config: fix potential shell injection in editor invocation #14180
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.56) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.56 · 134 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.293
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.056
Real PR Conversation Timeline
1 comments
"Review active on #14180"
general
weight: 0.35
2ykwang
what does this PR do?
I noticed that the configuration command logic runs the editor subprocess using
shell=Truecombined with a manual double-quote check on the filename to prevent command injection. Since double quotes don't block POSIX shell command substitution (like$()or backticks), this was actually vulnerable to shell injection if a user had a malformed config path. I refactored it to useshlex.splitand list-based execution (shell=False), which makes it secure by design, removes the shell injection risk, and cleanly gets rid of the filename quoting limitation.PR Checklist: