Skip to content

feat(cli): add --workflow flag to configure the GitHub deploy-workflow path - #245

Merged
Brooooooklyn merged 2 commits into
mainfrom
feat/github-workflow-path
Jul 2, 2026
Merged

Brooooooklyn merged 2 commits into
mainfrom
feat/github-workflow-path

Conversation

@Brooooooklyn

@Brooooooklyn Brooooooklyn commented Jul 2, 2026 •

Copy link
Copy Markdown
Member

What

Adds a --workflow <path> flag to void github connect and void github update, letting the project owner configure which workflow file the platform authorizes to mint an OIDC deploy token. Defaults to the scaffolded .github/workflows/void-deploy.yml.

void github connect my-app --repo owner/app --executor github_actions --workflow .github/workflows/ci.yml
void github update  my-app --workflow .github/workflows/deploy.yml

Why

The authorized deploy workflow was previously hardcoded server-side. This lets owners point the OIDC trust at their own workflow file (it must live under .github/workflows/ and end in .yml/.yaml). The API is authoritative for validation and storage; the CLI just forwards the value.

Details

  • github-args: parse --workflow for both connect and update (trimmed, value-required).
  • github-cmd: thread workflowPath into connect; update treats it as flag-only (no interactive prompt) and no-ops when unchanged.
  • client: send workflowPath in the POST/PATCH bodies; add workflow_path to the GithubConnection type.
  • Fail closed: connect/update verify the server echoed the requested workflow_path and exit non-zero otherwise, so a CLI pointed at an older API (which silently drops the field) can't leave the user believing a custom workflow is authorized.
  • help + docs/reference/cli.md: document the flag and its security semantics.

Testing

vp test run — github CLI unit tests (parser + connect/update threading + fail-closed verification) all pass; typecheck/fmt/lint clean.

Pairs with a platform-side PR that adds the server workflow_path column, owner-gated routes, and the OIDC pin.

🤖 Generated with Claude Code


Note

Medium Risk
Changes which workflow may mint deploy tokens (security-sensitive OIDC trust), though validation is server-side and the CLI fails closed when the platform does not apply the path.

Overview
Adds --workflow <path> to void github connect and void github update so project owners can configure which GitHub Actions workflow file the platform trusts for OIDC deploy-token minting (default .github/workflows/void-deploy.yml).

The CLI parses the flag, sends optional workflowPath on connect/update API calls, and extends GithubConnection with workflow_path. On update, workflow changes are flag-only (no TTY prompt), count toward the non-interactive “at least one flag” guard, and patch only when the value differs. Connect and update fail closed if the user passed --workflow but the response workflow_path does not match—avoiding silent success against an older API that ignores the field.

Help text and docs/reference/cli.md document the flag and OIDC trust semantics. Unit tests cover parsing, update threading, no-op behavior, and old-platform verification.

Reviewed by Cursor Bugbot for commit ef845e8. Bugbot is set up for automated code reviews on this repo. Configure here.

Brooooooklyn and others added 2 commits July 2, 2026 17:17
…w path

`void github connect` and `void github update` now accept `--workflow <path>`
to set which workflow file the platform authorizes for OIDC deploy-token
minting, defaulting to `.github/workflows/void-deploy.yml`. The path is sent
to the API (which is authoritative for validation), stored per-connection,
and enforced at the OIDC exchange so only that one workflow can deploy.

- github-args: parse `--workflow` for both connect and update (trimmed,
  value-required)
- github-cmd: thread workflowPath into connect; update treats it as
  flag-only (no interactive prompt), no-ops when unchanged
- client: send `workflowPath` in POST/PATCH bodies; add workflow_path to
  the GithubConnection type
- help + docs/reference/cli.md: document the flag and its security semantics

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`void github connect`/`update` now verify the returned connection's
workflow_path equals the requested --workflow and exit non-zero otherwise.
An older platform that predates the field silently drops it and returns
success, which would leave the user believing a custom workflow is
authorized while the server stays pinned to the default. Fails closed with
an "API may be too old" message instead.

Addresses a finding from the adversarial review of the configurable
deploy-workflow-path feature.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 2, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_b7cbf8a6-de57-416c-9af7-6f27c8642b76)

@Brooooooklyn
Brooooooklyn merged commit de1d581 into main Jul 2, 2026
7 checks passed
@Brooooooklyn
Brooooooklyn deleted the feat/github-workflow-path branch July 2, 2026 09:29
cpojer pushed a commit that referenced this pull request Sep 11, 2026
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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