agentleFS
sametcelikbicaksametcelikbicak/opencode-team/skills/team-security-review/SKILL.md

team-security-review

Skill69 starsChanged 19 days agoMITView on GitHub

Security review methodology. Authentication, authorization, input validation, secret management, dependency scanning and finding reporting. The playbook of the security role.

  • Reads credentials

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

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

    Do two checks for every endpoint:

    line 23
  2. Distinctive:

    Resource-based: do they own this resource?

    line 25
  3. Distinctive:

    Do error messages leak internal details (stack trace, SQL)?

    line 49
  4. Distinctive:

    Run these and put the output in the report:

    line 63
  5. Distinctive:

    Do not make up a CVSS score.

    line 103

≈ “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

Security Review

Core principle

Read the code, do not guess. A security finding is only a finding if you have read the actual code path. A "this might happen" hypothesis is not a finding — mark it as "suspicious".

1. Authentication

  • Password: strong hash (argon2id/bcrypt), never SHA/MD5, never plaintext
  • Session: cookie with httpOnly + secure + sameSite, idle and absolute timeout
  • Token: short lifetime, refresh rotation, revocable in case of leakage
  • Account lockout: attempt count + time-based throttling
  • Password reset: single-use and time-limited token
  • MFA: for administrator/critical operations

2. Authorization

Do two checks for every endpoint:

  1. Functional: does this person have permission to perform this action?
  2. Resource-based: do they own this resource? (IDOR)

Patterns to check:

  • An endpoint without authentication (not on the allowlist)
  • The id parameter used directly (not compared against the user's own record)
  • An "edit" endpoint exists but the "delete" endpoint has no permission check
  • Administrator endpoints are only hidden in the interface, not checked on the server
  • Bulk operation endpoints (could mix the user's data with someone else's)

3. Input validation

AttackProtection
SQL/NoSQL injectionParameterized queries, ORM, schema validation
XSSOutput escaping, dangerouslySetInnerHTML forbidden, CSP
SSRFAllowlist of permitted hosts, private IP range blocking
Path traversalPath normalization, blocking escapes from the root directory
Mass assignmentAllowlist of permitted fields
DeserializationUntrusted data is never deserialized
ReDoSNo dangerous regex, input length limited

Checklist:

  • Does every user input pass through a class (type + format + length + range)?
  • Is input validation applied in the application layer, or only on the client? (client validation is not security)
  • Do error messages leak internal details (stack trace, SQL)?

4. Secret management

  • Are secrets embedded in the code? (Has .env entered the repo, is it in git log?)
  • Are there secrets in the logs? (token, password, full card number)
  • Is the secret in production or in development?
  • Is the error shown to the user separate from the error that is logged?
  • Is .gitignore correct? Is .env tracked?

In the finding report, do not write the value of the secret — the file path and the type are enough.

5. Dependencies

Run these and put the output in the report:

npm audit        # Node
pip-audit        # Python
cargo audit      # Rust
govulncheck      # Go

List the critical/high vulnerabilities and state which ones are actually on a code path that is used.

6. Transport and browser

  • HTTPS mandatory, HSTS
  • Cookie flags: httpOnly, secure, sameSite
  • CORS: Access-Control-Allow-Origin: * + authenticated requests = critical
  • Security headers: CSP, X-Content-Type-Options, Referrer-Policy
  • CSRF protection on form POSTs (cookie-based sessions)

7. Finding report

For each finding:

[Severity] Title
Location: file:line
Impact: <what an attacker can do>
Reproduction: <step by step>
Fix: <concrete suggestion>
Status: fixed / open / accepted

Severity levels:

LevelCriteria
CriticalData leak, authentication bypass, remote code execution
HighPrivilege escalation, IDOR, secret leak
MediumXSS (reflected), CSRF, missing rate limit
LowInformation leak, missing header, version disclosure

Do not make up a CVSS score. Write the impact and derive the severity from the impact.

Common mistakes

MistakeThe right way
Making up a finding without reading the codeRead it, verify it, then write it
Guessing a CVSS scoreWrite the impact text
Writing the secret into the reportLocation and type only
Looking only at the application layerInfrastructure and deployment settings are in scope too
Closing a finding before it is fixedFix first, then verify

Output format

Markdown: Summary / Finding table (severity, location, impact, status) / Finding details / Dependency scan output / Remaining risks.

In the user's language (Turkish or English).

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.