Skip to content

Fix gh-aw workflow issues: label gates, duplicate title prefixes, security restrictions, and Docker image pinning#10

Merged
zircote merged 3 commits intofeature/gh-aw-migrationfrom
copilot/sub-pr-9
Feb 21, 2026
Merged

Fix gh-aw workflow issues: label gates, duplicate title prefixes, security restrictions, and Docker image pinning#10
zircote merged 3 commits intofeature/gh-aw-migrationfrom
copilot/sub-pr-9

Conversation

Copy link
Contributor

Copilot AI commented Feb 20, 2026

Four categories of issues identified in the gh-aw workflow migration PR review.

Duplicate title prefixes

safe-outputs title-prefix values were redundant with the titles the agent was instructed to construct, resulting in doubled prefixes (e.g., "Weekly Farm Check - Weekly Farm Check - Week N"). Removed title-prefix from weekly-reminder.md, eov-seasonal-reminder.md, and flock-action.md, with matching updates to GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG in the compiled lock files.

Missing label gates

flock-action.lock.yml and eov-enrichment.lock.yml triggered on every opened issue with no label filtering, despite the compiler comments claiming otherwise. Added if: conditions to the pre_activation job in each:

# flock-action.lock.yml
pre_activation:
  if: contains(github.event.issue.labels.*.name, 'flock-action')

# eov-enrichment.lock.yml
pre_activation:
  if: |
    contains(github.event.issue.labels.*.name, 'record:eov-site-assessment') ||
    contains(github.event.issue.labels.*.name, 'record:eov-soil-sample') ||
    ...

--allow-all-tools in weekly-reminder

weekly-reminder.lock.yml was compiled with --allow-all-tools --allow-all-paths, unlike the other workflows which use explicit allowlists. Replaced with --allow-path /tmp/gh-aw/ --allow-path "${GITHUB_WORKSPACE}".

Mutable Docker image reference

ghcr.io/zircote/nsip was referenced by tag only (supply chain risk). Pinned to digest in both flock-action.md and flock-action.lock.yml:

ghcr.io/zircote/nsip@sha256:a1480316dc0e122fdce2724fd0f255033d04c0830bcb4686605ea429d5b9e793

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…ecurity restrictions, and Docker image pinning

Co-authored-by: zircote <307960+zircote@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate workflows to GitHub Agentic Workflow format Fix gh-aw workflow issues: label gates, duplicate title prefixes, security restrictions, and Docker image pinning Feb 20, 2026
Copilot AI requested a review from zircote February 20, 2026 10:01
@zircote zircote marked this pull request as ready for review February 21, 2026 02:38
Copilot AI review requested due to automatic review settings February 21, 2026 02:38
Copy link

Copilot AI left a comment

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 fixes four critical issues in the gh-aw workflow migration: duplicate title prefixes, missing label gates, overly permissive security settings, and unpinned Docker images. These changes improve workflow reliability, security, and user experience.

Changes:

  • Removed redundant title-prefix values from safe-outputs configurations that were duplicating prefixes already in agent-generated titles
  • Added label filtering conditions to pre_activation jobs to prevent workflows from triggering on every opened issue
  • Restricted agent permissions in weekly-reminder from --allow-all-tools --allow-all-paths to explicit path allowlists
  • Pinned NSIP Docker image to SHA256 digest for supply chain security

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.github/workflows/weekly-reminder.md Removed redundant "Weekly Farm Check - " title prefix from safe-outputs
.github/workflows/weekly-reminder.lock.yml Updated compiled workflow: removed title prefix from config JSON and replaced --allow-all-tools --allow-all-paths with explicit --allow-path restrictions
.github/workflows/flock-action.md Removed redundant "[Flock Action] " title prefix and pinned nsip Docker image to SHA256 digest
.github/workflows/flock-action.lock.yml Updated compiled workflow: removed title prefix from config JSON, pinned nsip image digest, and added label gate to pre_activation job
.github/workflows/eov-seasonal-reminder.md Removed redundant "EOV " title prefix from safe-outputs
.github/workflows/eov-seasonal-reminder.lock.yml Updated compiled workflow: removed title prefix from config JSON
.github/workflows/eov-enrichment.lock.yml Added multi-label gate to pre_activation job to filter EOV-related issues

@zircote zircote merged commit d07bf0c into feature/gh-aw-migration Feb 21, 2026
1 check passed
zircote added a commit that referenced this pull request Feb 21, 2026
* Migrate 4 workflows to GitHub Agentic Workflow (gh-aw) format

Replace YAML workflows that assigned copilot-swe-agent or used
github-script with unified gh-aw markdown files that combine
trigger configuration and agent instructions in a single file.

Migrated workflows:
- flock-action: NSIP breeding analysis (consolidates .yml + instructions)
- eov-enrichment: EOV ecological monitoring (consolidates .yml + instructions)
- weekly-reminder: Monday farm checklist creation
- eov-seasonal-reminder: Quarterly ecological monitoring reminder

Kept as YAML (not agentic):
- copilot-setup-steps.yml (infrastructure setup)
- dependabot-automerge.yml (CI reusable workflow)

Key improvements in gh-aw format:
- Read-only permissions with writes gated through safe-outputs
- Reaction feedback (eyes) on event-triggered workflows
- Restricted bash allowlists (least-privilege)
- Lock-for-agent to prevent concurrent processing
- Duplicate detection for scheduled workflows
- Edge case handling for invalid inputs
- Branch-prefix constraints on PR creation

* Fix compile errors and add compiled .lock.yml files

- Remove unsupported `reaction` and `branch-prefix` fields
- Fix bash tool syntax (array format, not object)
- Remove unsupported `max`/`discussions` on safe-outputs
- Add compiled .lock.yml for all 4 agentic workflows
- Add .gitattributes and .github/aw/ from gh-aw compiler

* Fix label gates, duplicate title prefixes, allow-all-tools, and image digest pinning (#11)

* Initial plan

* Fix review comments: label gates, title prefix duplication, security improvements

Co-authored-by: zircote <307960+zircote@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: zircote <307960+zircote@users.noreply.github.com>

* Fix gh-aw workflow issues: label gates, duplicate title prefixes, security restrictions, and Docker image pinning (#10)

* Initial plan

* Address review comments: fix duplicate title prefixes, label gates, security restrictions, and Docker image pinning

Co-authored-by: zircote <307960+zircote@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: zircote <307960+zircote@users.noreply.github.com>
Co-authored-by: Robert Allen <zircote@gmail.com>

---------

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: zircote <307960+zircote@users.noreply.github.com>
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.

3 participants