Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot scan AMI on AWS with v0.4.8.1 #5821

Closed
1 of 2 tasks
nikpivkin opened this issue Dec 25, 2023 Discussed in #5807 · 6 comments · Fixed by #5822
Closed
1 of 2 tasks

Cannot scan AMI on AWS with v0.4.8.1 #5821

nikpivkin opened this issue Dec 25, 2023 Discussed in #5807 · 6 comments · Fixed by #5822
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. target/vm Issues relating to virtual machine scanning

Comments

@nikpivkin
Copy link
Contributor

Discussed in #5807

Originally posted by mloiseleur December 19, 2023

Description

Same scan command, that did work with v0.48.0 do not work with v0.48.1.
It seems it encounter this specific issue: aws/aws-sdk-go-v2#2370 , when an AWS go mod dependency has been updated but not the others.

Desired Behavior

$ ./trivy version
Version: 0.48.1
[...]
$ trivy scan vm ami:ami-XXXX
[ Scan is done]

Actual Behavior

$ trivy scan vm ami:ami-XXXX
2023-12-19T14:46:21.847+0100	INFO	Vulnerability scanning is enabled
2023-12-19T14:46:21.847+0100	INFO	Misconfiguration scanning is enabled
2023-12-19T14:46:21.869+0100	FATAL	vm scan error: scan error: unable to initialize a scanner: unable to initialize a vm scanner: ec2.DescribeImages: not found, ResolveEndpointV2

Reproduction Steps

Note: same exact command works perfectly fine with v0.48.0

Target

Virtual Machine Image

Scanner

Vulnerability

Output Format

None

Mode

None

Debug Output

N/A

Operating System

Linux AMD64

Version

Version: 0.48.1

Checklist

@nikpivkin nikpivkin added kind/bug Categorizes issue or PR as related to a bug. target/vm Issues relating to virtual machine scanning labels Dec 25, 2023
@mloiseleur
Copy link

@nikpivkin @masahiro331 It's still does not work with v0.48.2. One can see this error message when switching from 0.48.0 to 0.48.2, with same conf & env, just changing image tag:

2024-01-11T13:27:28.581Z	INFO	Snapshot snap-0793dc1b3b75c0cac found
2024-01-11T13:27:28.582Z	FATAL	vm scan error: scan error: scan failed: failed analysis: EBS open error: EBS error: not found, ResolveEndpointV2
2024-01-11T13:27:30.503Z	INFO	Vulnerability scanning is enabled
2024-01-11T13:27:30.503Z	INFO	Misconfiguration scanning is enabled
2024-01-11T13:27:31.289Z	INFO	Snapshot snap-0e788653fa93a9d4e found
2024-01-11T13:27:31.290Z	FATAL	vm scan error: scan error: scan failed: failed analysis: EBS open error: EBS error: not found, ResolveEndpointV2
2024-01-11T13:27:33.166Z	INFO	Vulnerability scanning is enabled
2024-01-11T13:27:33.166Z	INFO	Misconfiguration scanning is enabled
2024-01-11T13:27:33.830Z	INFO	Snapshot snap-0f8a3647c96941cae found
2024-01-11T13:27:33.830Z	FATAL	vm scan error: scan error: scan failed: failed analysis: EBS open error: EBS error: not found, ResolveEndpointV2

@nikpivkin
Copy link
Contributor Author

nikpivkin commented Jan 11, 2024

@masahiro331 I've opened a PR, could you take a look?

@tburow
Copy link

tburow commented Jan 19, 2024

#5822 did not fix the issue - is there an update on this?? - trying to follow the multiple threads and there's not really an answer on this one yet that I can see

thanks
Tim

@knqyf263
Copy link
Collaborator

@tburow Fixed in #5934. You can try canary builds.
https://github.com/aquasecurity/trivy/actions/runs/7527808000

@tburow
Copy link

tburow commented Jan 22, 2024

@tburow Fixed in #5934. You can try canary builds. https://github.com/aquasecurity/trivy/actions/runs/7527808000

is there going to be a patch release or do we need to wait for .49? if .49 when will that be? - Thanks again

@knqyf263
Copy link
Collaborator

v0.49.0 will include it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. target/vm Issues relating to virtual machine scanning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants