Skip to content

fix(platform): enforce project scope across public APIs - #3305

Merged
larryro merged 5 commits into
mainfrom
fix/api-probe-findings
Sep 10, 2026
Merged

larryro merged 5 commits into
mainfrom
fix/api-probe-findings

Conversation

@larryro

@larryro larryro commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Project-owned REST resources now take their project from /api/v1/projects/{id}/…: agents, tasks and comments, chat, automation installations and runs, and project file search. Requests reject the retired routing fields, and replaced flat endpoints are removed. Global chat and run endpoints serve only resources without a project; organization-owned catalogs remain global.

Every project URL checks the key holder’s access and the resource’s actual project, including private projects, archived writes and queued chat turns. Token webhooks use /api/projects/{id}/automations/webhook/{token} for installed projects, validate scope before duplicate responses, and deduplicate independently per project. MCP run tools enforce the same project permissions. File writes hold project locks through binding, and Hub document creation rejects another user’s upload or a file already bound to a document, chat or conversation.

The API contracts also align model discovery, contact update/source validation, skills and document lifecycle/error handling; WebDAV docs are updated. OpenAPI, the webhook editor and EN/DE/FR guides and tutorials describe the resulting contracts. No schema or data migration is introduced.

Validation:

  • bun run check: all 43 tasks passed, including platform backend 74,067 tests and UI 3,537 tests.
  • bun run knip:check and bun run lint:manual passed; final OpenAPI parity suite passed 52 cases; full and new-file SAST scans reported zero findings.
  • Production auth/Hono against isolated PostgreSQL: 149 HTTP checks plus concurrent archive and queued-turn scope proofs. External model, blob-storage and search-provider execution was not part of this isolated run.
  • Actual Chromium QA: 21 docs pages, webhook editor in EN/DE/FR and narrow layout; published cURL examples for agents, task intake/start, project runs/chat and webhook retries executed successfully.
  • CI on ef1b6acfa: Format, Lint, Type check, Build, Unit and Knip passed. Draft-gated jobs remain skipped.

Enforce scoped identifier conflicts, run admission, deletion visibility, and JSON errors across the REST surface. Expose permitted direct-call models and provider selection, preserve failed chat requests, and prevent crawls from overwriting saved website metadata.

Align the generated OpenAPI contract, English/German/French developer docs, and manual coverage with regression tests. Remove the redundant API-key plugin rate window so the platform token buckets remain the throttle authority.
@larryro
larryro force-pushed the fix/api-probe-findings branch from 278eef6 to 9bb00bc Compare September 9, 2026 13:32
@larryro larryro changed the title fix(platform): repair REST API validation and contract drift fix(platform): align REST contracts and project agents Sep 9, 2026
@larryro larryro changed the title fix(platform): align REST contracts and project agents fix(platform): enforce project scope across public APIs Sep 9, 2026
@larryro
larryro marked this pull request as ready for review September 9, 2026 23:46
@larryro
larryro merged commit 35ea132 into main Sep 10, 2026
23 checks passed
@larryro
larryro deleted the fix/api-probe-findings branch September 10, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant