Skip to content

Commit ec68dad

Browse files
fix: only block release on critical or high severity issues
1 parent 065e901 commit ec68dad

File tree

2 files changed

+68
-1
lines changed

2 files changed

+68
-1
lines changed

.github/workflows/vuln-check.yaml renamed to .github/workflows/vuln-check-full.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
cp dist/linux_amd64/default_linux_amd64_v1/observe-agent .
5858
5959
- name: Build an image from Dockerfile
60-
run: docker build -f packaging/docker/Dockerfile -t docker.io/${{ env.TEST_TAG}} .
60+
run: docker build -f packaging/docker/Dockerfile -t docker.io/${{ env.TEST_TAG }} .
6161

6262
- name: Docker Scout
6363
id: docker-scout
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Pre-release Docker Image Vulnerability Check
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
branch:
7+
required: true
8+
type: string
9+
10+
permissions:
11+
contents: read
12+
13+
env:
14+
TEST_TAG: observeinc/observe-agent:test
15+
16+
jobs:
17+
vuln-check:
18+
runs-on: ubuntu-observe-agent-8cpu
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
ref: ${{ github.event.inputs.branch }}
25+
26+
- name: Login to Docker Hub
27+
uses: docker/login-action@v3
28+
with:
29+
username: ${{ secrets.DOCKERHUB_USERNAME }}
30+
password: ${{ secrets.DOCKERHUB_TOKEN }}
31+
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v3
34+
35+
- name: Set up Go
36+
uses: actions/setup-go@v5
37+
with:
38+
go-version: 1.23.7
39+
40+
- name: Run GoReleaser
41+
uses: goreleaser/goreleaser-action@v6
42+
with:
43+
distribution: goreleaser-pro
44+
version: 2.7.0
45+
args: build --snapshot --id=default --skip=validate --single-target
46+
env:
47+
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
48+
49+
- name: Copy Binary
50+
run: |
51+
cp dist/linux_amd64/default_linux_amd64_v1/observe-agent .
52+
53+
- name: Build an image from Dockerfile
54+
run: docker build -f packaging/docker/Dockerfile -t docker.io/${{ env.TEST_TAG }} .
55+
56+
- name: Docker Scout
57+
id: docker-scout
58+
uses: docker/scout-action@v1
59+
with:
60+
image: ${{ env.TEST_TAG }}
61+
command: cves,recommendations
62+
to-latest: true
63+
ignore-base: true
64+
ignore-unchanged: true
65+
only-fixed: false
66+
only-severities: critical,high
67+
exit-code: true

0 commit comments

Comments
 (0)