Repository navigation
Add Trivy security scanning workflow to aws-unified-lambda - #65
Open
app-dp-ci-autopilot[bot] wants to merge 1 commit into
Open
app-dp-ci-autopilot[bot] wants to merge 1 commit into
app-dp-ci-autopilot[bot] wants to merge 1 commit into
Conversation
Enables Trivy Security Scans for filesystem and Docker images. Committing this file to the repo at this path should NOT lead to Grand Central builds / deployments for services associated with this repo.
Comment on lines
+10
to
+33
| name: Trivy Filesystem Scan | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Run Trivy filesystem scan | ||
| uses: aquasecurity/trivy-action@master | ||
| with: | ||
| scan-type: 'fs' | ||
| scan-ref: '.' | ||
| ignore-unfixed: true | ||
| severity: 'HIGH,CRITICAL' | ||
| format: 'sarif' | ||
| output: 'trivy-fs-results.sarif' | ||
|
|
||
| - name: Upload Trivy filesystem results to GitHub Security tab | ||
| if: always() | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| with: | ||
| sarif_file: 'trivy-fs-results.sarif' | ||
|
|
||
| trivy_image_scan: |
Comment on lines
+34
to
+63
| name: Trivy Docker Image Scan | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Build and load Docker image | ||
| uses: docker/build-push-action@v6 | ||
| with: | ||
| context: ./logs-function | ||
| file: ./logs-function/Dockerfile | ||
| load: true | ||
| tags: oci-log-integration-scan:latest | ||
|
|
||
| - name: Run Trivy image scan | ||
| uses: aquasecurity/trivy-action@master | ||
| with: | ||
| scan-type: 'image' | ||
| image-ref: 'oci-log-integration-scan:latest' | ||
| ignore-unfixed: true | ||
| severity: 'HIGH,CRITICAL' | ||
| format: 'sarif' | ||
| output: 'trivy-image-results.sarif' | ||
|
|
||
| - name: Upload Trivy image results to GitHub Security tab | ||
| if: always() | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| with: | ||
| sarif_file: 'trivy-image-results.sarif' No newline at end of file |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request adds a Trivy security scanning workflow. It was
raised automatically by dp-ci-autopilot on behalf of this repository's
integration enrollment.
Trivy scans the filesystem and the Docker image for HIGH and CRITICAL
vulnerabilities on a daily schedule, and uploads the results to this
repository's Security tab.
dp-ci-autopilot will not merge this pull request. Please review and merge
it yourself once the required checks on this repository have passed.
Merging this file should NOT lead to Grand Central builds / deployments
for services associated with this repo.