Skip to content
This repository was archived by the owner on Jun 3, 2026. It is now read-only.

Commit 44bdb2d

Browse files
ci: harden fork PR checks
1 parent b6265ca commit 44bdb2d

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/api-schema-diff.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ jobs:
140140
cat api-diff-report.txt
141141
142142
- name: Post diff to PR
143-
if: always()
143+
if: always() && (github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository)
144144
uses: actions/github-script@v7
145145
with:
146146
script: |

.github/workflows/deploy-staging.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
# ── 1. Deploy PR branch to staging EC2 ─────────────────────────────────────
6565
deploy:
6666
name: Deploy to staging EC2
67+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
6768
runs-on: ubuntu-latest
6869
timeout-minutes: 20
6970
environment:

.github/workflows/security-scan.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
cache: pip
3030

3131
- name: Install bandit
32-
run: pip install bandit[toml]
32+
run: pip install bandit[toml] bandit-sarif-formatter
3333

3434
- name: Run Bandit
3535
run: |
@@ -41,6 +41,7 @@ jobs:
4141
continue-on-error: true
4242

4343
- name: Upload Bandit SARIF
44+
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
4445
uses: github/codeql-action/upload-sarif@v3
4546
with:
4647
sarif_file: bandit-results.sarif

0 commit comments

Comments
 (0)