Skip to content

Actionlint should check permissions passed to reusable workflows (in the same repository) #552

@ianlewis

Description

@ianlewis

When calling reusable workflows, each reusable workflow requests permissions based on the permissions required for each job. The permissions must be granted by the calling workflow for the workflow to be valid.

If the calling workflow does not grant adequate permissions then GitHub Actions will fail the workflow run with an error like the following.

The workflow is not valid. .github/workflows/pull_request.tests.yml (Line: 64, Col: 3): Error calling workflow 'ianlewis/repo-template/.github/workflows/workflow_call.zizmor.yml@1ae42c4d4c64e09f3b01302bd64a20af0d82c4bd'. The workflow is requesting 'security-events: write', but is only allowed 'security-events: none'.

Actionlint should check for the correct permissions when the reusable workflow is being called from the same repository via uses: ./path/to/workflow.yml. Actionlint already checks for the existence of this file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions