Skip to Content
flowpact

FP201 · missing-required-secret

A reusable workflow is called without one of its required secrets.

CodeNameCategoryDefault severityReported by
FP201missing-required-secretSecrets🔴 errorlint, check, the action, the editor

What you see

In the deep-nesting fixture:

✖  ERROR  FP201 missing-required-secret
  jobs.package calls .github/workflows/package.yml without required secret "signing-key"
  ▶ .github/workflows/build.yml:29:11

Why it matters

GitHub fails the run when a required secret is not passed — but only when that call path actually executes.

How to fix

Pass the secret under secrets:, or use secrets: inherit if the callee should see all repository secrets.

Example

uses: ./.github/workflows/deploy.yml
secrets:
  token: ${{ secrets.TOKEN }}
  # deploy.yml also requires "registry-password"

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[FP201] why):

.github/workflows/build.yml
# flowpact: ignore[FP201] why it is acceptable here
uses: ./.github/workflows/package.yml

In the config, with an override, which can expire:

.github/flowpact/flowpact.config.yml
overrides:
  - rule: FP201
    target: ".github/workflows/package.yml#secrets.signing-key"
    reason: Why it is acceptable here, at least 10 characters.
    expires: YYYY-MM-DD   # optional

target is the symbol the finding is about; to list them:

flowpact lint --format json | jq -r '.findings[] | select(.code == "FP201") | .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:

.github/flowpact/flowpact.config.yml
rules:
  FP201: off
  # or: missing-required-secret: error

Explain it in the terminal:

flowpact explain FP201
  • FP202 unknown-secret: A caller passes a secret the reusable workflow does not declare.
  • FP205 undeclared-secret-ref: A reusable workflow reads a secret it does not declare, and some caller does not use secrets: inherit.
  • Remote interfaces

On this page