agentleFS
eeshsaxenaeeshsaxena/agent-skills/skills/security-sweep/SKILL.md

security-sweep

Skill2 starsChanged 4 months agoMITView on GitHub

Catch the common, high-impact security mistakes before they ship. Use when reviewing code that handles input, auth, secrets, queries, or file paths.

6 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Secrets: No API keys, tokens, or passwords in source, logs, or error messages.

    line 16
  2. Distinctive:

    Dependencies and crypto: Do not roll your own crypto.

    line 31
  3. Distinctive:

    Do not bury a critical auth bypass under style nits.

    line 39

“Common” is measured: kept by at least 6 in 10 of the 5 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.

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

Security Sweep

Most breaches come from a short list of boring mistakes, not exotic exploits. Sweep for these every time code touches untrusted input or sensitive data.

The checklist

  1. Injection. Are queries parameterized? No string-built SQL, shell, or template. Never pass user input into eval, exec, child_process, or a raw query. Use prepared statements and safe APIs.
  2. Secrets. No API keys, tokens, or passwords in source, logs, or error messages. They belong in environment variables or a secrets manager. Grep the diff for likely secrets before committing.
  3. AuthZ, not just authN. Logging in is not enough. Every sensitive action must check that this user may act on this resource. Watch for IDs taken straight from the request and trusted without an ownership check.
  4. Input validation at the boundary. Validate type, length, range, and format on all external input. Allowlist over denylist. Treat everything from the client as hostile, including headers and cookies.
  5. Output encoding. Escape data for the context it lands in: HTML, attribute, URL, JS. This is what stops XSS. Prefer framework auto-escaping and never dangerouslySetInnerHTML with user data.
  6. Path and file handling. Reject .. and absolute paths in user-supplied filenames. Resolve and confirm the final path stays inside the intended directory before reading or writing.
  7. Dependencies and crypto. Do not roll your own crypto. Use vetted libraries and standard algorithms. Flag obviously outdated or unmaintained dependencies in the changed area.

How to report findings

For each issue: name the file and line, state the concrete attack ("a user could pass ../../etc/passwd here"), and give the minimal fix. Rank by real impact. Do not bury a critical auth bypass under style nits.

Scope

This is a fast sweep for common classes, not a full audit. If the change is security-critical (payments, auth core, crypto), say so and recommend a deeper review.

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.