Menu

Your CI Pipeline Never Re-Runs the Request That Proved the Bug
πŸ“°

Your CI Pipeline Never Re-Runs the Request That Proved the Bug

DEV Community: cicdΒ·HACKBOXΒ·10 days ago
#EisFwv9T
#devtocicd#devto#dev#request#tenant
Reading 0:00
15s threshold

You already have the requests. You ran them once, found a bug, fixed it, and moved on. The gap in most CI pipelines is not detection β€” it is that nobody ever re-runs the request that proved the bug in the first place.

This post is about a small harness that fixes that: take the requests your testing produced, replay them against a second tenant's session, and fail the build when the response says "yes" to a question it should have said "no" to.

The shape of the test

A cross-tenant authorization bug has a signature that is easy to express as a test:

An object exists for tenant A (invoice 4821, project 91, report 17).

Tenant B holds a valid session.

Tenant B requests A's object by ID.

The response is 200 with A's data instead of 403 / 404 .

Steps 1–3 are the hard part to write by hand and the trivial part to automate.…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.