fix(security): weekly audit remediations for IAM, decrypt, and migrate - #113
Draft
cursor[bot] wants to merge 1 commit into
Draft
fix(security): weekly audit remediations for IAM, decrypt, and migrate#113cursor[bot] wants to merge 1 commit into
cursor[bot] wants to merge 1 commit into
Conversation
Re-implement the 2026-08-31 audit remediations that never merged, plus fd cleanup on encrypt/decrypt temp paths. Scope S3 IAM to encrypted/*, allow DisableKey for IR, encrypt the ops SNS topic, refuse decrypt overwrites without --force, and confine migrate inputs to the import directory. Co-authored-by: Specter099 <Specter099@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Weekly static security audit (2026-09-07). The 2026-08-31 remediations never merged to
main; this PR re-implements them and updatesSECURITY_AUDIT.md.On
mainthis scan found: 0 Critical, 8 High, 7 Medium, 6 Low.After this PR: 0 Critical, 3 High (operator/IAM follow-ups), 5 Medium, 5 Low.
Landed hardenings:
DisableKeyfrom the deny (keepScheduleKeyDeletion) so a compromised CMK can be frozen during IRUpdateItem/ListBucket; scope S3 toencrypted/*; grantsts:GetCallerIdentity; encrypt the ops SNS topic with the envault CMKdecrypt --forceand refuse overwrite before creating temp filess3_keyvalues that are not content-addressedmigratepaths to the import directoryENVAULT_AUDIT_TTL_DAYSon all event writesrotate-keyDescribeKeypreflight; microsecond CAS tokens; dashboardlast_activitypagingexecwarns when inheritingAWS_*; close encrypt/decrypt fds if the stream fails beforefdopenRemaining (documented in
SECURITY_AUDIT.md): rotation still needs a separate grant for a new CMK; old S3 versions are not a revocation primitive;--clean-envstays opt-in;state-indexGSI replacement is a migration.Type of Change
Testing
pytest tests/unit/— 179 passedruff check/ruff format --check/mypy src/envault/— cleanChecklist