Skip to content

Harden benchmark workflow input handling#1225

Closed
fegge wants to merge 1 commit into
pq-code-package:mainfrom
trailofbits:fix/ci-workflow-input-command-injection
Closed

Harden benchmark workflow input handling#1225
fegge wants to merge 1 commit into
pq-code-package:mainfrom
trailofbits:fix/ci-workflow-input-command-injection

Conversation

@fegge

@fegge fegge commented Jun 26, 2026

Copy link
Copy Markdown

Summary

  • Validate manual benchmark workflow inputs before using them in shell or make command contexts.
  • Pass benchmark action inputs through environment variables and arrays instead of direct shell interpolation.
  • Harden local benchmark CLI and formatter script argument handling.

Validation

  • ruff format scripts/tests: passed
  • ruff check scripts/tests: passed
  • python3 -m py_compile scripts/tests: passed
  • git diff --check -- .github/actions/bench/action.yml .github/workflows/bench_ec2_any.yml .github/workflows/bench_ec2_reusable.yml scripts/format scripts/tests: passed
  • bash -n scripts/format: passed
  • shellcheck scripts/format: passed
  • actionlint .github/workflows/bench_ec2_any.yml .github/workflows/bench_ec2_reusable.yml: passed
  • zizmor .github/workflows/bench_ec2_any.yml .github/workflows/bench_ec2_reusable.yml .github/actions/bench/action.yml: passed with no findings
  • Unsafe --cflags, --ldflags, and --cross-prefix benchmark CLI probes: rejected with exit code 2 and did not create marker files
  • Not run: ./scripts/format because nixpkgs-fmt is not installed in this local environment
  • Not run: ./scripts/lint because shfmt is not installed in this local environment

Fixes #1213


This work was completed by Trail of Bits as part of the Patch The Planet project in collaboration with OpenAI. The issue was identified primarily by the Codex coding agent, and manually reviewed before submission.

@fegge

fegge commented Jun 26, 2026

Copy link
Copy Markdown
Author

Reopened from an upstream repository branch with DCO-signed commits so full CI can run: #1233

@fegge fegge closed this Jun 26, 2026
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.

Manual benchmark and formatter inputs are interpreted as shell syntax

1 participant