-
Notifications
You must be signed in to change notification settings - Fork 0
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 #19 from GeorgeDavis-Ibexlabs/dev
Merge change from `dev` into `main`
- Loading branch information
Showing
2 changed files
with
44 additions
and
32 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 |
---|---|---|
|
@@ -20,7 +20,7 @@ permissions: | |
security-events: write | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
jobs: | ||
iac-scan: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-latest | ||
|
@@ -58,6 +58,20 @@ jobs: | |
if: steps.changed-files.outputs.any_changed == 'true' | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Log in to Docker Hub | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Extract metadata (tags, labels) for Docker | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
id: meta | ||
uses: docker/[email protected] | ||
with: | ||
images: georgedavisibexlabs/publish-sarif-to-jira | ||
|
||
- name: Build Docker image | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
uses: docker/[email protected] | ||
|
@@ -66,16 +80,17 @@ jobs: | |
file: Dockerfile | ||
push: false | ||
# sbom: true | ||
tags: georgedavisibexlabs/publish-sarif-to-jira:build | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- name: Run Trivy in GitHub SBOM mode and submit results to Dependency Graph | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
uses: aquasecurity/[email protected] | ||
with: | ||
scan-type: 'fs' | ||
format: 'github' | ||
output: 'dependency-results.sbom.json' | ||
image-ref: '.' | ||
scan-type: "fs" | ||
format: "github" | ||
output: "dependency-results.sbom.json" | ||
image-ref: "georgedavisibexlabs/publish-sarif-to-jira:main" | ||
github-pat: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload trivy SBOM as a Github artifact | ||
|
@@ -86,30 +101,22 @@ jobs: | |
path: trivy-dependency-results.sbom.json | ||
retention-days: 30 | ||
|
||
- name: List Docker Containers | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: 'docker ps -a' | ||
- name: Run Trivy Image scanner | ||
uses: aquasecurity/[email protected] | ||
with: | ||
scan-type: "image" | ||
image-ref: "georgedavisibexlabs/publish-sarif-to-jira:main" | ||
limit-severities-for-sarif: true | ||
trivy-config: .github/config/trivy-sarif.yaml | ||
|
||
- name: List Docker Images | ||
if: steps.changed-files.outputs.any_changed == 'true' | ||
run: 'docker images' | ||
|
||
# - name: Run Trivy Image scanner | ||
# uses: aquasecurity/[email protected] | ||
# with: | ||
# scan-type: 'image' | ||
# image-ref: 'georgedavisibexlabs/publish-sarif-to-jira' | ||
# limit-severities-for-sarif: true | ||
# trivy-config: .github/config/trivy-sarif.yaml | ||
|
||
# - name: Upload Trivy Image scan results | ||
# uses: actions/[email protected] | ||
# with: | ||
# name: trivy-image-scan-results | ||
# path: trivy-image-scan-results.sarif | ||
# retention-days: 30 | ||
|
||
# - name: Upload Trivy scan results to GitHub Security tab | ||
# uses: github/codeql-action/upload-sarif@v3 | ||
# with: | ||
# sarif_file: 'trivy-image-scan-results.sarif' | ||
- name: Upload Trivy Image scan results | ||
uses: actions/[email protected] | ||
with: | ||
name: trivy-image-scan-results | ||
path: trivy-image-scan-results.sarif | ||
retention-days: 30 | ||
|
||
- name: Upload Trivy scan results to GitHub Security tab | ||
uses: github/codeql-action/upload-sarif@v3 | ||
with: | ||
sarif_file: "trivy-image-scan-results.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