Rebuilds the generated outputs for skills/code-security after the rule
content updates in #13 (commit ddc19af). The source rule files were
updated but `make` was not run, so the compiled AGENTS.md and extracted
test cases drifted from the rules.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Create sections.ts to parse _sections.md dynamically
- Eliminate hardcoded section map from parser.ts (was 28 entries)
- Replace duplicate parsing code in build.ts with shared module
- _sections.md is now the single source of truth for section metadata
Adding a new rule now only requires updating _sections.md
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Replace React performance section map with security categories (1-28)
- Fix _sections.md parsing to use ### headings instead of ##
- Each rule now maps to its proper section by filename
Now generates 28 sections organized by impact level:
- Critical (1-9): SQL injection, XSS, secrets, etc.
- High (10-22): Crypto, SSRF, Terraform, K8s, etc.
- Medium (23-25): Regex DoS, race conditions
- Low (26-28): Best practices, performance
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rule consistency:
- Add missing impactDescription and tags to 15 rule files
- Standardize reference format to **References:** across all rules
- Update _template.md with correct reference format
Parser improvements:
- Replace regex-based parser with AST-based parsing using remark/unified
- Add unified, remark-parse, remark-frontmatter, unist-util-visit, js-yaml
- More robust extraction of frontmatter, examples, and code blocks
Validation improvements:
- Add warnings for missing optional fields (impactDescription, tags)
- Report all errors/warnings instead of stopping on first error
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>