Skip to content

Commit a6487eb

Browse files
committed
Actions lockfiles: match repository casing
1 parent ea26459 commit a6487eb

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

  • actions/ql

actions/ql/lib/codeql/actions/Lock.qll

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ class ActionsLock extends YamlDocument {
2525
pin = pinNode.getValue() and
2626
pinnedNwo = pin.regexpCapture("^([^/@:]+/[^/@:]+)@([^:]+)$", 1) and
2727
ref = pin.regexpCapture("^([^/@:]+/[^/@:]+)@([^:]+)$", 2) and
28-
pinnedNwo = pinnedNwo.toLowerCase() and
2928
(
30-
nwo.toLowerCase() = pinnedNwo
29+
nwo.toLowerCase() = pinnedNwo.toLowerCase()
3130
or
32-
nwo.toLowerCase().prefix(pinnedNwo.length() + 1) = pinnedNwo + "/"
31+
nwo.toLowerCase().prefix(pinnedNwo.length() + 1) = pinnedNwo.toLowerCase() + "/"
3332
) and
3433
root.lookup("dependencies").(YamlMapping).lookup(pin) = dependency and
3534
dependency.lookup("ref").(YamlScalar).getValue() = ref and

actions/ql/test/query-tests/Security/CWE-829-Lockfile/.github/workflows/actions.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
version: future-version
22
workflows:
33
.github/workflows/rust-ci.yml:
4-
- dtolnay/rust-toolchain@v1
4+
- DToLnAy/RuSt-ToOlChAiN@v1
55
- mismatched/action@v1
66
- malformed/action@v1
77
- missing/action@v1
88
.github/workflows/other.yml:
99
- other-workflow/action@v1
1010
dependencies:
11-
dtolnay/rust-toolchain@v1:
11+
DToLnAy/RuSt-ToOlChAiN@v1:
1212
ref: v1
1313
commit: sha1-6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
1414
owner_id: 1940490

0 commit comments

Comments
 (0)