Skip to content

feat(security): add security tooling for vulnerability detection#43

Merged
chaliy merged 6 commits intomainfrom
claude/security-tools-evaluation-7Q4ae
Feb 2, 2026
Merged

feat(security): add security tooling for vulnerability detection#43
chaliy merged 6 commits intomainfrom
claude/security-tools-evaluation-7Q4ae

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Feb 2, 2026

Summary

Add comprehensive security tooling to BashKit for vulnerability detection and prevention:

  • cargo-audit: CVE scanning for dependencies (every PR)
  • cargo-deny: License and source verification (every PR)
  • cargo-fuzz: Parser fuzzing with LibFuzzer (nightly scheduled)
  • Miri: Undefined behavior detection (every PR)
  • cargo-geiger: Unsafe code auditing (every PR)
  • proptest: Property-based security testing (every PR)

Changes

  1. Threat Model Update - New "Security Tooling" section documenting all tools
  2. CI Additions - cargo-audit, cargo-deny, Miri, cargo-geiger, proptest
  3. Fuzzing Setup - Nightly fuzzing workflow with 3 fuzz targets
  4. Proptest Tests - Property-based security tests

Test plan

  • cargo fmt --check passes
  • cargo clippy --all-targets --all-features -- -D warnings passes
  • cargo test --features network passes (288 tests)
  • cargo test --test proptest_security passes

Document security tools for vulnerability detection:
- Static analysis: cargo-audit, cargo-deny, cargo-geiger
- Dynamic analysis: cargo-fuzz, Miri, proptest
- Memory safety: ASAN, Miri
- Supply chain: cargo-audit, Dependabot

Update testing coverage matrix to include fuzz and proptest columns.
- Add rustsec/audit-check action for CVE scanning
- Add cargo-deny-action for license and source verification
- Both run on every PR to catch security issues early
Add fuzz testing infrastructure:
- parser_fuzz: Tests parser with arbitrary input
- lexer_fuzz: Tests lexer/tokenizer
- arithmetic_fuzz: Tests arithmetic expansion

Add scheduled CI workflow that runs fuzzing nightly.
Expose parser module publicly for fuzz target access.

Addresses threat model V3 (parser hang) and V4 (parser recursion).
- Add Miri job for undefined behavior detection
- Add cargo-geiger job for unsafe code auditing
- Miri runs subset of parser tests (full suite too slow)
- Geiger uploads report as artifact for review

Note: No unsafe code currently in bashkit crate.
Add property-based tests that verify:
- Parser/lexer never panic on arbitrary input
- Execution always terminates with limits
- Nested structures don't cause stack overflow
- Resource limits are enforced
- Path traversal attempts are contained
- Variable expansion is safe

Run in CI with reduced cases for speed, full suite in nightly.
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

The cargo-deny check was failing because:
- colored crate uses MPL-2.0
- icu_* crates use Unicode-3.0

Both are OSI-approved licenses.
@chaliy chaliy merged commit 4ef648f into main Feb 2, 2026
6 checks passed
@chaliy chaliy deleted the claude/security-tools-evaluation-7Q4ae branch February 2, 2026 03:52
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