Skip to content

fix(aci): Selected project state should react to form changes#112434

Closed
malwilley wants to merge 3 commits into
masterfrom
malwilley/detector-ctx-project
Closed

fix(aci): Selected project state should react to form changes#112434
malwilley wants to merge 3 commits into
masterfrom
malwilley/detector-ctx-project

Merge remote-tracking branch 'origin/master' into malwilley/detector-…

7040c4c
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden completed Apr 8, 2026 in 19m 57s

3 issues

Medium

Unescaped conversation_id in Snuba query can cause incorrect results or parsing errors - `src/sentry/api/endpoints/organization_ai_conversation_details.py:128`

The change removes proper value escaping from build_escaped_term_filter and uses direct f-string interpolation: f"gen_ai.conversation.id:{conversation_id}". If conversation_id (user-provided via URL path) contains spaces, the query parses as gen_ai.conversation.id:first_word second_word where second_word becomes unrelated free-text search, returning incorrect results silently. Parentheses cause parsing errors. While handle_query_errors() catches InvalidSearchQuery, silent wrong results are not caught. The old code quoted and escaped values to prevent this.

EAP time window validation removed for MetricIssueDetectorValidator path - `src/sentry/snuba/snuba_query_validator.py:331-332`

The removed call to _validate_time_window for Dataset.EventsAnalyticsPlatform was the only validation enforcing the 5-minute minimum time window when SnubaQueryValidator is used directly (via MetricIssueDetectorValidator). While AlertRuleSerializer has its own duplicate validation at lines 214-219, MetricIssueDetectorValidator at metric_issue_detector.py:194 uses SnubaQueryValidator(timeWindowSeconds=True) as a child serializer without any time window validation. This allows creating EAP metric issue detectors with invalid sub-5-minute time windows, which will cause subscription errors at runtime.

pull_request_target with secrets: inherit passes all secrets to external reusable workflow - `.github/workflows/changelog-preview.yml:21`

This workflow uses pull_request_target trigger with secrets: inherit, which passes all repository secrets to the reusable workflow getsentry/craft/.github/workflows/changelog-preview.yml. If that external workflow checks out fork code (PR head ref) and executes it, an attacker could exfiltrate secrets by opening a malicious PR. The workflow also grants elevated permissions (contents: write, pull-requests: write, statuses: write) which amplifies potential impact.

3 skills analyzed
Skill Findings Duration Cost
sentry-security 0 8m 20s $12.74
sentry-backend-bugs 2 18m 21s $14.02
gha-security-review 1 19m 48s $1.21

Duration: 46m 29s · Tokens: 16.5M in / 209.1k out · Cost: $28.00 (+extraction: $0.03, +merge: $0.00, +dedup: $0.00)