agentleFS
HayatelinHayatelin/devsecops-skills/skills/secscan/SKILL.md

secscan

Skill0 starsChanged 5 months agoMITView on GitHub

Run a fast secrets and dangerous-code pre-flight scan before committing or pushing code. Trigger when the user says "scan before commit", "check for secrets", "is this safe to push", or whenever you are about to stage, commit, or open a PR with new code.

  • Installs packages
  • Commits and pushes

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. atgreen/secscan-skill★ 51same 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 repository8 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    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
  1. Distinctive:

    After generating or editing code that touches auth, config, env vars, DB queries, subprocess calls, or crypto.

    line 13
  2. Distinctive:

    When the user pastes a file and asks "anything dangerous in here?"

    line 14
  3. Very specific:

    Make sure the companion secscan tool is available.

    line 18
  4. Very specific:

    If pip is unavailable or you want zero-install, fetch the single file and run it: curl -sSL …

    line 20
  5. Distinctive:

    Read every finding. Do not auto-suppress.

    line 24
  6. Very specific:

    Secrets: remove from source, move to env vars or a secrets manager, and ROTATE the exposed value — if it was ever committed, treat it as …

    line 39
  7. Distinctive:

    SQL injection: use parameterized queries / prepared statements or the ORM's safe query builder.

    line 42
  8. Very specific:

    Weak crypto: use SHA-256+/bcrypt/argon2 for hashing, AES-GCM for encryption, secrets.token_urlsafe() for tokens, and never disable …

    line 43

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

When to use

  • Right before a git commit, git push, or opening a pull request.
  • After generating or editing code that touches auth, config, env vars, DB queries, subprocess calls, or crypto.
  • When the user pastes a file and asks "anything dangerous in here?"

Process

  1. Make sure the companion secscan tool is available. Prefer pip: pip install secscan-skill then run secscan . --min-severity high.
  2. If pip is unavailable or you want zero-install, fetch the single file and run it: curl -sSL https://raw.githubusercontent.com/Hayatelin/secscan-skill/main/secscan.py -o secscan.py && python secscan.py . --min-severity high
  3. Scan only what is about to ship when possible: pass changed paths, or run on the staged set (git diff --cached --name-only) so you flag what this commit actually introduces.
  4. Read every finding. Do not auto-suppress. Classify each as a real issue or a confirmed false positive.
  5. Fix real issues (see "How to fix"), re-run the scan, and confirm it comes back clean before committing.

What to check

The scanner surfaces these categories — verify each one it reports:

  • Hardcoded secrets — API keys, tokens, AWS keys, private keys, passwords, connection strings with credentials, high-entropy strings.
  • eval / exec / dynamic code — and JS Function(), setTimeout("string"), child_process on untrusted input.
  • shell=True / shell injection — subprocess(..., shell=True), os.system, backticks, unsanitized command strings.
  • SQL injection — string-formatted/concatenated queries instead of parameterized statements.
  • Weak crypto — MD5/SHA1 for security, DES/RC4, hardcoded IVs, random (not secrets) for tokens, disabled TLS verification.

How to fix

  • Secrets: remove from source, move to env vars or a secrets manager, and ROTATE the exposed value — if it was ever committed, treat it as compromised (see the secret-rotation skill).
  • eval/exec: replace with a safe parser, an allow-list dispatch table, or ast.literal_eval for data.
  • shell=True: pass an argument list (["cmd", arg]) with shell=False; never interpolate user input into a command string.
  • SQL injection: use parameterized queries / prepared statements or the ORM's safe query builder.
  • Weak crypto: use SHA-256+/bcrypt/argon2 for hashing, AES-GCM for encryption, secrets.token_urlsafe() for tokens, and never disable certificate verification.

Report back

Summarize as: total findings by severity, the concrete issues that remain, what you fixed, and a final "clean / not clean" verdict. If anything is a deliberate false positive, say which line and why. Never report "safe to commit" until a re-scan at --min-severity high is clean.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.