Skip to content

Commit 9370109

Browse files
author
John Kjell
committed
Simplify dev workflow
Signed-off-by: John Kjell <[email protected]>
1 parent 4f3922e commit 9370109

File tree

1 file changed

+3
-63
lines changed

1 file changed

+3
-63
lines changed

.github/workflows/pipeline.yml

Lines changed: 3 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,8 @@ jobs:
2929
attestations: "git github environment"
3030
command: go vet ./...
3131

32-
# --ignore DL3002
33-
lint:
34-
uses: ./.github/workflows/witness.yml
35-
with:
36-
pull_request: ${{ github.event_name == 'pull_request' }}
37-
step: lint
38-
pre-command-attestations: "git github environment"
39-
attestations: "git github environment"
40-
pre-command: |
41-
curl -sSfL https://github.com/hadolint/hadolint/releases/download/v2.12.0/hadolint-Linux-x86_64 -o /usr/local/bin/hadolint && \
42-
chmod +x /usr/local/bin/hadolint
43-
command: hadolint -f sarif Dockerfile > hadolint.sarif
44-
artifact-upload-name: hadolint.sarif
45-
artifact-upload-path: hadolint.sarif
46-
4732
unit-test:
48-
needs: [ fmt, vet, lint ]
33+
needs: [ fmt, vet ]
4934
uses: ./.github/workflows/witness.yml
5035
with:
5136
pull_request: ${{ github.event_name == 'pull_request' }}
@@ -55,21 +40,8 @@ jobs:
5540
artifact-upload-name: cover.out
5641
artifact-upload-path: cover.out
5742

58-
sast:
59-
needs: [ fmt, vet, lint ]
60-
uses: ./.github/workflows/witness.yml
61-
with:
62-
pull_request: ${{ github.event_name == 'pull_request' }}
63-
step: sast
64-
pre-command-attestations: "git github environment"
65-
attestations: "git github environment"
66-
pre-command: python3 -m pip install semgrep==1.45.0
67-
command: semgrep scan --config auto ./ --sarif -o semgrep.sarif
68-
artifact-upload-name: semgrep.sarif
69-
artifact-upload-path: semgrep.sarif
70-
7143
build:
72-
needs: [ unit-test, sast ]
44+
needs: [ unit-test ]
7345
uses: ./.github/workflows/witness.yml
7446
with:
7547
pull_request: ${{ github.event_name == 'pull_request' }}
@@ -78,7 +50,7 @@ jobs:
7850
command: go build -o bin/software main.go
7951

8052
build-image:
81-
needs: [ unit-test, sast ]
53+
needs: [ unit-test ]
8254
runs-on: ubuntu-latest
8355

8456
permissions:
@@ -128,35 +100,3 @@ jobs:
128100

129101
outputs:
130102
tags: ${{ steps.meta.outputs.tags }}
131-
132-
generate-sbom:
133-
needs: build-image
134-
uses: ./.github/workflows/witness.yml
135-
with:
136-
pull_request: ${{ github.event_name == 'pull_request' }}
137-
step: generate-sbom
138-
pre-command-attestations: "git github environment"
139-
attestations: "git github environment sbom"
140-
artifact-download: image.tar
141-
pre-command: |
142-
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
143-
command: |
144-
syft packages docker-archive:/tmp/image.tar --source-name=pkg:oci/testifysec/swf -o cyclonedx-json --file sbom.cdx.json
145-
artifact-upload-name: sbom.cdx.json
146-
artifact-upload-path: sbom.cdx.json
147-
148-
secret-scan:
149-
needs: build-image
150-
uses: ./.github/workflows/witness.yml
151-
with:
152-
pull_request: ${{ github.event_name == 'pull_request' }}
153-
step: secret-scan
154-
pre-command-attestations: "git github environment"
155-
attestations: "git github environment"
156-
artifact-download: image.tar
157-
pre-command: |
158-
curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh | sh -s -- -b /usr/local/bin
159-
command: |
160-
trufflehog docker --image=file:///tmp/image.tar -j > trufflehog.json
161-
artifact-upload-name: trufflehog.json
162-
artifact-upload-path: trufflehog.json

0 commit comments

Comments
 (0)