Commit 12dec83
fix: remove pull_request_target security vulnerability (#22)
The PR workflow used `pull_request_target` with explicit checkout of
untrusted PR code (`ref: ${{ github.event.pull_request.head.sha }}`),
allowing malicious PRs to execute arbitrary code with write permissions.
## Changes
- Changed workflow trigger from `pull_request_target` to `pull_request`
- Removed explicit `ref` parameter from checkout action
- Retained `pull-requests: write` permission for semantic PR action
The workflow now executes PR code in a restricted context without
elevated privileges while maintaining full functionality.
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: airtonix <61225+airtonix@users.noreply.github.com>
Co-authored-by: Zeno Jiricek <airtonix@users.noreply.github.com>1 parent 9efd90a commit 12dec83
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
45 | 44 | | |
46 | 45 | | |
47 | 46 | | |
48 | | - | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
0 commit comments