[AUDIT] Automated code-review summary — mesh-review #4
Labels
No labels
bug
code-review
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
foravo/mesh-review-comment-proof-20260519044241#4
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from GitHub issue
M00C1FER/mesh-review#9.Source: https://github.com/M00C1FER/mesh-review/issues/9
Original author: @M00C1FER
Original state: closed
Automated Code-Review Audit — mesh-review
Date: 2026-05-02
Tool: GitHub Copilot CLI (automated analysis + fix)
Fix commit:
834f8d8441226ac383868a9cb8ac5c69b650581eFix PR: #1
All 7 findings have been fixed in PR #1 on branch
fix/code-review-audit.Finding Summary
summary/core.pyreview/core.pysummary/core.pyreview/falsify.pyreview/falsify.pycli.pyinstall.shFindings Detail
Finding 1 — HIGH: Format-string crash on diffs with curly braces (summary/core.py)
prompt.format(diff=diff)raisesKeyErrororValueErrorwhenever the diff contains{word}(git conflict markers, JSON, f-strings). This crashes summarization for all CLIs on a large class of common diffs.Fix:
prompt.replace("{diff}", diff)— literal substitution with no format-string semantics.Finding 2 — MEDIUM: Subprocess exit silently discarded (review/core.py)
_shell_runnernever checksproc.returncode. Auth errors, missing models, and rate limits are silently treated as empty LLM output, producing empty findings with no error indication.Fix: Return
ReviewResult(error=...)immediately whenproc.returncode != 0.Finding 3 — MEDIUM: Subprocess exit silently discarded (summary/core.py)
Same pattern as Finding 2, mirrored in
summary/core.py:_shell_runner.Fix: Return
SummaryDoc(error=...)immediately whenproc.returncode != 0.Finding 4 — MEDIUM: Subprocess exit silently discarded (falsify.py)
make_subprocess_falsifiernever checksproc.returncode. Non-zero exits fall through to_parse_falsifier_output(None)with a misleading "unparseable output" error rather than the actual CLI error.Fix: Return early with the actual stderr content when
proc.returncode != 0.Finding 5 — MEDIUM: LLM-controlled values in str.format() — KeyError risk (falsify.py)
sigma_gatepasses LLM-generated finding titles and bodies as kwargs to_FALSIFY_PROMPT.format(). Any finding about JSON, templates, or Python f-strings can contain{...}and crash the sigma gate for all findings.Fix: Added
_esc()helper that doubles all curly braces; applied to all LLM-controlled kwargs.Finding 6 — MEDIUM: Unhandled FileNotFoundError on --diff-file (cli.py)
open(args.diff_file)has no exception handling. Missing or unreadable files produce a Python traceback instead of a clean error message.Fix: Wrapped in
try/except FileNotFoundError, OSErrorwith clean stderr output and exit code 1.Finding 7 — LOW: YAML injection in build_yaml() (install.sh)
User-supplied CLI names and command tokens are written into YAML without quoting or escaping. Names with
:break YAML structure; tokens with"or\break YAML string quoting.Fix: All values now double-quoted in YAML with
\and"escaped viased.What Was Not Found
subprocess.run()withoutshell=True— correct.pyyaml); no network-facing components.Imported from GitHub issue comment
M00C1FER/mesh-review#9:4362220547.Source: https://github.com/M00C1FER/mesh-review/issues/9#issuecomment-4362220547
Original author: @M00C1FER
Fixed by merged PR #1.