Make docker images scanner weekly and triggered on allowed images update #145
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 docker images from the allowed docker images list" | ||
on: | ||
# we should run this job if somebody wants to add/update allowed docker images | ||
pull_request: | ||
paths: | ||
- 'tests/tck-build-logic/src/main/resources/allowed-docker-images' | ||
# we should run this job once a week to check if new vulnerabilities are found in existing images | ||
schedule: | ||
- chron: "0 0 * * 6" | ||
jobs: | ||
scan-images: | ||
name: "🔎 Scan docker images" | ||
runs-on: "ubuntu-20.04" | ||
steps: | ||
- name: "☁️ Checkout repository" | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- uses: graalvm/setup-graalvm@v1 | ||
with: | ||
java-version: '17' | ||
distribution: 'graalvm' | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: "🔎 Check docker images" | ||
run: | | ||
curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sudo sh -s -- -b /usr/local/bin | ||
sudo apt-get install jq | ||
./gradlew checkAllowedDockerImages |