Repository navigation
Reject a Dash-Prefixed Agents Name in Both Bootstrap Loaders - #3156
Conversation
Fixes #3129 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
PowerShell binds a typographic dash as a parameter prefix. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🟡 Changes recommended
Add an assertion proving rejected inputs do not trigger the fetch.
1 open finding
What changed in this PR
Adds validation to reject dash-prefixed agent names before installer handoff.
Changes:
- Validates ASCII and typographic dash prefixes in both loaders.
- Adds regression tests for rejected names.
| File | Reviewed changes |
|---|---|
tests/test_bootstrap.py |
Adds loader rejection tests; should also assert rejection occurs before fetching. |
host-setup/bootstrap.sh |
Validates agent names during argument parsing. |
host-setup/bootstrap.ps1 |
Validates ASCII and typographic dash prefixes before installation. |
🧠 Review effort: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
A recorded local strict-review pass covers head |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3156 +/- ##
==========================================
Coverage ? 63.97%
==========================================
Files ? 17
Lines ? 9151
Branches ? 0
==========================================
Hits ? 5854
Misses ? 3297
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… Dash-Name Refusal to Main (#3164) - #3162 makes `gh-write-guard` read the gh write targets it still missed: an inherited `GH_REPO` from the session environment, a run-time word before gh's command, a gh write behind a run-time command word, a positional repository and the missing write subcommands, `gh api` write targets outside `repos/`, and the `GH_REPO` gaps #3135 introduced. It adds no new allow. - #3156 makes both bootstrap loaders reject a dash-prefixed `-Agents`/`--agents` name before the handoff, so `-All` can no longer bind install-agents' switch. Verified natively under pwsh 7 and Windows PowerShell 5.1 in #3161. - #3153 lets a manual dispatch bypass the smoke build's paths filter, in the catalog snippet and the reusable-workflows example together. - #3154 tests the Docker task workflow's credential check, login, and hook inputs. - #3150 bumps the actions-deps group. After this merges, the host-safety installer payload changes, so the maintainer runs the installer after promotion. Closes #3129 Closes #3131 Closes #3132 Closes #3133 Closes #3136 Closes #3147 Closes #3148 Closes #3149 🤖 Generated with [Claude Code](https://claude.com/claude-code)

Fixes #3129
bootstrap.ps1 -Agentsandbootstrap.sh --agentsnow refuse any tool name that starts with a dash before the handoff toinstall-agents, with an error and a nonzero exit. Without it,pwsh -Filebinds-Allor-aas a parameter ofinstall-agents.ps1(and--allis read as an option byinstall-agents.sh), installing every tool.Invoke-AgentsInstallover every split name, for ASCII hyphen and also U+2013, U+2014, U+2015, which PowerShell binds as a parameter prefix (autocorrected paste). The check runs after the tree fetch, as the empty-list check does.tests/test_bootstrap.py. Revert proof: with both loaders restored to develop, all subtests of both new tests fail; with the fix they pass.Windows native verification (5.1 and 7) is left to the maintainer.
🤖 Generated with Claude Code