agentleFS
Kuan-AI-comKuan-AI-com/agent-skills/skills/security-check/SKILL.md

security-check

Skill0 starsChanged 6 days agoMITView on GitHub

Review a codebase, pull request or diff for exploitable security problems. Use when the user asks for a security review or audit, "is this safe", "check for vulnerabilities", "any secrets leaked?", or before deploying or open-sourcing a project.

  • Reads credentials

32 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use learn.

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.
  • genomewalkerSkill

    learn

    Learn from web sources, generate SKILL.md, and store key patterns in soul memory. Trigger keywords: learn, skill-gen, web-learn, documentation, tutorial.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 1 is distinctive, and 4 are very specific to this project.

  • 0

    Common

    Most of the 24 edited versions we read keep these.

  • 1

    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
  1. Very specific:

    Search working tree: git grep -nIE '(api[_-]?key|secret|token|passwd|password|BEGIN [A-Z ]*PRIVATE KEY)' and known prefixes (sk_live_, …

    line 13
  2. Very specific:

    Check .gitignore covers .env*, keys, dumps.

    line 15
  3. Very specific:

    Every endpoint that reads or changes data: who may call it?

    line 28
  4. Very specific:

    Run the ecosystem audit if available (npm audit --omit=dev, pip-audit, cargo audit, govulncheck).

    line 33
  5. Distinctive:

    Do not modify code unless asked.

    line 44

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

1. Scope first

  • A diff/PR: review only changed code plus whatever it calls or exposes. A whole repo: start from entry points (routes, handlers, CLI, queue consumers, webhooks).
  • Note the stack, the framework's built-in protections (ORM parameterization, template auto-escaping, CSRF middleware) and where auth is enforced. Many "findings" are already handled by the framework: check before reporting.

2. Secrets

  • Search working tree: git grep -nIE '(api[_-]?key|secret|token|passwd|password|BEGIN [A-Z ]*PRIVATE KEY)' and known prefixes (sk_live_, AKIA, ghp_, xox).
  • History: git log -p -S '<suspect string>' or git log --all --diff-filter=D --name-only for deleted .env files. Use gitleaks/trufflehog only if installed.
  • Check .gitignore covers .env*, keys, dumps.
  • Never print a full secret. Show the first 4 characters and the location. A secret that ever reached git history must be rotated, not just deleted: say so.

3. Trace input to sinks

For each entry point, follow untrusted input (body, query, headers, cookies, filenames, webhook payloads, LLM output) to:

  • SQL/NoSQL built by string concatenation; shell commands (exec, system, subprocess(shell=True)); eval/dynamic imports
  • file paths (path traversal, ../), uploads (type, size, storage location, served back as HTML?)
  • outbound URLs fetched by the server (SSRF to 169.254.169.254, localhost)
  • HTML/markdown rendered without escaping (XSS), redirects to user-given URLs
  • deserialization of untrusted data (pickle, YAML load, Java serialization) Report only when you can name the path from source to sink. If you cannot confirm it, list it as "to verify", not as a finding.

4. Authorization

  • Every endpoint that reads or changes data: who may call it? Look for IDs from the request used without an ownership check (IDOR), admin routes guarded only in the UI, mass assignment (role, isAdmin accepted from the body).
  • Webhooks: signature verified? Password reset and login: rate limited, tokens single-use and expiring?

5. Config and dependencies

  • Debug mode or verbose errors in production, CORS * with credentials, cookies missing HttpOnly/Secure/SameSite, missing security headers on HTML apps.
  • Run the ecosystem audit if available (npm audit --omit=dev, pip-audit, cargo audit, govulncheck). Report only vulnerable packages that are reachable in production; ignore dev-only and unreachable advisories.
  • Logs that write tokens, passwords or personal data.

6. Report

Rank by severity: Critical (remote, no auth, data or account takeover), High, Medium, Low. For each:

  • file:line, one-sentence issue
  • how an attacker uses it (concrete request or input)
  • the fix (code-level, minimal)

Then: To verify (suspicions without a confirmed path) and Not checked (areas out of scope or not readable). No theoretical padding: if you found nothing critical, say so plainly.

Do not modify code unless asked. Do not run exploits against live or third-party systems.

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.