Skip to content

ci: test window injection - #178

Closed
alfondotnet wants to merge 2 commits into
mainfrom
ci/windows-openurl-repro
Closed

alfondotnet wants to merge 2 commits into
mainfrom
ci/windows-openurl-repro

Conversation

@alfondotnet

@alfondotnet alfondotnet commented Sep 18, 2026

Copy link
Copy Markdown
Member

Test plan

  • Wait for windows-openurl-repro on this PR
  • Job logs show PASS: local marker created
  • Cloudflare / alfon.net shows a GET with query g<run_id> matching the job summary

Note

Low Risk
Adds isolated CI and a repro binary only; it does not change the CLI’s production browser-opening path.

Overview
Adds a Windows-only CI repro for the v0.1.2 OpenURL sink (exec.Command("cmd", "/c", "start", "", url)), separate from today’s ShellExecuteW opener in internal/tui.

A new workflow windows-openurl-repro runs on windows-latest when the workflow or scripts/repro_windows_openurl/** changes (or via workflow_dispatch). It runs go run ./scripts/repro_windows_openurl, which crafts a customer-ID-shaped URL whose & segments run echo to a local marker file and curl to http://alfon.net?g<GITHUB_RUN_ID>. The job fails unless both artifacts appear, proving cmd.exe parsed the injection. A follow-up step always writes the lookup URL and run_id to the job summary for log correlation.

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

Runs the v0.1.2 OpenURL sink (cmd /c start) on windows-latest with a
GET-only callback to alfon.net?g<run_id> plus a local marker file.
@alfondotnet alfondotnet changed the title ci: reproduce unpatched Windows cmd start injection on GHA ci: test window injection Sep 18, 2026
Commas did not split curl.exe arguments on windows-latest, so the GET
never ran. Marker still proved the & split.

@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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Repro job can hang indefinitely
    • Added 30-second context timeout to cmd.Run() and 5-minute timeout-minutes to workflow job to prevent indefinite hangs.

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 818b0c8. Configure here.

break
}
time.Sleep(200 * time.Millisecond)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Repro job can hang indefinitely

Medium Severity

The 15-second deadline only starts after cmd.Run() returns, so it never bounds the injected commands. In cmd.exe, & runs commands sequentially, and the first one is start of an https URL. If that start blocks on the runner’s browser, or if the follow-on curl hangs talking to alfon.net (no --max-time), echo and the marker check never run and the job can sit until the default runner timeout. The workflow also has no timeout-minutes.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 818b0c8. Configure here.

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