Regression: False positives on aws_s3_bucket with dynamic resources (Trivy v0.65.0) #9415
Closed
bokyung-kang
started this conversation in
Bugs
Replies: 2 comments
-
|
hi @bokyung-kang - could you try v0.66.0? It should be able to handle this. trivy config ~/repos/trivy-issues/9415/main.tf
2025-09-02T19:06:44-06:00 INFO [misconfig] Misconfiguration scanning is enabled
2025-09-02T19:06:50-06:00 INFO [misconfig] Need to update the checks bundle
2025-09-02T19:06:50-06:00 INFO [misconfig] Downloading the checks bundle...
165.20 KiB / 165.20 KiB [----------------------------------------------------------------------------------------------------------------------------------------] 100.00% 2.90 MiB p/s 300ms
2025-09-02T19:06:51-06:00 INFO [terraform scanner] Scanning root module file_path="."
2025-09-02T19:06:52-06:00 INFO Detected config files num=1
Report Summary
┌────────┬───────────┬───────────────────┐
│ Target │ Type │ Misconfigurations │
├────────┼───────────┼───────────────────┤
│ . │ terraform │ 0 │
└────────┴───────────┴───────────────────┘
Legend:
- '-': Not scanned
- '0': Clean (no security findings detected)
- |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Hi, @simar7 thanks for your suggestion. After investigation, we realized the false positives were caused by We’ve updated our code accordingly and will close this discussion. Thanks again for your guidance! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
After upgrading Trivy from v0.64.x to v0.65.0, false positive misconfiguration warnings appear for S3 buckets created dynamically using for_each, even though proper aws_s3_bucket_public_access_block and aws_s3_bucket_server_side_encryption_configuration resources are defined.
In v0.64.x, Trivy suppressed these warnings correctly. In v0.65.0, multiple HIGH-level issues are reported:
This appears to be a regression in how Trivy evaluates dynamic Terraform resources and correlates separate S3-related resources.
Desired Behavior
Trivy should recognize
aws_s3_bucket_public_access_blockandaws_s3_bucket_server_side_encryption_configurationapplied to dynamic buckets, and suppress the relevant HIGH-level AVD warnings.Actual Behavior
Trivy reports multiple HIGH issues for dynamically created S3 buckets, despite the public access block and encryption being properly configured.
Reproduction Steps
Operating System
WSL2 (Ubuntu)
Version
Checklist
trivy clean --allBeta Was this translation helpful? Give feedback.
All reactions