[17644] Update Production Backend Docker Image.
This PR Is a first step attempt at removing vulnerabilities from the ReportStream Docker image. The specific goals for this PR are to:
- Put environment variables of the
Dockerfileinside of curly braces as a best practice. - Make changes to run the application as a non-root user.
- Add the
—no-cacheflag to the docker build command inactions/build-backend/action.yml. - Use Microsoft's nightly builds to address the Debian-related vulnerabilities.
Test Steps:
- Install
trivy(brew install trivy) on your local machine. - Checkout the
mainbranch of ReportStream. - Run
docker build . --file Dockerfile --tag cdcgov/reportstream:latest --no-cachein theprime-routerdirectory. - Run
trivy image --severity HIGH,CRITICAL --ignore-unfixed cdcgov/reportstream:latest - Note the Debian-related vulnerabilities in the output.
- Checkout this branch.
- Repeat steps 3 through 5.
Changes
- See this.
Checklist
Testing
- [x] Tested locally?
Process
- [x] Includes a summary of what a code reviewer should test/verify?
- [x] DevOps team has been notified if PR requires ops support?
Linked Issues
N/A
To Be Done
*Create additional useer story to address runtime jar vulnerabilities in build.gradle.kts.
Specific Security-related subjects a reviewer should pay specific attention to
N/A
Dependency Review
✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.OpenSSF Scorecard
| Package | Version | Score | Details |
|---|
Scanned Manifest Files
Test Results
1 323 tests ±0 1 318 :white_check_mark: ±0 7m 46s :stopwatch: +11s 172 suites ±0 5 :zzz: ±0 172 files ±0 0 :x: ±0
Results for commit de2b96d1. ± Comparison against base commit 38b145c2.
:recycle: This comment has been updated with latest results.
Integration Test Results
60 files ±0 60 suites ±0 38m 7s :stopwatch: +26s 428 tests ±0 418 :white_check_mark: ±0 10 :zzz: ±0 0 :x: ±0 431 runs ±0 421 :white_check_mark: ±0 10 :zzz: ±0 0 :x: ±0
Results for commit de2b96d1. ± Comparison against base commit 38b145c2.
:recycle: This comment has been updated with latest results.
:tada: Snyk checks have passed. No issues have been found so far.
:white_check_mark: security/snyk check is complete. No issues have been found. (View Details)
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code