-
Notifications
You must be signed in to change notification settings - Fork 140
fix: pin trivy-action and setup-trivy to commit SHAs #3035
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
1f6495a
fix: pin trivy-action and setup-trivy to commit SHAs
FrankApiyo 45c1bfe
fix: bump trivy to v0.69.3, SHA-pin all actions in CI workflows
ukanga b4e5e87
fix: SHA-pin all actions in Docker build workflows
ukanga 5b63f9a
chore: add dependabot for GitHub Actions updates
ukanga aecd4fc
Merge pull request #3036 from onaio/fix/trivy-supply-chain-remediatio…
FrankApiyo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,10 +19,10 @@ jobs: | |
| fail-fast: false | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
|
|
||
| - name: Setup python | ||
| uses: actions/setup-python@v5 | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||
| with: | ||
| python-version: "3.10" | ||
| architecture: "x64" | ||
|
|
@@ -99,16 +99,16 @@ jobs: | |
| --health-retries 5 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
|
|
||
| - name: Setup Java | ||
| uses: actions/setup-java@v4 | ||
| uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4 | ||
| with: | ||
| distribution: "adopt" | ||
| java-version: "8" | ||
|
|
||
| - name: Setup python | ||
| uses: actions/setup-python@v5 | ||
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 | ||
| with: | ||
| python-version: "3.10" | ||
| architecture: "x64" | ||
|
|
@@ -154,22 +154,22 @@ jobs: | |
| run: echo "IS_PUBLIC_REPO=$(if [ ${{ github.event.repository.private }} = false ]; then echo true; else echo false; fi)" >> $GITHUB_ENV | ||
|
|
||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | ||
|
|
||
| - name: Update apt sources | ||
| run: sudo apt-get update | ||
|
|
||
| - name: Docker meta | ||
| id: meta | ||
| uses: docker/metadata-action@v5 | ||
| uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5 | ||
| with: | ||
| images: onaio/onadata | ||
| tags: | | ||
| type=ref,event=branch | ||
| type=ref,event=pr | ||
|
|
||
| - name: Build Docker image | ||
| uses: docker/build-push-action@v6 | ||
| uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6 | ||
| with: | ||
| context: . | ||
| file: ./docker/onadata-uwsgi/Dockerfile.ubuntu | ||
|
|
@@ -184,10 +184,10 @@ jobs: | |
| optional_packages=PyYAML django-redis ${{ secrets.ECR_OPTIONAL_PACKAGES }} | ||
|
|
||
| - name: Install Trivy | ||
| uses: aquasecurity/setup-trivy@v0.2.6 | ||
| uses: aquasecurity/setup-trivy@3fb12ec12f41e471780db15c232d5dd185dcb514 # v0.2.6 | ||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| with: | ||
| version: v0.69.1 | ||
| version: v0.69.3 | ||
| cache: true | ||
|
|
||
| - name: Configure Trivy VEX Hub with DHI advisories | ||
|
|
@@ -206,10 +206,10 @@ jobs: | |
| trivy vex repo download | ||
|
|
||
| - name: Run Trivy vulnerability scanner | ||
| uses: aquasecurity/trivy-action@c1824fd6edce30d7ab345a9989de00bbd46ef284 # v0.34.0 | ||
| uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. v0.69.3? |
||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| with: | ||
| version: "v0.69.1" | ||
| version: "v0.69.3" | ||
| image-ref: ${{ steps.meta.outputs.tags }} | ||
| format: sarif | ||
| ignore-unfixed: false | ||
|
|
@@ -220,7 +220,7 @@ jobs: | |
|
|
||
| - name: Cache Trivy HTML template | ||
| id: cache-template | ||
| uses: actions/cache@v4 | ||
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4 | ||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| with: | ||
| path: html.tpl | ||
|
|
@@ -236,10 +236,10 @@ jobs: | |
| wget -q "$url" -O html.tpl | ||
|
|
||
| - name: Run Trivy vulnerability scanner (HTML report) | ||
| uses: aquasecurity/trivy-action@c1824fd6edce30d7ab345a9989de00bbd46ef284 # v0.34.0 | ||
| uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. v0.69.3? |
||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| with: | ||
| version: "v0.69.1" | ||
| version: "v0.69.3" | ||
| image-ref: ${{ steps.meta.outputs.tags }} | ||
| format: "template" | ||
| template: "@html.tpl" | ||
|
|
@@ -250,23 +250,23 @@ jobs: | |
| trivy-config: trivy.yaml | ||
|
|
||
| - name: Upload Trivy SARIF as artifact | ||
| uses: actions/upload-artifact@v4 | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | ||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| with: | ||
| name: trivy-sarif-results | ||
| path: trivy_results.sarif | ||
| retention-days: 30 | ||
|
|
||
| - name: Upload Trivy HTML report as artifact | ||
| uses: actions/upload-artifact@v4 | ||
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | ||
| if: github.event_name == 'pull_request' || github.event_name == 'push' | ||
| with: | ||
| name: trivy-html-report | ||
| path: trivy_results.html | ||
| retention-days: 30 | ||
|
|
||
| - name: Upload vulnerability scan results | ||
| uses: github/codeql-action/upload-sarif@v4 | ||
| uses: github/codeql-action/upload-sarif@256d634097be96e792d6764f9edaefc4320557b1 # v4 | ||
| if: (github.event_name == 'push' || github.event_name == 'pull_request') && env.IS_PUBLIC_REPO == 'true' | ||
| with: | ||
| sarif_file: "trivy_results.sarif" | ||
|
|
@@ -343,7 +343,7 @@ jobs: | |
| echo "EOF" >> $GITHUB_ENV | ||
|
|
||
| - name: Send Slack Notification | ||
| uses: slackapi/slack-github-action@v1.23.0 | ||
| uses: slackapi/slack-github-action@007b2c3c751a190b6f0f040e47ed024deaa72844 # v1.23.0 | ||
| if: github.event_name == 'push' || github.event_name == 'pull_request' | ||
| with: | ||
| payload: | | ||
|
|
||
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
v0.69.3?