Commit dc76ee9
committed
actions: stop unpinned-tag flagging $/ self-references
A $/ reference (e.g. "uses: $/path/to/action") is a same-repo self-reference
that resolves to the commit the workflow is running at. It is inherently pinned,
exactly like a "./" local reference, so it must never be reported by
actions/unpinned-tag.
Adds an isSelfReference(nwo) guard to the query plus a test fixture covering the
bare "$/actions/foo" form and the "$/actions/foo@v1" form (the latter is
rejected by the $/ rule but writable by a user; the guard suppresses it either
way).
Part of github/actions-dispatch#755.1 parent 161c8c4 commit dc76ee9
3 files changed
Lines changed: 26 additions & 0 deletions
File tree
- actions/ql
- src
- Security/CWE-829
- change-notes
- test/query-tests/Security/CWE-829/.github/workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| |||
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
| 64 | + | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
0 commit comments