Skip to content

[plan] Reduce excessive permissions in test-firewall-escape workflow #5211

Closed

Description

@github-actions

Objective

Reduce excessive permissions in test-firewall-escape.lock.yml workflow to follow the principle of least privilege.

Context

Security Risk: Overly broad permissions increase attack surface if the workflow is compromised.

Affected File: .github/workflows/test-firewall-escape.lock.yml

  • Permission: issues: write (Line 265)

Reference: Discussion #5202 - Static Analysis Report

Approach

Review the workflow's actual requirements and reduce permissions to the minimum needed.

Permission Analysis

  1. Determine what GitHub API operations this workflow actually performs
  2. Check if issues: write is truly necessary or if issues: read suffices
  3. If write access is needed, verify it's used appropriately
  4. Consider if the workflow could use safe-outputs instead of direct write permissions

Files to Modify

  1. .github/workflows/test-firewall-escape.md (source workflow)

    • Review the permissions: section in frontmatter
    • Reduce issues: write to issues: read if write access is not actually used
    • Consider using safe-outputs configuration if issue creation/updates are needed
  2. Recompile workflow:

    gh aw compile test-firewall-escape

Example Fix

❌ Before (Excessive):

permissions:
  contents: read
  issues: write

✅ After (Least Privilege):

permissions:
  contents: read
  issues: read

# Or if issue creation is needed, use safe-outputs:
safe-outputs:
  create-issue:

Acceptance Criteria

  • Workflow permissions reviewed and documented
  • issues: write removed if not needed, or justified if required
  • Safe-outputs used if issue creation/updates are needed
  • Workflow compiles successfully with gh aw compile test-firewall-escape
  • Static analysis (zizmor) shows no excessive permissions findings
  • Workflow still functions correctly with reduced permissions

Validation

Run static analysis to verify fix:

gh aw compile test-firewall-escape --zizmor

Expected: No High-severity excessive permissions findings.
Related to #5207

AI generated by Plan Command for discussion #5202

Activity

  1. pelikhan commented on Dec 1, 2025

    @pelikhan
    Collaborator

    Move the issue: write permissions to the post-issue job, not the top level permissions

  2. assigned and unassigned on Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions