File tree Expand file tree Collapse file tree 6 files changed +52
-3
lines changed Expand file tree Collapse file tree 6 files changed +52
-3
lines changed Original file line number Diff line number Diff line change 11
11
steps :
12
12
- name : Checkout code
13
13
uses : actions/checkout@v3
14
+ with :
15
+ persist-credentials : false
14
16
15
17
- name : Run black to check formatting
16
18
uses : psf/black@stable
Original file line number Diff line number Diff line change 12
12
steps :
13
13
- name : Checkout code
14
14
uses : actions/checkout@v3
15
+ with :
16
+ persist-credentials : false
15
17
16
18
- name : Set up Python
17
19
uses : actions/setup-python@v4
Original file line number Diff line number Diff line change @@ -33,12 +33,14 @@ jobs:
33
33
if : inputs.ref != ''
34
34
with :
35
35
ref : ${{ inputs.ref }}
36
+ persist-credentials : false
36
37
37
38
- name : Checkout current branch
38
39
uses : actions/checkout@v3
39
40
if : inputs.ref == ''
40
41
with :
41
42
ref : ${{ github.ref }}
43
+ persist-credentials : false
42
44
43
45
- name : Set up Python ${{ matrix.python-version }}
44
46
uses : actions/setup-python@v4
Original file line number Diff line number Diff line change @@ -88,12 +88,13 @@ jobs:
88
88
HOSTNAME : ${{ secrets.SSH_HOST }}
89
89
USER_NAME : ${{ secrets.SSH_USERNAME }}
90
90
GH_ACCESS_TOKEN : ${{ secrets.GH_ACCESS_TOKEN }}
91
+ GH_REF : ${{ github.ref }}
91
92
run : |
92
93
echo "$PRIVATE_KEY" > private_key && chmod 600 private_key
93
- ssh -o StrictHostKeyChecking=no -i private_key ${USER_NAME}@${HOSTNAME} '
94
+ ssh -o StrictHostKeyChecking=no -o SendEnv=GH_REF - i private_key ${USER_NAME}@${HOSTNAME} '
94
95
cd /home/ubuntu/actions/ &&
95
96
rm -rf Scenic &&
96
- git clone --branch $(basename "${{ github.ref }} ") --single-branch https://[email protected] /BerkeleyLearnVerify/Scenic.git &&
97
+ git clone --branch $(basename "$GH_REF ") --single-branch https://[email protected] /BerkeleyLearnVerify/Scenic.git &&
97
98
cd Scenic &&
98
99
python3 -m venv venv &&
99
100
source venv/bin/activate &&
Original file line number Diff line number Diff line change @@ -47,12 +47,14 @@ jobs:
47
47
if : inputs.ref != ''
48
48
with :
49
49
ref : ${{ inputs.ref }}
50
+ persist-credentials : false
50
51
51
52
- name : Checkout current branch
52
53
uses : actions/checkout@v3
53
54
if : inputs.ref == ''
54
55
with :
55
56
ref : ${{ github.ref }}
57
+ persist-credentials : false
56
58
57
59
- name : Set up Python ${{ matrix.python-version }}
58
60
uses : actions/setup-python@v4
69
71
python -m pip install -e ".[test-full]"
70
72
71
73
- name : Run pytest
74
+ env :
75
+ TEST_OPTIONS : ${{ inputs.options || (matrix.slow && '--no-graphics' || '--fast --no-graphics') }}
76
+ shell : sh
72
77
run : |
73
- pytest ${{ inputs.options || (matrix.slow && '--no-graphics' || '--fast --no-graphics') } }
78
+ pytest ${TEST_OPTIONS }
Original file line number Diff line number Diff line change
1
+ name : GitHub Actions Security Analysis with zizmor 🌈
2
+ # https://woodruffw.github.io/zizmor
3
+
4
+ on :
5
+ push :
6
+ branches : ["main"]
7
+ pull_request :
8
+ branches : ["**"]
9
+
10
+ jobs :
11
+ zizmor :
12
+ name : zizmor latest via PyPI
13
+ runs-on : ubuntu-latest
14
+ permissions :
15
+ security-events : write
16
+ # required for workflows in private repositories
17
+ contents : read
18
+ actions : read
19
+ steps :
20
+ - name : Checkout repository
21
+ uses : actions/checkout@v4
22
+ with :
23
+ persist-credentials : false
24
+
25
+ - name : Install the latest version of uv
26
+ uses : astral-sh/setup-uv@v4
27
+
28
+ - name : Run zizmor 🌈
29
+ run : uvx zizmor --format sarif . > results.sarif
30
+ env :
31
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
32
+
33
+ - name : Upload SARIF file
34
+ uses : github/codeql-action/upload-sarif@v3
35
+ with :
36
+ sarif_file : results.sarif
37
+ category : zizmor
You can’t perform that action at this time.
0 commit comments