Repository navigation
Replies: 1 comment
|
I'm experiencing similar issues with some AMIs I'm trying to scan. What I've discovered, so far, to be the primary difference between this AMI and ones that work is the unscannable AMI does not have have a partition table and instead is a direct ext4 filesystem on the block device with a grub bootloader. The scannable AMIs use a gpt partition table with the first partition being the ext4 filesystem. Perhaps the Trivy's AMI/EBS handler is expecting the device to be partitioned? |
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
I could not find any discussions/issues which report this.
We're trying to scan an AMI using trivy on an EC2 instance (m6g.large), pointing it at an AMI we use.
The AMI is a base image, created from a clean Alma Linux 9 AMI with some compliance configuration but no applications/services installed.
Initially we tried and when encountered errors were unclear whether or not it was caused by the EBS volume and associated snapshot being encrypted. We created a copy of the AMI which was unencrypted but still encounter the same issue.
Ensured that the IAM Role used by the instance has the permissions described:
Tried running
trivy vm --distro alma/9 --scanners vuln --aws-region xxxxxxx ami:ami-xxxxxxxxxxxxxxxxx(from looking at https://trivy.dev/dev/docs/target/vm/#__code_7 and the output of trivy vm --help) and got this output:Edit: launched a new instance from the AMI we are trying to scan; installed Trivy and ran a fs scan on itself; this produces results, so one would expect scanning the AMI would produce similar output
Desired Behavior
Trivy should perform some scanning
Actual Behavior
No scanning took place
Reproduction Steps
Target
Virtual Machine Image
Scanner
Vulnerability
Output Format
Table
Mode
Standalone
Debug Output
Operating System
Alma Linux 9.5 (Teal Serval)
Version
Checklist
All reactions