feat: add bootcamp security command for standalone security analysis#60
Merged
Merged
Conversation
Completes the deterministic, LLM-free report trio. `bootcamp health` and `bootcamp metrics` already expose their generation engines as standalone commands; this adds the third — `bootcamp security` — over the `analyzeSecurityPatterns` engine that powers SECURITY.md. `bootcamp security <repo-url>` (local path or remote URL) scans the repo and reports: - findings (severity, file/line, remediation), most-severe-first - protection coverage matrix (helmet/CORS/CSP, rate limiting, input validation, SQL-injection prevention, secret handling) - security-relevant dependencies - a 0-100 score + A-F grade Flags mirror health/metrics: --json, --check/--min-score (CI gate), --branch, --max-files (routed past root-flag collisions), --keep-temp, --verbose. Tests: 9 unit (DI-mocked resolve/scan/analyze; report/JSON/check both directions/local/keep-temp/scan-failure/resolve-failure) and 3 E2E spawning the real CLI against a fixture with detectable patterns (human report, JSON shape incl. helmet/rate-limit detection, --check gate both directions). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
e0ae5e5 to
743cc58
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
bootcamp security <repo-url>— the third deterministic, LLM-free report command, completing thehealth/metrics/securitytrio.bootcamp healthandbootcamp metricsalready expose their generation engines as standalone, scannable, CI-gateable commands. TheSECURITY.mdengine (analyzeSecurityPatterns) had no standalone equivalent — this closes that gap.What it reports
Scans any repo (local path or remote URL) and reports the deterministic security analysis that powers
SECURITY.md:.env.example)Flags
Mirror
health/metrics:--json,--check/--min-score(CI gate),--branch,--max-files(routed past root-command flag collisions),--keep-temp,--verbose.Implementation
Mirrors
health-command.ts/metrics-command.tsin structure and reusesanalyzeSecurityPatternsverbatim (readingpackage.jsonthe same way the generation pipeline does), so the output can never drift fromSECURITY.md.Testing
--json,--checkboth directions, custom--max-files, local path,--keep-temp, scan-failure cleanup, resolve-failure..envgitignored): human report, JSON shape, and the--checkgate in both directions.npm test→ 1124 passing; typecheck + lint + build clean.🤖 Generated with Claude Code