Skip to content

Commit a688241

Browse files
committed
[nrf noup] ci: prevent PRs from installing python pkgs
pip install requirements-actions.txt from base branch instead of untrusted PR During install a malicious package can execute code in setup.py Signed-off-by: Thomas Stilwell <[email protected]>
1 parent 20d89eb commit a688241

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/manifest.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1717
with:
1818
path: zephyrproject/zephyr
19-
ref: ${{ github.event.pull_request.head.sha }}
19+
ref: ${{ github.event.pull_request.base.sha }}
2020
fetch-depth: 0
2121
persist-credentials: false
2222

@@ -32,6 +32,14 @@ jobs:
3232
cd zephyrproject/zephyr
3333
pip install -r scripts/requirements-actions.txt --require-hashes
3434
35+
- name: Checkout the code
36+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
with:
38+
path: zephyrproject/zephyr
39+
ref: ${{ github.event.pull_request.head.sha }}
40+
fetch-depth: 0
41+
persist-credentials: false
42+
3543
- name: west setup
3644
env:
3745
BASE_REF: ${{ github.base_ref }}

0 commit comments

Comments
 (0)