Skip to content

Container Vulnerability Scan #171

Container Vulnerability Scan

Container Vulnerability Scan #171

name: Container Vulnerability Scan
on:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
container-scan:
if: github.repository_owner == 'cilium'
name: Scan Containers
runs-on: ubuntu-22.04
continue-on-error: true
strategy:
matrix:
image: [
{name: cilium, dockerfile: ./images/cilium/Dockerfile},
{name: clustermesh-apiserver, dockerfile: ./images/clustermesh-apiserver/Dockerfile},
{name: docker-plugin, dockerfile: ./images/cilium-docker-plugin/Dockerfile},
{name: hubble-relay, dockerfile: ./images/hubble-relay/Dockerfile},
{name: operator-generic, dockerfile: ./images/operator/Dockerfile},
]
branch: [v1.12, v1.13, v1.14, v1.15]
include:
- image: {name: kvstoremesh, dockerfile: ./images/kvstoremesh/Dockerfile}
branch: v1.14
steps:
- name: Checkout branch
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ matrix.branch }}
persist-credentials: false
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3.3.0
- name: Build local container
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0 # v5.3.0
with:
context: .
tags: ${{ matrix.image.name }}:${{ matrix.branch }}
push: false
load: true
file: ${{ matrix.image.dockerfile }}
build-args: |
OPERATOR_VARIANT=${{ matrix.image.name }}
- name: Checkout VEX data
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
path: vex
sparse-checkout: .openvex.json
- name: Scan image
uses: anchore/scan-action@3343887d815d7b07465f6fdcd395bd66508d486a # v3.6.4
with:
image: ${{ matrix.image.name }}:${{ matrix.branch }}
output-format: table
severity-cutoff: high
vex: vex/.openvex.json