-
Notifications
You must be signed in to change notification settings - Fork 65
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
Fix publish workflow failure with the new trivy action changes #7385
Comments
@TharmiganK is there a significant time difference when Trivy caching is disabled? |
I also encountered this a few times when releasing the library modules and went with option 2. As per the document referred to, if we disable it, we may experience rate-limiting issues. Has this caching been enabled recently, as we have seen recently? |
The difference is only in seconds. But as @daneshk mentioned caching partially solve the rate-limiting issues and we have added this another fix for rate limiting as well. Btw I am thinking of a third option which uses this - name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
env:
TRIVY_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-db,public.ecr.aws/aquasecurity/trivy-db
TRIVY_JAVA_DB_REPOSITORY: ghcr.io/aquasecurity/trivy-java-db,public.ecr.aws/aquasecurity/trivy-java-db
with:
scan-type: "rootfs"
scan-ref: "${{ github.workspace }}/ballerina/lib"
format: "table"
timeout: "10m0s"
exit-code: "1"
scanners: "vuln"
cache-dir: "/tmp/trivy-cache" |
Description
With the latest trivy action version, the caching is enabled by default. The cache will be stored in
$GITHUB_WORKSPACE/.cache/trivy
. More information can be found here.Since the libraries does not ignore this specific directory -
.cache
, the gradle release sub task -checkCommitNeeded
will fail since this directory is not committed. Sample failure can be found here.There are two possible options to resolve this issue:
.cache/
to the.gitignore
file of each repositoryI prefer the Option 1 since it requires the least changes
Version
Ballerina SwanLake Update 11
The text was updated successfully, but these errors were encountered: