Skip to content

test(security): deep security audit with regression tests#487

Merged
chaliy merged 4 commits intomainfrom
claude/security-audit-g2Iqf
Mar 3, 2026
Merged

test(security): deep security audit with regression tests#487
chaliy merged 4 commits intomainfrom
claude/security-audit-g2Iqf

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Mar 2, 2026

Summary

  • Deep security audit across 6 attack surfaces: parser, VFS, builtins, Python integration, tool interface, network
  • Found 18 new vulnerabilities (TM-INJ-012–016, TM-INF-017–018, TM-DOS-041–050, TM-PY-028)
  • Verified 3 previously-open issues are now fixed (TM-DOS-030, TM-INF-013, TM-INF-014)
  • Added 17 regression tests (16 #[ignore] until fix lands, 1 active) in security_audit_pocs.rs
  • Updated specs/006-threat-model.md with new threat IDs, fixed statuses, and open controls

Key findings

Severity Count Examples
HIGH 8 Internal prefix injection via declare/readonly/local/export, arithmetic panic, lexer stack overflow, brace expansion OOM
MEDIUM 4 OverlayFs symlink limit bypass, MountableFs missing path validation, VFS copy limit skip, info leak in set/declare
LOW 6 rename overwrites dirs, combinatorial brace explosion, date time leak, missing depth limits

Test plan

  • cargo test --test security_audit_pocs — 1 pass, 16 ignored, 0 failures
  • cargo test --test security_audit_pocs -- --ignored — all 16 fail (confirming vulns present)
  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • cargo test --features http_client --test security_audit_pocs — passes with CI flags

claude added 2 commits March 2, 2026 22:11
Comprehensive security audit covering parser, VFS, builtins, Python
integration, tool interface, and network boundaries. Found 18 new
vulnerabilities (TM-INJ-012–016, TM-INF-017–018, TM-DOS-041–050,
TM-PY-028) with working PoC tests. Also verified 3 previously-open
issues are now fixed (TM-DOS-030, TM-INF-013, TM-INF-014).

Key findings:
- declare/readonly/local/export bypass is_internal_variable() guard
- _ARRAY_READ_ prefix injection creates arbitrary arrays
- Brace expansion {N..M} has no upper bound (OOM DoS)
- Arithmetic compound assignment panics on overflow (DoS)
- Lexer stack overflow on nested $() in double-quotes
- OverlayFs symlink() bypasses all file count limits
- InMemoryFs copy() skips limits when dest exists
- date builtin leaks real host time

https://claude.ai/code/session_01JuqQfhfg67dWWn8ngcBxUK
Tests now assert desired secure behavior and are #[ignore] until fixes
land. Each ignore reason includes the threat model ID. When a fix is
applied, the test flips from ignored→green as a regression gate.

- 16 ignored tests: all fail when forced (confirming vulns are present)
- 1 non-ignored test: lexer depth at safe level (documents safe path)
- CI runs clean: clippy, tests, no warnings

https://claude.ai/code/session_01JuqQfhfg67dWWn8ngcBxUK
@chaliy chaliy merged commit 527db2a into main Mar 3, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants