mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
fix: respect GITHUB_TOKEN to download artifacts from GHCR (#7580)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
This commit is contained in:
@@ -79,21 +79,25 @@ $ TRIVY_INSECURE=true trivy image [YOUR_IMAGE]
|
||||
```
|
||||
|
||||
### GitHub Rate limiting
|
||||
Trivy uses GitHub API for [VEX repositories](../supply-chain/vex/repo.md).
|
||||
|
||||
!!! error
|
||||
``` bash
|
||||
$ trivy image ...
|
||||
$ trivy image --vex repo ...
|
||||
...
|
||||
API rate limit exceeded for xxx.xxx.xxx.xxx.
|
||||
```
|
||||
|
||||
Specify GITHUB_TOKEN for authentication
|
||||
https://developer.github.com/v3/#rate-limiting
|
||||
Specify GITHUB_TOKEN for [authentication](https://docs.github.com/en/rest/using-the-rest-api/rate-limits-for-the-rest-api?apiVersion=2022-11-28)
|
||||
|
||||
```
|
||||
$ GITHUB_TOKEN=XXXXXXXXXX trivy alpine:3.10
|
||||
$ GITHUB_TOKEN=XXXXXXXXXX trivy image --vex repo [YOUR_IMAGE]
|
||||
```
|
||||
|
||||
!!! note
|
||||
`GITHUB_TOKEN` doesn't help with the rate limit for the vulnerability database and other assets.
|
||||
See https://github.com/aquasecurity/trivy/discussions/8009
|
||||
|
||||
### Unable to open JAR files
|
||||
|
||||
!!! error
|
||||
@@ -217,6 +221,11 @@ Please remove the token and try downloading the DB again.
|
||||
docker logout ghcr.io
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```shell
|
||||
unset GITHUB_TOKEN
|
||||
```
|
||||
|
||||
## Homebrew
|
||||
### Scope error
|
||||
|
||||
Reference in New Issue
Block a user