Skip to content

ingest: tie labs to vendors, close the login redirect bypass, narrow job writes - #760

Draft
SaveAanchal wants to merge 1 commit into
aanchal/ingest-dashboard-portfrom
aanchal/ingest-security
Draft

SaveAanchal wants to merge 1 commit into
aanchal/ingest-dashboard-portfrom
aanchal/ingest-security

Conversation

@SaveAanchal

Copy link
Copy Markdown
Contributor

Security fixes from the review:

  • Each vendor is registered to its labs (onboard --lab); other labs are rejected before anything is stored and checked again at hand-off.
  • Login redirects are limited to safe local targets.
  • Conversion jobs write only to egoverse-ingest-jobs, so a compromised job can't reach accounts, decisions or Lance. The remaining risk is in egomimic/ingest/aws/README.md.

Tested: unit tests.
Not tested: the real R2 tokens and the new bucket, which don't exist yet.

🤖 Generated with Claude Code

…job writes

Needed before any vendor gets a login.

- Labs: onboarding records which labs a vendor may deliver for (--lab, required).
  A conversion job rejects any other lab before storing a stage or diff, and hand-off
  checks again from the pin. A vendor with no registered labs delivers nothing.
- Redirects: login `next` and bulk decide `back` go through views.safe_target, which
  refuses control characters, backslashes, and anything with a scheme or host.
  /login?next=/%09/evil.com used to leave the site.
- Job writes: pipeline/jobs/ and pipeline/staged/ move to their own bucket,
  egoverse-ingest-jobs (--jobs-bucket), so a job's key needs write access nowhere else:
  not accounts, decisions, status or rldb. The README lists each key's access and the
  risk that remains.

The R2 tokens themselves have not been created or tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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