Skip to content

[static-analysis] RGS-008: Secret Directly Interpolated in run Block across 61 workflows #28155

@github-actions

Description

@github-actions

Rule: RGS-008 — Secret Directly Interpolated in run Block
Severity: High
Affected Workflows: 61 workflows (62 total instances)

Description

A $\{\{ secrets.* }} expression, $\{\{ github.token }}, or $\{\{ env.GITHUB_TOKEN }} appears directly inside a run: block's shell script rather than being passed via the env: mapping.

When secrets are interpolated directly into run: blocks, they are literally pasted into the shell script as plain text before execution. This creates multiple risks:

  1. The secret value becomes part of the shell script text, potentially visible in error messages, debug logs, or process listings
  2. If the secret value contains shell metacharacters, it can break shell syntax or cause unintended command execution
  3. The secret is exposed to shell history and /proc filesystem
  4. Any expression injection vulnerability in the same run: block gains direct access to the secret value

Impact

Secret exposure via side channels even when GitHub's log masking is in place. Combined with expression injection, this can lead to full secret exfiltration.

Remediation

Move secrets from inline expressions to the env: mapping:

Before (vulnerable):

- name: API Call
  run: |
    curl -H Authorization:

Generated by Static Analysis Report · ● 341K ·

  • expires on Apr 30, 2026, 8:00 PM UTC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions