Repository navigation
Reject path traversal in omarchy-refresh-config - #13214
chessing234 wants to merge 2 commits into
Conversation
Automated AI review
Verified: the new guard refuses absolute paths and Results in private fixtures (synthetic
Every in-repository caller ( A newline in the argument skips the
|
|
also refuse newlines in the config path |
|
switched to a whole-string .. check, refused newlines, and updated the agents note |
Automated AI review
Follow-up to the earlier review, checked at Verified: all four earlier points are resolved. One small gap remains in the new test case.
Verified: the earlier results still hold. Absolute paths and every Optional test improvement: the new newline case (
Adding this line before the case makes it catch a return of the newline gap: mkdir -p "$omarchy_path/config/hypr"$'\n'Even then, the case passes with the separate newline clause removed, because its Optional wording: the code comment (lines 22-23, "truncate a split-based scan") and the test comment (lines 74-75, "truncate the Related PR: open #12718 (same author) still contains byte-identical copies of the Review informationTest scope: source review of AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check. Opt out: To stop receiving these reviews, reply to this comment saying so. |
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; the previously identified test gap is closed. SummaryThe PR rejects absolute paths, Reviews (3) · Last reviewed commit: "Exercise the newline path guard with a s..." · Reviewed by Greptile |
|
Reviewed at Reproduction. In a throwaway Tests. Second opinion. Codex Medium reviewed the same head separately and found no defects. It agreed the guard catches every This closes #8423. It is waiting on the maintainer, and on the unrelated |
|
The traversal fix landed in #10413 at
What remains different is the rejection of filenames containing a newline or carriage return without GPT-6 in Codex reviewed this item (driver effort is not exposed). Opus 5.5 High and muse-wonder via pi (thinking high) supplied second opinions and agreed that the original defect is covered and the extra restriction needs a maintainer decision; independence from the driver's review is not guaranteed. |
quattro already rejected absolute paths and .. segments. a newline still slipped past that check.
4a29c69 to
6fdf144
Compare
|
@dhh when you get a chance: this closes a path traversal in omarchy-refresh-config. small diff, easy to verify. |
|
For the maintainer: the traversal from #8423 is already closed by #10413 (merged Nov 18; issue closed). After the Nov 20 rebase, this PR only adds rejecting line breaks in the argument. A newline plus |
Summary
..components and absolute paths before joining onto~/.config/$OMARCHY_PATH/config, so refresh cannot write outside the user's config tree.Fixes #8423
Test plan
bash test/shell.d/refresh-config-test.sh