File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,27 @@ jobs:
19
19
with : { go-version: stable }
20
20
- run : go mod download
21
21
22
+ # Login to the GitHub Packages registry to avoid rate limiting.
23
+ # - https://aquasecurity.github.io/trivy/v0.55/docs/references/troubleshooting/#github-rate-limiting
24
+ # - https://github.com/aquasecurity/trivy/issues/7580
25
+ # - https://github.com/aquasecurity/trivy-action/issues/389
26
+ # - https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry
27
+ # - https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions
28
+ - name : Login to GitHub Packages
29
+ run : >
30
+ docker login ghcr.io
31
+ --username '${{ github.actor }}'
32
+ --password-stdin <<< '${{ secrets.GITHUB_TOKEN }}'
33
+
22
34
# Report success only when detected licenses are listed in [/trivy.yaml].
23
35
# The "aquasecurity/trivy-action" action cannot access the Go module cache,
24
36
# so run Trivy from an image with the cache and local configuration mounted.
25
37
# - https://github.com/aquasecurity/trivy-action/issues/219
26
38
# - https://github.com/aquasecurity/trivy/pkgs/container/trivy
27
- - run : >
39
+ - name : Scan licenses
40
+ run : >
28
41
docker run
42
+ --env 'DOCKER_CONFIG=/docker' --volume "${HOME}/.docker:/docker"
29
43
--env 'GOPATH=/go' --volume "$(go env GOPATH):/go"
30
44
--workdir '/mnt' --volume "$(pwd):/mnt"
31
45
'ghcr.io/aquasecurity/trivy:latest'
You can’t perform that action at this time.
0 commit comments