-
Notifications
You must be signed in to change notification settings - Fork 0
Revert pr.yaml trigger to pull_request (unblock CI) #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,15 +4,13 @@ | |
| # Stage 3: macOS tests (only if Stage 2 passes) | ||
| # | ||
| # SECURITY NOTE: | ||
| # - Uses pull_request_target to run workflow from the trusted main branch, not from the PR branch | ||
| # - This prevents malicious workflow YAML changes in untrusted PR branches from taking effect | ||
| # - All checkout steps use PR refs (refs/pull/*/head) to check out PR code from the base repo | ||
| # - Uses pull_request (not pull_request_target) to avoid the "pwn request" attack vector | ||
| # (pull_request_target runs from the trusted main branch with elevated permissions, and checking | ||
| # out untrusted PR code in that context can allow attackers to exfiltrate secrets or abuse write access) | ||
| # - After checkout, configuration files (.editorconfig, BannedSymbols.txt, etc.) are fetched from | ||
| # the main branch to prevent malicious PRs from disabling analyzers or bypassing code quality checks | ||
| # - If a PR changes any of these protected configuration files, CI explicitly fails with instructions | ||
| # for a maintainer to manually review and verify the changes before merging | ||
| # - persist-credentials: false prevents the checkout token from being written to git config for subsequent git commands | ||
| # (it does NOT, by itself, prevent steps from accessing github.token / GITHUB_TOKEN if you explicitly expose it) | ||
| # - PRs that change protected configuration files (for example .editorconfig or Directory.Build.*) | ||
| # intentionally fail validation; those config changes are not evaluated by CI in the untrusted PR context | ||
| # - Default GITHUB_TOKEN permissions are restricted to read-only repository contents to limit impact if exposed | ||
|
|
||
| name: PR Checks v3 (Gated) | ||
|
|
@@ -24,7 +22,7 @@ env: | |
| CODECOV_MINIMUM: 90 | ||
|
|
||
| on: | ||
| pull_request_target: # Runs from the main branch, not from PR branch | ||
| pull_request: | ||
| branches: | ||
| - main | ||
|
Comment on lines
24
to
27
|
||
|
|
||
|
|
@@ -44,8 +42,6 @@ jobs: | |
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: refs/pull/${{ github.event.pull_request.number }}/head | ||
| persist-credentials: false | ||
| fetch-depth: 0 | ||
|
Comment on lines
42
to
45
|
||
|
|
||
| - name: Run gitleaks | ||
|
|
@@ -70,9 +66,6 @@ jobs: | |
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: refs/pull/${{ github.event.pull_request.number }}/head | ||
| persist-credentials: false | ||
|
|
||
| - name: Fetch trusted configuration files from main branch | ||
| run: | | ||
|
|
@@ -194,9 +187,6 @@ jobs: | |
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: refs/pull/${{ github.event.pull_request.number }}/head | ||
| persist-credentials: false | ||
|
|
||
| - name: Fetch trusted configuration files from main branch | ||
| run: | | ||
|
|
@@ -496,9 +486,6 @@ jobs: | |
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: refs/pull/${{ github.event.pull_request.number }}/head | ||
| persist-credentials: false | ||
|
|
||
| - name: Fetch trusted configuration files from main branch | ||
| shell: pwsh | ||
|
|
@@ -735,9 +722,6 @@ jobs: | |
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: refs/pull/${{ github.event.pull_request.number }}/head | ||
| persist-credentials: false | ||
|
|
||
| - name: Fetch trusted configuration files from main branch | ||
| run: | | ||
|
|
@@ -1044,9 +1028,6 @@ jobs: | |
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: refs/pull/${{ github.event.pull_request.number }}/head | ||
| persist-credentials: false | ||
|
|
||
| - name: Fetch trusted configuration files from main branch | ||
| run: | | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.