Repository navigation
[Security] Treat command operands as literal values - #11495
Merged
ErikMelton merged 2 commits intoSep 22, 2026
Merged
Conversation
lalvarezt
force-pushed
the
command-operands-as-literal
branch
from
September 12, 2026 15:57
1d971f3 to
b72d7e5
Compare
Member
|
The hardening looks correct, but this PR currently breaks the repository’s shell test suite. The following tests pass on
Their pacman stubs and exact argv expectations still assume the old forms:
They need to accept the new delimiter forms:
|
Contributor
Author
😲 my bad, that's what I get for not running the full suite. Fixing it |
ErikMelton
approved these changes
Sep 17, 2026
This was referenced Sep 25, 2026
omarchybot
added a commit
that referenced
this pull request
Oct 1, 2026
sunshine-bin and sunshine-git provide and conflict with sunshine without a version, so pacman -Q sunshine names them, the version strip misses, and the migration tried to replace them with the repo package. --noconfirm declines the conflict and pacman exits 1, so the migration failed on every update even for an already patched provider. The notice is worded for a provider that may already be patched, since its version is not comparable to the repo package's. The test's pacman stub now also accepts the -- that omarchy-pkg-present passes on quattro since #11495; without it the test failed once merged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Codex Medium <noreply@openai.com>
omarchybot
added a commit
to d-zalewski/omarchy
that referenced
this pull request
Oct 3, 2026
quattro now passes `--` before the path on every editor launch (omacom#11495), so the --sudo fallback does the same and the tests expect it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ryanrhughes
pushed a commit
that referenced
this pull request
Oct 16, 2026
Treat command operands as literal values (cherry picked from commit a4dd253)
ryanrhughes
added a commit
that referenced
this pull request
Oct 16, 2026
omarchy-pkg-add passes -- now that #11495 is on this branch, so the fixture matches quattro again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some helper scripts pass command-line values to other programs without explicitly ending the option list. If a value starts with
-, such as--help, it can be interpreted as a flag instead of the value the user intended. The helper may then show help, fail, or act on the wrong input.One example in
omarchy-pkg-add:omarchy-pkg-add --hookdir /tmp/attacker-hooks innocuous-packagewas forwarded to rootpacmanaspacman -S --noconfirm --needed --hookdir /tmp/attacker-hooks innocuous-package. Pacman treated--hookdiras an option and could run a selected hook during the package transaction, even though the helper later returned an error. With--, the call becomespacman -S --noconfirm --needed -- --hookdir /tmp/attacker-hooks innocuous-package, so the value is treated as a package operand instead.