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

security-and-hardening

Skill3 starsChanged 6 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.

88 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 8 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.
  • MrCipherSmithSkill

    constraint-driven-development

    Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.

    Also in 16 projects that use this

  • HK-hubSkill

    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 36 projects that use this

  • HK-hubSkill

    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 40 projects that use this

  • seikaikyoSkill

    doubt-driven-development

    對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。

    Also in 39 projects that use this

  • seikaikyoSkill

    interview-me

    需求不明時的意圖萃取訪談:一次一題、每題附上自己的猜測、聽出「真正想要 vs 覺得應該要」,直到能預測使用者反應(約 95% 信心)才動工。適用:需求缺少對象 / 動機 / 成功標準 / 約束,或使用者點名「訪談我」「先確認一下」「我們確定嗎」。明確自足的指示、純資訊查詢、機械性操作不適用。

    Also in 36 projects that use this

  • jarosser06Skill

    test-strategy

    Plans pytest test strategies for Drift's 90%+ coverage requirement using coverage analysis, edge case identification, and test suite design. Use when determining what tests to write, analyzing coverage gaps, or planning test strategies.

    Also in 3 projects that use this

  • +1 more from HK-hub

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 83 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 83 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.