mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-10-22 19:46:24 +00:00
fix(ci): pass workflow_run head_branch through env; read-only tokens
auto-merge.yml interpolated ${{ github.event.workflow_run.head_branch }} straight into a run script that holds a contents:write token. A fork pull request controls that branch name, so it could run commands with write access (CodeQL actions/code-injection/critical). It now arrives as an environment variable.
ci.yml, code-quality.yml and deploy.yml get permissions: contents: read; none of them writes through GITHUB_TOKEN.
This commit is contained in:
1 parent
cb25e08547
commit
07facbdda2
4 files changed
+18
-1
No files matched your search
@@ -18,6 +18,11 @@ on:
|
||||
env:
|
||||
SUBQL_ACCESS_TOKEN: ${{ secrets.SUBQL_ACCESS_TOKEN }}
|
||||
|
||||
|
||||
# Read-only token: these jobs never write through GITHUB_TOKEN.
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
deploy-pezkuwi:
|
||||
if: ${{ github.event_name == 'release' || github.event.inputs.project == 'all' || github.event.inputs.project == 'pezkuwi' }}
|
||||
|
||||
Reference in new issue
Block a user