You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2f1b2db
Browse filesBrowse the repository at this point in the historyBrowse files
Merge branch 'main' into cursor/view-as-policy-identity-c497
Keep fail-closed parse/actor rules and recursive SELECT inspection from this
branch, and take main's whole-statement schema allowlist plus
assertProtectedTablesAreInspectable. Blank outer-column provenance from a
derived table is no longer treated as unresolved so a qualified protection
does not catch the same table name in another schema.
Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
`/inferred-relationships/*`) had the check; every later "Phase" block did not — so an
391
+
authenticated user could pass someone else's connection id to
392
+
`/brain/health-scores/{id}`, `/brain/data-sensitivity/{id}` (which names the PII
393
+
columns), `/brain/cost-attribution/{id}`, `/brain/ml-overview/{id}` and ~90 more and
394
+
read that user's database intelligence. All 116 are now guarded, and
395
+
`BrainControllerAuthorizationSafetyTest` fails the build if a new one is not. The
396
+
misses clustered by **when a section was written**, not by read/write semantics —
397
+
when adding a controller section, guard it as you write it.
398
+
-**When the path carries some other id** (`simulationId`, `experimentId`, `patternId`,
399
+
`noteId`, `taskId`), resolve the owning connection first via that service's
400
+
`getConnectionId(id)` and assert on the result. Do not skip the check because the
401
+
path has no `connectionId` in it.
402
+
-**An endpoint with no connection scope at all is admin-only.**
403
+
`POST /brain/column-values/embed-all` spans every connection, so it carries
404
+
`@PreAuthorize("hasRole('ADMIN')")` — it cannot be authorized against one
405
+
connection's grants. `@EnableMethodSecurity(prePostEnabled = true)` is on in
406
+
`SecurityConfig`, so `@PreAuthorize` is live.
407
+
-**Assert inside the `try`, and rethrow `ResponseStatusException` before the
408
+
catch-all.** Every handler in `BrainController` ends with a
409
+
`catch (Exception) -> 500`; without the earlier
410
+
`catch (ResponseStatusException e) { throw e; }` a 403 is swallowed and reported as a
411
+
server error, so a client cannot tell "not yours" from "broken". The safety test
412
+
asserts this too.
413
+
378
414
### MCP & CLI Release Rules
379
415
380
416
**Whenever you add, rename, or remove an MCP tool or a CLI subcommand, you MUST update all of these in the same commit — they are agent-facing surfaces and drift silently breaks discoverability:**
0 commit comments