Commit Graph

20 Commits

Author SHA1 Message Date
Drew Dennison 769eb809d6 remove 2026-01-15 14:31:39 -08:00
Drew Dennison e6d279659f Expand sql-injection.md with multi-language examples
Based on semgrep-rules test cases, now covers:
- Python (psycopg2): concatenation, .format(), f-strings
- JavaScript (pg): template literals, concatenation
- Java (JDBC): Statement vs PreparedStatement
- Go (database/sql): concatenation, fmt.Sprintf
- Ruby (pg): concatenation, interpolation
- C# (SqlCommand): String.Format, SqlParameter

Test cases: 347 → 364 (+17 examples)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 14:23:17 -08:00
Drew Dennison cd382c1c40 Extract section parsing into shared module
- 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>
2026-01-15 14:17:35 -08:00
Drew Dennison bfa8941893 Fix section mapping for security rules
- 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>
2026-01-15 14:14:33 -08:00
Drew Dennison 2e12e64d4d Improve rule consistency and rewrite parser with remark/unified
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>
2026-01-15 14:11:57 -08:00
Drew Dennison 2ea1e704b3 Fix nested code fence in README breaking numbered list
Use 4 backticks for outer fence so inner code blocks don't break it.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:18:23 -08:00
Drew Dennison 8bcf9f1ce7 Regenerate zip with updated READMEs 2026-01-15 13:13:57 -08:00
Drew Dennison ffaf3d2612 Update READMEs and add build package documentation
- skills/code-security/README.md: Simplified, added categories summary
- packages/code-security-build/README.md: New - documents build tooling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:13:57 -08:00
Drew Dennison 3cd507999b Regenerate zip with updated README 2026-01-15 13:10:41 -08:00
Drew Dennison 5ad8da18da Update README with full list of security categories
- Added all 28 security rule categories organized by impact level
- Listed supported languages (15+)
- Expanded use cases to include infrastructure configuration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:10:35 -08:00
Drew Dennison 4802d8723f Add Makefile for validate, build, and zip automation
Targets:
- make all/release: validate, build, and create zip packages
- make validate: validate rule files via pnpm
- make build: build skill files
- make zip: create zip packages for all skills
- make clean: remove generated files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:06:55 -08:00
Drew Dennison 1f11971e5a add an acknowledgement section 2026-01-15 13:03:50 -08:00
Drew Dennison 698aa2bb91 Add SKILL.md and zip package for code-security skill
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 13:01:34 -08:00
Drew Dennison cfec7199b8 make it very clear this is an example non-valid secret 2026-01-15 12:56:49 -08:00
Drew Dennison 1804f863e2 reduce size of files 2026-01-15 12:54:30 -08:00
Drew Dennison c81e69ac77 first pass 2026-01-15 12:33:17 -08:00
Drew Dennison eaff835852 remove old code example 2026-01-15 08:26:33 -08:00
Drew Dennison 4e9b382510 inital commit 2026-01-15 08:23:52 -08:00
Drew Dennison 3e9960a7d2 add AGENTS.md and CLAUDE.md symlink 2026-01-14 21:00:23 -08:00
Drew Dennison a09e9f1647 add readme 2026-01-14 20:56:50 -08:00