Skip to content

fix: harden redaction and temp cleanup boundaries - #76

Merged
codeforester merged 1 commit into
mainfrom
security/54-20260802-redaction-cleanup-boundaries
Aug 2, 2026
Merged

fix: harden redaction and temp cleanup boundaries#76
codeforester merged 1 commit into
mainfrom
security/54-20260802-redaction-cleanup-boundaries

Conversation

@codeforester

Copy link
Copy Markdown
Contributor

Closes #54

Summary

  • compile a Click-aware redaction plan across command trees, aliases, destinations, value forms, sensitive arguments, and documented secret-name heuristics
  • redact argv once before it reaches logging, history display resolvers, or custom history writers, with synchronized fail-closed plan publication
  • claim invocation temp leaves through stable no-follow parent handles and retain an ownership descriptor through teardown
  • validate run-root containment, inode identity, symlink boundaries, devices, and Linux mount IDs before descriptor-relative content erasure
  • retain partial logs and empty directory nodes instead of reopening pathname unlink or rmdir replacement races
  • document the native Windows fallback and the explicit same-account filesystem threat boundary

Validation

  • 214 tests and 54 generated subtests on current Click
  • 214 tests and 54 generated subtests on Click 8.1.8
  • deterministic adversarial coverage for publication, creation, replacement, traversal, mount-identity, rollback, and descriptor-lifecycle races
  • isolated sdist and wheel build validated with scripts/validate_package_artifact.py
  • ./tests/validate.sh
  • git diff --check

Security review

Two independent adversarial review passes completed. The final pass found no merge blockers after verifying the exact rollback-symlink, nested-directory replacement, missing-mount-ID descriptor leak, and concurrent redaction publication reproductions.

@codeforester
codeforester merged commit 1394878 into main Aug 2, 2026
17 checks passed
@codeforester
codeforester deleted the security/54-20260802-redaction-cleanup-boundaries branch August 2, 2026 20:23
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.

Harden sensitive-option redaction and runtime cleanup boundaries

1 participant