FP204 · secrets-inherit
`secrets: inherit` hands every repository secret to the callee; flowpact lists what is actually needed.
| Code | Name | Category | Default severity | Reported by |
|---|---|---|---|---|
FP204 | secrets-inherit | Secrets | 🔵 info | lint, check, the action, the editor |
What you see
In the deep-nesting fixture:
● INFO FP204 secrets-inherit
jobs.build inherits all secrets; .github/workflows/build.yml and its callees read REGISTRY_TOKEN
▶ .github/workflows/pipeline.yml:26:5Why it matters
Inherit makes the secret flow invisible: nobody can tell from the caller which secrets reach which job, and every nested workflow gets all of them.
How to fix
Replace secrets: inherit with an explicit secrets: mapping of the secrets listed in the message.
Example
uses: ./.github/workflows/deploy.yml
secrets: inheritScope
Not reported when the callee, or a callee it hands every secret to, reads the whole secrets context (toJSON(secrets), secrets.*, secrets[inputs.name]), has an expression that does not parse, or hands every secret on to a workflow flowpact cannot read (a remote workflow, or a local one that is missing or not reusable): it then reads, or may read, every secret the caller has, which no explicit mapping can list. Not reported in generated files, which are not edited by hand.
Accept one finding
When a finding is intended, accept it with a reason rather than turning the rule off. It is listed apart from the other findings, and does not fail the build.
On its line, with an ignore comment alone on the line above it (the
editor's quick fix adds it there) or at the end of the line, after any other comment such as a version
(# v4.3.0 # flowpact: ignore[FP204] why):
# flowpact: ignore[FP204] why it is acceptable here
secrets: inheritIn the config, with an override, which can expire:
overrides:
- rule: FP204
target: ".github/workflows/pipeline.yml#jobs.build.secrets"
reason: Why it is acceptable here, at least 10 characters.
expires: YYYY-MM-DD # optionaltarget is the symbol the finding is about; to list them:
flowpact lint --format json | jq -r '.findings[] | select(.code == "FP204") | .symbol'* matches within a path segment and ** across segments, so one entry accepts every finding whose symbol matches:
target: '**#inputs.app-id' is that input in every workflow and action.
Change the severity
Change the severity (or turn the rule off) in .github/flowpact/flowpact.config.yml, by code or by name:
rules:
FP204: off
# or: secrets-inherit: errorExplain it in the terminal:
flowpact explain FP204