How Cal.com Rebuilt AppSec After Going Closed Source
How Cal.com consolidated noisy security tooling into one continuous, context-aware pull request security program with Gecko.
Gecko Security

Most security teams run SAST and feel covered. Then broken access control shows up in a pentest anyway. OWASP found it in 100% of applications they tested. Pattern-based tools have not closed that gap, and the reason is structural, not fixable with more rules.
TLDR:
Broken access control is a category of vulnerability where an application fails to properly enforce who can do what. A user accesses a resource they should not see, modifies data belonging to another account, or calls an administrative endpoint without the required privileges.
OWASP's analysis of roughly 500,000 applications found broken access control present in 100% of them, making it the top-ranked vulnerability category in the OWASP Top 10.
The mechanics vary widely across three core patterns:
What makes these patterns hard to catch is that none of them are syntax errors. The code compiles, the application runs, and the logic looks structurally correct. The flaw lives in what the application does not check, not in what it does wrong at a language level. A route handler may exist and execute cleanly while skipping every authorization decision entirely.
The absence of a check is not the same as a malformed expression. No forbidden function call occurs. No known-bad string appears. The code path that processes a request to /admin/users may be perfectly valid Python or Go, with no detectable anomaly at the token or syntax level. The only way to identify the vulnerability is to reason about what verification was supposed to happen and confirm whether it actually did.
Broken access control has occupied the top position on the OWASP Top 10 since the 2021 edition, and the 2025 data shows why that ranking holds. OWASP tested roughly 500,000 applications and found broken access control present in 100% of them. No other category comes close to that saturation rate.
The reason it stays there has nothing to do with developers ignoring the problem. Authorization logic is structurally harder to get right than input validation or dependency management. Whether a given user should access a given resource at a given moment depends on roles, ownership relationships, request context, and business rules that are rarely written down in one place. That logic is scattered across services, middleware, route handlers, and database queries, and it changes as the application grows.
Input validation failures like SQL injection have a recognizable shape: untrusted data reaches a dangerous sink without sanitization. A pattern scanner can, in principle, trace that flow. Broken access control failures look completely different. The code often executes exactly as written. There is no malformed input, no missing sanitization call, no dangerous function invoked incorrectly. The problem is that a request succeeds when the system's own rules say it shouldn't.
Consider a common IDOR scenario: an API endpoint that accepts a userId parameter and returns account data. The function may validate the session token correctly, query the database correctly, and return well-formed JSON. Every line does what it was written to do. The vulnerability is that no line checks whether the authenticated user owns the requested userId. No pattern can flag that absence, because the absence leaves no syntactic trace in the code.
This is why broken access control has stayed at OWASP #1 while categories amenable to pattern detection have declined in prevalence. The problem is not a deficit of tool adoption. It is a structural mismatch between what the vulnerability requires to detect and what most security tools are built to find, a gap that static analysis and business logic research has covered in depth.
Broken access control is not a single bug class. It covers several distinct failure modes, each of which requires a different kind of reasoning to detect.
Vertical privilege escalation happens when a user accesses functionality reserved for a higher role, such as a regular user calling an admin endpoint. Horizontal escalation happens when a user accesses another user's data at the same privilege level, the classic IDOR pattern where changing a resource ID in a request returns records belonging to a different account.
Some endpoints simply have no authorization check attached. The route exists, the handler runs, and nothing in the code path verifies whether the caller is allowed to invoke it. These gaps are often invisible at the file level because the check was never added, so there is no pattern to match against.
IDOR flaws appear when an application exposes internal identifiers directly to the client without verifying ownership. The identifier itself is the attack surface. Detection requires knowing the relationship between the caller's identity and the referenced resource, which is a semantic question, not a syntactic one.
Overly permissive CORS policies allow cross-origin requests to reach authenticated endpoints. Path traversal vulnerabilities let callers reference files or resources outside their permitted scope. Both rely on runtime behavior and configuration state that static code patterns alone cannot fully capture.
Broken access control vulnerabilities tend to follow a small set of patterns that attackers have refined over years of targeting real applications. Understanding these patterns explains why detection is harder than it looks from a code-review perspective.
The most straightforward attacks involve changing an identifier in a request. A user authenticated as account 1042 modifies a URL parameter to read /api/accounts/1041/statements. If the server fetches the record without checking whether the requesting user owns it, the attacker has the data. No exploit kit required.
Attackers probe role boundaries by replaying requests with lower-privilege tokens. A standard user submits the same API call an admin just made, or modifies a role field in a JWT payload before sending it. If the authorization check trusts client-supplied context, the escalation succeeds.
Some endpoints are hidden from the UI but reachable directly. Attackers map API routes, locate administrative functions never exposed to normal users, and call them without restriction. The server assumed obscurity was protection.
What connects all of these is that the vulnerability lives in authorization logic, not in data handling. The attacker is not injecting malicious input. They are making a structurally normal request that the application should refuse but does not.
Pattern-based SAST vs DAST tools work by matching code against a library of known-bad signatures. A rule flags exec() calls, another flags unsanitized SQL concatenation, another flags missing HttpOnly on cookies. The approach is sound for vulnerability classes where the flaw lives in a single expression or a predictable data-flow path.
Broken access control is not that class.
The authorization decision in a real application is rarely a single call. It's the result of a role being set at login, carried through a session object, checked (or not checked) across several middleware layers, and then enforced at the point where a resource is served. No individual line of that chain looks wrong in isolation.
Consider what a SAST rule would need to "see" to catch a missing tenant check:
A pattern matcher reads tokens. It cannot hold the application's intended authorization model in memory and compare actual behavior against it. The gap is not a missing rule. The gap is that the check's absence produces no signature.
When a vulnerability is the absence of a check, scanning for patterns in what exists will always return clean. SAST tools report on what code does. Broken access control is about what code fails to do. OWASP found broken access control in 100% of tested applications, and pattern-based tools were already widespread when that data was collected. The prevalence is not a coincidence.
Static code analysis tools parse source files into abstract syntax trees and walk those trees looking for signatures: a known-bad function call, an unvalidated input reaching a dangerous sink, a missing null check. The approach works well for vulnerability classes where the problem lives in a single expression or a predictable data flow path.
Broken access control rarely does.
A typical authorization failure spans multiple files, services, and layers. The permission check might live in a middleware module. The resource fetch happens in a controller. The ownership relationship is encoded in a database schema or an ORM mapping. No single file contains the vulnerability. The AST for each file is individually unremarkable.
Consider what a file-level AST actually captures: the syntactic structure of one compilation unit in isolation. It records that a function exists, what arguments it takes, and what it calls. It does not record whether the caller verified the caller's identity before invoking it, or whether a service boundary was crossed between the permission check and the resource access.
There are three categories of context that AST parsing cannot recover:
Pattern matching cannot flag what it cannot see. When authorization logic is distributed across the call graph instead of co-located in a single function, the pattern never fires.
The detection gap is only half the problem. Traditional SAST tools also generate enormous noise, and the two failures compound each other in ways that leave teams worse off than the numbers suggest individually.
A June 2025 Help Net Security analysis of a Python/Flask codebase found traditional SAST flagging 1,166 potential issues. Six were real. Manually reviewing that list would take close to 200 hours.
Teams spending that time on false alarms are not reviewing authorization logic or checking whether ownership checks are in place across service boundaries, a gap that AI-powered security testing tools are beginning to close. The noise consumes the attention budget that would otherwise catch what SAST cannot find by design. You end up with a tool that is both loud about things that do not matter and silent about the category that appears in every application OWASP has tested.
Detecting broken access control requires the analyzer to hold three things in mind simultaneously: what the code does, what it was supposed to do, and what external context makes a given code path exploitable. Pattern matching handles none of these.
A pattern-based SAST tool reads token sequences. It can confirm that a known dangerous function call is present, or that a common unsafe pattern appears in a file. What it cannot do is reason about the relationship between a request handler, the role model backing it, the middleware chain that was supposed to enforce authorization, and the business rule that defines who should have access. That relationship is not a pattern. It is a semantic graph that spans multiple files, services, and often configuration layers that live outside the codebase entirely.
For any given endpoint, catching broken access control requires the following inputs:
Pattern matching operates on the code as written. It has no mechanism for asking whether what is written matches what was intended, or whether the enforcement chain that exists on paper actually executes at runtime for a specific request.
The analyzers that catch broken access control reason over a compiler-accurate semantic model of the codebase. They build a representation that preserves call relationships, data flows, type information, and control flow across module and service boundaries. Then they ask a different class of question: given this call chain and this trust model, is there a reachable code path where an insufficiently privileged principal reaches a protected resource without passing through a valid enforcement point?
That question requires the analyzer to hold the entire authorization graph in scope, beyond the file currently being parsed. It requires knowing that the middleware registered on the router does not apply to this route because a developer passed { auth: false } in the route options. It requires understanding that the ownership check that appears in the service layer is only reached after the controller already returns the object in some code paths.
No ruleset catches that. Semantic reasoning does.
Production systems fail on broken access control in ways that are consistent, repeatable, and invisible to pattern-based SAST. Three cases show exactly how this plays out.
In ONYX, a document intelligence application, CVE-2025-51479 showed that curators could modify any group's membership, including groups they had no administrative rights over. The authorization check existed. It ran on the right endpoint. But it checked the requesting user's role against the wrong scope, a structural mismatch between what the check verified and what the operation actually changed. No regex pattern catches that. The flaw lives in the relationship between a role claim and a resource boundary, not in any string a scanner can match.
A Cal.com broken access control vulnerability allowed authenticated users to read and modify bookings belonging to other users. The code path accepted a booking ID from the request, fetched the record, and acted on it without verifying ownership. The function handling the operation looked, in isolation, like correct authenticated code. The missing piece was a single ownership assertion that should have existed but did not. SAST sees what is written. It has no way to flag the absence of a check that was never there.
In N8N, the workflow automation tool, a broken access control flaw let lower-privileged users access credentials stored by higher-privileged users, as detailed in the n8n OAuth authorization bypass research. The credential retrieval logic applied permission checks at the workflow level but not at the credential level, so an indirect path through workflow execution bypassed the intended restriction entirely. The gap was architectural: two separate permission models that should have intersected, but did not. Pattern matching on either model in isolation would find nothing wrong.
Preventing broken access control starts with accepting that no single tool or practice closes the gap alone. The controls that work are layered, and each layer targets a different failure mode.
Most access control failures trace back to decisions made before a line of code is written. Getting these right reduces the surface area substantially:
/api/orders/4821 should only succeed if order 4821 belongs to them, regardless of how the request arrived.Manual review and automated testing catch what architecture alone leaves open:
SAST tools can flag missing authentication decorators, absent middleware, and some misconfigured role checks. For broken access control, however, the coverage gap is structural. A pattern-based scanner reads code tokens; it cannot determine whether a given authorization check is semantically correct for the object being accessed, whether a check applies to the right data scope, or whether a permission decision made in one service correctly governs a resource owned by another.
The result is that SAST catches the obvious omissions while the subtle, exploitable cases stay in production. Closing that gap requires analysis that reasons about what the code is supposed to do, not what patterns appear in it.
Three approaches to static analysis look similar from the outside but cover completely different ground when the vulnerability is broken access control. The table below maps each against the dimensions that matter most for detecting OWASP #1.
| Capability | Pattern-Based SAST | Taint Analysis SAST | Semantic / Contextual Analysis |
|---|---|---|---|
| Cross-file call chain tracing | No | Partial (within single repo) | Yes |
| Cross-service authorization tracking | No | No | Yes |
| IDOR detection | No | No | Yes |
| Multi-step privilege escalation detection | No | No | Yes |
| False positive rate on authorization findings | High | High | Low |
| Reasoning about authorization intent | No | No | Yes |
The "Partial" on cross-file call chain tracing for taint analysis deserves context. Taint analysis can follow data across function boundaries within a single codebase, but it tracks whether untrusted data reaches a dangerous sink, not whether a principal is authorized to reach a given resource. Those are different questions. A taint analysis tool confirming no SQL injection exists on a booking endpoint says nothing about whether the requesting user owns that booking.
The false positive pattern for both pattern-based and taint analysis SAST reflects the same underlying problem: both flag syntactic patterns that look suspicious but are structurally benign, while leaving actual authorization logic gaps untouched. The alerts fire on things that don't matter. The ownership check that was never written stays invisible. Semantic analysis inverts that: it asks whether the authorization chain that should exist actually executes, which means findings on authorization logic are grounded in what the code is supposed to do, not what tokens appear in it.
Gecko surfaces findings with working proof-of-concept exploits, including 0-day vulnerability discoveries that pattern-based tools missed entirely. It does this by building a semantic code graph instead of a pattern library: a compiler-accurate representation of how data flows through the application, which roles invoke which functions, and which authorization checks exist at each decision point.
The gap that matters for broken access control is this: Gecko can ask whether an authorization check was supposed to run on a given code path and verify whether it actually does. Pattern-based tools cannot ask that question because the answer lives in the relationship between call chains, not in any single file.
Consider a common finding pattern: an API endpoint that passes object identifiers directly into a database query without first confirming the requesting user owns that object. No regex catches this because the vulnerability is the absence of a check, and absence has no syntax.
Gecko traces the full execution path from the incoming request through service boundaries to the data layer. It identifies where ownership validation exists elsewhere in the codebase, recognizes that the same validation is missing on this path, and surfaces a finding with a working proof-of-concept. The finding includes context about why the check is absent, beyond confirming that it is.
Broken access control appears in 100% of tested applications precisely because the flaw category is defined by logic gaps, not code patterns. Closing detection coverage on that category requires reasoning about what code was supposed to do, and that is a semantic problem, not a matching one.
No tool that matches patterns can find a check that was never there. Broken access control sits at OWASP #1 because your authorization logic is a semantic problem, distributed across call chains and config layers that file-level analysis cannot see. The path to actual coverage runs through semantic reasoning over the full call graph. Grab 30 minutes with the Gecko team to see what that looks like on your codebase.
Pattern-based SAST is built to match known-bad signatures in code tokens, but broken access control failures leave no signature: the vulnerability is the absence of a check, not the presence of something wrong. No ruleset catches what was never written, which is why OWASP found broken access control in 100% of roughly 500,000 tested applications even as SAST adoption was already widespread.
Taint analysis tracks whether untrusted data reaches a dangerous sink, which is a data-flow question. Broken access control is a correctness question: did the right principal pass through the right enforcement point before reaching the resource? Those are different questions, and taint analysis cannot answer the second one. Semantic analysis builds a compiler-accurate graph of call chains, role relationships, and enforcement points across service boundaries, then asks whether a given code path ever reaches a protected resource without passing through a valid authorization check.
No. IDOR detection requires knowing the ownership relationship between the requesting user and the referenced object, a semantic question about intent that lives across files, services, and ORM mappings, not in any single expression. A standard SAST tool parses files in isolation and cannot hold that relationship in scope.
In a monolith, the authorization gap tends to be a missing check in a single code path. Across microservices, the gap is often architectural: a permission check exists at the API gateway but not in the downstream data service, so any call that reaches the inner service directly, or passes through a service-to-service call where the caller's permissions are trusted without re-validation, bypasses the control entirely. Single-file or single-repo analysis tools cannot see that gap because no individual file contains the vulnerability.
Check whether it can answer three specific questions: does any code path to this data query include an authorization check, does the requesting user's identity get validated against the resource being accessed, and does the authorization middleware registered on the router actually execute for this specific route? If the tool cannot answer those questions with a call-chain trace instead of a pattern match, it is not covering broken access control. It is covering the syntactic patterns around it.
Gecko Security
The latest news, technologies, and resources from our team.
How Cal.com consolidated noisy security tooling into one continuous, context-aware pull request security program with Gecko.
Gecko Security
See what actually changed in the OWASP Top 10 for 2026, from merged SSRF and XXE categories to new supply chain risks and scanner coverage gaps.
Jeevan Jutla
Gecko Security uncovered CVE-2026-21894 in August 2026, an n8n authorization bypass with CVSS 8.8. See why static tools missed it and how to remediate it.
Jeevan Jutla
Security misconfiguration is OWASP A05 for a reason. Learn how deployment context determines exploitability and how to fix gaps in August 2026.
Jeevan Jutla
How do modern AppSec vendors actually compare? This July 2026 capability map covers SAST, DAST, SCA, business logic flaws, and cross-service
Gecko Security
Break down your AppSec stack: what SAST, DAST, SCA, IAST, and pen testing each see — and what they miss. Updated July 2026 by Gecko Security.
Gecko Security
Occasional updates, new content, and insights. No spam; unsubscribe anytime.