trivy icon indicating copy to clipboard operation
trivy copied to clipboard

fix(aws): use `BuildableClient` insead of `xhttp.Client`

Open DmitriyLewen opened this issue 4 months ago • 0 comments

Description

There is a problem with xhttp.Client — Trivy aws-sdk cannot connect to IMDS.
That is why some users cannot get credentials.

The aws docs recommend using BuildableClient — https://docs.aws.amazon.com/sdk-for-go/v2/developer-guide/configure-http.html

This PR changes xhttp.Client to BuildableClient with the insecure option.

Related issues

  • Close #9437

Related PRs

  • [x] #9322

Checklist

  • [x] I've read the guidelines for contributing to this repository.
  • [x] I've followed the conventions in the PR title.
  • [ ] I've added tests that prove my fix is effective or that my feature works.
  • [ ] I've updated the documentation with the relevant information (if needed).
  • [ ] I've added usage information (if the PR introduces new options)
  • [ ] I've included a "before" and "after" example to the description (if the PR is a user interface change).

DmitriyLewen avatar Sep 04 '25 13:09 DmitriyLewen