Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/package-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# with:
# ref: refs/pull/${{ github.event.number }}/merge
with:
ref: refs/pull/${{ github.event.number }}/merge

Comment on lines 10 to 13
Copy link

Copilot AI Mar 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow is triggered by pull_request_target but explicitly checks out the PR merge ref and then runs bun install / repo code (codegen, pkg-pr-new). With pull_request_target, the job runs in the base-repo security context (and typically has broader GITHUB_TOKEN permissions), so a malicious PR can execute arbitrary code and exfiltrate credentials. Mitigate by switching to pull_request, or restricting to same-repo PRs (if: github.event.pull_request.head.repo.full_name == github.repository), and explicitly minimizing permissions + disabling install scripts (bun install --ignore-scripts --frozen-lockfile) if you must keep pull_request_target.

Copilot uses AI. Check for mistakes.
- uses: oven-sh/setup-bun@v2
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ on:
default: "ubuntu-latest"
type: choice

pull_request_target:
push:
branches:
- "*" # matches every branch that doesn't contain a '/'
Expand Down
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
},
"biome.enabled": true,
"prettier.enable": false,
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true
"js/ts.tsdk.path": "node_modules/typescript/lib",
"js/ts.tsdk.promptToUseWorkspaceVersion": true
}
Loading