Skip to content

fix: harden GitHub action entrypoints - #12

Merged
berisher merged 4 commits into
mainfrom
fix/action-entrypoint-hardening
Mar 30, 2026
Merged

fix: harden GitHub action entrypoints#12
berisher merged 4 commits into
mainfrom
fix/action-entrypoint-hardening

Conversation

@berisher

@berisher berisher commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Harden the GitHub Action entrypoints used to install and run pickle-fuzzer.

This change removes direct input interpolation in the composite action, pins the
third-party actions used by the Atheris mode, constrains action-managed paths to
GITHUB_WORKSPACE, rejects inverted opcode bounds before invocation, and
replaces same-origin checksum trust with GitHub artifact-attestation
verification for downloaded release binaries.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Performance improvement
  • Code refactoring
  • Test addition or update

Changes Made

  • Moved inputs.mode validation through an environment variable instead of
    interpolating it directly into a run: block.
  • Pinned actions/setup-python and dtolnay/rust-toolchain to immutable SHAs
    for Atheris mode.
  • Required explicit version for non-tag action refs, validated release tags,
    and verified downloaded binaries with gh attestation verify against the
    repo release workflow.
  • Constrained output_dir, output_file, and Atheris harness paths to stay
    within GITHUB_WORKSPACE.
  • Preserved raw args splitting without allowing glob expansion.
  • Preserved single-file mode when --mutators is present by inserting --
    before the positional output path.
  • Rejected inverted min_opcodes / max_opcodes before invoking the CLI.
  • Cleaned the temporary wheel directory, required exactly one built wheel, and
    passed harness_args as a split argv array instead of unquoted shell text.
  • Updated action documentation to describe explicit version pinning and
    whitespace-delimited harness_args.

Testing Performed

Describe the tests you ran to verify your changes:

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • All existing tests pass (cargo test)

Test commands:

bash -n scripts/action-install.sh scripts/action-run.sh scripts/action-atheris.sh
git diff --check
cargo fmt --check
cargo test

Manual checks:

  • scripts/action-install.sh rejects invalid release tags such as ../../evil
  • scripts/action-run.sh rejects output_file values that escape
    GITHUB_WORKSPACE
  • scripts/action-run.sh keeps positional file arguments separate from repeated
    --mutators
  • scripts/action-atheris.sh rejects harness paths outside
    GITHUB_WORKSPACE
  • scripts/action-atheris.sh installs exactly one built wheel and passes
    harness_args as a split argv array

Checklist

Before submitting this PR, please ensure:

  • Code follows project style guidelines (cargo fmt)
  • No clippy warnings (cargo clippy -- -D warnings)
  • All tests pass (cargo test)
  • Documentation updated (if applicable)
  • CHANGELOG.md updated (if applicable)
  • No breaking changes (or documented if necessary)
  • Commit messages follow conventional commit format

Performance Impact

If this PR affects performance:

  • Benchmarks run and results documented
  • No significant performance regression

Benchmark results:

N/A

@berisher
berisher marked this pull request as ready for review March 30, 2026 20:34
@berisher
berisher merged commit 927322f into main Mar 30, 2026
24 checks passed
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