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 vulnerability scanners tell you whether dangerous functions get called with user input, but they can’t tell you whether your authorization logic actually works. Codex Security flips this model by asking semantic questions about your code: Does this execution path include a permission check? Should this parameter be validated but isn’t? Codex Security scanned over 1.2 million commits and identified 10,561 high-severity vulnerabilities by reasoning about intent instead of matching patterns. But threat modeling against source code carries a fundamental risk: when the code is the only input, the scanner treats all existing behavior as expected behavior. The code alone doesn’t contain your business logic, your deployment architecture, or your trust model. That context lives in design documents, architecture specs, and runtime information. This article covers how Codex Security’s methodology works, what it caught during beta testing, and where it falls short.
TLDR:
Codex Security is an AI-powered application security testing approach that analyzes code repositories to understand how applications work, identify potential vulnerabilities, and validate findings through automated exploitation. Unlike traditional SAST tools that match predefined vulnerability patterns, it reasons about whether code implements security controls correctly. This lets it answer context-specific questions: Does this API endpoint validate user ownership? Is there an authorization check in this path? The goal is catching business logic vulnerabilities that pattern-based scanners miss but human security researchers find during manual penetration testing.
Codex Security operates through a three-phase workflow that mirrors how skilled penetration testers approach manual code audits.
The system begins by analyzing your application’s business logic to build context. It maps data flows, identifies trust boundaries, and determines what security controls should exist. By studying API endpoints, service interactions, and data movement patterns, Codex creates attack scenarios tailored to your codebase instead of relying on generic vulnerability patterns.
Here’s where a tension appears. When Codex Security builds its threat model from source code, it can only reason about what the code does. Every behavior in the codebase gets treated as expected behavior, because the code is the only source of truth the scanner has. There’s nothing in a function call that signals whether that function should require an ownership check. That intent lives in design documents, architecture decision records, and product specs, not in the implementation itself.
Next, it searches for exploitable issues based on that threat model. This phase asks targeted questions: Does this endpoint validate user permissions? Can users access resources they shouldn’t own? The focus stays on security controls that matter in real-world attacks.
Finally, Codex validates findings by building automated exploits. This proves vulnerabilities are genuinely exploitable, not theoretical risks. The system generates proof-of-concept code that shows exactly how an attacker could abuse each flaw.
Human pentesters need weeks. This methodology delivers comparable results in hours. The key difference is that skilled pentesters bring context that source code can’t contain: knowledge of the deployment architecture, the trust boundaries as they were designed, and the business rules as they were intended. Source code shows what exists. It can’t show what was supposed to exist.
During its beta period, Codex Security scanned more than 1.2 million commits across open-source repositories. The system identified 792 critical findings and 10,561 high-severity vulnerabilities in projects including GnuTLS, GOGS, Chromium, and PHP.
What’s striking about these numbers isn’t their volume. Critical issues appeared in under 0.1% of the commits analyzed. This signal-to-noise ratio matters because it shows most code doesn’t contain severe security flaws, but the flaws that exist often hide in widely-used projects.
The beta testing period revealed vulnerabilities in foundational software that millions of applications depend on. When GnuTLS or PHP contain security issues, the blast radius extends across entire ecosystems.
These results show automated reasoning can spot problems at scale. But they also raise questions about false positive rates, severity calibration, and whether findings represent genuinely novel discoveries or known issue classes. The research preview didn’t specify how many findings were previously unknown versus rediscoveries of existing CVEs.
Broken access control sits at the top of OWASP’s 2025 vulnerability rankings for a reason. Every application tested showed some form of this flaw.
This vulnerability class covers missing authorization checks, insecure direct object references, privilege escalation paths, and authentication bypasses. These aren’t syntactic problems where malicious input breaks parsing logic. They’re semantic failures where code works exactly as written but doesn’t enforce the security model developers intended.
Consider a microservice architecture where the API gateway validates user identity but downstream services assume any request reaching them is already authorized. The code functions perfectly. Data flows as designed. But users can access resources they shouldn’t own by crafting API calls that skip ownership validation.
Traditional SAST tools struggle here because broken access control doesn’t follow predictable patterns. Each application implements authorization differently. Detecting these flaws requires understanding what checks should exist, where trust boundaries occur, and whether security logic matches intent.
Traditional SAST tools parse code into abstract syntax trees that map program structure within individual files. This works for finding SQL injection or cross-site scripting because those vulnerabilities follow recognizable syntactic patterns. Taint analysis tracks whether user input reaches dangerous functions.
Business logic vulnerabilities break this model. AST-based tools can’t answer the questions that matter for authorization flaws: Does this execution path include a permission check? Should this parameter be validated but isn’t? These questions require understanding relationships across files and services, beyond syntax alone.
The problem is they can’t reason about intent. When an API endpoint accepts a user ID parameter, taint analysis tracks that the data flows to a query or function call, but it can’t determine whether the code validates that the authenticated user should access that resource.
Human security researchers find these issues by building mental models of how applications should behave, then testing whether implementation matches intent.
AI coding assistants are shipping vulnerable code at scale. Recent analysis across 80 coding tasks spanning four programming languages found only 55% of AI-generated code was secure. Nearly half introduces known security flaws.
This isn’t theoretical. Developers accept AI suggestions containing broken authentication logic, missing authorization checks, and flawed security boundaries. The code compiles. Tests pass. But the controls don’t work.
The scale amplifies the damage. When one developer writes buggy code, the impact stays contained. When millions accept AI suggestions sharing similar security weaknesses, those patterns spread across codebases worldwide.
The timing problem is real. Vulnerabilities arrive faster than security teams can review them manually. Traditional review cycles assume human-written code at human speed. AI-assisted development breaks that assumption, producing more code with higher defect density than existing processes were built to handle.
Traditional scanners and Codex Security solve different problems. SAST tools excel at catching syntactic vulnerabilities through pattern matching. DAST finds runtime issues by probing live applications. SCA identifies known vulnerabilities in dependencies. These approaches work well for their intended use cases.
Codex Security fills the gap they leave: business logic flaws that require understanding intent. Where SAST asks “does this code match a vulnerability pattern,” Codex asks “does this code enforce the security model it should?”
| Tool Type | Detection Method | Best For | Limitation |
|---|---|---|---|
| SAST | Pattern matching | SQL injection, XSS | Single-file, syntactic issues |
| DAST | Black-box probing | Runtime configuration flaws | Surface-level exploration |
| SCA | Dependency signatures | Known CVEs in libraries | Third-party code only |
| Codex Security | Semantic reasoning | Authorization bugs, IDOR | Requires code access |
The right approach uses both. Run traditional scanners for coverage of known patterns. Add semantic analysis for logic flaws that pattern matching can’t catch.
Codex Security operates as a research preview with practical constraints. You need GitHub repository integration to run scans. Code stored elsewhere or behind strict security policies won’t work without workarounds.
Scan duration scales with codebase size. Repositories with millions of lines can take hours for initial analysis, which works for scheduled reviews but not for real-time developer feedback loops.
Suggested fixes require validation before deployment. Automated patches can break functionality or create new issues. Treat remediation proposals as drafts that need careful review, not drop-in solutions.
Pattern-based SAST still has advantages for specific use cases. Fast CI/CD feedback on common injection flaws happens quicker with traditional scanners. Codex excels at authorization bugs and complex logic vulnerabilities that signature-based tools miss.
The deeper constraint is structural. Source code doesn’t contain your business logic. It doesn’t encode your deployment architecture, your trust model, or the risk decisions your team made during design. Those live in design documents, architecture specs, threat models built against product requirements, and risk registers like bug bounty scope guides.
Consider a privilege escalation path in an internal-only service that sits behind two layers of authentication, accessible only to employees on a corporate VPN. Codex Security may surface it as a critical finding. But its actual risk profile is completely different from an identical flaw in a publicly exposed API. The source code can’t tell the scanner which situation it’s looking at.
This is why mismatches between developer intent and actual implementation, the definition of broken business logic, are so hard to detect from code alone. The source of truth for what the code should do is not in the code. It’s in design documents, the product spec, or the bug bounty brief that defines what counts as a valid finding. A scanner reasoning against the implementation is not reasoning against the intent.
Semantic analysis builds a code property graph instead of an abstract syntax tree. This preserves how symbols, types, and functions relate across your entire codebase, including connections between files.
The approach uses language server protocols to index code the same way IDEs understand it. When you jump to a definition in VS Code, the editor follows semantic relationships. Code property graphs capture those same connections, linking function calls to their implementations across repositories and microservices.
This lets security tools answer questions AST parsers cannot: Where does this data cross service boundaries? Does any execution path to this database query include ownership validation? Which endpoints expose user resources without checking permissions?
We built Gecko to close the gap that code-only analysis leaves open. Our compiler-accurate indexer creates a semantic map of your codebase, tracing how data flows across microservices and where trust boundaries occur. But the indexer is only part of what makes the difference. Gecko incorporates context that source code can’t contain: your product logic, deployment architecture, and the design intent behind your security controls.
That context is what turns raw findings into actionable risk. A vulnerability in a publicly exposed API endpoint that skips an ownership check is a P0. The same code pattern in an internal admin service behind corporate SSO and network controls carries a different risk profile entirely. Code scanners surface both identically. Gecko uses your deployment and trust context to separate them.
True broken business logic comes from mismatches between what developers intended to build and what actually got built. The source of truth for that intent is not in the code. It’s in design documents, architecture specs, and risk registers, the same inputs that define what counts as a real vulnerability in a bug bounty program. Gecko incorporates that context to find findings that reflect your actual threat model, going beyond what code-only analysis can surface.
The system identifies all API endpoints, maps authentication mechanisms, and tracks whether authorization checks protect sensitive operations. When we find a potentially vulnerable code path, we generate proof-of-concept exploits to validate it’s genuinely exploitable. This methodology has found 30+ CVEs in eight months across projects like Cal.com, N8N, Ollama, and Gradio.
Broken access control dominates vulnerability rankings because traditional tools can’t detect it reliably. Codex Security moves beyond pattern matching by threat modeling against your codebase. That’s a meaningful step forward. But source code doesn’t contain your business logic, your deployment architecture, or your trust model. Reasoning about what the code does is not the same as reasoning about what it was designed to do. Finding real broken business logic requires understanding the intent, and that lives in design documents and product specs, not in the implementation. Tools that incorporate that context will catch what code-only analysis misses.

Artemiy Malyshau
Co-founder & CTO
Artemiy served in an elite unit of the Austrian Cyber Forces, defending national infrastructure He was then the first employee at a government-backed cybersecurity research group, where he led security projects for Interpol and national governments. At Gecko he builds the platform trusted to sit inside Fortune 500 codebases, and holds it to the standard those governments taught him.
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
Authorization bypass in n8n’s dynamic-credentials OAuth endpoints allows any authenticated user to operate on another user’s OAuth credential by supplying its ID, enabling unauthorized OAuth rebinding and revocation.
Artemiy Malyshau
An IDOR vulnerability in n8n’s public variables API allows authenticated users to read project variables outside their authorized scope, exposing secrets across project boundaries.
Artemiy Malyshau
Learn API scanning for automated security testing. Find vulnerabilities from broken authentication to business logic flaws in your endpoints.
Artemiy Malyshau
A complete guide to automated pentest tools and best practices. Learn what works, what doesn’t, and how to implement continuous security testing.
Artemiy Malyshau
Compare the best AI-powered application security testing tools. Find which tools detect business logic flaws and broken access control.
Artemiy Malyshau
Occasional updates, new content, and insights. No spam; unsubscribe anytime.