Skip to content

Commit eb09e9d

Browse files
authored
chore: migrate container scanning from Snyk to Docker Scout (#124)
## Summary Replace Snyk container vulnerability scanning with **Docker Scout** — Docker's official first-party tool. ## Changes - **Removed** `.github/workflows/snyk-container-analysis.yml` - **Added** `.github/workflows/docker-scout.yml` using `docker/scout-action@v1` - **Updated** README badge from Snyk Container → Docker Scout ## Why | | Snyk | Docker Scout | |---|---|---| | Vendor | 3rd party | **Docker (official)** | | API token | Required (`SNYK_TOKEN`) | None needed for public repos | | Free tier | Limited scans | Unlimited for public repos | ## Behavior - Same triggers: push/PR to `main` on Dockerfile or workflow changes - Same severity: `critical,high` only - Same output: SARIF uploaded to GitHub Code Scanning - Builds `xianpengshen/clang-tools:21` before scanning (same target as before)
1 parent 2d81203 commit eb09e9d

3 files changed

Lines changed: 57 additions & 50 deletions

File tree

.github/workflows/docker-scout.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Docker Scout
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths:
7+
- 'Dockerfile*'
8+
- '.github/workflows/docker-scout.yml'
9+
pull_request:
10+
branches: [main]
11+
paths:
12+
- 'Dockerfile*'
13+
- '.github/workflows/docker-scout.yml'
14+
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
security-events: write
19+
20+
jobs:
21+
scout:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
28+
29+
- name: Build image
30+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
31+
with:
32+
file: Dockerfile
33+
build-args: |
34+
BASE_IMAGE=ubuntu:questing
35+
CLANG_VERSION=21
36+
load: true
37+
tags: xianpengshen/clang-tools:21
38+
39+
- name: Login to Docker Hub
40+
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
41+
with:
42+
username: ${{ secrets.DOCKER_USERNAME }}
43+
password: ${{ secrets.DOCKER_PASSWORD }}
44+
45+
- name: Docker Scout CVEs
46+
uses: docker/scout-action@bacf462e8d090c09660de30a6ccc718035f961e3 # v1.20.4
47+
with:
48+
command: cves
49+
image: xianpengshen/clang-tools:21
50+
sarif-file: scout.sarif
51+
only-severities: critical,high
52+
53+
- name: Upload SARIF to GitHub Code Scanning
54+
uses: github/codeql-action/upload-sarif@03e4368ac7daa2bd82b3e85262f3bf87ee112f57 # v3.35.1
55+
with:
56+
sarif_file: scout.sarif

.github/workflows/snyk-container-analysis.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![GitHub Repo](https://img.shields.io/badge/GitHub%20Repo-URL-blue?logo=github)](https://github.com/cpp-linter/clang-tools-docker)
55
![Maintenance](https://img.shields.io/maintenance/yes/2026)
66
[![CI](https://github.com/cpp-linter/clang-tools-docker/actions/workflows/CI.yml/badge.svg)](https://github.com/cpp-linter/clang-tools-docker/actions/workflows/CI.yml)
7-
[![Snyk Container](https://github.com/cpp-linter/clang-tools-docker/actions/workflows/snyk-container-analysis.yml/badge.svg)](https://github.com/cpp-linter/clang-tools-docker/actions/workflows/snyk-container-analysis.yml)
7+
[![Docker Scout](https://github.com/cpp-linter/clang-tools-docker/actions/workflows/docker-scout.yml/badge.svg)](https://github.com/cpp-linter/clang-tools-docker/actions/workflows/docker-scout.yml)
88

99
🐳 **Clang Tools Docker Image**: This Docker image comes pre-installed with essential clang tools, including `clang-format` and `clang-tidy`.
1010

0 commit comments

Comments
 (0)