Skip to content

Commit 2720aaf

Browse files
author
Alvaro Muñoz
committed
Add new test for secrets in artifact query
1 parent 279b0bb commit 2720aaf

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

ql/test/query-tests/Security/CWE-312/.github/workflows/secrets-in-artifacts.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,26 @@ jobs:
6262
with:
6363
name: file
6464
path: foo
65+
test7: # NOT VULNERABLE
66+
runs-on: ubuntu-latest
67+
steps:
68+
- uses: actions/checkout@v4
69+
with:
70+
persist-credentials: false
71+
- name: "Upload artifact"
72+
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
73+
with:
74+
name: file
75+
path: .
76+
test8: # VULNERABLE
77+
runs-on: ubuntu-latest
78+
steps:
79+
- uses: actions/checkout@v4
80+
with:
81+
persist-credentials: true
82+
- name: "Upload artifact"
83+
uses: actions/upload-artifact@1746f4ab65b179e0ea60a494b83293b640dd5bba # v4.3.2
84+
with:
85+
name: file
86+
path: .
87+

ql/test/query-tests/Security/CWE-312/SecretsInArtifacts.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
| .github/workflows/secrets-in-artifacts.yml:27:9:32:2 | Uses Step | A secret is exposed in an artifact uploaded by $@ | .github/workflows/secrets-in-artifacts.yml:27:9:32:2 | Uses Step | actions/upload-artifact |
33
| .github/workflows/secrets-in-artifacts.yml:38:9:43:2 | Uses Step | A secret is exposed in an artifact uploaded by $@ | .github/workflows/secrets-in-artifacts.yml:38:9:43:2 | Uses Step | actions/upload-artifact |
44
| .github/workflows/secrets-in-artifacts.yml:49:9:54:2 | Uses Step | A secret is exposed in an artifact uploaded by $@ | .github/workflows/secrets-in-artifacts.yml:49:9:54:2 | Uses Step | actions/upload-artifact |
5+
| .github/workflows/secrets-in-artifacts.yml:82:9:86:18 | Uses Step | A secret is exposed in an artifact uploaded by $@ | .github/workflows/secrets-in-artifacts.yml:82:9:86:18 | Uses Step | actions/upload-artifact |

0 commit comments

Comments
 (0)