-
Notifications
You must be signed in to change notification settings - Fork 3
115 lines (98 loc) · 3.29 KB
/
verify-pr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
---
name: Verify Pull Request
on:
pull_request:
branches:
- main
permissions:
contents: read
# Cancel any in-flight jobs for the same pull request so there is only one job active at a time.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
verify:
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Run Cimon
uses: ./
with:
client-id: ${{ secrets.CIMON_CLIENT_ID }}
secret: ${{ secrets.CIMON_SECRET }}
prevent: true
allowed-hosts: >
cycode.com
registry.npmjs.org
report-process-tree: true
fail-on-error: true
- name: Test
run: |
curl -I https://api.github.com
curl -I https://cycode.com
wget --quiet --timeout 1 https://registry.npmjs.org || true
verify-provenance:
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Create Private Key
run: |
openssl genrsa -out private-key.pem 3072
- name: Run Cimon
uses: ./attest
with:
client-id: ${{ secrets.CIMON_CLIENT_ID }}
secret: ${{ secrets.CIMON_SECRET }}
subjects: NDgyY2U4YzhmN2U4NjdkYTNhM2MwNWE5YWVlNjM3NzAzZTE3NDcwZWQxY2Y4ODJhOWU1YjQwNWU4ZjgyNjE5ZCAgYXJ0aWZhY3QxCjg5Y2ZjNjk1NGU4OGIyZjkyYTdjMjg3OWQ5ZWIwODVjNDJmM2M3MDY1ZDAxMmE1MDY2ZjQ1MGRiZTU5YjJjMDAgIGFydGlmYWN0Mgo=
sign-key: private-key.pem
report-job-summary: true
report-artifact: true
fail-on-error: true
verify-provenance-image-ref:
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Create Private Key
run: |
openssl genrsa -out private-key.pem 3072
- name: Run Cimon
uses: ./attest
with:
client-id: ${{ secrets.CIMON_CLIENT_ID }}
secret: ${{ secrets.CIMON_SECRET }}
subjects: 'cycodelabs/cimon@sha256:ad4ab84178621f359a5ec1ba9eff8ba46626d8d1999416646b6aaa96bfcbf802'
sign-key: private-key.pem
report-job-summary: true
report-artifact: true
fail-on-error: true
verify-agent-and-attest:
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Run Cimon Agent
uses: ./
with:
client-id: ${{ secrets.CIMON_CLIENT_ID }}
secret: ${{ secrets.CIMON_SECRET }}
report-process-tree: true
fail-on-error: true
- name: Create Artifact
run: |
echo artifact > artifact.txt
- name: Run Cimon Attest
uses: ./attest
with:
client-id: ${{ secrets.CIMON_CLIENT_ID }}
secret: ${{ secrets.CIMON_SECRET }}
subjects: artifact.txt
report-job-summary: true
fail-on-error: true
- name: Test
run: |
curl -I https://api.github.com
curl -I https://cycode.com
wget --quiet --timeout 1 https://registry.npmjs.org || true