Security Hardening — Command Injection Elimination

Eliminate the command injection attack surface across the CLI. The product targets a clone-and-run deployment — developers clone repos containing `.ana/ana.json` and run pipeline commands. A malicious config file can currently execute arbitrary shell commands because user-controlled and config-controlled values reach `execSync` via string interpolation without validation. This must be mechanically impossible before seeking users.

verdict PASSscore 27 / 27findings 10 (0 risk · 3 debt · 7 obs)duration 1h 14mrejection cycles 0shipped May 4, 2026surface cli

Pipeline timeline

Intent to proven code in 1h 14m across Think, Plan, Build, and Verify.

Think
2m
Plan
15m
Build
53m
Verify
5m

Assertion ledger

27 claims, each independently verified. Showing 8 — show all →

IDSaysMatcher
A001Slugs with shell injection characters are rejected before any operationverifiedok
A002Slugs attempting path traversal are rejectedverifiedok
A003Valid kebab-case slugs pass validationverifiedok
A004Slugs with numbers like fix-v2 pass validationverifiedok
A005Branch names with shell injection characters are rejectedverifiedok
A006Valid branch names with slashes pass validationverifiedok
A007Empty string is accepted as a valid branch prefixverifiedok
A008Skill names with shell injection characters are rejectedverifiedok

Findings 10 total

debtpackages/cli/tests/commands/work.test.tsclosed
A016-A019 @ana tags point to pre-existing branchPrefix template tests, not command entry point validation
debtclosed
No dedicated integration tests for command entry point injection rejection — saveArtifact, completeWork, createPr, strengthen
obspackages/cli/tests/utils/git-operations.test.tsclosed
@ana tag IDs collide across build cycles — A001-A008 tags from prior contracts still present in git-operations.test.ts and findProjectRoot.test.ts
obspackages/cli/src/utils/git-operations.tsclosed
getCurrentBranch still uses execSync — not hardened by this phase
obspackages/cli/src/utils/validators.tsclosed
SLUG_PATTERN exported but only consumed by test file — no source imports the raw regex
+5more findings

Integrity seal

scopesha256:13f7bad7930a3...
contractsha256:b9e52761c704d...
plansha256:f3730b4237814...
specsha256:0fe120b5859af...
build-reportsha256:67bc172dade85...
build-datasha256:0888fb3e8495e...
verify-reportsha256:9f0dd78e9f3ac...
verify-datasha256:63108d6bb4fdf...
audit cmd$ ana proof audit security-hardening   → all hashes match