FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

add trivy cache by sam-trace · Pull Request #63 · hypertrace/github-actions · GitHub

add trivy cache - #63

Open
sam-trace wants to merge 3 commits into
mainfrom
trivy-cache
Open

add trivy cache#63
sam-trace wants to merge 3 commits into
mainfrom
trivy-cache

Conversation

Copy link
Copy Markdown
Contributor

Description

trivy scans are failing because of db download. this is a fix to the below issue

aquasecurity/trivy#7668

Comment thread trivy-fs-scan/action.yaml
shell: sh
id: date
run: |
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

If we're putting the date into the cache, what's the point? It's just going to accumulate cache entries. I would suggest we make caching optional.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

removed caching . since vulnerabilities are updated daily, we cannot cache it after a day.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

How does pulling this manually via oras help? the rate limit is on ghcr. In the linked thread, they suggest you can just use their public ECR instead which can be passed as a flag.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

TRIVY_DB_REPOSITORY=ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db

Seems like this should fallback to the public ECR (should be a similar one for the java db). There's also rate limiting there but we can either set up a user or just hope that having two options should be good enough.

Comment thread trivy-fs-scan/action.yaml Outdated
rm javadb.tar.gz

- name: Cache DBs
uses: actions/cache/save@v4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

There's no cache restore in this flow. It's atypical to use cache save directly, but if if we're going to we should be doing a restore on cache hit.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL