-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4928 from jaredb96/snyk-trivy-pr-scan
Github Actions PR scan
- Loading branch information
Showing
3 changed files
with
5,826 additions
and
54 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: HMDA PR CVE Scan | ||
|
||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
permissions: | ||
pull-requests: write | ||
|
||
jobs: | ||
hmda-platform-cve-scan: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Build Docker image of HMDA platform | ||
run: | | ||
env JAVA_OPTS="-Xss256m -Xmx4096m" sbt "project hmda-platform" dockerPublishLocalSkipTests | ||
continue-on-error: false | ||
|
||
- name: Tag and name Docker image | ||
run: docker tag hmda/hmda-platform:latest pr-cve-scan:latest | ||
|
||
- name: Set up Homebrew | ||
uses: Homebrew/actions/setup-homebrew@master | ||
|
||
- name: Install Grype | ||
run: | | ||
brew install grype | ||
- name: Run Grype scan | ||
run: | | ||
grype pr-cve-scan:latest > grype-report.txt | ||
- name: Upload Grype report to artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: cve-report | ||
path: | | ||
grype-report.txt | ||
- name: Post comment with report link | ||
uses: thollander/actions-comment-pull-request@v3 | ||
with: | ||
message: CVE scan report generated by Grype are available. Check the Actions tab to download the reports. | ||
|
||
- name: Remove Docker image | ||
run: | | ||
docker rmi pr-cve-scan:latest |
This file contains 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.