Skip to content

fix(ci): harden downstream bump inputs - #24

Closed
zhanghanduo wants to merge 1 commit into
mainfrom
codex/harden-downstream-bump-input
Closed

zhanghanduo wants to merge 1 commit into
mainfrom
codex/harden-downstream-bump-input

Conversation

@zhanghanduo

Copy link
Copy Markdown
Collaborator

Summary

  • keep repository_dispatch and workflow_dispatch values out of generated shell source
  • validate release tags with a strict allow-list before writing GITHUB_ENV
  • repeat validation inside the repin helper for defense in depth
  • cover valid PEP 440 release forms plus shell, newline, whitespace, and path injection inputs

Why

The downstream template is the authoritative source for ApodexHarness PR #524. Direct GitHub-expression interpolation let a crafted manual-dispatch value alter the shell program before the old v-prefixed check ran; the same loose check also allowed GITHUB_ENV injection and invalid branch names.

Verification

  • uv run pytest -q tests/test_downstream_repin.py (14 passed)
  • uv run ruff check agent_core tests scripts .github/downstream/repin_agent_core.py
  • python3 -m py_compile .github/downstream/repin_agent_core.py tests/test_downstream_repin.py
  • git diff --check

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