security-diff-scan
Skill2 starsChanged 47 days agoMITView on GitHub
Performs change-scoped defensive discovery on a diff or PR for the Defense Factory Discovery phase. Use on pull requests or local uncommitted changes instead of a full-fleet scan.
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 32
Run targeted defensive tools on changed packages/files only when available.
- Very specific: line 37
Write .defense-factory/findings/candidates/_diff-scan-<pr-or-sha>.md summarizing scope and residual risk (unreviewed areas).
- Distinctive: line 50
Do not mark findings validated.
- Distinctive: line 51
If the diff touches systems outside authorization, stop and ask for scope clarification.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
security-diff-scan
Phase: Discovery
Style: Blue (defensive)
When to use
- User points at a PR, branch diff, or local changes
- Faster path than
security-scanfor incremental review
Preconditions
- Authorization for the repository under review.
- SECURITY.md present.
- Ability to obtain the diff (
git diff,gh pr diff, etc.).
Procedure
- Determine base and head (e.g.
main...HEAD). - List changed paths; map to inventory
asset_ids when possible. - Review the diff for:
- AuthZ/AuthN bypass patterns
- Injection sinks with new untrusted input
- New secrets or credentials
- Dangerous default configs
- Dependency upgrades with known issues
- Run targeted defensive tools on changed packages/files only when available.
- Emit candidate findings to
.defense-factory/findings/candidates/with:source_skill:security-diff-scanlocation.pathset to changed files- Tag
diff-scanand optionalpr_url
- Write
.defense-factory/findings/candidates/_diff-scan-<pr-or-sha>.mdsummarizing scope and residual risk (unreviewed areas). - Validate JSON with
scripts/validate_artifacts.py.
Required outputs
| Path | Notes |
.defense-factory/findings/candidates/*.json | Candidates only |
.defense-factory/findings/candidates/_diff-scan-*.md | Scope report |
Stop / refuse
- Same authorization rules as
security-scan. - Do not mark findings validated.
- If the diff touches systems outside authorization, stop and ask for scope clarification.
Next phase
triage-validate-finding for candidates that need dynamic proof; then dedupe-findings.
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- openai/codex-security★ 11ksame name
- openai/plugins★ 7.4ksame name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- build-inventorySkill
- dedupe-findingsSkill
- define-security-policySkill
- fix-findingSkill
- route-ownershipSkill
- security-scanSkill
- threat-modelSkill
- triage-validate-findingSkill
- verify-fixSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

