Skip to content

Commit 1c232ed

Browse files
fix: only block release on fixed issues with higher severity than low (#179)
### Description Only block release on fixed issues with higher severity than low. This will ensure we can still release in the 180 day window we have to fix low severity issues, or when we know about an issue that has no fix.
1 parent 065e901 commit 1c232ed

File tree

3 files changed

+70
-8
lines changed

3 files changed

+70
-8
lines changed

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ permissions:
1515

1616
jobs:
1717
vuln-check:
18-
name: Docker Image Vulnerability Check
19-
uses: ./.github/workflows/vuln-check.yaml
18+
name: Pre-release Docker Image Vulnerability Check
19+
uses: ./.github/workflows/vuln-check-release.yaml
2020
secrets: inherit
2121
with:
2222
branch: ${{ github.ref }}

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ on:
77
description: "The branch on which to run the vulnerability check"
88
required: true
99
default: "main"
10-
workflow_call:
11-
inputs:
12-
branch:
13-
required: true
14-
type: string
1510

1611
permissions:
1712
contents: read
@@ -57,7 +52,7 @@ jobs:
5752
cp dist/linux_amd64/default_linux_amd64_v1/observe-agent .
5853
5954
- name: Build an image from Dockerfile
60-
run: docker build -f packaging/docker/Dockerfile -t docker.io/${{ env.TEST_TAG}} .
55+
run: docker build -f packaging/docker/Dockerfile -t docker.io/${{ env.TEST_TAG }} .
6156

6257
- name: Docker Scout
6358
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: true
66+
only-severities: medium,critical,high
67+
exit-code: true

0 commit comments

Comments
 (0)