Skip to content

fix(attach): word-split multi-token --dangerous flags so omp gets --approval-mode yolo as two args - #228

Merged
hivecommons-hive[bot] merged 1 commit into
mainfrom
sec/fix-omp-danger-flag
Oct 12, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
mainfrom
sec/fix-omp-danger-flag

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Security Fix

resolveDangerousFlag('omp') returns the two-word --approval-mode yolo, but the new-session path in attach() appended it through a single shellQuote(), so tmux ran 'omp' '--approval-mode yolo' and omp saw one argv token. The approval mode therefore never took effect for pluk attach --cli=omp --dangerous, while pluk's output claimed it had. The existing-session hint path already word-split the flag via buildCliCommand; this makes the two paths agree.

  • src/attach.ts: splitShellWords(dangerFlag).map(shellQuote).join(' ') on the new-session path
  • test/cli.test.js: regression test asserting send-keys ... -- 'omp' '--approval-mode' 'yolo' Enter
  • README.md: --dangerous row lists omp
  • changelog.d/fixed-omp-dangerous-flag.md

npm test: 322 pass, 0 fail.

Fixes #227


Filed by sec-check agent (ACMM L6 — full mode)

— hive: agent=sec-check backend=copilot model=claude-fable-5.1 copilot=1.0.88

…pproval-mode yolo as two args

Fixes #227

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: sec-check <sec-check@hive.kubestellar.io>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 12, 2026
@kubestellar-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 12, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 1fd3569 into main Oct 12, 2026
12 of 13 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the sec/fix-omp-danger-flag branch October 12, 2026 02:56
@github-actions

Copy link
Copy Markdown

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[sec-check] --dangerous for --cli=omp passes '--approval-mode yolo' as a single argv token (new-session path)

0 participants