fix(safeoutputs): render applyable PR suggestions correctly#1104
fix(safeoutputs): render applyable PR suggestions correctly#1104Copilot wants to merge 5 commits into
Conversation
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
|
/rust-review |
|
✅ Rust PR Reviewer completed successfully! |
🔍 Rust PR ReviewSummary: Mostly solid work — correctness and test coverage are good, one security gap worth fixing before merging. Findings🔒 Security Concerns
// Current (line 91) — only blocks ADO injection, not traversal
reject_pipeline_injection(&self.repository, "repository")?;
// Fix — consistent with mcp.rs:228 which already uses this
if !self.repository.is_empty() {
ensure!(
crate::validate::is_safe_path_segment(&self.repository),
"repository must be a safe path segment (no '..', '/', or '\\'), got: '{}'",
self.repository
);
}There is a runtime defense at
|
|
@copilot adfress review comments |
Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Summary
add-pr-commentwas creating inline suggestion threads that Azure DevOps treated as zero-width insertion points, and shared sanitization was escaping</>inside markdown code. The result was non-applyable suggestions and HTML entities being written back into suggested code.Thread anchoring
add-pr-commentnow anchors inline threads to the full selected line range instead ofoffset: 1→offset: 1.Markdown-aware sanitization
```suggestionbodies.Focused coverage
Test plan
Covered by focused unit tests for: