agentleFS
UIhoshiUIhoshi/AgentLogic/skills/engineering/appsec-review/SKILL.md

appsec-review

Skill0 starsChanged 7 days agoMITView on GitHub

Comprehensive application security review, diff-scoped vulnerability triage, repository-grounded threat modeling, and security ownership analysis. Trigger automatically when reviewing PRs/diffs for security, auditing auth/crypto/permissions/input-parsing/secrets/sandbox boundaries, running threat modeling, or analyzing sensitive-code bus factor.

3 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. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every candidate finding MUST follow Self-Refute First and carry one explicit static-evidence verdict:

    line 34
  2. Distinctive:

    Honesty Rule: Never turn an incomplete scan or skipped files into a "no findings" claim.

    line 39
  3. Very specific:

    When auditing maintainer risk, orphaned sensitive code, or CODEOWNERS accuracy:

    line 53

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

Application Security Review & Threat Modeling (appsec-review)

This skill synthesizes the open-source Apache-2.0 security workflows from OpenAI Skills (openai/skills: security-best-practices, security-threat-model, security-ownership-map) with clean-room diff-scoped reachability review, directory-scoped SECURITY.md resolution, and tri-state static verdict discipline.

1. Mandatory Automatic Activation Rule

Automatically activate this skill (without waiting for the user to ask by skill name) whenever the task involves:

  • Security review or AppSec audit of source code, a PR, commit range, branch diff, or working-tree patch (security-review).
  • Repository-grounded threat modeling (STRIDE, trust boundaries, assets, abuse paths, mitigations).
  • Sensitive-code ownership, CODEOWNERS risk validation, or bus-factor hotspot topology.
  • Modifying authentication, authorization, cryptography, secrets handling, deserialization, parsers, sandboxing, or external network/file boundaries.

2. Mode A: Diff-Scoped & Language Security Review (security-diff-and-best-practices)

A.1 Policy & Scope Resolution

  1. Resolve the exact scope first: Git diff range, local patch, or targeted directory/language (python, javascript/typescript, go, powershell, etc.).
  2. Inspect every changed text file in scope, including deleted files at the baseline revision, and trace changed behavior into supporting callers/callees without expanding into an unrelated full-repo audit unless requested.
  3. Locate and read the root and any directory-scoped SECURITY.md policy covering affected paths before assigning severity, so attacker roles, trusted inputs, and product security boundaries match project policy.

A.2 Language & Secure-by-Default Checklist

  • Input & Injection Surfaces: Parameterized SQL/queries, strict command-arg arrays (never unsanitized shell interpolation), safe path normalization against traversal, prototype/attribute-pollution guards, safe XML/YAML/JSON deserialization, and output encoding / CSP hygiene (never write raw unescaped markup sinks).
  • AuthN / AuthZ & Session Integrity: Server-side authorization checks on every state-changing endpoint/action, CSRF/origin validation, constant-time token comparison, least-privilege session/JWT validation (alg pinning, expiry, audience).
  • Secrets, Crypto & Sandbox: Zero hardcoded credentials or tokens, CSPRNG (crypto.randomBytes / secrets) for security tokens, AEAD ciphers (AES-GCM / ChaCha20-Poly1305), TLS verification enabled, explicit outbound URL/redirect SSRF allowlists.
  • CI / Build / Packaging Surfaces: Unpinned third-party Actions, untrusted PR script execution (pull_request_target), environment/secret leakage in logs.

A.3 Tri-State Static Verdict & Self-Refute First Gate

Every candidate finding MUST follow Self-Refute First and carry one explicit static-evidence verdict:

  • confirmed: Attacker-controlled source -> reachable sink verified in current code with concrete file:line evidence and no effective upstream sanitizer/guard.
  • not_actionable: Counter-argument succeeded (unreachable, dead path, non-attacker-controlled input, or enforced upstream guard/policy).
  • needs_review: Reached a clear risk boundary, but missing runtime/config/external proof prevents confirmation.

Honesty Rule: Never turn an incomplete scan or skipped files into a "no findings" claim; explicitly state coverage limits and uninspected paths.


3. Mode B: Repository-Grounded Threat Modeling (threat-model)

  1. System Model Extraction: Inventory primary components, data stores, external integrations, and runtime entrypoints (server, CLI, worker, library), separating runtime from CI/dev tooling and tests.
  2. Trust Boundaries, Assets & Entrypoints: Map concrete trust boundaries (protocol, auth, encryption, validation, rate limits), high-value assets (credentials, user data, models, compute, audit logs), and attack surfaces (endpoints, uploads, parsers, jobs, admin tools).
  3. Abuse Paths & Mitigations: Enumerate realistic Actor -> Entrypoint -> Asset -> Impact paths, distinguish existing verified controls from gaps, and tie each mitigation to a concrete owner/file.

4. Mode C: Security Ownership & Bus-Factor Map (security-ownership)

When auditing maintainer risk, orphaned sensitive code, or CODEOWNERS accuracy:

  1. Analyze git history (excluding noise commits like lockfiles/Dependabot unless requested) to build a people-to-file topology and file co-change clusters.
  2. Flag sensitive hotspots (auth, crypto, permissions, CI workflows) with bus_factor <= 1, inactive/departed primary owners, or stale CODEOWNERS rules.

5. Attribution

  • Incorporates methodologies from openai/skills (security-best-practices, security-threat-model, security-ownership-map — Apache-2.0) and clean-room diff-scoped / tri-state verdict workflows.

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.