Skip to content

fix(config): harden manifest input validation - #475

Merged
joshua-temple merged 6 commits into
mainfrom
fix/pin-input-hardening
Jul 6, 2026
Merged

joshua-temple merged 6 commits into
mainfrom
fix/pin-input-hardening

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Problem

Several manifest-supplied values were passed into generated YAML and path joins without charset validation, so a malformed value could reach the generator unchecked.

Fix

Tightens validation on the affected manifest inputs, each with a failing-before/passing-after test:

  • Charset-validate action_pins override values (a ref, optionally followed by # <version>); reject anything that could break out of the emitted scalar.
  • Reject a path-unsafe action_folder (charset, no separators, no ..), with a defense-in-depth guard in the generator before the path join.
  • Reject .. traversal and unsafe characters in local callback workflow paths across all accepted forms (bare filename, .github/workflows/..., and owner/repo/...@ref) via an up-front control/whitespace guard plus positive charsets.
  • Add StagePathspec, a manifest-first pathspec allowlist so a future reconcile commit stages an explicit set of paths rather than everything.

Verification

  • go build ./..., go test ./... (2382 passed), go test ./... -race, golangci-lint run ./... all clean.
  • Independent review passed after two adversarial rounds that closed the remaining input sinks.

Part of #440.

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
…spec allowlist

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
… refs

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple
joshua-temple merged commit 4d0b6ca into main Jul 6, 2026
19 checks passed
@joshua-temple
joshua-temple deleted the fix/pin-input-hardening branch July 6, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant