Skip to content

Latest commit

 

History

History
143 lines (97 loc) · 5.72 KB

File metadata and controls

143 lines (97 loc) · 5.72 KB
description Instructions for fixing Dependabot PRs that update dependencies in generated workflow manifest files
disable-model-invocation true

You are specialized in fixing Dependabot PRs for GitHub Agentic Workflows dependency manifests. Read the ENTIRE content of this file carefully before proceeding. Follow the instructions precisely.

Fixing Dependabot PRs for Agentic Workflow Dependencies

Warning

Never directly merge Dependabot PRs that modify generated files such as .github/workflows/package.json, .github/workflows/requirements.txt, or .github/workflows/go.mod. These files are generated by the gh aw compiler and any direct changes will be overwritten on the next compilation.

Background

The gh aw compile --dependabot command scans all agentic workflow files (.github/workflows/*.md) for runtime tool dependencies and generates manifest files:

Manifest Ecosystem Full Path
package.json / package-lock.json npm .github/workflows/package.json / .github/workflows/package-lock.json
requirements.txt pip .github/workflows/requirements.txt
go.mod Go .github/workflows/go.mod

When Dependabot opens PRs to update these dependencies, the fix must be applied to the source .md workflow files, not the generated manifests.

Fix Strategy: Bundle Multiple PRs

Rather than fixing Dependabot PRs one by one, bundle all pending fixes into a single commit:

  1. Find all open Dependabot PRs targeting the generated manifest files
  2. Identify the source .md files for each dependency
  3. Apply all version updates to the .md files in one pass
  4. Regenerate the manifests with a single gh aw compile --dependabot
  5. Commit and push — Dependabot will auto-close the resolved PRs

Step-by-Step Instructions

1. List Open Dependabot PRs

Use GitHub tools to list all open Dependabot PRs:

gh pr list --author "app/dependabot" --state open

Filter for PRs affecting generated workflow manifests (title contains Bump or similar, files include .github/workflows/package.json, .github/workflows/requirements.txt, or .github/workflows/go.mod).

2. Identify Source .md Files

For each outdated dependency, find which workflow files reference it:

# For npm packages (e.g., @playwright/test)
grep -r "@playwright/test" .github/workflows/*.md .github/workflows/shared/

# For pip packages (e.g., requests)
grep -r "requests==" .github/workflows/*.md

# For Go packages
grep -r "golang.org/x/tools" .github/workflows/*.md

3. Update Versions in .md Files

Edit the workflow files to use the updated dependency versions:

# Example: Update @playwright/test from 1.41.0 to 1.42.0
# Find:    npx @playwright/test@1.41.0
# Replace: npx @playwright/test@1.42.0

For MCP server transitive dependencies, update the shared MCP config:

# Locate the shared MCP configuration
grep -r "@sentry/mcp-server" .github/workflows/shared/

# Update the version in the args array:
# args: ["@sentry/mcp-server@0.27.0"] → args: ["@sentry/mcp-server@0.29.0"]

4. Regenerate Manifests

After updating all .md files, regenerate the manifests:

gh aw compile --dependabot

This updates .github/workflows/package.json, .github/workflows/requirements.txt, and .github/workflows/go.mod from the updated .md file versions.

If .github/workflows/package-lock.json also needs updating:

cd .github/workflows && npm install --package-lock-only && cd -

5. Verify and Commit

# Review the changes
git diff .github/workflows/

# Stage and commit all dependency updates together
git add .github/workflows/ .github/aw/
git commit -m "chore: bundle dependabot dependency updates"
git push

Dependabot will automatically close all PRs whose dependency versions now match the committed versions.

Bundling Decision Guide

Bundle multiple PRs when:

  • ✅ Multiple Dependabot PRs target the same ecosystem (npm, pip, Go)
  • ✅ PRs affect different workflows but update the same package
  • ✅ All updates are minor or patch version bumps (low breaking-change risk)

Handle separately when:

  • ⚠️ A PR involves a major version bump with potential breaking changes
  • ⚠️ Different teams own different workflows with separate review requirements

Troubleshooting

Issue Solution
.github/workflows/package-lock.json not updated Run cd .github/workflows && npm install --package-lock-only after compilation
Dependency not found in .md files Check shared MCP configs in .github/workflows/shared/
Compilation fails after version update Check if the new version has breaking API changes
Dependabot PR not auto-closing Verify the exact version strings match; check for pre-release suffixes

Dismissed Dependabot Alerts and VEX

When a Dependabot security alert is dismissed with a substantive security reason (not_used, inaccurate, or tolerable_risk), consider generating a VEX (Vulnerability Exploitability eXchange) statement to record the assessment as a machine-readable OpenVEX v0.2.0 document in .vex/<ghsa-id>.json. Alerts dismissed as no_bandwidth do not represent a security decision and should not produce a VEX statement.

Learn about the OpenVEX format, purl construction, and dismissal-to-justification mappings from openvex.dev before generating statements.

Related Documentation

  • Dependabot Support — Full reference for gh aw compile --dependabot
  • OpenVEX Specification — VEX standard for vulnerability exploitability exchange
  • Local copy: @.github/aw/github-agentic-workflows.md