Skip to content

Spurious 'permission none does not meet requirements' warning when bots: allowlist actor triggers workflow #33963

@theletterf

Description

@theletterf

Summary

When a workflow has on.bots: ["github-actions[bot]"] in its frontmatter and github-actions[bot] triggers it, the pre_activation job emits a warning even though the activation succeeds:

User permission 'none' does not meet requirements: admin, maintainer, write

Reproduction

Frontmatter:

on:
  bots: ["github-actions[bot]"]
  workflow_call:
    ...

Trigger: gh workflow run as github-actions[bot] (e.g. from a quality dispatcher).

Observed: workflow activates and runs correctly, but pre_activation / check_membership logs the warning above.

Root cause

The compiled check_membership step sets both GH_AW_REQUIRED_ROLES and GH_AW_ALLOWED_BOTS as env vars and evaluates them independently. When the actor is a bot, the roles check still runs and warns about none permission, even though the bot passes via GH_AW_ALLOWED_BOTS.

GH_AW_REQUIRED_ROLES is "admin,maintainer,write" regardless of whether roles: is explicit in the frontmatter or defaulted — so there's no frontmatter change that suppresses the warning.

Expected behavior

When an actor matches the bots: allowlist, the roles check should either not run or not emit a warning. A bot actor passing via bots: is an explicit grant; the roles mismatch is expected and not actionable.

Impact

The warning is confusing: it implies a permission failure when the activation actually succeeded. It also can't be suppressed from the caller side.

Repo where observed: elastic/docs-actions — sweep workflows triggered by a quality dispatcher running as github-actions[bot].

Metadata

Metadata

Labels

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