-
Notifications
You must be signed in to change notification settings - Fork 2
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
[#291] Added generic scan workflow. #292
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
335fd72
[291] Added generic scan workflow.
GROwen d11959e
[291] Reverted dockerize version.
GROwen 78475fe
[291] Hardcoded image tag for testing.
GROwen c57d7c9
[291] Debug matrix inputs.
GROwen e7607fa
[291] Added feature branch to conditional.
GROwen 2f61cf6
[291] Debug matrix excludes.
GROwen 5f002cb
[291] Refactored excludes.
GROwen 9f4b128
[291] Removed annotations. Updated tag.
GROwen 89aa4b5
[291] Added summary as input to workflow.
GROwen 967b826
[291] Removed variable from summary input.
GROwen a653839
[291] Updated setting of source ref.
GROwen cd0eedf
[291] Removed var name assignment for summary.
GROwen 1fba3cc
[291] Hardcoded image tag for validation of functionality.
GROwen f73c17d
[291] Renamed workflow to avoid conflict with archived.
GROwen 6e7d3df
[291] Removed redundant workflows.
GROwen d2a0657
[291] Reverted tag validation.
GROwen 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,55 @@ | ||
name: vulnerability-scan | ||
run-name: Scheduled CVE vulnerability scan of published images. | ||
env: | ||
REGISTRY: ghcr.io | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
summary: | ||
description: 'Summary of the scheduled scan.' | ||
required: false | ||
default: 'Trivy CVE scan of published images.' | ||
jobs: | ||
setup-matrix: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set summary | ||
run: echo "${{ github.event.inputs.summary }}" >> $GITHUB_STEP_SUMMARY | ||
- if: github.ref_name == '5.x' | ||
uses: druzsan/setup-matrix@v2 | ||
with: | ||
matrix: | | ||
images: ${{ vars.IMAGES }} | ||
exclude: | ||
- images: mailpit | ||
- if: github.ref_name != '5.x' | ||
uses: druzsan/setup-matrix@v2 | ||
with: | ||
matrix: | | ||
images: ${{ vars.IMAGES }} | ||
exclude: | ||
- images: mailpit | ||
- id: setup-matrix | ||
run: echo "matrix=$MATRIX" >> $GITHUB_OUTPUT | ||
outputs: | ||
matrix: ${{ steps.setup-matrix.outputs.matrix }} | ||
vulnerability-scan-schedule: | ||
runs-on: ubuntu-latest | ||
needs: setup-matrix | ||
strategy: | ||
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.inputs.ref }} | ||
- name: Scan for vulnerabilities | ||
id: scan | ||
uses: crazy-max/ghaction-container-scan@v3 | ||
with: | ||
image: ${{ env.REGISTRY }}/${{ github.repository }}/${{ matrix.images }}:${{ github.ref_name }} | ||
dockerfile: ./images/${{ matrix.images }} | ||
- name: Upload SARIF file | ||
if: ${{ steps.scan.outputs.sarif != '' }} | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: ${{ steps.scan.outputs.sarif }} |
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.
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.
Is this fixed elsewhere?
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.
yep, #295