File tree Expand file tree Collapse file tree 2 files changed +68
-0
lines changed
Expand file tree Collapse file tree 2 files changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Author Verification
2+
3+ on :
4+ push :
5+ branches : ["main"]
6+
7+ permissions : read-all
8+
9+ jobs :
10+ verify :
11+ name : Verify Author
12+ runs-on : ubuntu-latest
13+ permissions :
14+ contents : read
15+ id-token : write # required for SLSA provenance - https://docs.chainloop.dev/guides/slsa/
16+ env :
17+ CHAINLOOP_WORKFLOW_NAME : " author-verification"
18+ CHAINLOOP_PROJECT : " chainloop"
19+
20+ steps :
21+ - name : Install Chainloop
22+ run : |
23+ curl -sfL https://dl.chainloop.dev/cli/install.sh | bash -s
24+
25+ - name : Checkout repository
26+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
27+
28+ - name : Initialize Attestation
29+ run : |
30+ chainloop attestation init --workflow $CHAINLOOP_WORKFLOW_NAME --project $CHAINLOOP_PROJECT
31+ env :
32+ # Needed for commit signature verification: https://docs.chainloop.dev/concepts/attestations#commit-verification
33+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+
35+ - name : Finish and Record Attestation
36+ if : ${{ success() }}
37+ run : |
38+ chainloop attestation status --full
39+ chainloop attestation push
40+
41+ - name : Mark attestation as failed
42+ if : ${{ failure() }}
43+ run : |
44+ chainloop attestation reset
45+
46+ - name : Mark attestation as cancelled
47+ if : ${{ cancelled() }}
48+ run : |
49+ chainloop attestation reset --trigger cancellation
Original file line number Diff line number Diff line change 1+ # Contract for author verification workflow
2+ apiVersion : chainloop.dev/v1
3+ kind : Contract
4+ metadata :
5+ name : chainloop-vault-author-verification
6+ description : Contract for author verification on merge to main
7+ spec :
8+ runner :
9+ type : GITHUB_ACTION
10+ policies :
11+ attestation :
12+ - ref : source-commit
13+ with :
14+ check_signature : " yes"
15+ check_author_verified : " yes"
16+ policyGroups :
17+ - ref : slsa-checks
18+ with :
19+ runner : GITHUB_ACTION
You can’t perform that action at this time.
0 commit comments