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

Allow using GITHUB_TOKEN in the Trivy plugin #733

Open
estar-platform-team opened this issue Feb 3, 2025 · 2 comments
Open

Allow using GITHUB_TOKEN in the Trivy plugin #733

estar-platform-team opened this issue Feb 3, 2025 · 2 comments

Comments

@estar-platform-team
Copy link

Our Trivy plugin container is crashing and the last few error lines are

1.7385860129482949e+09  error  v1/handler.go:66  failed to policy details  {"error": "GHSA-32gq-x56h-299c: GET https://api.github.com/advisories/GHSA-32gq-x56h-299c: 403 API rate limit exceeded for 3.75.66.29. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.) [rate reset in 28m30s]"}
1.7385860147505121e+09  error  v1/handler.go:66  failed to policy details  {"error": "GHSA-mh55-gqvf-xfwm: GET https://api.github.com/advisories/GHSA-mh55-gqvf-xfwm: 403 API rate limit of 60 still exceeded until 2025-02-03 13:01:48 +0000 UTC, not making remote request. [rate reset in 28m13s]"}
1.7385860147506497e+09  error  v1/handler.go:66  failed to policy details  {"error": "GHSA-xpw8-rcwv-8f8p: GET https://api.github.com/advisories/GHSA-xpw8-rcwv-8f8p: 403 API rate limit of 60 still exceeded until 2025-02-03 13:01:48 +0000 UTC, not making remote request. [rate reset in 28m13s]"}

We tried running the container with the GITHUB_TOKEN env var but it does not seem to have an effect

We tried running the container with logLevel: -1 but it does not seem to have an effect either, so we cannot verify github is the cause or there is something else happening between the API rating and the container crash

@fjogeleit
Copy link
Member

Thanks I will take a Look on this. Don’t think the env is currently Supported. Will add this Feature.

@fjogeleit
Copy link
Member

The newest release should support setting the github token for authenticated calls via the plugin.trivy.github.token configuration or via GITHUB_TOKEN env. Can be set via envVars: https://github.com/kyverno/policy-reporter/blob/main/charts/policy-reporter/values.yaml#L1459

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants