Skip to content

Accept self-repository $/ action and reusable workflow references - #75924

Merged
pelikhan merged 4 commits into
mainfrom
copilot/accept-self-repository-prefix
Nov 8, 2026
Merged

pelikhan merged 4 commits into
mainfrom
copilot/accept-self-repository-prefix

Conversation

Copilot AI commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

gh-aw rejects GitHub Actions’ $/ references even with strict: false. These references resolve against the running workflow’s own repository and commit without an @ref.

  • Action pinning: Pass $/ steps through unchanged in agent, custom, and safe-output jobs.
  • Integrity validation: Apply the existing ./ path checks to $/, including reusable-workflow paths; continue rejecting @ref suffixes and malformed paths.
  • Regression coverage: Cover all requested locations, both strict modes, and invalid references.
jobs:
  action:
    runs-on: ubuntu-latest
    steps:
      - uses: $/some/action
  call:
    uses: $/.github/workflows/called.yml

Copilot AI changed the title [WIP] Add support for self-repository prefix in workflow calls Accept self-repository $/ action and reusable workflow references Nov 8, 2026
Copilot AI requested a review from pelikhan November 8, 2026 17:23
@pelikhan
pelikhan marked this pull request as ready for review November 8, 2026 17:34
Copilot AI adaptive review requested due to automatic review settings November 8, 2026 17:34
@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

❌ PR Specification Reviewer failed to deliver outputs. Please review the logs for details.

Generated by PR Specification Reviewer for #75924

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Ponytail Reviewer · routed: gpt56 max · ~2 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 118 · ◷

Generated by Ponytail Reviewer for #75924

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Design Decision Gate 🏗️

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Design Decision Gate 🏗️ · routed: gpt56 max · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Test Quality Sentinel · routed: gpt56 max · ~1 AIC · ⌖ ~2 AIC · ◇ ~1 AIC · ⊞ 6.3K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions github-actions Bot 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.

Reviewed immutable PR head 2949367 against compiler threat detection v1.0.98/CTR-002 and security architecture v1.1.9/CS-10. The implementation and tests preserve strict SHA pinning for remote actions while safely validating additive $/ self-repository references. No blocking conformance findings. Synchronized and queued specification updates: compiler threat detection v1.0.99 plus changelog 1.0.99, and security architecture v1.1.10, documenting $/ path semantics, no @ref suffix, local-path validation, and preserved remote pinning. Static review only; tests were not run per review protocol. Coverage is limited to the captured diff and applicable specifications.

Generated by PR Specification Reviewer for #75924 · copilot · gpt50 · ~7 AIC · ⌖ ~2 AIC · ⊞ 1.7K
Comment /review-specs to run again

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-11-08T17:38:31Z
review_event: REQUEST_CHANGES
top_themes: [workflow_run artifact-execution coverage for $/ refs, validation bypass in regression test]
files_reviewed: [pkg/workflow/action_pins.go, pkg/workflow/action_pins_test.go, pkg/workflow/compiler_lint_test.go, pkg/workflow/lint/integrity.go, pkg/workflow/lint/integrity_test.go, pkg/workflow/lint/artifact_execution.go]
comment_count: 2

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K · ◷
Comment /review to run again

@github-actions github-actions Bot 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.

Found two blocking correctness/coverage issues. The new $/ execution path is not included in workflow_run artifact-execution protection, allowing cross-run artifact content to reach repository code without the existing diagnostic. Also, the end-to-end regression disables validation, so it does not prove that normal compilation accepts these references. Inline comments contain the required fixes. Static review only; tests were not run.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again

Comment thread pkg/workflow/compiler_lint_test.go Resolved
Comment thread pkg/workflow/action_pins.go Resolved

@github-actions github-actions Bot 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.

Skills-Based Review 🧠

Applied /tdd. The core change is sound and the new tests pass. One non-blocking gap: $/ refs leak into the lock-file header.

📋 Key Themes & Highlights

