Skip to content
SecHelixv3 alpha
GitHub
DocsContributeSupportWorkbenchGitHub
Back to overview
Host guide · GitHub Copilot

Give Copilot a security review contract instead of a prompt.

GitHub documents .github/skills, .claude/skills, and .agents/skills as repository skill directories. Copy the portable SecHelix bundle into one of them so Copilot reviews against an evidence contract rather than a paragraph of instructions.

Part of the AppSec agent guide.

GitHub documents three repository skill directories that Copilot reads: .github/skills, .claude/skills, and .agents/skills. A security skill for Copilot is therefore a directory you commit, not an extension you install. Copy the portable SecHelix bundle into one of them and the review contract travels with the repository, applies to every contributor, and is reviewable in a pull request like any other file.

The repository does not ship a pre-made .github/skills/ directory, so you create it. That path is documented by GitHub; a Copilot session loading SecHelix from it is not something we have observed and recorded, and this page does not claim otherwise.

Copilot path documentedBundle verifiedWorkflow benchmark not measured

Commit the contract into the repository

Place the bundle
git clone https://github.com/omarmohelal/SecHelix.git
mkdir -p .github/skills
cp -R SecHelix/skills/sechelix .github/skills/sechelix
git add .github/skills/sechelix && git commit -m "chore: add the SecHelix review contract"

Committing it is the point. A prompt in someone's editor settings reviews one person's work. A directory in the repository reviews everyone's, survives onboarding, and shows up in the diff when someone changes the rules.

DirectoryDocumented forNotes
.github/skills/sechelix/GitHub Copilot and VS Code agentsCreate it yourself. Nothing else in the repository competes for the path.
.agents/skills/sechelix/Copilot and Codex bothWhere the Agent Skills CLI installs. One placement covers two hosts.
.claude/skills/sechelix/Copilot and Claude Code bothUseful when the team is already on Claude Code and adding Copilot.

What a contract gives you that a prompt file does not

Both a prompt and a skill are text the model reads. The difference is that the skill brings a vocabulary with defined edges, and refuses to let a claim skip a state.

Applicability states
APPLICABLE, NOT_APPLICABLE, UNKNOWN, BLOCKED. Missing evidence is UNKNOWN and is never quietly rewritten as NOT_APPLICABLE.
Finding states
HYPOTHESIS, VERIFIED, LIKELY_BUT_UNPROVEN, FALSE_POSITIVE, DUPLICATE_ROOT_CAUSE, BLOCKED_BY_ENVIRONMENT.
Evidence chain
Seven links per finding: attacker control, reachability, boundary failure, safe reproduction, impact, preconditions, root cause. The schema requires all seven.
Refutation attempt
A required non-empty string. A finding cannot validate against the contract without a written attempt to disprove it.
Release decision
PASS, PASS_WITH_KNOWN_RISK, BLOCKED, INCOMPLETE. Missing evidence fails closed rather than passing quietly.

Differential review: what did this change do to the posture?

Re-reviewing a whole repository on every pull request is slow and returns the same findings each time. The narrower question is what the diff did. A deterministic classifier answers it without a model, and it ships in the repository.

Classify a diff
git diff main...HEAD | python scripts/diff_review.py -
python scripts/diff_review.py change.patch --json-output
gh pr diff 42 | python scripts/diff_review.py - --fail-on-new-risk

Eighteen rules map a changed line to a direction. The directions are deliberately conservative: removing a control is new risk, adding a control is reduced risk, and adding a new surface is new risk.

ChangeAddedRemoved
A new routeNEW_RISKRISK_REDUCED
An authorization guardRISK_REDUCEDNEW_RISK
A row-level security policyRISK_REDUCEDNEW_RISK
A response security headerRISK_REDUCEDNEW_RISK
An agent tool definitionNEW_RISKUNCHANGED
A dependencyUNKNOWNUNKNOWN
A payment state transitionNEW_RISKUNKNOWN
A webhook handlerNEW_RISKNEW_RISK

Then hand the same diff to the model with the review framing.

Pull-request prompt
Use SecHelix to security-review the current pull request/diff.
Map changed trust boundaries and dataflows, identify new or weakened controls, verify important
candidates, and state whether the PR introduces a verified blocker, known risk, or no
evidence-backed security regression.

Two steps in Actions, one of which fails closed

Workflow steps
- name: Classify the security delta
  run: git diff origin/main...HEAD | python scripts/diff_review.py - --fail-on-new-risk

- name: Gate the release on the canonical report
  run: python scripts/security_gate.py report.json --policy policies/default.json

Keep report generation and gating in separate steps. The gate reads a canonical report and returns an exit code: 0 for PASS and PASS_WITH_KNOWN_RISK, 1 for BLOCKED, and 2 for INCOMPLETE or malformed input. Treat both 1 and 2 as non-green, because a run that could not produce evidence is not a run that found nothing.

  • A forked pull request cannot hold the gateWorkflows on forks run without repository secrets. Classify the diff there and run the full gated job on a trusted trigger instead.
  • A green typecheck is not a green buildA recorded audit nearly accepted a fix that a stale prerender cache had reverted. The types compiled; the served application still had the defect. Assert against the built artifact.
  • A blanket denial passes as a fixA regression test that only proves the hostile input is rejected also passes when the feature is broken for everyone. Assert the legitimate path still works in the same test.

What is verified, and what is only documented

Copilot repository skills

DOCUMENTED

GitHub publishes the three skill directories. Loading SecHelix inside Copilot was not observed here, so it stays documented.

Portable bundle

VERIFIED

Self-contained with no parent-directory references. Copied out of the repository and exercised from inside the copy.

Deterministic scripts

VERIFIED

The diff classifier and the release gate are standard-library Python. They run identically in Actions and on a laptop.

  • No claim is made that SecHelix finds more issues than any other approach. That comparison has not been measured.
  • The value being claimed is narrower and checkable: the vocabulary is fixed, the evidence requirement is enforced by a schema, and the gate fails closed.
Install

Commit the review contract with the code it reviews.

npx skills@latest add omarmohelal/SecHelix --skill sechelix