Skip to content

Commit d2e9411

Browse files
author
Alvaro Muñoz
committed
Update and new tests
1 parent 44377ac commit d2e9411

16 files changed

+104
-13
lines changed

ql/test/query-tests/Security/CWE-349/.github/workflows/test1.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44

55
jobs:
66
pr-comment:
7+
permissions: read-all
78
runs-on: ubuntu-latest
89
steps:
910
- uses: xt0rted/pull-request-comment-branch@v2
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
on:
2+
issue_comment:
3+
types: [created]
4+
5+
jobs:
6+
pr-comment:
7+
permissions: write-all
8+
runs-on: ubuntu-latest
9+
steps:
10+
- run: |
11+
echo ${{ github.event.comment.body }}
12+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
issue_comment:
3+
types: [created]
4+
5+
permissions: write-all
6+
7+
jobs:
8+
pr-comment:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: xt0rted/pull-request-comment-branch@v2
12+
id: comment-branch
13+
14+
- uses: actions/checkout@v3
15+
if: success()
16+
with:
17+
ref: ${{ steps.comment-branch.outputs.head_sha }}
18+
19+
- uses: actions/cache@v2
20+
with:
21+
path: ./poison
22+
key: poison_key
23+
- run: |
24+
cat poison
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
on:
2+
issue_comment:
3+
types: [created]
4+
5+
permissions:
6+
issues: write
7+
jobs:
8+
pr-comment:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: xt0rted/pull-request-comment-branch@v2
12+
id: comment-branch
13+
14+
- uses: actions/checkout@v3
15+
if: success()
16+
with:
17+
ref: ${{ steps.comment-branch.outputs.head_sha }}
18+
19+
- run: |
20+
./checkedout/poison
21+

ql/test/query-tests/Security/CWE-349/.github/workflows/test2.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Cache Poisoning
22

33
on: pull_request_target
44

5+
permissions: read-all
6+
57
jobs:
68
poison:
79
runs-on: ubuntu-latest

ql/test/query-tests/Security/CWE-349/.github/workflows/test3.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Cache Poisoning
22

33
on: pull_request_target
44

5+
permissions: {}
6+
57
jobs:
68
poison:
79
runs-on: ubuntu-latest

ql/test/query-tests/Security/CWE-349/.github/workflows/test4.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: Cache Poisoning
22

33
on: pull_request_target
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
poison:
710
runs-on: ubuntu-latest
11+
permissions: read-all
812
steps:
913
- uses: actions/checkout@v3
1014
with:

ql/test/query-tests/Security/CWE-349/.github/workflows/test5.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on: pull_request_target
55
jobs:
66
poison:
77
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
810
steps:
911
- uses: actions/checkout@v3
1012
with:

ql/test/query-tests/Security/CWE-349/.github/workflows/test6.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on: pull_request_target
55
jobs:
66
poison:
77
runs-on: ubuntu-latest
8+
permissions: read-all
89
steps:
910
- uses: actions/checkout@v3
1011
with:

ql/test/query-tests/Security/CWE-349/.github/workflows/test7.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on: pull_request_target
55
jobs:
66
poison:
77
runs-on: ubuntu-latest
8+
permissions: read-all
89
steps:
910
- uses: actions/checkout@v3
1011
with:

0 commit comments

Comments
 (0)