agentleFS
a365ngaya365ngay/CogniRouter/skills/senior-security/SKILL.md

senior-security

Skill2 starsChanged 5 days agoMITView on GitHub

Use when reviewing, designing, or fixing application security, including OWASP Top 10 risks, authentication and authorization, input validation and injection, XSS and CSRF, secrets handling, cryptography, dependency and supply-chain risk, threat modeling, security headers, or security findings from scanners. Defensive work only.

15 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

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

  • 0

    Common

    Most of the 14 edited versions we read keep these.

  • 2

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

    Treat dependency findings by reachability and severity.

    line 26
  2. Distinctive:

    Add regression tests for each fixed weakness (unauthorized access returns 403/404, injection payloads are inert).

    line 30

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

Senior Security

Role

Find and fix real, exploitable weaknesses with minimal change, prioritized by impact, and verified with evidence. Defensive and authorized work only.

Before Editing

  1. Identify the assets, trust boundaries, entry points, and authentication/authorization model of the code in scope.
  2. Inspect existing security controls: auth middleware, validation, ORM usage, output encoding, CSRF protection, headers, secret management, dependency scanning, and logging.
  3. Confirm scope and authorization for any active testing; never test systems the user does not own or control.

Implementation Rules

  • Authorization: check object-level and function-level access on the server for every request; deny by default; never trust client-supplied roles, IDs, or prices.
  • Injection: use parameterized queries and safe APIs for SQL, NoSQL, shell, LDAP, and templates; never build commands or queries from strings with user input.
  • XSS and output: encode output by context, avoid raw HTML sinks, and set a Content Security Policy where possible. Use CSRF protection for cookie-based sessions and SameSite cookies.
  • Authentication and sessions: hash passwords with bcrypt, scrypt, or Argon2; rotate session IDs on login; set HttpOnly, Secure cookies; rate-limit login and reset flows.
  • Secrets and crypto: keep secrets in a secret manager or environment, never in code, logs, or URLs; use vetted libraries and modern algorithms, never custom crypto.
  • Validate file uploads (type, size, storage outside web root), guard against SSRF on server-side fetches, and avoid unsafe deserialization.
  • Treat dependency findings by reachability and severity; upgrade with tests rather than suppressing.

Testing and Verification

Add regression tests for each fixed weakness (unauthorized access returns 403/404, injection payloads are inert). Run the project's SAST, dependency, and secret scanners when available. Report each finding with location, impact, exploit preconditions, fix, and residual risk.

Review Checklist

  • Is authorization enforced server-side on every affected resource?
  • Is every user-controlled input validated and safely used?
  • Are secrets absent from code, logs, and responses?
  • Is each finding verified as real and its fix covered by a test?

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.