feat(container)!: Update image bitnami/mongodb ( 7.0 → 8.0 ) #687
Workflow file for this run
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
--- | |
name: Scan Containers | |
on: # yamllint disable-line rule:truthy | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "k8s/**.yaml" | |
- "provision/ansible/**.yml.j2" | |
jobs: | |
detect-file-changes: | |
name: Detect File Changes | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
list-files: json | |
filters: | | |
yaml: | |
- added|modified: "**.yaml" | |
- added|modified: "**.yml" | |
- added|modified: "**.yaml.j2" | |
- added|modified: "**.yml.j2" | |
outputs: | |
yaml_files: ${{ steps.filter.outputs.yaml_files }} | |
detect-containers: | |
name: Detect Containers | |
runs-on: ubuntu-latest | |
needs: detect-file-changes | |
strategy: | |
matrix: | |
file: ${{ fromJSON(needs.detect-file-changes.outputs.yaml_files) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Install Jo | |
run: | | |
sudo apt-get install jo -y | |
- name: Detect Containers in Files | |
id: containers | |
run: | | |
containers=$(.github/scripts/container-parser.sh --file "${{ matrix.file }}") | |
# Ensure proper JSON format for matrix | |
echo "containers=$(echo "${containers}" | jq -c '{"containers": .}')" >> $GITHUB_OUTPUT | |
outputs: | |
containers: ${{ steps.detect-containers.outputs.containers }} | |
scan-containers: | |
name: Scan Containers | |
runs-on: ubuntu-latest | |
needs: detect-containers | |
strategy: | |
matrix: ${{ fromJSON(needs.detect-containers.outputs.containers) }} | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 | |
- name: Scan Container | |
uses: aquasecurity/trivy-action@18f2510ee396bbf400402947b394f2dd8c87dbb0 # 0.29.0 | |
with: | |
image-ref: ${{ matrix.containers }} | |
vuln-type: os,library | |
severity: CRITICAL,HIGH | |
format: template | |
template: "@/contrib/sarif.tpl" | |
output: trivy-results.sarif | |
- name: Upload Trivy scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # v3 | |
with: | |
sarif_file: trivy-results.sarif |