Skip to content

Treat $/ self-repository references like local actions - #235

Merged
timtebeek merged 1 commit into
mainfrom
tim/lockfiles-public-preview
Oct 15, 2026
Merged

timtebeek merged 1 commit into
mainfrom
tim/lockfiles-public-preview

Conversation

@timtebeek

Copy link
Copy Markdown
Member

GitHub's workflow dependency lockfiles (public preview) introduce uses: $/… for same-repository actions and reusable workflows. These refs always resolve to the running commit, so they are inherently pinned and reject a trailing @ref. gh actions-lock also rewrites existing ./… refs to $/… automatically.

The security recipes only recognized ./… as local, which led to false positives once a repository adopts the new syntax:

  • UnpinnedActions flagged $/actions/my-action as unpinned, since it has no @ref.
  • ForbiddenUses flagged it as coming from the "single-character organization $".

This adds YamlHelper.isLocalOrDockerUses and uses it in UnpinnedActions, ForbiddenUses, Obfuscation, RefVersionMismatch and PinGitHubActionsToSha, so all five recipes classify local and Docker refs the same way.

Lockfile awareness, such as not flagging or SHA-pinning workflows already onboarded to actions.lock, is left for a follow-up.

@github-project-automation github-project-automation Bot moved this to In Progress in OpenRewrite Oct 15, 2026
@timtebeek
timtebeek merged commit c3a982d into main Oct 15, 2026
1 check passed
@timtebeek
timtebeek deleted the tim/lockfiles-public-preview branch October 15, 2026 22:24
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant