Skip to content

Match a sub-path action to its actions.lock key in pinned_share and actions_latest_share - #171

Open
paulfoley wants to merge 1 commit into
SoulCraft-Org:mainfrom
paulfoley:fix/actions-pinned-subpath
Open

paulfoley wants to merge 1 commit into
SoulCraft-Org:mainfrom
paulfoley:fix/actions-pinned-subpath

Conversation

@paulfoley

@paulfoley paulfoley commented Nov 20, 2026 •

Copy link
Copy Markdown

Closes #168

Item Detail
What changed New lockKey(uses) in quality/collectors/lib/lock-key.mjs: owner/repo@ref, sub-path dropped, owner and repo lower-cased. The GitHub collector (readLock, actions.pinned_share) and the Tools collector (lockedCommits, actionPins, so tools.actions_latest_share) match through it
Why gh actions-lock files owner/repo/sub/path@ref under owner/repo@ref, lower-cased. Both collectors compared the uses: value verbatim, so a locked sub-path action read as not pinned (actions.pinned_share) and as not a SHA (tools.actions_latest_share)
How it was verified node --test quality/collectors/github/github-security.test.mjs quality/collectors/tools/tools.test.mjs quality/collectors/lib/seam.test.mjs (56 pass). Two new cases use Acme/Kit/sub/path@v1.2.3 against the lock key acme/kit@v1.2.3. With lockKey returning its input, both fail
How to reverse it Revert the commit; a uses: with no sub-path and a lower-case owner keys exactly as before
Judgment call Reason How to reverse it
Match owner and repo case-insensitively, beyond the sub-path the issue names The lock writes owner/repo in lower case, so a workflow that spells the owner Acme/Kit/sub@v1 still missed after the sub-path fix. GitHub names are not case-sensitive Drop .toLowerCase() in lockKey
One helper in lib/, not a copy in each collector Two collectors read the same lock, and the seam test allows lib/ Inline the regex in each reader

🤖 Generated with Claude Code


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…ctions_latest_share

gh actions-lock files `owner/repo/sub/path@ref` under `owner/repo@ref`, with
owner and repo in lower case. Both collectors compared the workflow's
`uses:` value verbatim, so a locked sub-path action read as not pinned and
as not a SHA.

lockKey (lib/lock-key.mjs) writes the key the lock uses. readLock and the
pinned-share check, and lockedCommits and actionPins, both go through it.

Closes SoulCraft-Org#168

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: paulfoley <268432743+paulfoley@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

actions.pinned_share and tools.actions_latest_share miss sub-path actions locked by gh actions-lock

1 participant