Skip to content

ci: add codex workflows for backport and fixing CI#5926

Merged
jackye1995 merged 2 commits intolance-format:mainfrom
jackye1995:codex-patch
Feb 10, 2026
Merged

ci: add codex workflows for backport and fixing CI#5926
jackye1995 merged 2 commits intolance-format:mainfrom
jackye1995:codex-patch

Conversation

@jackye1995
Copy link
Copy Markdown
Contributor

Introduce 2 CodeX workflows that could be commonly used:

  1. patch a merged PR to a specific release branch
  2. fix a CI workflow that is currently breaking main branch

@github-actions github-actions Bot added the ci Github Action or Test issues label Feb 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

PR Review

P0 Security Concern

--dangerously-bypass-approvals-and-sandbox flag exposes the runner to risk.

Both workflows use codex exec --dangerously-bypass-approvals-and-sandbox, which allows the AI agent to execute arbitrary commands without any sandboxing. Combined with workflow_dispatch inputs that could be manipulated, this creates risk:

  1. The PR_URL, RELEASE_BRANCH, WORKFLOW_RUN_URL, and GUIDELINES inputs are directly interpolated into the prompt, which is then executed by an unsandboxed agent. While the prompt instructs the agent to behave in certain ways, the agent may interpret malicious inputs unpredictably.

  2. The agent has write access to the repository (via LANCE_RELEASE_TOKEN) with no guardrails.

Recommendation: Consider if sandboxing can be enabled with explicit tool allowlists, or restrict who can trigger these workflows (if: github.actor == 'maintainer-list').


P1 Issues

  1. Missing branch protection validation - The backport workflow allows targeting any branch via release_branch input. Consider validating that the target branch matches an expected pattern (e.g., release/*) to prevent accidental pushes to protected branches.

  2. Potential infinite loop on complex conflicts - The backport prompt says to "try to resolve" conflicts and "if conflicts are too complex to resolve automatically, abort." This is vague guidance for an AI agent. Consider adding a concrete limit (e.g., "If more than 5 files have conflicts, abort").

  3. No cleanup on failure - If the workflows fail partway through, branches may be left behind (backport/pr-* or codex/fix-ci-*). Consider adding cleanup in a finally block or post-step.


The overall structure and prompt engineering are reasonable for the intended use case.

@jackye1995 jackye1995 merged commit 1b38a74 into lance-format:main Feb 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Github Action or Test issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants