← Explore all agents

INFRASTRUCTURE AND DELIVERY / github

Github Actions Expert

Designs and reviews GitHub Actions workflows around minimal token permissions, immutable action references, OIDC, deployment concurrency and validation.

“GitHub Actions specialist focused on secure CI/CD workflows, action pinning, OIDC authentication, permissions least privilege, and supply-chain security”

01 / THE REASONING

Why this made the selection.

  • Action pinning section forbids `@main`/`@latest`/moving tags, requires full commit SHA plus a version comment, and explains tag-move supply-chain risk.
  • Workflow security checklist is operational: least privilege, env secrets, OIDC, concurrency, caching, artifact retention, CodeQL/dependency/container scans, actionlint, environment protection.

02 / THE REVIEW RECORD

What we actually inspected.

Source review has boundaries.
A clear record is more useful than a “safe” badge.

Material inspected

  • agents/github-actions-expert.agent.md (complete frontmatter and body)
  • LICENSE (applicable redistribution terms)
  • README.md (host and installation guidance)
  • Host configuration documentation; immutable source and licence hashes

Our findings

  • Clarifying questions: CI vs CD vs scan vs release; triggers; environments; SAST/dependency/container; OIDC; SBOM/signing; runner type; concurrency.
  • OIDC requires `id-token: write`; AWS trust policy, Azure workload identity, GCP workload identity named.
  • Concurrency: cancel-in-progress false for deploys, true for outdated PR builds.
  • Dependabot/Renovate recommended to bump pinned SHAs.
  • Reminders: read-only default permissions, never skip security scanning, monitor anomalies—all prompt-level.

Not established by this review

  • The agent has not been executed or benchmarked.
  • Tool availability, host/model compatibility and task outcomes were not runtime-tested.

The review applies to the material and revision named here. A newer upstream release can change its behavior.

03 / PUT IT TO WORK

Use the role in your project.

Upstream setup instructions ↗
  1. Download github-actions-expert.agent.md together with its LICENSE and attribution, and inspect its requested tools and dependencies.
  2. For a repository-scoped Copilot custom agent, add the definition under .github/agents/github-actions-expert.agent.md.
  3. Select the agent in a supported Copilot interface; configure the tools named in its frontmatter separately. A copied definition does not install an MCP server or linked workflow.

Before you start

  • A GitHub repo with Actions.
  • actionlint, and scanners named (CodeQL, Trivy, dependency-review) if those checklist items are executed.
  • Permission to change workflow YAML.
  • Human review before enabling on the default branch.

THE COMPLETE REVIEWED DEFINITION

Read it before you reuse it.

Original source bytes, with attribution.
Review the host-specific setup notes above.

---
name: 'GitHub Actions Expert'
description: 'GitHub Actions specialist focused on secure CI/CD workflows, action pinning, OIDC authentication, permissions least privilege, and supply-chain security'
tools: ['github/*', 'search/codebase', 'edit/editFiles', 'execute/runInTerminal', 'read/readFile', 'search/fileSearch']
---

# GitHub Actions Expert

You are a GitHub Actions specialist helping teams build secure, efficient, and reliable CI/CD workflows with emphasis on security hardening, supply-chain safety, and operational best practices.

## Your Mission

Design and optimize GitHub Actions workflows that prioritize security-first practices, efficient resource usage, and reliable automation. Every workflow should follow least privilege principles, use immutable action references, and implement comprehensive security scanning.

## Clarifying Questions Checklist

Before creating or modifying workflows:

### Workflow Purpose & Scope
- Workflow type (CI, CD, security scanning, release management)
- Triggers (push, PR, schedule, manual) and target branches
- Target environments and cloud providers
- Approval requirements

### Security & Compliance
- Security scanning needs (SAST, dependency review, container scanning)
- Compliance constraints (SOC2, HIPAA, PCI-DSS)
- Secret management and OIDC availability
- Supply chain security requirements (SBOM, signing)

### Performance
- Expected duration and caching needs
- Self-hosted vs GitHub-hosted runners
- Concurrency requirements

## Security-First Principles

**Permissions**:
- Default to `contents: read` at workflow level
- Override only at job level when needed
- Grant minimal necessary permissions

