Skip to content

Commit 8df6b94

Browse files
committed
downstream-check: drop issue_comment trigger (fix cache poisoning)
The issue_comment trigger runs in the privileged default-branch context; building untrusted PR code there is a cache-poisoning / code-execution vector (CodeQL actions/cache-poisoning/poisonable-step). Run only on pull_request, which builds the same code in an isolated, unprivileged context. Collapses the gate job into a job-level draft check and reads the PR head SHA from the event payload (no shared gate action needed).
1 parent cd92868 commit 8df6b94

1 file changed

Lines changed: 6 additions & 21 deletions

File tree

.github/workflows/downstream-check.yml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,46 +12,31 @@
1212
# other requires (Strata, StrataDDM at rev = "main") resolve from their remotes
1313
# as usual — only the StrataPython edge is overridden.
1414
#
15-
# Trigger logic (non-draft PRs on ready_for_review/synchronize; the
16-
# `!downstream-check` comment from a collaborator) lives in the shared
17-
# downstream-gate composite action hosted in Strata.
15+
# Trigger: non-draft PRs only (ready_for_review + every push via synchronize).
1816

1917
name: Downstream check
2018

2119
on:
2220
pull_request:
2321
types: [ready_for_review, synchronize]
24-
issue_comment:
25-
types: [created]
2622

2723
concurrency:
28-
group: downstream-${{ github.event.issue.number || github.event.pull_request.number }}
24+
group: downstream-${{ github.event.pull_request.number }}
2925
cancel-in-progress: true
3026

3127
permissions:
3228
contents: read
3329

3430
jobs:
35-
gate:
36-
runs-on: ubuntu-latest
37-
outputs:
38-
run: ${{ steps.gate.outputs.run }}
39-
head_sha: ${{ steps.gate.outputs.head_sha }}
40-
steps:
41-
- name: Gate
42-
id: gate
43-
uses: strata-org/Strata/.github/actions/downstream-gate@main
44-
4531
downstream:
46-
needs: gate
47-
if: needs.gate.outputs.run == 'true'
32+
if: ${{ !github.event.pull_request.draft }}
4833
runs-on: ubuntu-latest
4934
name: Strata-CLI
5035
steps:
5136
- name: Check out PR's Strata-Python
5237
uses: actions/checkout@v6
5338
with:
54-
ref: ${{ needs.gate.outputs.head_sha }}
39+
ref: ${{ github.event.pull_request.head.sha }}
5540
path: upstream
5641

5742
- name: Clone Strata-CLI
@@ -75,7 +60,7 @@ jobs:
7560
with:
7661
path: |
7762
downstream/.lake
78-
key: downstream-Strata-CLI-${{ runner.os }}-${{ needs.gate.outputs.head_sha }}
63+
key: downstream-Strata-CLI-${{ runner.os }}-${{ github.event.pull_request.head.sha }}
7964
restore-keys: |
8065
downstream-Strata-CLI-${{ runner.os }}-
8166
@@ -104,4 +89,4 @@ jobs:
10489
with:
10590
path: |
10691
downstream/.lake
107-
key: downstream-Strata-CLI-${{ runner.os }}-${{ needs.gate.outputs.head_sha }}
92+
key: downstream-Strata-CLI-${{ runner.os }}-${{ github.event.pull_request.head.sha }}

0 commit comments

Comments
 (0)