Skip to content

Add review-agentic-workflows skill for security-first workflow review and optimization triage - #53775

Merged
pelikhan merged 15 commits into
mainfrom
copilot/add-review-agentic-workflows-skill
Aug 18, 2026
Merged

Add review-agentic-workflows skill for security-first workflow review and optimization triage#53775
pelikhan merged 15 commits into
mainfrom
copilot/add-review-agentic-workflows-skill

Conversation

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

This PR adds a dedicated skill for reviewing agentic workflow changes end-to-end, with explicit focus on catching security regressions and surfacing optimization opportunities from run evidence. It also wires the skill into repository-level skill routing so it is discoverable by intent.

  • New skill: review-agentic-workflows

    • Adds .github/skills/review-agentic-workflows/SKILL.md as a self-contained review playbook.
    • Defines a structured review flow: scope changed workflows, compile with strict validation/security tooling, detect weakening changes, and report findings by severity.
  • Security regression detection hardening

    • Encodes concrete suspicious-change classes (permission expansion, integrity downgrades, unpinned actions, relaxed guardrails, widened network/tool access, unsafe prompt/script edits).
    • Requires explicit rationale for risk-increasing changes instead of silent acceptance.
  • Run-history optimization guidance

    • Adds optional gh aw audit / gh aw logs analysis when run IDs/history are available.
    • Focuses optimization recommendations on measurable signals (token/cost hotspots, retry churn, bottleneck steps, avoidable tool calls, firewall-denial loops).
  • Skill routing integration

    • Updates AGENTS.md to map security-focused agentic workflow review tasks to the new skill.
BASE_REF="${BASE_REF:-origin/main}"
if git rev-parse --verify "$BASE_REF" >/dev/null 2>&1; then
  git diff --name-only "$BASE_REF...HEAD" -- .github/workflows/
else
  git diff --name-only -- .github/workflows/
fi

Copilot AI and others added 3 commits August 18, 2026 17:43
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title Add review-agentic-workflows skill for secure workflow reviews Add review-agentic-workflows skill for security-first workflow review and optimization triage Aug 18, 2026
Copilot AI requested a review from pelikhan August 18, 2026 17:47

Run these checks before reviewing:

```bash

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot use the bash script to install the cli

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.

Updated in 435a4c6. The setup now uses bash ./install-gh-aw.sh to install gh aw when it is missing, with fallback handling if the installer script is unavailable.

Identify changed workflow sources and generated outputs:

```bash
BASE_REF="${BASE_REF:-origin/main}"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot move this as a step

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.

Updated in 435a4c6. I moved this into explicit step-based guidance so the scope diff command is now part of a clearly defined review step.


Run these checks before reviewing:

```bash

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot move this as a step

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.

Updated in 435a4c6. The setup section is now explicitly step-based, and the CLI install flow is documented as a concrete step.

If `gh aw` extension is unavailable but local binary exists:

```bash
./gh-aw compile --strict --actionlint --zizmor --poutine --runner-guard --yamllint

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot also shellcheck

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.

Updated in 435a4c6. Added --shellcheck to both strict compile commands in the skill guidance.

Copilot AI and others added 2 commits August 18, 2026 18:04
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: docs
  • Risk: low
  • Priority score: 37/100 (impact 12, urgency 10, quality 15)
  • Recommended action: defer

Draft adding a new review-agentic-workflows skill. Already has 5 reviews. Low risk; undraft to proceed to merge track.

Generated by 🔧 PR Triage Agent · auto · 45 AIC · ⌖ 2.09 AIC · ⊞ 8.3K ·


### Step 0) Verify repository and install CLI when missing

```bash

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot extract to bash script in the folder

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.

Implemented in 080c574. I extracted the setup/install logic into .github/skills/review-agentic-workflows/setup.sh and updated SKILL.md Step 0 to call that script.


### 3) Enforce security best practices

Require and verify:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot add an explicit reference to the agentic workflow skill .md file using a github raw user content url.

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.

Implemented in 2cc4187. Added an explicit GitHub rawusercontent URL reference to .github/skills/agentic-workflows/SKILL.md in .github/skills/review-agentic-workflows/SKILL.md.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
@@ -0,0 +1,35 @@
#!/usr/bin/env bash

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@copilot do not reimplement setup, use the install-aw.sh file in main.

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.

Updated in 4e6d7d4. .github/skills/review-agentic-workflows/setup.sh now uses the repository root ./install-gh-aw.sh installer instead of reimplementing setup/install flow in the skill script.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI requested a review from pelikhan August 18, 2026 20:21
@pelikhan

Copy link
Copy Markdown
Collaborator

@copilot remove setup.sh and instead prompt the user to test if gh aw is installed or run the bash scripts steps from the gh-aw repo

Copilot AI and others added 7 commits August 18, 2026 20:36
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor Author

@copilot remove setup.sh and instead prompt the user to test if gh aw is installed or run the bash scripts steps from the gh-aw repo

Updated in 5d39ee2. I removed .github/skills/review-agentic-workflows/setup.sh and changed Step 0 in SKILL.md to prompt checking gh aw --help, then instruct running bash ./install-gh-aw.sh from the gh-aw repo when missing before continuing.

@pelikhan
pelikhan marked this pull request as ready for review August 18, 2026 21:13
Copilot AI balanced review requested due to automatic review settings August 18, 2026 21:13
@pelikhan
pelikhan merged commit 157cf97 into main Aug 18, 2026
@pelikhan
pelikhan deleted the copilot/add-review-agentic-workflows-skill branch August 18, 2026 21:13

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

Adds a security-first playbook for reviewing agentic workflows and makes it discoverable through repository skill routing.

Changes:

  • Adds workflow security, validation, and optimization review guidance.
  • Routes relevant reviews to the new skill.
Show a summary per file
File Description
AGENTS.md Registers the new review skill.
.github/skills/review-agentic-workflows/SKILL.md Defines the review playbook and commands.

Review details

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

  • Files reviewed: 2/2 changed files
  • Comments generated: 4
  • Review effort level: Balanced

# Review Agentic Workflows

Use this skill when asked to review `.github/workflows/*.md` agentic workflows or their generated `.lock.yml` outputs.
Reference workflow authoring skill guidance at: https://raw.githubusercontent.com/github/gh-aw/main/.github/skills/agentic-workflows/SKILL.md
Comment on lines +25 to +37
if gh aw --help >/dev/null 2>&1; then
echo "gh aw is installed"
else
if [ -f ./install-gh-aw.sh ]; then
echo "gh aw is missing. Run the install step before continuing:"
echo " bash ./install-gh-aw.sh"
echo "Then verify:"
echo " gh aw --help"
else
echo "gh aw is missing and ./install-gh-aw.sh is not present in this checkout."
fi
return 1 2>/dev/null || exit 1
fi
Comment on lines +47 to +52
BASE_REF="${BASE_REF:-origin/main}"
if git rev-parse --verify "$BASE_REF" >/dev/null 2>&1; then
git diff --name-only "$BASE_REF...HEAD" -- .github/workflows/
else
git diff --name-only -- .github/workflows/
fi

```bash
gh aw audit <run-id-or-url>
gh aw logs --start-date -14d --workflow-name <workflow-name>
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.87.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants