Skip to content

Commit

Permalink
[MISC] Enabling scanning for other images (#118)
Browse files Browse the repository at this point in the history
  • Loading branch information
deusebio authored and rgildein committed Nov 21, 2024
1 parent e8c5c4e commit f6387ec
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build ROCK

on:
workflow_call:
inputs:
branch:
type: string
default: ''

jobs:
lint:
Expand All @@ -27,6 +31,8 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}

- name: Setup LXD
uses: canonical/setup-lxd@main
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,29 @@ on:
branches:
- 3.4-22.04/edge
- 3.5-22.04/edge
- 3.4-22.04/stable
- 3.5-22.04/stable
pull_request:
workflow_call:
inputs:
branch:
type: string
default: ''
jobs:
build:
uses: ./.github/workflows/build.yaml
with:
branch: ${{ inputs.branch }}
scan:
name: Trivy scan and sbom generation
needs: build
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}

- name: Install rockcraft (for skopeo)
run: |
sudo snap install rockcraft --classic --edge
Expand Down Expand Up @@ -48,6 +60,7 @@ jobs:
if: always()
with:
sarif_file: 'trivy-results.sarif'
ref: ${{ inputs.branch }}

- name: Run Trivy in GitHub SBOM mode and submit results to Dependency Graph
uses: aquasecurity/[email protected]
Expand Down

0 comments on commit f6387ec

Please sign in to comment.