14
14
15
15
jobs :
16
16
fmt :
17
- uses : testifysec/witness-run-action/ .github/workflows/witness.yml@v0.3.0
17
+ uses : ./ .github/workflows/witness.yml
18
18
with :
19
19
pull_request : ${{ github.event_name == 'pull_request' }}
20
20
step : fmt
21
21
archivista-server : ' https://judge.aws-sandbox-staging.testifysec.dev'
22
- archivista-headers : " Authorization: Token ${{ secrets.sandbox_witness_api_token }}"
23
22
attestations : ' git github environment'
24
23
command : go fmt ./...
24
+ secrets :
25
+ token : ${{ secrets.sandbox_witness_api_token }}
25
26
26
27
vet :
27
- uses : testifysec/witness-run-action/ .github/workflows/witness.yml@v0.3.0
28
+ uses : ./ .github/workflows/witness.yml
28
29
with :
29
30
pull_request : ${{ github.event_name == 'pull_request' }}
30
31
step : vet
31
32
archivista-server : ' https://judge.aws-sandbox-staging.testifysec.dev'
32
- archivista-headers : " Authorization: Token ${{ secrets.sandbox_witness_api_token }}"
33
33
attestations : ' git github environment'
34
34
command : go vet ./...
35
+ secrets :
36
+ token : ${{ secrets.sandbox_witness_api_token }}
35
37
36
38
# --ignore DL3002
37
39
lint :
38
- uses : testifysec/witness-run-action/ .github/workflows/witness.yml@v0.3.0
40
+ uses : ./ .github/workflows/witness.yml
39
41
with :
40
42
pull_request : ${{ github.event_name == 'pull_request' }}
41
43
step : lint
42
44
archivista-server : ' https://judge.aws-sandbox-staging.testifysec.dev'
43
- archivista-headers : " Authorization: Token ${{ secrets.sandbox_witness_api_token }}"
44
45
pre-command-attestations : ' git github environment'
45
46
attestations : ' git github environment'
46
47
pre-command : |
@@ -49,45 +50,50 @@ jobs:
49
50
command : hadolint -f sarif Dockerfile > hadolint.sarif
50
51
artifact-upload-name : hadolint.sarif
51
52
artifact-upload-path : hadolint.sarif
53
+ secrets :
54
+ token : ${{ secrets.sandbox_witness_api_token }}
52
55
53
56
unit-test :
54
57
needs : [fmt, vet, lint]
55
- uses : testifysec/witness-run-action/ .github/workflows/witness.yml@v0.3.0
58
+ uses : ./ .github/workflows/witness.yml
56
59
with :
57
60
pull_request : ${{ github.event_name == 'pull_request' }}
58
61
step : unit-test
59
62
archivista-server : ' https://judge.aws-sandbox-staging.testifysec.dev'
60
- archivista-headers : " Authorization: Token ${{ secrets.sandbox_witness_api_token }}"
61
63
attestations : ' git github environment'
62
64
command : go test ./... -coverprofile cover.out
63
65
artifact-upload-name : cover.out
64
66
artifact-upload-path : cover.out
67
+ secrets :
68
+ token : ${{ secrets.sandbox_witness_api_token }}
65
69
66
70
sast :
67
71
needs : [fmt, vet, lint]
68
- uses : testifysec/witness-run-action/ .github/workflows/witness.yml@v0.3.0
72
+ uses : ./ .github/workflows/witness.yml
69
73
with :
70
74
pull_request : ${{ github.event_name == 'pull_request' }}
71
75
step : sast
72
76
archivista-server : ' https://judge.aws-sandbox-staging.testifysec.dev'
73
- archivista-headers : " Authorization: Token ${{ secrets.sandbox_witness_api_token }}"
74
77
pre-command-attestations : ' git github environment'
75
78
attestations : ' git github environment'
76
79
pre-command : python3 -m pip install semgrep==1.45.0
77
80
command : semgrep scan --config auto ./ --sarif -o semgrep.sarif
78
81
artifact-upload-name : semgrep.sarif
79
82
artifact-upload-path : semgrep.sarif
83
+ secrets :
84
+ token : ${{ secrets.sandbox_witness_api_token }}
80
85
81
86
build :
82
87
needs : [unit-test, sast]
83
- uses : testifysec/witness-run-action/ .github/workflows/witness.yml@v0.3.0
88
+ uses : ./ .github/workflows/witness.yml
84
89
with :
85
90
pull_request : ${{ github.event_name == 'pull_request' }}
86
91
step : build
87
92
archivista-server : ' https://judge.aws-sandbox-staging.testifysec.dev'
88
- archivista-headers : " Authorization: Token ${{ secrets.sandbox_witness_api_token }}"
89
93
attestations : ' git github environment'
90
94
command : go build -o bin/software main.go
95
+ secrets :
96
+ token : ${{ secrets.sandbox_witness_api_token }}
91
97
92
98
build-image :
93
99
needs : [unit-test, sast]
@@ -130,10 +136,10 @@ jobs:
130
136
with :
131
137
step : build-image
132
138
archivista-server : ' https://judge.aws-sandbox-staging.testifysec.dev'
133
- archivista-headers : " Authorization: Token ${{ secrets.sandbox_witness_api_token }}"
134
139
attestations : ' git github environment oci slsa'
135
140
command : |
136
141
/bin/sh -c "docker buildx build -t ${{ steps.meta.outputs.tags }} -o type=docker,dest=image.tar --push ."
142
+ archivista-headers : " ${{ format('Authorization: Token {0}', secrets.sandbox_witness_api_token) }}"
137
143
138
144
- name : Upload Artifact
139
145
uses : actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
@@ -146,12 +152,11 @@ jobs:
146
152
147
153
generate-sbom :
148
154
needs : build-image
149
- uses : testifysec/witness-run-action/ .github/workflows/witness.yml@v0.3.0
155
+ uses : ./ .github/workflows/witness.yml
150
156
with :
151
157
pull_request : ${{ github.event_name == 'pull_request' }}
152
158
step : generate-sbom
153
159
archivista-server : ' https://judge.aws-sandbox-staging.testifysec.dev'
154
- archivista-headers : " Authorization: Token ${{ secrets.sandbox_witness_api_token }}"
155
160
pre-command-attestations : ' git github environment'
156
161
attestations : ' git github environment sbom'
157
162
artifact-download : image.tar
@@ -161,15 +166,16 @@ jobs:
161
166
syft packages docker-archive:/tmp/image.tar --source-name=pkg:oci/testifysec/swf -o cyclonedx-json --file sbom.cdx.json
162
167
artifact-upload-name : sbom.cdx.json
163
168
artifact-upload-path : sbom.cdx.json
169
+ secrets :
170
+ token : ${{ secrets.sandbox_witness_api_token }}
164
171
165
172
secret-scan :
166
173
needs : build-image
167
- uses : testifysec/witness-run-action/ .github/workflows/witness.yml@v0.3.0
174
+ uses : ./ .github/workflows/witness.yml
168
175
with :
169
176
pull_request : ${{ github.event_name == 'pull_request' }}
170
177
step : secret-scan
171
178
archivista-server : ' https://judge.aws-sandbox-staging.testifysec.dev'
172
- archivista-headers : " Authorization: Token ${{ secrets.sandbox_witness_api_token }}"
173
179
pre-command-attestations : ' git github environment'
174
180
attestations : ' git github environment'
175
181
artifact-download : image.tar
@@ -179,3 +185,5 @@ jobs:
179
185
trufflehog docker --image=file:///tmp/image.tar -j > trufflehog.json
180
186
artifact-upload-name : trufflehog.json
181
187
artifact-upload-path : trufflehog.json
188
+ secrets :
189
+ token : ${{ secrets.sandbox_witness_api_token }}
0 commit comments