Skip to content

Weekly security audit remediations (2026-08-15) - #110

Draft
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/repository-security-audit-4737
Draft

Weekly security audit remediations (2026-08-15)#110
cursor[bot] wants to merge 3 commits into
mainfrom
cursor/repository-security-audit-4737

Conversation

@cursor

@cursor cursor Bot commented Aug 15, 2026

Copy link
Copy Markdown

Summary

Weekly static security audit of envault-cli. Prior Critical findings from March/July (plaintext-before-verify, one-shot decrypt, overwritable audit events, unconstrained KMS discovery) are already fixed on main. This change remediates leftover High/Medium items and replaces the stale root SECURITY_AUDIT.md with a current-state report.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Chore / maintenance

What changed

  • IAM: remove unused dynamodb:UpdateItem; scope s3:ListBucket to the bucket ARN.
  • KMS: drop DisableKey from the key-policy DENY so incident response can disable a CMK without a CloudFormation edit.
  • Decrypt: refuse to overwrite an existing file unless --force; validate DynamoDB-supplied S3 keys (encrypted/ prefix, no ..).
  • Honour ENVAULT_AUDIT_TTL_DAYS on every audit event write.
  • rotate-key: DescribeKey the target key before any plaintext is written.
  • State: microsecond CAS tokens; dashboard last_activity pages past EVENT items.
  • Docs/CI: current audit report, ENVAULT_* .env.example, pip-audit CVE justifications, CODEOWNERS for cli.py / isolation.py.

Remaining (not in this PR)

See SECURITY_AUDIT.md: 0 Critical, 2 High, 9 Medium, 7 Low. Highest leftovers are rotate-key still scoped to the stack CMK only, and noncurrent S3 versions remaining readable under the old key for 365 days.

Testing

  • ruff check / ruff format --check / mypy src/envault/ — pass
  • pytest tests/unit/ — 172 passed

Checklist

  • Self-reviewed the diff
  • Added / updated tests
  • Updated documentation if needed
  • CI passes
Open in Web View Automation 

cursoragent and others added 3 commits August 15, 2026 11:41
Remove unused dynamodb:UpdateItem, scope ListBucket to the bucket ARN,
and drop kms:DisableKey from the key-policy deny so a compromised CMK
can be disabled without a CloudFormation change. Version the access-logs
bucket.

Co-authored-by: Specter099 <Specter099@users.noreply.github.com>
Refuse decrypt overwrites unless --force, validate DynamoDB-supplied S3
keys, honour ENVAULT_AUDIT_TTL_DAYS on every event write, and preflight
DescribeKey before rotate-key decrypts plaintext. Tighten last_updated
CAS to microseconds and page past EVENT items for dashboard last_activity.

Co-authored-by: Specter099 <Specter099@users.noreply.github.com>
Document remaining High/Medium issues, justify pip-audit CVE ignores,
point .env.example at ENVAULT_* variables, and extend CODEOWNERS to
cli.py and isolation.py.

Co-authored-by: Specter099 <Specter099@users.noreply.github.com>
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