11 Commits
Author SHA1 Message Date
SyamsandClaude Opus 5 623af98704 refactor(security-and-hardening): move code patterns out of SKILL.md into a skill-local reference
SKILL.md loaded ~5.3k tokens on every activation, 30% of it inline
TypeScript examples that an agent only needs when it reaches that code.
docs/skill-anatomy.md already asks for SKILL.md under 500 lines with
reference material in supporting files; this skill was at 524.

Move the OWASP prevention patterns, input-validation and upload code,
SSRF check, destructive-path discussion, dependency-audit decision tree,
rate-limiting and secrets snippets, data-classification table, and LLM
output example verbatim into references/hardening-patterns.md (same
convention as constraint-driven-development/references/floor-guard.md).
SKILL.md keeps the workflow: threat model, three-tier boundaries, and a
condensed "Hardening Controls" section stating each rule with a deep link
to its pattern. Frontmatter, Process, Rationalizations, Red Flags, and
Verification are byte-identical to before.

The skill's own review checklist duplicated references/security-checklist.md;
replace it with a pointer and add its three privacy items to the shared
checklist so nothing is lost.

SKILL.md: 524 -> 216 lines, 4096 -> 2449 words (~-40% tokens per load).
Routing unchanged: run-evals rank-1 stays 100%, no description edits.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-18 20:05:06 +08:00
notbuckiandClaude Opus 5 45fd4a0439 docs(security): destructive path targets need an allowlist, a depth floor, and an owner check
The trust-boundary list names only remote channels, so local values that the
OS hands you — another process's command line or environment, a filename on a
shared volume, a path in a job payload — read as internal. The one rule about
destructive actions (LLM06) governs who may act, not what gets hit: a
confirmed call with a wrongly derived target deletes the root just the same.
A shape check ("absolute, at least one directory deep") proves well-formedness
and gets mistaken for authorization.

SKILL.md gets the extended trust-boundary item, a prose-only "Destructive
Operations on Derived Paths" next to File Upload Safety, and one line each in
the Input checklist, Red Flags and Verification. The worked example lives in
references/security-checklist.md, per skill-anatomy's rule to move detailed
material out of SKILL.md — the file is already over the 500-line budget, so
this keeps the per-activation cost to +11 lines.

Two limits are stated where the snippet is copied from, rather than implied
away: a marker inside the tree is self-attestation until its integrity is
protected and the expected owner comes from authenticated state, and
resolving a path and then operating on the name is a check/use race wherever
an untrusted process can swap an ancestor.

No new directory, frontmatter unchanged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-04 10:25:46 +02:00
ayobamiseun 245714936b docs(security): align audit phrasing — the ecosystem's dependency audit
'Native dependency audit' collides with the established meaning of
native dependencies (compiled modules); use the same unambiguous
phrasing as the shipping-and-launch checkbox in this PR.
2026-07-26 13:43:20 +01:00
ayobamiseun 45ccfb6f3d docs(skills): extend ecosystem-neutral commands catalog-wide (#404 Phase 2)
Follow-up to #419, addressing the remaining normative npm-family
commands federicobartoli's grep on #404 identified:

- incremental-implementation: the four increment-checklist exit criteria
  and the example prompt now use the repository's own test/build/
  typecheck/lint commands, pointing at the TDD skill's Discover the
  Stack First section
- planning-and-task-breakdown: task-template verification lines use the
  template's placeholder style instead of hardcoded npm commands
- shipping-and-launch: the security checkbox names the ecosystem's
  dependency audit rather than npm audit alone
- debugging-and-error-recovery: the diagnosis/bisect/verify command
  blocks are labeled as npm examples with substitution notes
- references/security-checklist.md: OWASP row 6 generalizes npm audit
  to the native dependency audit
- security-and-hardening needed no change: its SKILL.md was already
  neutralized (detected-package-manager wording)

Ride-along: pins the below-zero debit behavior (ValueError) in TDD eval
case 3, per nucliweb's non-blocking review note on #419.
2026-07-22 21:35:05 +01:00
Federico Bartoli 509281da06 docs(security): clarify npm install-script versions
Date the version matrix and distinguish fallback, npm 11.18.x, and npm 12.x behavior using verified lifecycle-script probes.
2026-07-11 14:44:03 +02:00
Federico Bartoli 175013ab41 docs(security): harden package-manager supply-chain guidance 2026-07-11 09:34:05 +02:00
Addy Osmani cad41cb506 docs(security): complete the OWASP LLM Top 10 quick-reference table
Per federicobartoli's note on #219: the table was headed "Top 10" but
listed only 8. Add the two missing entries (LLM04 Data and Model Poisoning,
LLM09 Misinformation) so the heading matches the contents.
2026-06-07 15:26:33 -07:00
Addy Osmani d1983929db fix(security): address review on #219
Per nucliweb's review:
- Resolve OWASP numbering inconsistency: rename the prevention section to
  "OWASP Top 10 Prevention Patterns" and drop the per-item numbers so it no
  longer implies a ranking that conflicts with the 2021 quick-reference table.
- Harden the SSRF example against DNS rebinding/TOCTOU: resolve all records
  and reject if any is non-unicast, plus a caveat that fetch re-resolves and
  pointers to request-filtering-agent / ssrf-req-filter for high-risk surfaces.
- Add LLM08 (Vector and Embedding Weaknesses) to the LLM section and the
  reference table, covering per-tenant embedding isolation and poisoned docs.
- Promote "Threat Model First" to a "## Process" header per the repo's skill
  anatomy convention.
- Make the LLM "GOOD" example parse defensively (JSON.parse + schema in a
  try/catch) so it models handling untrusted output end to end.
2026-06-07 11:36:31 -07:00
Addy Osmani b7add8c945 docs(security): mirror new coverage into the security checklist
- Threat Modeling "start here" block (trust boundaries, STRIDE, abuse cases)
- SSRF line under Input Validation
- Supply-chain hygiene items under Dependency Security
- AI / LLM Security section + OWASP Top 10 for LLMs quick reference table
2026-06-05 21:57:15 -07:00
Federico Bartoli fea75b1647 Align skill descriptions with Anthropic best practices
Update all SKILL.md descriptions to lead with what the skill does
(third person) followed by trigger conditions, per Anthropic's
skill authoring docs. All original trigger conditions preserved.
Update description max chars to match Anthropic spec (1024).
Retain workflow-summary warning in skill-anatomy.md to prevent
agents from following descriptions instead of reading full skills.
Add Table of Contents to reference files longer than 100 lines so
Claude can see the full scope of available information even when
previewing with partial reads.
2026-03-31 22:41:45 +02:00
Addy Osmani dfba53259a add references and examples 2026-02-15 14:28:33 -08:00