Urgent.News

What's breaking now, across thousands of outlets.

Tech

Testing Broken Access Control Without Guessing

Broken access control has been at or near the top of the OWASP Top 10 for a decade, and it is still the category most automated tools handle worst. The reason is structural: access control is not a pattern in a response, it is a relationship between two identities and one object. You cannot see it in a single request. You have to hold two sessions at once and compare. This is the testing method,…

Broken access control is a leading issue in the OWASP Top 10 for a decade, and automated tools struggle with this category more than any other. The problem lies in the fact that access control is not a single response pattern, but a relationship between two identities and one object. To test this, two accounts with identical roles and one shared object must be created.

Then, every endpoint can be walked using the first account's session and asserting on objects belonging to the second account. This method can be automated. The core of the testing process is simple: create two accounts, A and B, each owning one object, and then check every endpoint with A's session, asserting on objects belonging to B. To ensure the test is valid, the ownership must be established first by fetching B's object with B's token and recording a stable fingerprint.

The response must contain B's data, not just an empty array. Comparing the fingerprint against the response confirms the test's validity. Common mistakes include using non-existent ids, testing in the same tenant without different user accounts, trusting UI restrictions, ignoring export and report endpoints, and overlooking field-level filtering.

For GraphQL, two checks cover most cases: resolving a global ID with a different session and abusing batch/alias queries. Implementing this testing method in CI ensures that access control regressions are caught early, preventing them from being introduced by ordinary feature work.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

How I ship a private Android app through Google Play to testers' phones

Some apps have no business being searchable. A tool built for one company, a client demo, a closed beta you want a dozen people to poke at — none of these belong in public Play search.

  • Private Android app shipped via Google Play without public search results
  • App record created on Google Play Console with AAB file upload
  • Testers granted access via opt-in URL with account verification

RAG Pipeline Utils v3.8: Testing RAG Answers in TypeScript

v3.8.0 is about testing RAG in TypeScript. The answer matchers now compile with types, and a new guide walks through the whole setup with Vitest, from a unit test to a test set that fails CI when…

  • RAG Pipeline Utils 3.8 introduces TypeScript support for testing RAG answers.
  • New matchers toBeGroundedIn, toCite, and toContainNoPII enable early error detection.
  • Guide provides step-by-step setup using Vitest for unit, answer, and evaluation tests.

More from Friday 6 November →