Skip to content

Commit

Permalink
Use docker login before Trivy action
Browse files Browse the repository at this point in the history
  • Loading branch information
smola committed Oct 23, 2024
1 parent 893bd2d commit 5eaa988
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/analyze-changes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ jobs:
cp -RP "${MVN_LOCAL_REPO}/com/datadoghq" ./workspace/.trivy/
ls -laR "./workspace/.trivy"
# NOTE: This avoids rate limits when pulling Trivy
- name: Login to GitHub Container Registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Run Trivy security scanner
uses: aquasecurity/trivy-action@6e7b7d1fd3e4fef0c5fa8cce1229c54b2c9bd0d8 # v0.24.0
with:
Expand Down

0 comments on commit 5eaa988

Please sign in to comment.