Skip to content

Commit e733ac6

Browse files
committed
Revert "Actions lockfiles: require repository identity"
This reverts commit 0106f4e.
1 parent 0106f4e commit e733ac6

6 files changed

Lines changed: 6 additions & 25 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +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 workflow pins with positive owner and
6-
repository IDs and a full commit digest.
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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ class ActionsLock extends YamlDocument {
99
ActionsLock() { this.getFile().getBaseName() = "actions.lock" }
1010

1111
/**
12-
* Holds if the lockfile records `nwo` at `ref` for `workflowPath` with positive owner and
13-
* repository IDs and a full commit digest. Repository pins also cover sub-actions such as
14-
* `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`.
1514
*/
1615
bindingset[nwo]
1716
predicate pins(string workflowPath, string nwo, string ref) {
@@ -33,8 +32,6 @@ class ActionsLock extends YamlDocument {
3332
) and
3433
root.lookup("dependencies").(YamlMapping).lookup(pin) = dependency and
3534
dependency.lookup("ref").(YamlScalar).getValue() = ref and
36-
dependency.lookup("owner_id").(YamlScalar).getValue().toInt() > 0 and
37-
dependency.lookup("repo_id").(YamlScalar).getValue().toInt() > 0 and
3835
dependency
3936
.lookup("commit")
4037
.(YamlScalar)
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 `.github/workflows/actions.lock` entry with positive owner and repository IDs and a full commit digest 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: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ workflows:
55
- mismatched/action@v1
66
- malformed/action@v1
77
- missing/action@v1
8-
- missing-owner/action@v1
9-
- zero-repo/action@v1
108
.github/workflows/other.yml:
119
- other-workflow/action@v1
1210
dependencies:
@@ -30,12 +28,3 @@ dependencies:
3028
commit: 6c977a6ca4077a0ceb28ffbe03f59d46e9ac8772
3129
owner_id: 5
3230
repo_id: 6
33-
missing-owner/action@v1:
34-
ref: v1
35-
commit: sha1-3333333333333333333333333333333333333333
36-
repo_id: 7
37-
zero-repo/action@v1:
38-
ref: v1
39-
commit: sha1-4444444444444444444444444444444444444444
40-
owner_id: 8
41-
repo_id: 0

actions/ql/test/query-tests/Security/CWE-829-Lockfile/.github/workflows/rust-ci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,5 @@ jobs:
1212
- uses: mismatched/action@v1 # $ Alert
1313
- uses: malformed/action@v1 # $ Alert
1414
- uses: missing/action@v1 # $ Alert
15-
- uses: missing-owner/action@v1 # $ Alert
16-
- uses: zero-repo/action@v1 # $ Alert
1715
reusable:
1816
uses: dtolnay/rust-toolchain/.github/workflows/reusable.yml@v1 # $ Alert

actions/ql/test/query-tests/Security/CWE-829-Lockfile/UnpinnedActionsTag.expected

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
| .github/workflows/rust-ci.yml:11:13:11:36 | other-workflow/action@v1 | Unpinned 3rd party Action 'rust-ci.yml' step $@ uses 'other-workflow/action' with ref 'v1', not a pinned commit hash | .github/workflows/rust-ci.yml:11:7:12:4 | Uses Step | Uses Step |
33
| .github/workflows/rust-ci.yml:12:13:12:32 | mismatched/action@v1 | Unpinned 3rd party Action 'rust-ci.yml' step $@ uses 'mismatched/action' with ref 'v1', not a pinned commit hash | .github/workflows/rust-ci.yml:12:7:13:4 | Uses Step | Uses Step |
44
| .github/workflows/rust-ci.yml:13:13:13:31 | malformed/action@v1 | Unpinned 3rd party Action 'rust-ci.yml' step $@ uses 'malformed/action' with ref 'v1', not a pinned commit hash | .github/workflows/rust-ci.yml:13:7:14:4 | Uses Step | Uses Step |
5-
| .github/workflows/rust-ci.yml:14:13:14:29 | missing/action@v1 | Unpinned 3rd party Action 'rust-ci.yml' step $@ uses 'missing/action' with ref 'v1', not a pinned commit hash | .github/workflows/rust-ci.yml:14:7:15:4 | Uses Step | Uses Step |
6-
| .github/workflows/rust-ci.yml:15:13:15:35 | missing-owner/action@v1 | Unpinned 3rd party Action 'rust-ci.yml' step $@ uses 'missing-owner/action' with ref 'v1', not a pinned commit hash | .github/workflows/rust-ci.yml:15:7:16:4 | Uses Step | Uses Step |
7-
| .github/workflows/rust-ci.yml:16:13:16:31 | zero-repo/action@v1 | Unpinned 3rd party Action 'rust-ci.yml' step $@ uses 'zero-repo/action' with ref 'v1', not a pinned commit hash | .github/workflows/rust-ci.yml:16:7:17:2 | Uses Step | Uses Step |
8-
| .github/workflows/rust-ci.yml:18:11:18:66 | dtolnay/rust-toolchain/.github/workflows/reusable.yml@v1 | Job $@ in 'rust-ci.yml' uses reusable workflow 'dtolnay/rust-toolchain/.github/workflows/reusable.yml' with ref 'v1', not a pinned commit hash | .github/workflows/rust-ci.yml:18:5:18:77 | Job: reusable | Job: reusable |
5+
| .github/workflows/rust-ci.yml:14:13:14:29 | missing/action@v1 | Unpinned 3rd party Action 'rust-ci.yml' step $@ uses 'missing/action' with ref 'v1', not a pinned commit hash | .github/workflows/rust-ci.yml:14:7:15:2 | Uses Step | Uses Step |
6+
| .github/workflows/rust-ci.yml:16:11:16:66 | dtolnay/rust-toolchain/.github/workflows/reusable.yml@v1 | Job $@ in 'rust-ci.yml' uses reusable workflow 'dtolnay/rust-toolchain/.github/workflows/reusable.yml' with ref 'v1', not a pinned commit hash | .github/workflows/rust-ci.yml:16:5:16:77 | Job: reusable | Job: reusable |

0 commit comments

Comments
 (0)