Key Themes

  • Header leak (inline comment): CollectActionReferences in redact_secrets.go still skips only ./, so $/ refs are listed under "Custom actions used". A compile confirmed this. Not functional, but misleading, and no test asserts the header.
  • Test coverage: TestCompilerLintSelfRepositoryReferences covers all four locations in both strict modes. integrity_test.go covers valid and malformed $/ cases, including the @ref, traversal, and expression rejections.

Positive Highlights

  • ✅ $/ pass-through in applyActionPinToTypedStep matches the existing ./ handling, and the doc comment is updated.
  • ✅ integrityReference reuses the ./ path checks for $/ and still rejects @ref suffixes and malformed paths.
  • ✅ Compiled end-to-end: $/some/action, $/.github/workflows/called.yml, and $/some/report-action pass through unchanged, and $/.github/workflows/called.yml@v1 fails with a CTR-002 error.

Not verified

  • safe-outputs.actions uses: $/... goes through parseActionUsesField, which only recognises ./ and ../. I did not confirm its behaviour because my scratch config failed schema validation.

@copilot please address the review comment above.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 5.4K
Comment /matt to run again

"$/.github/workflows/called.yml",
"$/some/report-action",
} {
require.Contains(t, string(lock), "uses: "+uses+"\n")

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.

[/tdd] The lock header lists $/ refs under "Custom actions used", but ./ refs are excluded. CollectActionReferences (redact_secrets.go, the ./ skip) was not updated, and this test never checks the header, so the gap is untested. A compile confirms it: the header lists $/some/action and $/.github/workflows/called.yml.

💡 Suggested fix

Skip $/ in CollectActionReferences:

if strings.HasPrefix(ref, "./") || strings.HasPrefix(ref, "$/") {
    continue
}

Then assert the header in this test:

require.NotContains(t, string(lock), "#   - $/")

@copilot please address this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 5ed8fa7: CollectActionReferences excludes $/ actions and reusable workflows. Added collector regressions and a compiled-header assertion; the tests fail before the fix and pass afterward.

Copilot AI 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.

🟡 Changes recommended

The collector still excludes only ./, causing newly supported $/ self-repository actions and reusable workflows to be incorrectly listed as external dependencies.

1 open issue
What changed in this PR

Updates gh-aw’s compiler to accept GitHub Actions $/ self-repository action and reusable workflow references without an @ref, addressing #75910.

Changes:

  • Passes self-repository actions through pinning unchanged.
  • Applies existing repository-relative path validation to $/ references.
  • Adds regression coverage for supported locations, both strict modes, and malformed references.
File Description
pkg/​workflow/​lint/​integrity.go Validates $/ using existing local-path rules.
pkg/​workflow/​lint/​integrity_test.go Covers valid and malformed self-repository references.
pkg/​workflow/​compiler_lint_test.go Covers compilation across job types and strict modes.
pkg/​workflow/​action_pins.go Bypasses pin lookup for self-repository actions.
pkg/​workflow/​action_pins_test.go Verifies self-repository actions remain unchanged.

Review effort: Max (auto)

// Local (./...), self-repository ($/...), and Docker image (docker://...) references
// are valid GitHub Actions syntax that cannot and should not be pinned — emit as-is.
if strings.HasPrefix(step.Uses, "./") || strings.HasPrefix(step.Uses, "docker://") {
if strings.HasPrefix(step.Uses, "./") || strings.HasPrefix(step.Uses, "$/") || strings.HasPrefix(step.Uses, "docker://") {
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (pkg/workflow/compiler_lint_test.go:428): This end-to-end regression sets SetSkipValidation(true), so it bypasses the schema/normal validation path that could still reject $/ in action and reusable-workflow uses fields. The test can pass while real compilation fails before reaching the pinning/lint logic. Please enable validation here (or add a companion case with validation enabled) to verify the advertised compile behavior. - Accept self-repository $/ action and reusable workflow references #75924 (comment)
  3. Review (pkg/workflow/action_pins.go:525): $/ is now treated as executable repository code everywhere pinning is applied, but the workflow_run artifact-execution lint still recognizes only ./ references. A workflow_run job can therefore download a cross-run artifact and then execute an artifact-derived self-repository action via $/... without the existing diagnostic. Please update that lint path (and add a regression case) so this new equivalent reference receives the same protection. - Accept self-repository $/ action and reusable workflow references #75924 (comment)
  4. Review (pkg/workflow/compiler_lint_test.go:438): [/tdd] The lock header lists $/ refs under \"Custom actions used\", but ./ refs are excluded. CollectActionReferences (redact_secrets.go, the ./ skip) was not updated, and this test never checks the header, so the gap is untested. A compile confirms it: the header lists $/some/action and $/.github/workflows/called.yml. - Accept self-repository $/ action and reusable workflow references #75924 (comment)
  5. Fix failing check impacted-go-tests (FAILURE): https://github.com/github/gh-aw/actions/runs/42505665248/job/128807727351.
  6. Fix failing check impacted-go-tests (FAILURE): https://github.com/github/gh-aw/actions/runs/42504119752/job/128803072994.
  7. Fix failing check safe_outputs (FAILURE): https://github.com/github/gh-aw/actions/runs/42505665209/job/128809495686.

Once you start work, post this work summary as a PR comment without the leading Copilot mention, including the Sous-chef head, work, and state lines below, to record that the assignment is running. Apply the necessary fixes on this PR's existing branch, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not merge or trigger CI.

Sous-chef requested-head: 2949367
Sous-chef requested-work: 42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac 9082ef24ca1097350cf6bff6532c144b6e90789bd7d853537e89dd0e85dd75be c7cf93e497befdd5e698d00101b0703e4101fe4133d86d433f7c170d07402b7e d9ab2e5d4a5e0952ac12ca29e01db62e66fa78ec89d49b6414c535e07a8ebee2 e6900bca1ff5afee13ff23e5592a800f0f5c2611b0cfea609e7cf055ebc0824a
Sous-chef requested-state: 920ea3771cd7c78e66c7de2799a73b5c2ab39f5c12e3103ec2b002a0064167e8

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~9 AIC · ⌖ ~16 AIC · ⊞ 1.2K · ◷
Comment /souschef to run again

Copilot AI commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot

Copilot assignment requested for the following outstanding work:...

Assignment running:

  1. Update this branch with the latest main using make merge-main, resolving conflicts and preserving the intended changes.
  2. Enable validation in the self-repository compilation regression.
  3. Extend workflow_run artifact-execution lint protection to $/ references and add regression coverage.
  4. Exclude $/ references from external dependency headers and test the collector and compiled header.
  5. Investigate and fix impacted-go-tests failures in runs 42505665248 and 42504119752.
  6. Investigate the safe_outputs failure in run 42505665209.

Sous-chef requested-head: 2949367
Sous-chef requested-work: 42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac 9082ef24ca1097350cf6bff6532c144b6e90789bd7d853537e89dd0e85dd75be c7cf93e497befdd5e698d00101b0703e4101fe4133d86d433f7c170d07402b7e d9ab2e5d4a5e0952ac12ca29e01db62e66fa78ec89d49b6414c535e07a8ebee2 e6900bca1ff5afee13ff23e5592a800f0f5c2611b0cfea609e7cf055ebc0824a
Sous-chef requested-state: 920ea3771cd7c78e66c7de2799a73b5c2ab39f5c12e3103ec2b002a0064167e8

Copilot AI requested a review from gh-aw-bot November 8, 2026 18:32
@pelikhan
pelikhan merged commit 90babbc into main Nov 8, 2026
74 checks passed
@pelikhan
pelikhan deleted the copilot/accept-self-repository-prefix branch November 8, 2026 19:03
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.2

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.

Accept the self-repository prefix $/ like ./ for actions and job-level reusable workflow calls

4 participants