Skip to content

CI(lint): Adopt the self-repository syntax - #175

Merged
ModeSevenIndustrialSolutions merged 1 commit into
mainfrom
feat/self-repository-syntax
Sep 21, 2026
Merged

ModeSevenIndustrialSolutions merged 1 commit into
mainfrom
feat/self-repository-syntax

Conversation

@ModeSevenIndustrialSolutions

Copy link
Copy Markdown
Member

Summary

Adopts GitHub's self-repository uses: $/ syntax for the local action
reference, and swaps the actionlint pre-commit hook for a fork that
understands it.

zizmor's self-repository audit (v1.30.0+) reports the older
workspace-relative uses: ./ form as a finding and wants uses: $/
instead. Upstream actionlint v1.7.12 predates that syntax and rejects it
outright, so the conversion and the hook swap have to land together —
either change on its own leaves one linter failing.

Changes

  • .pre-commit-config.yaml — replace
    Mateusz-Grzelinski/actionlint-py (upstream v1.7.12.24) with
    kjanat/actionlint v1.17.0, an
    actively maintained fork that understands $/{path}. Pinned to commit
    08bb2c4f0d039744455b87aef1c647fb8b66d37b.
  • .github/workflows/testing.yaml — convert the local action
    reference from uses: ./ to uses: $/.
  • .github/actionlint.yaml — two path-scoped ignores, each with a
    comment explaining why it exists and when it can be removed.

Why the bare-$/ ignore

The fork deliberately rejects a bare $/, because actions/runner's
TryParseSelfRepository helper refuses an empty path. GitHub's
server-side workflow parser does accept it: an action living at the
repository root has no {path}, so a bare $/ resolves and runs.

The ignore pattern quotes $/ exactly, with no trailing wildcard:

specifying action "\$/" in invalid format because path is missing

A looser pattern would also suppress malformed extra-slash forms such as
$//, which must keep failing.

Why the cache-access ignore

The fork adds a cache-access policy check that upstream lacks. It flags
the reusable workflow call in openssf-scorecard.yaml, made under the
low-trust branch_protection_rule trigger, and wants cache-mode: read
or cache-mode: none.

GitHub shipped cache-mode on 2026-09-10 and SchemaStore's workflow
schema already models it, but check-jsonschema 0.38.0 — the newest
release — vendors an older copy, so adding the key fails the
check-github-workflows hook. The lint is suppressed rather than writing
a key that another mandatory hook rejects. The entry names its single
callee, so any other reusable workflow call added to that file must
account for cache access on its own merits, and it matches the pinned SHA
as [0-9a-f]{40} so Dependabot bumps do not break it.

Remove that entry once a check-jsonschema release vendors a schema
containing cache-mode, then set cache-mode: read on the job.

Validation

All run locally against this branch, all clean:

  • prek run --all-files — no failures
  • actionlint (kjanat fork v1.17.0) — no findings
  • uvx zizmor@1.30.1 --persona auditor --min-severity informational --offline --format plain . — no findings
  • aislop ci --changes — 0 errors, 0 warnings
  • Commit is signed and carries a DCO sign-off

zizmor's self-repository audit (v1.30.0+) reports the older
workspace-relative 'uses: ./' form as a finding and wants GitHub's
self-repository 'uses: $/' syntax instead. Upstream actionlint
v1.7.12 predates that syntax and rejects it outright, so converting
the reference and swapping the actionlint hook have to land together:
either change on its own leaves one linter failing.

Swap the actionlint-py hook, pinned to upstream v1.7.12.24, for
kjanat/actionlint v1.17.0, an actively maintained fork that
understands '$/{path}'. Convert the local action reference in
.github/workflows/testing.yaml from './' to '$/'.

The fork deliberately rejects a bare '$/', because actions/runner's
TryParseSelfRepository helper refuses an empty path. GitHub's
server-side workflow parser does accept it: an action at the
repository root has no {path}, so a bare '$/' resolves and runs. Add
a path-scoped ignore in .github/actionlint.yaml for that one message.
The pattern quotes '$/' exactly, with no trailing wildcard, so
malformed extra-slash forms such as '$//' keep failing.

The fork also adds a cache-access policy check that upstream lacks,
which flags the reusable workflow call in openssf-scorecard.yaml made
under the low-trust branch_protection_rule trigger. The key it wants,
'cache-mode: read', is rejected by check-jsonschema 0.38.0, whose
vendored workflow schema predates it, so a second path-scoped ignore
suppresses the lint rather than writing a key another mandatory hook
refuses. That entry names its single callee and matches the pinned
SHA as [0-9a-f]{40}, so Dependabot bumps do not break it.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions requested review from a team and a balanced review from Copilot September 18, 2026 18:52
@github-actions github-actions Bot added the CI CI and tests updates label Sep 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The bare $/ reference has no path and is rejected by the GitHub Actions runner.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adopts GitHub Actions self-repository references and updates linting support.

Changes:

  • Switches to the forked actionlint release.
  • Converts the local action reference to self-repository syntax.
  • Adds scoped lint suppressions for unsupported edge cases.
File summaries
File Description
.pre-commit-config.yaml Updates the actionlint hook.
.github/workflows/testing.yaml Changes the local action reference.
.github/actionlint.yaml Adds path-specific lint ignores.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/testing.yaml Resolved

@zxiiro zxiiro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Auto-approved by agent: reviewed workflow/code change for security and CI/CD impact, found low risk. Adopt $/ self-repo uses + pinned actionlint fork; no permission/secret changes.

@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions merged commit cc4efaa into main Sep 21, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI CI and tests updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants