Skip to content

ci: prevent shell injection in bench workflow inputs#8

Merged
minagishl merged 1 commit into
mainfrom
bugfix/issue-1-bench-input-sanitization
Jun 29, 2026
Merged

ci: prevent shell injection in bench workflow inputs#8
minagishl merged 1 commit into
mainfrom
bugfix/issue-1-bench-input-sanitization

Conversation

@minagishl

Copy link
Copy Markdown
Member

Summary

  • Route all workflow_dispatch inputs in the benchmark step through environment variables instead of interpolating them directly into the shell script.
  • Validate time_ms and warmup_ms as positive integers before invoking the benchmark.

This closes a script-injection vector where malicious time_ms or warmup_ms values could inject arbitrary shell commands or CLI flags when the workflow is triggered via workflow_dispatch.

Related Issue

Closes #1

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Chore / dependency update

Testing

  • Verified the workflow YAML structure is valid.
  • Confirmed time_ms / warmup_ms validation rejects non-integer values before tsx is invoked.
  • Confirmed all inputs (backend, mode, time_ms, warmup_ms, twilic_vs_msgpack_only) are passed via env vars and referenced with quoted shell expansions.

Checklist

  • Tests added or updated (optional)
  • Documentation updated (if applicable)
  • No breaking changes (or breaking changes are documented above)

Route workflow_dispatch inputs through environment variables and validate
time_ms and warmup_ms as positive integers before invoking the benchmark.
@github-actions

Copy link
Copy Markdown

Invisible characters check

No suspicious invisible characters detected in the PR diff.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Risk: low. Approved — Cursor Bugbot was not present on this PR; the bench workflow change routes dispatch inputs through env vars with integer validation for timing fields, which addresses the injection vector. No reviewers assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@minagishl minagishl merged commit d1e5329 into main Jun 29, 2026
4 checks passed
@minagishl minagishl deleted the bugfix/issue-1-bench-input-sanitization branch June 29, 2026 02:39
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.

bug: inputs.time_ms / inputs.warmup_ms interpolated directly into shell (script injection)

1 participant