Skip to Content
flowpact

FP503 · schema-violation

The file does not match GitHub’s workflow / action schema (validated with GitHub’s own parser).

CodeNameCategoryDefault severityReported by
FP503schema-violationEnv & expressions🔴 errorlint, check, the action, the editor

What you see

In the broken fixture:

✖  ERROR  FP503 schema-violation
  Unexpected value 'stepz'
  ▶ .github/workflows/schema.yml:6:5

Why it matters

GitHub refuses to run a workflow or action with schema errors, often only when the trigger fires. Some keys it accepts and ignores instead, such as a top-level env: in action.yml, a filter the event does not support or a YAML merge key under an event. Those are reported as warnings: the file runs, but without the setting. The configured severity caps both kinds, so FP503: warning also reports schema errors as warnings, and ignored keys are never reported above warning.

How to fix

Correct the key or value reported. Most messages come from @actions/workflow-parser, the parser GitHub’s tooling uses; for a key GitHub ignores, the warning says what is lost and how to fix it.

Example

# action.yml
env:
  UV_VERSION: 0.9.0   # ignored: actions have no top-level env
runs:
  using: composite
  steps:
    - uses: astral-sh/setup-uv@v7
      with:
        version: ${{ env.UV_VERSION }}

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

.github/workflows/schema.yml
# flowpact: ignore[FP503] why it is acceptable here
stepz:

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

.github/flowpact/flowpact.config.yml
overrides:
  - rule: FP503
    file: ".github/workflows/schema.yml"
    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 == "FP503") | .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:
  FP503: off
  # or: schema-violation: error

Explain it in the terminal:

flowpact explain FP503
  • FP502 expression-parse-error: A ${{ }} expression (or an if: condition) cannot be parsed.
  • FP504 yaml-syntax-error: The file is not valid YAML.

On this page