T05 · Unauthorized Access and Privilege Escalation
- Location
smart-commit.host-agent.json:62- Finding
PR/MR Reviews Automatically Approve and Merge Changes Without Explicit Authorization
- Content
View full analysis
Vulnerability Details
File Location:
smart-commit.host-agent.json:62-63
Related Execution Instructions:SKILL.md:348-356,SKILL.md:468-474
Vulnerability Type: Unauthorized repository modification through unsafe defaults
Risk Level: HighVulnerable Code
json "pullRequestReview": { "threshold": 6, "autoApprove": true, "autoMerge": true, "summarySeverities": ["P0", "P1"], "commentSeverities": ["P0", "P1"], "skillPromptTuning": "", "skipSummaryOnPass": true, "skipCommentOnPass": true, "configFilePath": "" }The corresponding instructions explicitly preserve these defaults for live reviews:
text Default-config impact (know this before a live review): in the colocated smart-commit.host-agent.json, pullRequest.provider defaults to auto; pullRequestReview.autoApprove / autoMerge default to true; summarySeverities defaults to ["P0","P1"]. So a live pull-request review may auto-approve and merge after a passing review. When the user has not changed the config: - Add --dry-run only if the user explicitly asks for dry-run / a trial / no publish / no merge - If the user clearly does not want auto-merge / auto-approve this time: pass --set=pullRequestReview.autoMerge=false and/or --set=pullRequestReview.autoApprove=falseBatch review uses the same unsafe behavior:
text Default-config impact (know this before a live batch review): in the colocated config, pullRequestReview.autoApprove / autoMerge default to true. Batch items that pass may also be auto-approved and merged. - Add --dry-run only if the user explicitly asks for dry-run / a trial / no publish / no mergeTechnical Analysis
The Skill treats a request to review a PR/MR as sufficient authorization to approve and merge it. Approval and merge are materially broader operations than analysis or publication of review comments, but the execution path does not require a separate confirmation or an explicit request to merge.
The defau ...[truncated 1973 chars]
- Remediation
View remediation
Remediation Suggestions
-
Change the shipped defaults to:
json "autoApprove": false, "autoMerge": false -
Require an explicit user request to approve or merge. A request phrased only as “review” must remain read-only or comment-only.
-
Add a code-enforced confirmation immediately before each approval or merge. Documentation-only guidance is insufficient because the executable path can otherwise proceed with the configured defaults.
-
Make
--dry-runthe default for single and batch reviews unless the current request expressly authorizes platform mutations. -
Separate review, approval, and merge into distinct authorization gates. For batch workflows, require per-item confirmation or a clearly scoped batch authorization that identifies the repositories and target branches.
-
Before mutation, display the PR/MR URL, repository, source branch, target branch, review result, and exact actions to be performed.
-
Apply least-privilege platform tokens so review workflows cannot merge unless merge capability is explicitly required.
-
