Repository navigation
fix(terraform): drop the unencrypted-upload opt-out and reject collector + managed scan together - #91
Closed
tim-thacker-nullify wants to merge 1 commit into
Conversation
…tor + managed scan together allow_unencrypted_upload could not work against Nullify's bucket: an empty kms_key_arn also sets enable_kms_access = false, so the role gets no KMS statement, and the bucket's SSE-KMS default encryption still requires kms:GenerateDataKey on Nullify's key. The variable traded the collector's self-explaining error for an opaque S3 AccessDenied, so it is removed and kms_key_arn is unconditionally required when enable_collector is true. - k8s-resources: remove allow_unencrypted_upload and the ALLOW_UNENCRYPTED_UPLOAD env block; the KMS precondition is now kms_key_arn != "" alone - k8s-resources: precondition rejecting enable_collector together with enable_managed_scan_rbac, matching the example's scan_mode = "both" rejection - nullify-aws-integration: kms_key_arn description now states the cross-account rule the locals actually implement - terraform/README.md: fold #88's bare-key-form note into the rewritten KMS section so merging both PRs cannot leave two near-duplicate paragraphs - multi-cluster-complete: comment out the placeholder KMS ARN and shape it so the variable regex rejects it if pasted as-is - CI: validate rows for the four remaining modules/ directories Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Member
Author
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.
Round-3 review fixes for #88 and #89, stacked on #89's head branch.
R3-1, R3-6:
allow_unencrypted_uploadis removed, not plumbed.kms_key_arnalso setsenable_kms_access = false, so the role gets no KMS statement.context/iac/s3.tf:45-51,dast/iac/s3.tf:41-47), so a headerless upload is still encrypted with Nullify's key and needskms:GenerateDataKeyon it.kms_key_arn, so the opt-out cannot be made to work.kms_key_arn != ""alone; variable description, README KMS section and upgrade notes match.Other findings:
nullify-aws-integration'skms_key_arndescription (v5:111, v6:100) now states the cross-account rulelocals.tf:30-36implements.git diff 9ac0299 e7211577 -- aws-integration-setup/= 2 insertions) and reverts fix(terraform): accept every KMS key form the collector accepts #82's only code change, which this branch never had. Merging fix(terraform): keep k8s-resources KMS input to the two ARN forms S3 can resolve #88 anyway reproduces the duplicate:git merge-tree HEAD origin/fix/terraform-collector-kms-input-forms-r2lands both paragraphs, atREADME.md:280and:284.scan_mode = "both"rejection moves intomodules/k8s-resourcesas a precondition on the managed-scan ClusterRole, with a test row and a README paragraph by the variable list.multi-cluster-complete/terraform.tfvars.exampleis commented out and reshaped so the variable regex rejects it if pasted as-is.modules/dirs.terraform teston this base already covers all six at 1.8.5 and 1.10.5, and is the only job evaluatingvalidationblocks and preconditions.arn:aws:(eks-managed-scan-access/variables.tf:6,:22,:26,:43,:77, bothkms_key_arnregexes), sosplit(":", arn)[1]can only beaws.Removing a declared variable breaks a direct module caller that sets it; no shipped example or root does. Nothing run locally — no terraform, helm, kubectl or AWS calls.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.