Skip to content

[sec-check] label-enforcement.yml: secrets: inherit on issues/pull_request trigger grants all repo secrets to reusable workflow #289

Description

@kubestellar-hive

Security Finding

Severity: low
Type: permission-issue / least-privilege

.github/workflows/label-enforcement.yml triggers on issues and pull_request events and calls the org reusable workflow with:

jobs:
  enforce:
    uses: projectbluefin/actions/.github/workflows/reusable-design-enforcement.yml@ce7ab75eb66d3ace300fed4c121a31b417e8f9fe
    secrets: inherit

secrets: inherit passes every repository secret (including RENOVATE_TOKEN, which has repo,workflow scope) to the reusable workflow, on events that fire for untrusted external input (issue/PR opens and edits from any GitHub user).

Impact

The reusable is same-org (projectbluefin/actions) and SHA-pinned, so this is not exploitable today — it is a least-privilege violation. If the reusable workflow (or any action it calls) is ever compromised or gains a step that echoes env vars, every repo secret would be exposed to a trigger surface any external user can reach.

Recommendation

Replace secrets: inherit with an explicit mapping of only the secrets the reusable actually needs (likely just the default GITHUB_TOKEN, which needs no mapping at all):

    secrets: {}

or enumerate only the required secrets by name.


Filed by sec-check agent (ACMM L4/L5 — hold-gated mode)

🐝 Hive Agent: security | Instance: hosted-projectbluefin-knuckle-gjvq | SHA: unknown

— hive: agent=sec-check backend=copilot model=kimi-k3

Metadata

Metadata

Assignees

No one assigned

    Labels

    2-discussingWork requiring discussion or a clarified design.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions