Commit 6f4a9d9
fix(slack): Validate user org membership in Seer org resolution
Address PR review feedback:
- Change SLACK_PROVIDERS from set to list to match the RPC method's
expected `list[str]` parameter type, preventing serialization errors
- Check org status before calling get_installation to avoid unnecessary
queries for inactive orgs
- Verify the requesting Slack user belongs to the resolved org when
their identity is linked, preventing cross-org data access when
multiple orgs share a Slack workspace
- Fix inaccurate comments about DM fallback behavior
Refs ISWF-2388
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 6a28028 commit 6f4a9d9
File tree
2 files changed
+68
-9
lines changed- src/sentry/integrations/slack/webhooks
- tests/sentry/integrations/slack/webhooks/events
2 files changed
+68
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| 354 | + | |
| 355 | + | |
354 | 356 | | |
355 | 357 | | |
356 | 358 | | |
| |||
364 | 366 | | |
365 | 367 | | |
366 | 368 | | |
| 369 | + | |
| 370 | + | |
367 | 371 | | |
368 | 372 | | |
369 | 373 | | |
| |||
372 | 376 | | |
373 | 377 | | |
374 | 378 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | 379 | | |
381 | 380 | | |
382 | 381 | | |
383 | 382 | | |
384 | 383 | | |
385 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
386 | 395 | | |
387 | 396 | | |
388 | 397 | | |
| |||
394 | 403 | | |
395 | 404 | | |
396 | 405 | | |
397 | | - | |
| 406 | + | |
398 | 407 | | |
399 | 408 | | |
400 | 409 | | |
| |||
411 | 420 | | |
412 | 421 | | |
413 | 422 | | |
414 | | - | |
415 | | - | |
| 423 | + | |
| 424 | + | |
416 | 425 | | |
417 | 426 | | |
418 | 427 | | |
| |||
Lines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
116 | 119 | | |
117 | 120 | | |
118 | 121 | | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
0 commit comments