-
Notifications
You must be signed in to change notification settings - Fork 6
34 lines (28 loc) · 930 Bytes
/
Copy pathbot-conditions.yml
File metadata and controls
34 lines (28 loc) · 930 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# bot-conditions.yml
#
# what:
# workflows that check github.actor are susceptible to spoofing/impersonation,
# since github.actor refers to the last actor (i.e. in the git history of a
# branch) while the branch itself may contain attacker-controlled code.
#
# how:
# confusion between github.actor and other actor identities in a workflow trigger.
on: pull_request_target
permissions: {}
jobs:
hackme:
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: vulnerable-1
run: echo hello
if: ${{ github.actor == 'dependabot[bot]' }}
- name: vulnerable-2
run: echo hello
if: ${{ github.actor == 'dependabot[bot]' && github.repository == 'example/example' }}
- name: vulnerable-3
run: echo hello
if: github.actor == 'renovate[bot]'
- name: not-vulnerable-4
run: echo hello
if: github.actor == 'notabot'