Skip to content

Commit ea26459

Browse files
committed
Actions lockfiles: ignore schema version value
1 parent d0c1b32 commit ea26459

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

actions/ql/lib/change-notes/2026-09-01-actions-lock-yaml.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
category: feature
33
---
44
* GitHub Actions databases now extract `actions.lock` files. The new `ActionsLock` class
5-
provides access to their YAML abstract syntax trees and valid v0.0.2 workflow pins.
5+
provides access to their YAML abstract syntax trees and structurally valid workflow pins.

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ class ActionsLock extends YamlDocument {
99
ActionsLock() { this.getFile().getBaseName() = "actions.lock" }
1010

1111
/**
12-
* Holds if the v0.0.2 lockfile records `nwo` at `ref` for `workflowPath` with a full commit
13-
* digest. Repository pins also cover sub-actions such as `actions/cache/save`.
12+
* Holds if the lockfile records `nwo` at `ref` for `workflowPath` with a full commit digest.
13+
* Repository pins also cover sub-actions such as `actions/cache/save`.
1414
*/
1515
bindingset[nwo]
1616
predicate pins(string workflowPath, string nwo, string ref) {
@@ -20,7 +20,6 @@ class ActionsLock extends YamlDocument {
2020
string pin, string pinnedNwo
2121
|
2222
root = this and
23-
root.lookup("version").(YamlScalar).getValue() = "v0.0.2" and
2423
root.lookup("workflows").(YamlMapping).lookup(workflowPath) = workflowPins and
2524
workflowPins.getElement(_) = pinNode and
2625
pin = pinNode.getValue() and
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
22
category: minorAnalysis
33
---
4-
* The `actions/unpinned-tag` query no longer reports action references pinned by a valid v0.0.2 `.github/workflows/actions.lock` entry for the enclosing workflow.
4+
* The `actions/unpinned-tag` query no longer reports action references pinned by a structurally valid `.github/workflows/actions.lock` entry for the enclosing workflow.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: v0.0.2
1+
version: future-version
22
workflows:
33
.github/workflows/rust-ci.yml:
44
- dtolnay/rust-toolchain@v1

0 commit comments

Comments
 (0)