Skip to content

Migrate dependency-update workflow to GitHub Agentic Workflows#1065

Merged
dgee2 merged 2 commits into
mainfrom
dgee2/issue-1064-migrate-dependency-update-workflow-to-gi-fb1450
May 23, 2026
Merged

Migrate dependency-update workflow to GitHub Agentic Workflows#1065
dgee2 merged 2 commits into
mainfrom
dgee2/issue-1064-migrate-dependency-update-workflow-to-gi-fb1450

Conversation

@dgee2

@dgee2 dgee2 commented May 23, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #1064

Replaces the monolithic dependency-update.yml (which ran Copilot CLI directly with write tokens, creating a structural prompt injection risk) with three per-ecosystem GitHub Agentic Workflow source files compiled to hardened .lock.yml files.

Changes

Added

  • .github/workflows/dependency-update-dotnet.md - agentic workflow source for .NET / NuGet
  • .github/workflows/dependency-update-dotnet.lock.yml - compiled by gh aw compile
  • .github/workflows/dependency-update-node.md - agentic workflow source for Node / npm / pnpm
  • .github/workflows/dependency-update-node.lock.yml - compiled by gh aw compile
  • .github/workflows/dependency-update-github-actions.md - agentic workflow source for GitHub Actions
  • .github/workflows/dependency-update-github-actions.lock.yml - compiled by gh aw compile
  • .github/aw/actions-lock.json - pinned action SHAs generated by the compiler

Removed

  • .github/workflows/dependency-update.yml - replaced by the three per-ecosystem workflows above

Security review note (required by gh aw compile)

The compiled .lock.yml files reference one new restricted secret:

  • COPILOT_TOKEN - this is the existing fine-grained PAT already in use in the repository for Copilot CLI authentication. It is mapped to the COPILOT_GITHUB_TOKEN environment variable expected by the gh-aw Copilot engine via engine.env. No new credentials are introduced.

No new actions or redirects beyond those pinned in .github/aw/actions-lock.json (actions/github-script@v9.0.0 and github/gh-aw-actions/setup@v0.74.8), both standard gh-aw runtime dependencies.

Acceptance criteria

  • gh aw CLI used to compile each workflow to a .lock.yml
  • Each ecosystem has its own agentic workflow source file
  • Agent runs read-only (no write tokens in the agent job)
  • Network firewall configured per ecosystem (dotnet / node / defaults+github)
  • create-pull-request: max 10, preserve-branch-name, recreate-ref, fallback-as-issue false
  • close-pull-request: max 10
  • add-labels: max 30
  • Existing skills and prompt files unchanged
  • Build validation still runs via tools.bash
  • Weekly Friday 09:00 UTC schedule preserved
  • workflow_dispatch on each workflow for manual per-ecosystem runs
  • Old dependency-update.yml removed
  • COPILOT_TOKEN secret continues to be used via engine.env mapping

Replace the monolithic dependency-update.yml with three per-ecosystem
agentic workflow source files compiled via gh aw compile:

- dependency-update-dotnet.md (.NET / NuGet)
- dependency-update-node.md (Node / npm / pnpm)
- dependency-update-github-actions.md (GitHub Actions)

Each workflow runs Copilot with:
- Read-only agent token (no write permissions in agent job)
- Network firewall scoped to the ecosystem's required domains
- Safe outputs for create-pull-request (max 10, preserve-branch-name,
  recreate-ref), close-pull-request (max 10), and add-labels (max 30)
- Existing skills and prompt files referenced as-is from the workspace

The weekly Friday 09:00 UTC schedule and workflow_dispatch trigger are
preserved on each individual workflow. COPILOT_TOKEN secret continues
to be used via engine.env mapping.

Closes #1064

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 23, 2026 21:44

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.

Pull request overview

This PR migrates the repository’s dependency-update automation from a single Copilot-CLI-driven workflow (with write tokens in the agent job) to three per-ecosystem GitHub Agentic Workflows (gh-aw) with compiled, pinned .lock.yml workflows, reducing prompt-injection and credential exposure risk.

Changes:

  • Removed the monolithic .github/workflows/dependency-update.yml workflow.
  • Added per-ecosystem agentic workflow sources (.md) and their compiled .lock.yml workflows for .NET, Node, and GitHub Actions.
  • Added .github/aw/actions-lock.json and marked .lock.yml workflows as generated in .gitattributes.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.github/workflows/dependency-update.yml Removed legacy workflow that ran Copilot CLI directly with write permissions.
.github/workflows/dependency-update-dotnet.md New gh-aw source workflow for .NET dependency updates.
.github/workflows/dependency-update-dotnet.lock.yml Compiled/pinned gh-aw workflow for .NET updates.
.github/workflows/dependency-update-node.md New gh-aw source workflow for Node dependency updates.
.github/workflows/dependency-update-node.lock.yml Compiled/pinned gh-aw workflow for Node updates.
.github/workflows/dependency-update-github-actions.md New gh-aw source workflow for GitHub Actions dependency updates.
.github/workflows/dependency-update-github-actions.lock.yml Compiled/pinned gh-aw workflow for GitHub Actions updates.
.github/aw/actions-lock.json Adds pinned action SHAs emitted by the gh-aw compiler.
.gitattributes Marks .github/workflows/*.lock.yml as generated and resolves merges via ours.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/dependency-update-node.md
Comment thread .github/workflows/dependency-update-dotnet.md
Comment thread .github/workflows/dependency-update-github-actions.md
Comment thread .github/workflows/dependency-update-github-actions.md
Add explicit name frontmatter to dependency-update-github-actions.md
so the compiled lock.yml uses correct 'GitHub' capitalization.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud

Copy link
Copy Markdown

@dgee2 dgee2 merged commit 5285db0 into main May 23, 2026
13 checks passed
@dgee2 dgee2 deleted the dgee2/issue-1064-migrate-dependency-update-workflow-to-gi-fb1450 branch May 23, 2026 22:03
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.

Migrate dependency-update workflow to GitHub Agentic Workflows (gh-aw)

2 participants