Commit 154de31
authored
fix(tasks): reject client-supplied signals_scout task origin
origin_product was API-settable to signals_scout (only image_builder was
rejected), so any task:write caller could forge a scout task whose
appended run logs would be mirrored into PostHog's internal Logs project
once the mirror ships - flagged by the security review bots on the PR.
Scout tasks are created exclusively server-side by the signals scout
harness via the tasks facade, so treat signals_scout like image_builder:
an internal-only origin the public serializer rejects. With creation
server-attested, mirroring_enabled() can keep gating on origin_product.
The mirror is new in this PR, so no forged tasks can predate the check
where it matters.
Test: parameterized serializer-level SimpleTestCase over the internal-only
origins (verified to fail without the fix); the existing image_builder
endpoint test remains the wiring guard.
Generated-By: PostHog Code
Task-Id: 0c511836-2180-455a-9b58-45df2a0661ec1 parent 63d88b5 commit 154de31
2 files changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
598 | 603 | | |
599 | 604 | | |
600 | 605 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
15 | 30 | | |
16 | 31 | | |
17 | 32 | | |
| |||
0 commit comments