feat(compile): configure threat detection - #1716
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9f9a86b0-e06a-4bbb-9734-57dd643afed3
|
Azure Pipelines: Successfully started running 1 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
🔍 Rust PR ReviewSummary: Looks good overall — well-structured feature with solid test coverage; one code-quality concern and a subtle validation footgun worth discussing. Findings
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9f9a86b0-e06a-4bbb-9734-57dd643afed3
🔍 Rust PR ReviewSummary: Looks good overall — the feature is well-structured, tests are comprehensive, and the security-sensitive paths (prompt sanitization, ADO expression rejection, provider env isolation) are correctly handled. A few findings worth addressing. Findings
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9f9a86b0-e06a-4bbb-9734-57dd643afed3
|
@copilot based on the changes in this PR give me representative frontmatter configurations for the new threat detection frontmatter. Respond here. |
🔍 Rust PR ReviewSummary: Looks good — solid feature with comprehensive tests. One minor step-ordering change and a redundant re-parsing pattern worth noting, but no blocking issues. Findings
|
# 1) Minimal (default behavior: threat detection enabled)
name: example
description: demo
safe-outputs:
create-pull-request: {}# 2) Boolean shorthand: explicitly disable AI analysis (pass-through Detection job remains)
name: example
description: demo
safe-outputs:
create-pull-request: {}
threat-detection: false# 3) Object form: custom additional detector instructions
name: example
description: demo
safe-outputs:
create-pull-request: {}
threat-detection:
enabled: true
prompt: |
Also check for:
- authentication bypasses
- unsafe deserialization
- hardcoded credentials# 4) Object form with Detection-specific engine overlay + trusted pre/post steps
name: example
description: demo
engine:
id: copilot
model: claude-opus-4.7
args: [--reasoning-effort=high]
env:
SHARED_SETTING: agent
safe-outputs:
create-pull-request: {}
threat-detection:
engine:
model: gpt-5-mini
args: []
env:
SHARED_SETTING: detection
DETECTION_ONLY: "true"
steps:
- bash: ./scripts/prepare-security-scanner.sh
displayName: Prepare security scanner
post-steps:
- bash: ./scripts/run-security-scanner.sh
displayName: Run security scanner |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9f9a86b0-e06a-4bbb-9734-57dd643afed3
🔍 Rust PR ReviewSummary: Looks good — the threat-detection configuration feature is well-structured with solid security practices. One minor logic asymmetry worth noting. Findings
|
…etection-config-1701
🔍 Rust PR ReviewSummary: Looks good — well-structured feature with comprehensive tests and sound security boundaries. A few observations worth discussing. Findings
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9f9a86b0-e06a-4bbb-9734-57dd643afed3
🔍 Rust PR ReviewSummary: Looks good — feature is well-structured and thoroughly tested. One logic asymmetry and one minor inefficiency worth noting. Findings
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9f9a86b0-e06a-4bbb-9734-57dd643afed3
🔍 Rust PR ReviewSummary: Looks good overall — well-structured feature with solid test coverage. Two minor issues worth a quick fix. Findings🐛 Bugs / Logic Issues
|
Summary
safe-outputs.threat-detectionboolean and object configurationCloses #1701
Test plan
cargo testcargo test --test bash_lint_testscargo clippyado-aw inspect,ado-aw graph dump, andado-aw whatif --fail Detection