agentleFS
momentmakermomentmaker/kaijutsu/skills/community/security-and-hardening/SKILL.md

security-and-hardening

Skill3 starsChanged 7 months agoMITView on GitHub

OWASP-Top-10-aware security review of a diff or target file set. Use when the user says "security review", "OWASP check", "audit for vulns", "harden this", "security audit", or invokes /security. Composes blunder-hunt's hostile-input lens. Surfaces injection, auth gaps, broken access control, sensitive data exposure, and supply-chain risks.

45 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use constraint-driven-development, observability-and-instrumentation and 9 more.

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

    constraint-driven-development

    把一个项目的质量线确立为书面契约,并阻止 agent 悄悄降低它。通过访谈确定用户在意哪些维度,当用户心里没有数字时提供合理的默认阈值,把一切记录进 CONSTRAINTS.md,并盯住 diff 中质量线被削弱的迹象——新增的 @ts-ignore 或 eslint-disable 抑制注释、被跳过或删除的测试、被剥掉的断言、未实现的 stub、被调低的阈值。当没有任何质量线被写下来时使用;当用户说 "set up constraints" 或 "define our standards" 时;当用户希望把他们在意的维度——无障碍性、Web 性能、覆盖率——设置成被强制执行的约束时;当 agent 为了变绿不断静默检查或跳过测试时;当你需要一个覆盖率或性能阈值却不知道该选什么数字时;或者当 agent 写下的代码超出任何人会读的体量时。

    Also in 4 projects that use this

  • borhen68Skill

    observability-and-instrumentation

    Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.

    Also in 13 projects that use this

  • az9713Skill

    deprecation-and-migration

    Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.

    Also in 20 projects that use this

  • galandoSkill

    source-driven-development

    Version-aware, source-driven development — fetch official docs before writing framework code

    Also in 22 projects that use this

  • mycelium-hqSkill

    doubt-driven-development

    Use when correctness matters more than speed: about to commit non-trivial code, make an architectural call under uncertainty, work in unfamiliar code, or assert what the compiler cannot check (''this is safe'', ''thread-safe'', ''this scales'', ''matches the spec''). Strongest on high-stakes surfaces (production deploys, security-sensitive logic, data migrations, irreversible operations) and when the user asks to sanity-check, red-team, double-check, or get a second opinion on a decision.

    Also in 17 projects that use this

  • luischanciSkill

    interview-me

    Interactive interview to formalize a research idea into a structured specification with hypotheses and empirical strategy.

    Also in 16 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 44 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before merging changes that touch auth, sessions, payment, PII, or external network calls

    line 14
  2. Distinctive:

    After taking on a new dependency

    line 15
  3. Distinctive:

    After a security-relevant CVE in the project's stack

    line 16
  4. Very specific:

    After the OWASP sweep, invoke blunder-hunt with the hostile-input lens specifically:

    line 46
  5. Very specific:

    Write to a markdown file (docs/security-reviews/YYYY-MM-DD-<target>.md) AND post inline as PR comments if a PR is in scope (compose …

    line 68
  6. Very specific:

    Document supply-chain decisions: When a dep gets a CVE, the decision to upgrade-now vs.

    line 85

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

Adapted from addyosmani/agent-skills under the MIT License. Copyright (c) Addy Osmani. Modifications by kaijutsu maintainers — composed with blunder-hunt.

A focused review pass that walks the OWASP Top 10 against a code change set. The deliverable is a list of findings, each with severity, evidence, and remediation.

When to invoke

  • Before merging changes that touch auth, sessions, payment, PII, or external network calls
  • After taking on a new dependency
  • After a security-relevant CVE in the project's stack
  • User says "security review" / "audit" / "harden"

Process

Step 1: Identify the target

  • PR diff: gh pr diff <n>
  • Branch diff: git diff main...HEAD
  • File set: explicit list from user

Step 2: Walk the OWASP Top 10

For each category, scan the target. Tick yes / no per finding.

#CategoryLook for
A01Broken Access Controlmissing authz checks, IDOR, path traversal, allowed-by-default routes
A02Cryptographic Failureshardcoded secrets, weak ciphers (MD5/SHA1), missing TLS, plaintext PII
A03InjectionSQL/NoSQL/LDAP/cmd/template injection, unsanitized concat into queries / shells / templates
A04Insecure Designtrust boundaries crossed without validation, ambient authority, no rate-limit on expensive ops
A05Security Misconfigurationdefault creds, debug endpoints exposed, verbose error pages, permissive CORS
A06Vulnerable / Outdated Componentsdep versions with known CVEs, deprecated transitive deps
A07Identification + Auth Failuresweak session mgmt, predictable session IDs, missing rate-limit on login, missing MFA gate
A08Software / Data Integrityunsigned artifacts, supply-chain trust gaps, missing SRI for external scripts
A09Logging + Monitoring Failuresno audit log on auth events, no alerting on lockouts, secrets in logs
A10Server-Side Request Forgery (SSRF)user-controlled URLs in fetch/curl, allow-list missing, internal IPs not blocked

Step 3: Compose blunder-hunt with hostile-input lens

After the OWASP sweep, invoke blunder-hunt with the hostile-input lens specifically:

"Find every place where untrusted data flows into a trust boundary."

This catches subclasses of injection that don't fit neatly into the table above.

Step 4: Format findings

For each finding:

[severity] <file>:<line>
Category: <OWASP A0X>
Issue: <one-line>
Evidence: <quote / git blame / repro steps>
Remediation: <concrete fix>

Severities: critical (immediate fix), high (fix this PR), medium (file an issue, fix this sprint), low (FYI).

Step 5: Output

Write to a markdown file (docs/security-reviews/YYYY-MM-DD-<target>.md) AND post inline as PR comments if a PR is in scope (compose pr-review if installed).

Anti-rationalization table

ExcuseRebuttal
"We're not exposed to the internet"Internal threats matter too. Compromised employee laptop / supply-chain attack surface remains.
"The framework handles auth"Frameworks handle SOME auth. Application-layer authz (object-level) is your job.
"We use prepared statements everywhere"Then prove it. One missed concat in one query is the whole compromise.
"Our deps are pinned"Pinning ≠ secure. Run npm audit / cargo audit / pip-audit and report.
"It's just a small change"Auth bypass via 3-line change is the classic story. Size doesn't predict risk.

Hard rules

  • Never approve a security review without evidence per finding. Vague "looks fine" is forbidden.
  • Critical findings block merge. No "we'll fix it next PR" for critical.
  • Test the proposed fix. A remediation that doesn't actually mitigate is worse than nothing — the user thinks they're protected.
  • Document supply-chain decisions. When a dep gets a CVE, the decision to upgrade-now vs. defer is a decide-worthy moment.

Composes

  • blunder-hunt — hostile-input lens layered onto the OWASP sweep
  • pr-review (optional) — post findings as inline PR comments if a PR is in scope
  • decide (optional) — record any architectural security decisions surfaced

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.