Skip to main content
Glama

Workflow Permissions Audit

workflow_permissions_audit
Read-onlyIdempotent

Scan GitHub Actions workflows for missing permissions, write-all scopes, and risky pull_request_target write grants to enforce least privilege.

Instructions

Scan .github/workflows/*.yml for permissions declarations (top-level and per-job) and flag least-privilege gaps.

Required token scope: repo (or public_repo for public-only repos) with read access to repository contents.

Args:

  • owner, repo: Repository coordinates.

  • ref: Optional. Branch, tag, or SHA to read workflow files from. Falls back to the repository's default branch.

Flags:

  • No permissions declared anywhere in the file (workflow or job level) -- relies on the repo/org default token scope instead of an explicit declaration.

  • permissions: write-all (top-level or per-job) -- grants write access to every scope.

  • Any scope granted write on a workflow triggered by pull_request_target -- a known injection/exfiltration risk since that trigger runs with the base repo's token against untrusted PR content.

Returns: per-file findings by severity and a least_privilege/needs_review/over_permissioned conclusion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoBranch, tag, or SHA to read workflow files from. Falls back to the repository's default branch.
repoNoGitHub repo. Falls back to GITHUB_REPO.
ownerNoGitHub owner. Falls back to GITHUB_OWNER.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYes
repoYes
errorsYes
findingsYes
conclusionYes
trustBoundaryNo
workflowsScannedYes
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare readOnlyHint=true, idempotentHint=true, destructiveHint=false. Description adds critical context: scanning scope, token requirements, fallback behavior for `ref`, and the exact flags checked. No contradictions; description complements annotations well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description front-loads purpose and is well-structured with sections for args and flags. It is longer than strictly necessary due to detail, but every sentence adds value. Minor reduction in verbosity could improve it.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists, the description covers expected behavior, parameters, flags, and return value format (per-file findings with severity and conclusion). No gaps detected.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%; each parameter has a description. The description restates `ref` fallback and owner/repo defaults but doesn't add new semantics beyond the schema. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool scans `.github/workflows/*.yml` for permission declarations and flags least-privilege gaps, which is a specific verb-resource combination. It distinguishes itself from sibling tools like `security_triage` and `review_pr_against_standard` by focusing solely on workflow permissions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description specifies required token scope (`repo` or `public_repo` with read access) and identifies three specific flag conditions. While it doesn't explicitly contrast with sibling tools, the context makes its unique role clear. It could be improved by stating when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SakuraCianna/agentic-sdlc-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server