Files
dextmorgn 80ecb58bbb fix(api): require sketch permission before launching an enricher
launch_enricher took payload.sketch_id on trust: any authenticated caller
could dispatch an enricher against a sketch belonging to someone else, and the
worker would write its findings into that sketch.

EnricherService gains get_sketch_for_launch, the same lookup launch_flow has
used since ac485e2c: resolve the sketch, then _check_permission for "update"
on its investigation. No role row means no access, so an unknown sketch 404s
and a viewer or a stranger gets 403, matching the flow route's responses.

The check runs before the graph read, so a denied caller never reaches Neo4j
and never queues a task.

Unlike FlowService's copy, the sketch id is parsed to a UUID first.
SketchRepository.get_by_id binds it as one, so a non-UUID string reached
SQLAlchemy and raised, which would have turned a bad id into a 500 instead of
a denial.
2026-09-18 16:53:35 +02:00
..
2025-11-27 17:16:41 +01:00
2025-05-20 14:46:37 +02:00
2026-04-11 13:14:16 +02:00
2025-07-08 14:24:47 +02:00

flowsint-api

Installation

  1. Install Python dependencies:
uv sync

Run

# dev
uv run uvicorn app.main:app --host 0.0.0.0 --port 5001 --reload
# prod
uv run uvicorn app.main:app --host 0.0.0.0 --port 5001