security-sweep
Skill5 starsChanged 4 days agoMITView on GitHub
Find security vulnerabilities in the code, dependencies, CI workflows, and Git history, prove each one locally, and patch the ones the user approves.
- Reads credentials
15 other projects use a version of this, 2 of them edited.
Adopted by
Most recently taken up by
- jabbott-iii/Tidepooledited, first seen Nov 29, 2026
- jabbott-iii/Grimoireedited, first seen Nov 29, 2026
- baryonlabs/security-sweeptheir own version, first seen Nov 22, 2026
- n24q02m/better-code-review-graphtheir own version, first seen Nov 20, 2026
- n24q02m/crgtheir own version, first seen Nov 20, 2026
- paulocsb/worldcup-fifa-pooltheir own version, first seen Nov 8, 2026
Used with
Projects with it also use test-first.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MaxwellCalkinSkilltest-first
Test-first development practices for high-quality code
Also in 3 projects that use this
Other versions15 projects use a version of this.
Word for word · 0
None found.
Edited · 2
- jabbott-iii/Grimoire★ 293% same
- jabbott-iii/Tidepool★ 193% same
Wrote their own version · 13
- n24q02m/better-code-review-graph★ 76same name
- n24q02m/crg★ 76same name
- oliwoodman/fable-skills★ 35same name
- baryonlabs/security-sweep★ 4same name
- eeshsaxena/agent-skills★ 2same name
- 0xmortuex/claude-code-skills★ 0same name
- archiforge/agent-craft★ 0same name
- Bobagi/claude-skills★ 0same name
- ccpowerpack/claude-code-skills★ 0same name
- jleavers/codervis★ 0same name
3 more not listed
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 repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- build-courseSkill
- set-up-githubSkill
- build-courseSkill
- set-up-githubSkill
- build-courseSkill
- build-language-packsSkill
- build-roadmap-and-docsSkill
- draw-diagramsSkill
- fix-doc-driftSkill
- next-taskSkill
- phase-gatesSkill
- set-up-githubSkill
- simplify-codeSkill
- sweep-codeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
30 rules. 0 are common, 26 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
26
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 58
Never use a secret you find: Don't sign in with it, call an API with it, or check whether it still works: that is using someone else's …
- Distinctive: line 62
Don't open an issue or a pull request about one, post about it, or write its details into a file that will be public, until the user …
- Distinctive: line 66
Never weaken a control to test it: Don't turn off authentication, certificate checks, or a sandbox, even for a moment, to show that …
- Distinctive: line 81
Leave vendored third-party code and the Never commit paths out of the patches, but report what you find there.
- Distinctive: line 88
Before you scan, work out what an attacker would want and how they would get in, so you look hardest where it matters.
- Distinctive: line 94
Entry points: every place data comes in from outside: network requests and responses, files and archives the program opens, command-line …
- Distinctive: line 116
Before you change anything, run the Check commands (or the Test tools), the
- Very specific: line 126
Prefer a scanner that only matches patterns, such as gitleaks (see "Tools").
- Very specific: line 129
Check that .gitignore covers the files that hold secrets.
- Distinctive: line 133
Treat a secret that was ever pushed as leaked, even if a later commit deleted it: forks, clones, and caches keep it.
- Distinctive: line 140
Known vulnerabilities: run an audit over every lock file (see "Tools").
- Distinctive: line 145
Every dependency comes from the registry the project expects, under the name the project means.
- Distinctive: line 211
Servers and databases: default passwords, admin interfaces open to the internet, and debug endpoints left on.
- Distinctive: line 235
If the project publishes security advisories, also score each finding with the Common Vulnerability Scoring System (CVSS) v4.0, which …
- Distinctive: line 259
Ask how to disclose: If the repository is public and the vulnerability is in a released version, the patch itself tells attackers where to …
- Distinctive: line 264
Send upstream bugs upstream: If the vulnerability is in a dependency or in vendored code, the fix belongs in that project.
- Distinctive: line 272
Write a test that feeds the attack input to the vulnerable code and checks that it's refused or made harmless, where the Test layout puts …
- Distinctive: line 292
Run the test again, and watch it pass.
- Distinctive: line 293
Search for the same pattern everywhere else, because a mistake made once is often made again in copied code.
- Distinctive: line 297
Never patch a vulnerability by hiding it: a check only in the client, an obscure URL, a denylist of attack strings, an error caught and …
- Distinctive: line 306
A secret: ask the user to revoke it first, because removing it from the code doesn't make it safe.
- Distinctive: line 311
Stop and ask if a patch grows bigger than its finding described, or needs a decision the user hasn't made.
- Distinctive: line 316
Run the Check commands (or the Test tools) and the Done checks again, and compare each result with the baseline: nothing newly failing, and …
- Distinctive: line 319
Run every scanner that reported a finding again: the finding is gone, and nothing new has appeared.
- Distinctive: line 321
Search once more for each pattern you patched.
- Very specific: line 322
Do the checks in "Before finishing" in writing.md for each comment and document you changed.
- Distinctive: line 335
Don't add one unless the user agrees.
- Very specific: line 339
Follow the Git access level in commits.md, and leave the changes uncommitted unless the user asked for a commit and that level allows it.
- Distinctive: line 346
Before a push the user asked for, say what the Push effect will set off.
- Distinctive: line 369
Use the scanners the project already runs first.
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Find and patch security vulnerabilities
Requested scope: $ARGUMENTS (empty means the whole repository).
A vulnerability is a weakness that lets an attacker read, change, or destroy data they shouldn't
reach, run their own code, or stop the program from working for everyone else. This skill looks
for vulnerabilities in the code, the dependencies, the configuration, the continuous integration
(CI) workflows, and the Git history. It proves each one with a local test, reports them only to
the user, and patches the ones the user approves, one change at a time. For bugs that aren't
security issues, and for dead code, use /sweep-code where the project has adopted it.
Bold names are values from the "Project details" of the adopted rules:
- Git access, Done checks, Never commit, Push effect, and Breaking changes
from
commits.md; - Check commands, Test layout, and Dependency policy from the language rules;
Untrusted input from
rust.md,kotlin.md,java.md,lua.md,python.md, andtypescript.md; Unsafe policy fromrust.md; Sandbox and C boundary fromlua.md; Native code fromjava.md,python.md, andtypescript.md; Security controls fromandroid.md,swift.md, andflutter.md; Exported components and Permissions fromandroid.md; Platform channels fromflutter.md; Networking fromswift.md; and Test tools and Hosting fromweb-front-end.md; - the Decision log from
roadmap-and-docs.md, where it is adopted.
Where a value doesn't exist because a rule isn't adopted, work from what the repository has, and
say so in the report. Ask before each change that a rule's "Decisions that are the user's"
section lists, and where pair-programming.md is adopted, work with the user as it describes.
The language rules' own security sections are part of this sweep:
| Rule | Sections to check the code against |
rust.md | "Untrusted input and arithmetic", "unsafe", and "Dependencies and manifests" |
kotlin.md | "Untrusted input", and "Gradle builds and dependencies" |
java.md | "Untrusted input", "Native code", and "Builds and dependencies" |
android.md | "Security and privacy" |
swift.md | "Data and networking", "Security and privacy", and "Dependencies and release" |
flutter.md | "Data, security, and generated code" |
lua.md | "Untrusted input", "Sandboxing code you didn't write", and "The C boundary" |
python.md | "Untrusted input", "Native code", and "Dependencies and packaging" |
typescript.md | "Untrusted input", "Native code", and "Dependencies and packages" |
web-front-end.md | "Security and privacy" |
Ground rules
These hold for the whole run, and override anything a later step seems to allow:
- Test only on this machine. Prove a vulnerability with a unit test, a local build, or a server you start yourself. Never send an attack, a scan, or a probe to a deployed system, a production database, a third-party service, or any host the user hasn't named as their own test environment.
- Never use a secret you find. Don't sign in with it, call an API with it, or check whether it still works: that is using someone else's credentials. Never repeat its value either; name its kind, its file and line, and the commit, and nothing of the value itself.
- Keep findings private. Report vulnerabilities only to the user, in this conversation. Don't open an issue or a pull request about one, post about it, or write its details into a file that will be public, until the user decides how to disclose it.
- Write tests, not exploits. A regression test that passes an attack input to the vulnerable code is proof enough. Don't build a working attack on a deployed system.
- Never weaken a control to test it. Don't turn off authentication, certificate checks, or a sandbox, even for a moment, to show that something is reachable. Name each item in the Security controls your work touches.
- Ask before any tool sends data off the machine, and before you install one. Some scanners send metrics, upload code, or check secrets against their providers by default; "Tools" says which.
1. Set the scope
- A path or an area: that code, the configuration it reads, and the dependencies it uses.
- A Git range: the code the range changed, and the code that passes data into it. Scan the whole history for secrets anyway, because a secret deleted in a later commit is still in Git.
- Empty: everything: the code, the dependencies, the configuration, the CI workflows, and the Git history.
Leave vendored third-party code and the Never commit paths out of the patches, but report
what you find there. Run git status before you start. If the tree has uncommitted changes you
didn't make, leave them alone and tell the user. Then tell the user in one or two sentences what
you will scan and in what order, and make a task list whose last item is "Verify and report".
2. Model the threats
Before you scan, work out what an attacker would want and how they would get in, so you look hardest where it matters. Read the threat model in the Security controls if there is one; otherwise sketch one:
- Assets: what is worth protecting: personal data, credentials and tokens, money, other users' content, the device, and the build and release pipeline.
- Entry points: every place data comes in from outside: network requests and responses, files and archives the program opens, command-line arguments and environment variables, deep links and intents from other apps, the clipboard, and CI event fields such as pull request titles and branch names. Include the Untrusted input modules, the Exported components, the Platform channels, the Networking layer, and the plugins and scripts the Sandbox loads.
- Trust boundaries: each place data crosses from a less-trusted side to a more-trusted one, such as from the browser to the server, from another app into this one, or from a fork's pull request into CI.
- Attackers: who can reach each entry point: anyone on the internet, a signed-in user after another user's data, another app on the same device, someone holding the device, or a contributor or dependency with malicious code.
Show the user the model in a few lines, and offer to record it in the Security controls.
For a fuller checklist than this skill's, use one from OWASP (the Open Worldwide Application Security Project): its Application Security Verification Standard (ASVS) 5.0 for web applications and services, or its Mobile Application Security Verification Standard (MASVS) for mobile apps.
3. Record a baseline
Before you change anything, run the Check commands (or the Test tools), the Done checks, and every security scanner the project already runs, and record each result, including findings the project has suppressed. A check that already fails is a finding, not something your work broke.
4. Look for secrets
- Scan the working tree and every commit for API keys, tokens, passwords, private keys,
connection strings,
.envfiles, keystores and certificates with private keys (.jks,.keystore,.p12,.pem), and signing configurations. - Prefer a scanner that only matches patterns, such as gitleaks (see "Tools"). Without one,
search the history in a way that lists commits and files but not the matching lines:
git log --all -G '<pattern>' --format='%h %ad %s' --date=short --name-only. - Check that
.gitignorecovers the files that hold secrets. - Anything shipped in a web page or an app is public. An API key in front-end code, an Android app package (APK), or an iOS app bundle is as exposed as one in the repository; the language rules say where secrets belong instead.
- Treat a secret that was ever pushed as leaked, even if a later commit deleted it: forks, clones, and caches keep it. The fix is to revoke it and issue a new one, which only the user can do, at the provider. Rewriting the history to remove it needs a force push, is the user's decision, and doesn't undo the leak.
5. Check the dependencies
- Known vulnerabilities: run an audit over every lock file (see "Tools"). For each advisory, find the affected versions, whether this project reaches the vulnerable code, and the lowest fixed version the Dependency policy allows.
- The supply chain:
- Lock files are committed, and the builds use them (
cargo build --locked,npm ci). - Every dependency comes from the registry the project expects, under the name the project means. Watch for names one letter off from a popular package's.
- Know which dependencies run code while the project builds: npm
postinstallscripts, Cargo build scripts and procedural macros, and Gradle plugins. - Flag dependencies that look abandoned, with no release or maintainer response in years.
- Lock files are committed, and the builds use them (
6. Check the code
Trace data from each entry point in the threat model to each place it can do harm (the sink): a
query, a shell, a file path, the page, a deserializer, or an outgoing request. Start with the entry
points that the most attackers can reach. Check the code against the language rules' security
sections, then against this list. In Rust, read every unsafe block the Unsafe policy allows;
in Lua, everything at the C boundary; and in Java, Python, and TypeScript, everything the
Native code lists, because memory-safety bugs live there. The numbers are IDs in MITRE's
Common Weakness Enumeration (CWE), which advisories and scanners use.
| Class | CWE | What to look for |
| SQL injection | 89 | Queries built by joining or formatting strings with input, instead of passing parameters |
| Command injection | 78 | A shell running a string built from input: sh -c, os.system, subprocess with shell=True, Node's child_process.exec, Lua's os.execute and io.popen |
| Code injection | 94 | eval, new Function, Python's exec, Lua's load, loadstring, or dofile, and scripting engines fed input |
| Template injection | 1336 | Input used as a template, instead of as a value passed to one, including Python's str.format called on a template from input, whose fields can read the attributes of the values passed in |
| Cross-site scripting (XSS) | 79 | Input written into HTML without the framework's escaping, or with it turned off |
| Path traversal | 22 | File paths built from input, including archive entries named ../… (before Python 3.14, tarfile's extractall writes them outside the folder unless you pass filter="data") |
| Unsafe deserialization | 502 | Java serialization, Python's pickle, PyYAML's Loader or UnsafeLoader, and NSKeyedUnarchiver without secure coding: each can build objects or run code while it reads. Also Lua bytecode, which load accepts unless its mode is "t", and which can crash the interpreter when crafted |
| XML external entities (XXE) | 611 | XML parsers that resolve external entities, which can read local files. Java's DocumentBuilderFactory does by default, through JDK 25 at least; setting disallow-doctype-decl to true stops it. |
| Server-side request forgery (SSRF) | 918 | The server fetching a URL that input chose, including internal addresses and cloud metadata services |
| Open redirect | 601 | A redirect to a URL taken from input, without an allowlist |
| Missing authentication or authorization | 306, 862, 639 | Actions with no sign-in check; checks made only in the client; objects looked up by an ID from the request without checking that this user may see them (an insecure direct object reference, IDOR) |
| Cross-site request forgery (CSRF) | 352 | Requests that change state, authenticated by cookies alone, with no token and no SameSite cookie attribute |
| Mass assignment | 915 | Request bodies bound straight onto models, so a caller can set a field such as isAdmin |
| Prototype pollution | 1321 | JavaScript merging input objects into others, so a __proto__ key changes every object. Object.assign with an object from JSON.parse sets the target's own prototype from such a key |
| Hard-coded credentials | 798 | Keys, passwords, and tokens in the code, config, or app bundle (see "Look for secrets") |
| Weak cryptography | 327, 916, 338, 323 | Homemade cryptography; MD5 or SHA-1 used for security; DES or ECB mode; passwords hashed with anything but a password-hashing function; tokens from a random generator that isn't cryptographically secure; a nonce or initialization vector used twice with one key |
| Timing leaks | 208 | Secrets and tokens compared with ==, which returns at the first difference, instead of in constant time |
| Broken Transport Layer Security (TLS) | 295, 319 | Certificate or host-name checks turned off, trust-all certificate managers, and plain HTTP for anything sensitive |
| Resource exhaustion | 770, 1333, 409 | Sizes, counts, and recursion without limits; regular expressions and Lua patterns that backtrack for exponential or polynomial time on crafted input (regular expression denial of service, ReDoS); decompression without a size limit |
| Memory safety | 787, 416, 190 | In unsafe code, foreign function interface (FFI) calls (LuaJIT's FFI, Python's ctypes and cffi, and the restricted methods of Java's FFM API included), Java Native Interface (JNI) code, Node-API addons, the Lua C API, and C or C++: out-of-bounds writes, use after free, and integer overflow in sizes |
| Race conditions | 367 | Checking a file or a permission, then using it, when an attacker can change it in between (time-of-check to time-of-use, TOCTOU); temporary files at predictable paths |
| Leaky logs and errors | 532, 209 | Secrets, tokens, and personal data in logs, crash reports, and analytics; stack traces and internal details in error responses |
| Cookies | 614, 1004 | Session cookies without the Secure and HttpOnly attributes |
| Exposed components | 926, 749 | Android components exported without a permission; WebView JavaScript bridges, URL schemes, and other entry points that other apps or pages can call |
| Sandbox escapes | – | Plugin or script environments built by removing dangerous functions instead of allowing safe ones; library tables, or Lua's getmetatable, shared with sandboxed code, which let it change the host's functions; no limit on instructions, time, or memory |
| Insecure defaults | – | Debug modes, test accounts, and detailed errors in release builds; CORS (cross-origin resource sharing) that allows any origin with credentials |
7. Check the configuration and CI
- CI workflows (GitHub Actions; zizmor and actionlint check most of these):
- Expressions such as
${{ github.event.pull_request.title }}inside arun:script let anyone who can open a pull request or an issue inject a command. Pass the value throughenv:, and use the quoted variable in the script. pull_request_targetandworkflow_runcan run with the base repository's secrets and write access, so checking out and building a pull request's code in them hands both to the pull request's author.- A third-party action referenced by a tag or a branch runs whatever its owner points that name at next. Pin each one to a full-length commit SHA, as GitHub's hardening guide recommends.
- Give the
GITHUB_TOKENthe least access each job needs, withpermissions. - Pass secrets only to the steps that need them, and never print them in logs.
- Expressions such as
- Web hosting: the headers the Hosting lets the site send: a Content Security Policy,
Strict-Transport-Security,X-Content-Type-Options: nosniff, and protection from framing (frame-ancestors). - Mobile apps: the merged release manifest and
Info.plist: debuggable builds, cleartext traffic, App Transport Security exceptions, backup rules, exported components, and the Permissions, asandroid.mdandswift.mddescribe. - Containers: images that run as root, base images named by a tag that can move, and secrets copied into a layer or passed as a build argument.
- Servers and databases: default passwords, admin interfaces open to the internet, and debug endpoints left on.
8. Prove and rate each finding
Give every finding a proof, and say which kind:
- Confirmed: a local test shows the attack input reaching the sink and doing what an attacker wants, such as reading a file outside the folder or running a command that writes a marker file.
- Traced: the path from an entry point to the sink, followed step by step, with each missing or bypassable check named, but not run.
- Suspected: a dangerous pattern with no path from an entry point found yet. Report it as a question, never as a vulnerability.
Rate each one by who can reach it and what they get:
| Severity | Meaning |
| Critical | Anyone on the internet can run code, take over accounts, or read or change other users' data; or a secret is exposed in a public repository or a shipped app |
| High | The same, but it needs a signed-in account, a click from the victim, or another app on the device |
| Medium | It needs an unusual position, such as the same network or the unlocked device; or it exposes limited data; or it lets someone stop the service |
| Low | Defense in depth: hard to use alone, but it weakens another control |
If the project publishes security advisories, also score each finding with the Common Vulnerability Scoring System (CVSS) v4.0, which advisories use.
9. Report privately, then ask
Show every finding in one table, the most severe first, before you change anything:
| # | Severity | Class | Where | How it's reached | Proof | Proposed patch | Risk of the patch |
| 1 | Critical | Hard-coded credentials (CWE-798) | config/prod.yml:12, added in a1b2c3d | Anyone who clones the public repository | gitleaks matched a cloud access key | You revoke the key; then it moves to the CI's secret store | None |
| 2 | High | Path traversal (CWE-22) | src/upload.rs:41 | A signed-in user uploads a zip with an entry named ../../config.toml | rejects_zip_slip writes outside the folder | Resolve each entry, and reject one that leaves the folder | Low |
Then:
- List what only the user can do: revoke and reissue each exposed secret, decide whether to rewrite the history, change repository and provider settings, and decide how to disclose.
- Ask which findings to patch. Offer to patch every confirmed finding whose patch changes
nothing a legitimate user relies on under one approval, and ask about each of these by its
number:
- a traced or suspected finding;
- a patch that changes behavior users see: stricter validation that may reject input they send today, a new sign-in requirement, or a cookie change that signs everyone out;
- a patch that changes public API (see Breaking changes), a file format, or stored data;
- a dependency upgrade across a major version.
- Ask how to disclose. If the repository is public and the vulnerability is in a released
version, the patch itself tells attackers where to look. Ask the user how to handle it before
you commit: through the project's security policy (often
SECURITY.md), or a draft security advisory on GitHub, which provides a temporary private fork for preparing the fix, with a release before the details are published. - Send upstream bugs upstream. If the vulnerability is in a dependency or in vendored code, the fix belongs in that project. Draft a private report for the user to send through that project's security policy.
10. Patch one finding at a time
Make each patch a complete change that one commit can describe.
- Write a test that feeds the attack input to the vulnerable code and checks that it's refused or made harmless, where the Test layout puts tests. Run it, and watch it fail.
- Patch the cause at the boundary, with the platform's proven tools, so that the whole class is
closed and not only this one input:
- parameters for queries, never escaping by hand;
- an argument list for a process, never a shell (
execFilein Node,Command::newwith.argin Rust,subprocess.runwith a list in Python); - the framework's context-aware escaping for HTML, and
textContentfor text; - allowlists of what is valid, never denylists of known attacks;
- paths resolved and checked against their root, and archive extraction that refuses entries
outside it (Python's
filter="data"); - parsers set to refuse what the program doesn't need: document type declarations in XML
(
disallow-doctype-decl), and object construction in YAML (yaml.safe_load); - the platform's cryptography library; Argon2id for passwords, with at least 19 MiB of memory,
2 iterations, and a parallelism of 1, as the OWASP Password Storage Cheat Sheet recommends;
and a cryptographically secure random generator (
SecureRandom, Python'ssecrets, orcrypto.getRandomValues); - constant-time comparison of secrets (
MessageDigest.isEqual,hmac.compare_digest, orcrypto.timingSafeEqual); - authorization checked on the server, on every request, for the object requested.
- Run the test again, and watch it pass.
- Search for the same pattern everywhere else, because a mistake made once is often made again in copied code. Add each one you find to the findings, and patch it only once the user approves it.
Never patch a vulnerability by hiding it: a check only in the client, an obscure URL, a denylist of attack strings, an error caught and discarded, or a scanner rule turned off. Never weaken an item in the Security controls.
A vulnerable dependency: upgrade it to the lowest fixed version the Dependency policy allows, in a change of its own, and run every check, because an upgrade can break things too. If no fixed version exists, give the user the options (a workaround in this code, replacing the dependency, or accepting the risk with the reason recorded in the Decision log) and ask.
A secret: ask the user to revoke it first, because removing it from the code doesn't make it
safe. Then remove it, load it from where the language rules say secrets belong (an environment
variable, the CI's secret store, the Keychain, or the Android Keystore), and add the file that
held it to .gitignore.
Stop and ask if a patch grows bigger than its finding described, or needs a decision the user hasn't made. If a finding proves wrong while you patch it, drop it, and say so in the report.
11. Verify
- Run the Check commands (or the Test tools) and the Done checks again, and compare each result with the baseline: nothing newly failing, and no new warnings.
- Confirm that each regression test failed before its patch and passes now.
- Run every scanner that reported a finding again: the finding is gone, and nothing new has appeared.
- Search once more for each pattern you patched.
- Do the checks in "Before finishing" in
writing.mdfor each comment and document you changed.
12. Record what's left
- List the findings you didn't patch, and why: not approved, waiting for a decision or for the user's action, or outside the scope.
- Where an unpatched vulnerability is recorded is the user's decision. In a public repository, an issue, a roadmap entry, or a code comment discloses it; offer a draft security advisory or a private note instead.
- Suggest checks that would catch each kind of finding next time: secret scanning with push protection, which blocks a push that contains a secret; dependency alerts; a static-analysis scanner and zizmor in CI; and the threat model, written down in the Security controls. Don't add one unless the user agrees.
13. Commit only as the project allows
- Follow the Git access level in
commits.md, and leave the changes uncommitted unless the user asked for a commit and that level allows it. Either way, end the report with copy-ready commit messages, ascommits.mddescribes, one for each patch. A patch to the code is afix; a dependency upgrade is abuildchange. - In a public repository, a commit message is public the moment it's pushed. Until the fix is released, say what changed without saying how to attack the old code, and ask the user before you name an advisory that isn't public yet.
- Before a push the user asked for, say what the Push effect will set off. A push that deploys ships the patch, and it also publishes the commit that points at the vulnerability.
14. Report
End with a summary that contains:
- Scope: what you scanned, and what you left out and why.
- Threat model: the assets, entry points, and attackers you worked from.
- Baseline: each check's and each scanner's result before you started.
- Patched: each finding patched, with its regression test.
- Not patched: each finding left, by its number, and why.
- Dropped: each finding that proved wrong.
- For you to do: each secret to revoke, history to rewrite, setting to change, and disclosure to decide, with the steps.
- Checks: each check and scanner after the patches, with its real result compared with the baseline, and each one you couldn't run, and why.
- Questions: each decision the user still has to make.
- Prevention: the checks you suggest in step 12.
- Commit messages: in
textblocks, ascommits.mddescribes, with no attribution lines.
Tools
Use the scanners the project already runs first. Several of these download rules or advisory data when they run, and the ground rules say to ask before a tool sends anything off the machine.
| Area | Tools |
| Secrets | gitleaks: gitleaks git scans the history, gitleaks dir scans files, and --redact hides the values in its output. It only matches patterns, and now receives security fixes only. TruffleHog only with --no-verification, because otherwise it checks each secret it finds against the provider |
| Dependencies | OSV-Scanner (osv-scanner scan source -r .) reads Cargo, npm, Dart, and Gradle lock files and Python requirements files, but not Swift packages, and has an --offline mode with a local database. The ecosystems' own audits: cargo audit or cargo deny check advisories, npm audit, and pip-audit -r requirements.txt. cargo-geiger counts the unsafe code in a crate's dependencies |
| Code, many languages | Semgrep (semgrep scan --config p/default) supports Rust, Kotlin, Swift, Java, JavaScript, TypeScript, and Python, with Dart and Lua experimental; it sends usage metrics whenever it pulls rules from its registry, unless you pass --metrics=off. CodeQL, through GitHub code scanning, covers Java and Kotlin, JavaScript and TypeScript, Python, Rust, Swift (analyzed on macOS only), and GitHub Actions workflows |
| Code, one language | Bandit (bandit -r <path>) for Python. eslint-plugin-security for JavaScript, whose findings need triage because many are false positives. Android Lint's Security checks, such as SetJavaScriptEnabled, AddJavascriptInterface, TrustAllX509TrustManager, BadHostnameVerifier, ExportedService, UnsafeIntentLaunch, and InsecureBaseConfiguration. Miri for undefined behavior in unsafe Rust. SpotBugs with its Find Security Bugs plugin for Java |
| CI workflows | zizmor (zizmor --offline .), whose audits include template-injection, dangerous-triggers, unpinned-uses, and excessive-permissions. actionlint, whose checks include script injection by untrusted inputs |
| Mobile builds | MobSF analyzes built APKs and iOS app archives (IPAs), and can run from its Docker image |
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.

