← All questions
HardTechnical

Assume admins are tenant-scoped, red-admin has no blue membership, and the database worker can read all tenants. Review this pseudocode and write a finding plus regression tests.

1Give yourself 5 minutes
2Answer out loud, not in your head
3Then compare with the answer below

The problem

Assume admins are tenant-scoped, red-admin has no blue membership, and the database worker can read all tenants. Review this pseudocode and write a finding plus regression tests.

actor = require_session(request)
require(actor.role == 'admin')
rows = invoices.where(tenant_id=request.body.tenant_id)
return storage.write(rows).download_url

Reference answer

Then expect these follow-ups

  • What should happen if the user's export permission is revoked while a background job waits?

Hiring now

Security engineer roles are open right now

landed applies to roles like these for you, on each company’s own site, with answers written for the role.

Get 5x interviews10 free auto-applies. No card.
  • Senior Cisco Security Engineer

    Insight · Remote

  • Security Engineer Intern

    ServiceNow · Kirkland, Washington, United States

  • Senior Security Engineer

    Curri · Remote

Or practice this question first

Next question