fleetlint Policy for a fleet of repositories
v0.3
Getting started

ci/least-privilege

Workflows declare minimal permissions

Severitywarning
Tiers1, 2
Stacksany
Scoperoot
Kindexpr
Sourcelibrary v0.0.0-20261011205826-ecb4e9b3ffd4
Selected byfleetlint-recommended@0.1.0

Requirement

Every workflow sets top-level permissions (normally contents: read) and escalates per job only.

Why

The default token has write access to the repo; a compromised action in a read-only workflow can do far less.

Applies when

exists(".github/workflows/*.y*ml")

Check

For each item in:

glob(".github/workflows/*.y*ml")
yaml(item) != null && has(yaml(item).permissions)

Fix

Add permissions: { contents: read } at the top of each workflow and widen per job.

Agent instruction: Add top-level permissions: { contents: read } to every workflow lacking it; move any wider permission to the job that needs it.

See: https://fleetlint.org/baseline/#security


Generated by fleetlint docs from catalog v0.0.0-20261011205826-ecb4e9b3ffd4.