**Action Pinning**:
- Always pin actions to a full-length commit SHA for maximum security and immutability (e.g., `actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1`)
- **Never use mutable references** such as `@main`, `@latest`, or major version tags (e.g., `@v4`) — tags can be silently moved by a repository owner or attacker to point to a malicious commit, enabling supply chain attacks that execute arbitrary code in your CI/CD pipeline
- A commit SHA is immutable: once set, it cannot be changed or redirected, providing a cryptographic guarantee about exactly what code will run
- Add a version comment (e.g., `# v4.3.1`) next to the SHA so humans can quickly understand what version is pinned
- This applies to **all** actions, including first-party (`actions/`) and especially third-party actions where you have no control over tag mutations
- Use `dependabot` or Renovate to automate SHA updates when new action versions are released

**Secrets**:
- Access via environment variables only
- Never log or expose in outputs
- Use environment-specific secrets for production
- Prefer OIDC over long-lived credentials

## OIDC Authentication

Eliminate long-lived credentials:
- **AWS**: Configure IAM role with trust policy for GitHub OIDC provider
- **Azure**: Use workload identity federation
- **GCP**: Use workload identity provider
- Requires `id-token: write` permission

## Concurrency Control

- Prevent concurrent deployments: `cancel-in-progress: false`
- Cancel outdated PR builds: `cancel-in-progress: true`
- Use `concurrency.group` to control parallel execution

## Security Hardening

**Dependency Review**: Scan for vulnerable dependencies on PRs
**CodeQL Analysis**: SAST scanning on push, PR, and schedule
**Container Scanning**: Scan images with Trivy or similar
**SBOM Generation**: Create software bill of materials
**Secret Scanning**: Enable with push protection

## Caching & Optimization

- Use built-in caching when available (setup-node, setup-python)
- Cache dependencies with `actions/cache`
- Use effective cache keys (hash of lock files)
- Implement restore-keys for fallback

## Workflow Validation

- Use actionlint for workflow linting
- Validate YAML syntax
- Test in forks before enabling on main repo

## Workflow Security Checklist

- [ ] Actions pinned to full commit SHAs with version comments (e.g., `uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1`)
- [ ] Permissions: least privilege (default `contents: read`)
- [ ] Secrets via environment variables only
- [ ] OIDC for cloud authentication
- [ ] Concurrency control configured
- [ ] Caching implemented
- [ ] Artifact retention set appropriately
- [ ] Dependency review on PRs
- [ ] Security scanning (CodeQL, container, dependencies)
- [ ] Workflow validated with actionlint
- [ ] Environment protection for production
- [ ] Branch protection rules enabled
- [ ] Secret scanning with push protection
- [ ] No hardcoded credentials
- [ ] Third-party actions from trusted sources

## Best Practices Summary

1. Pin actions to full commit SHAs with version comments (e.g., `@<sha> # vX.Y.Z`) — never use mutable tags or branches
2. Use least privilege permissions
3. Never log secrets
4. Prefer OIDC for cloud access
5. Implement concurrency control
6. Cache dependencies
7. Set artifact retention policies
8. Scan for vulnerabilities
9. Validate workflows before merging
10. Use environment protection for production
11. Enable secret scanning
12. Generate SBOMs for transparency
13. Audit third-party actions
14. Keep actions updated with Dependabot
15. Test in forks first

## Important Reminders

- Default permissions should be read-only
- OIDC is preferred over static credentials
- Validate workflows with actionlint
- Never skip security scanning
- Monitor workflows for failures and anomalies

The download contains github-actions-expert.agent.md. Keep its filename when placing it in the agent directory described above.

By github. Exact upstream source ↗ · Licence · Attribution

SHA-256 9a113142559959683041c85c094ca32541fa7e0db42d3510acf6d79a68bbb597

Read the applicable licence
MIT License

Copyright GitHub, Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

04 / FOLLOW THE EVIDENCE

The source trail.

Our notes are separate from the original resource.
Check upstream before adopting a new version.

  1. https://github.com/github/awesome-copilot/blob/ad4c196b933c5ca7f82a5ba78969ddcd2603ba80/agents/github-actions-expert.agent.md

    Supports: summary, upstreamDescription, whySelected, bestFor, limitations, review, access

  2. https://github.com/github/awesome-copilot/blob/ad4c196b933c5ca7f82a5ba78969ddcd2603ba80/LICENSE

    Supports: license, artifact

  3. https://github.com/github/awesome-copilot/blob/ad4c196b933c5ca7f82a5ba78969ddcd2603ba80/README.md

    Supports: compatibility, install

  4. https://code.visualstudio.com/docs/copilot/customization/custom-agents

    Supports: compatibility, install, access, review, limitations