Skip to main content
Glama

Workflow Permissions Audit

workflow_permissions_audit
Read-onlyIdempotent

Audit GitHub Actions workflow permissions to identify least-privilege gaps, including missing declarations, write-all, and risky pull_request_target write access.

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
workflowsScannedYes
Behavior5/5

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

Beyond annotations (readOnly, not destructive), the description adds substantial behavioral context: required token scope (`repo`), scanning scope, specific flags (missing `permissions`, `write-all`, `pull_request_target` risk), and return structure (per-file findings and conclusion). This fully informs the agent of behavior.

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?

The description is moderately sized and well-structured: core purpose, token scope, args, flags (bulleted), and returns. It could be slightly more concise but is not overly verbose.

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 presence of an output schema, the description's summary of return values (per-file findings, severity, conclusion) is sufficient. It covers the tool's complexity with clear explanations of flags and conditions.

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%, so baseline is 3. The description repeats parameter information already in schema (owner, repo, ref with fallbacks) without adding new semantic details. It does not compensate further.

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?

The description clearly states the tool scans `.github/workflows/*.yml` for `permissions` declarations and flags least-privilege gaps. It uses specific verbs ('Scan', 'flag') and resources, distinguishing it from sibling tools like `branch_protection_status` or `security_triage`.

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?

The description implies usage for auditing workflow permissions but does not explicitly compare to sibling tools or provide when-not-to-use guidance. The context is clear enough for an agent to decide.

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