mirror of
https://github.com/denoland/deno.git
synced 2025-12-23 08:48:24 +00:00
chore: use main script for verify_pr_title.ts (#30821)
This security issue was reported to us where `pull_request_target` always runs in the context of the base repository... meaning if the GITHUB_TOKEN were accessed it would have write permissions to the deno repo. We shouldn't use the PR's script for this. That said, we were saved by this script being executed with zero permissions so it could never read the GITHUB_TOKEN env var or do anything with it anyway. This change adds a bit more defence in depth.
This commit is contained in:
parent
2ad17f7c7c
commit
3e9c60a32a
1 changed files with 3 additions and 2 deletions
5
.github/workflows/pr.yml
vendored
5
.github/workflows/pr.yml
vendored
|
|
@ -7,6 +7,8 @@ on:
|
|||
- edited
|
||||
- synchronize
|
||||
|
||||
# WARNING: This workflow runs in the context of the base repository so the
|
||||
# GITHUB_TOKEN it has access to has full write permissions to the repository.
|
||||
jobs:
|
||||
main:
|
||||
name: lint title
|
||||
|
|
@ -19,5 +21,4 @@ jobs:
|
|||
- name: Lint
|
||||
env:
|
||||
PR_TITLE: '${{ github.event.pull_request.title }}'
|
||||
PR_SHA: '${{ github.event.pull_request.head.sha }}'
|
||||
run: deno run https://raw.githubusercontent.com/denoland/deno/$PR_SHA/tools/verify_pr_title.js "$PR_TITLE"
|
||||
run: deno run https://raw.githubusercontent.com/denoland/deno/refs/heads/main/tools/verify_pr_title.js "$PR_TITLE"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue