Skip to content

fix(security): add recursion limits, redaction runtime guard, and security docs - #26

Merged
f3rdy merged 1 commit into
masterfrom
feature/24-security-hardening
Mar 14, 2026
Merged

f3rdy merged 1 commit into
masterfrom
feature/24-security-hardening

Conversation

@f3rdy

@f3rdy f3rdy commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • F-04: Recursion depth limit (max 50) in _collect_nested_credential_types() and redact_value()
  • A-01: Runtime redaction guard in build_payload() using contains_unredacted() — aborts AI detection if redaction fails
  • F-05: Trust-boundary comments on shell=True in password.py and ai_detect.py
  • docs/SECURITY.md: Comprehensive security architecture documentation covering data flow, triple-layer AI protection, trust boundaries, and verification steps
  • 7 new tests for recursion limits and redaction guard

Based on findings from cybersecurity audit of #24.

Test plan

  • uv run pytest — all 233+ tests green
  • Review docs/SECURITY.md for completeness
  • vaultctl detect-types --show-payload still works correctly

…st-boundary docs

Add depth limits (_depth > 50 → bail out) to _collect_nested_credential_types()
and redact_value() to prevent stack overflow on adversarial input.

Insert a contains_unredacted() verification check in build_payload() that aborts
with AIDetectionError if any original secret value survives redaction.

Document the trust-boundary rationale for shell=True usage in password.py and
ai_detect.py (command source is operator-controlled .vaultctl.yml).

Closes #24
@f3rdy
f3rdy merged commit 9bcf6e2 into master Mar 14, 2026
2 checks passed
@f3rdy
f3rdy deleted the feature/24-security-hardening branch March 14, 2026 07:19
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.

1 participant