File tree Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Expand file tree Collapse file tree 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,14 @@ jobs:
12
12
runs-on : ubuntu-latest
13
13
14
14
steps :
15
- - name : Checkout the repository
16
- uses : actions/checkout@v4
17
- with :
18
- # This is considered a security risk when used in conjunction with pull_request_target
19
- # However, we are not running any code from the PR, so it's safe
20
- # https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
21
- ref : ${{ github.event.pull_request.head.sha }}
22
- # This is needed when the action is run in a fork PR
23
- # according to https://github.com/tj-actions/changed-files/blob/065e671731666959f9ea1bbbb7ddb8363a8ae9cd/src/commitSha.ts#L612-L621
24
- repository : ${{ github.event.pull_request.head.repo.full_name }}
25
-
15
+ # Without a checkout action, the tj-actions/changes-files action
16
+ # will use the GitHub API to to determine the diff.
17
+ # This way we can avoid checking ot the forked PR and
18
+ # minimize the risk of using `pull_request_target` together
19
+ # with `actions/checkout`.
20
+ # Refs:
21
+ # - https://securitylab.github.com/resources/github-actions-preventing-pwn-requests/
22
+ # - https://github.com/tj-actions/changed-files?tab=readme-ov-file#using-githubs-api-octocat
26
23
- name : Get changed files
27
24
id : check-files
28
25
uses : tj-actions/changed-files@d6e91a2266cdb9d62096cebf1e8546899c6aa18f # v45.0.6
You can’t perform that action at this time.
0 commit comments