Surface Code Discovery
New in APIsec Surface
See every way into your APIs from the code, then prove which ones an attacker can reach.
- Business logic risks, found in codeMissing auth checks and risky data flows that scanners miss
- Risks traced to endpointsWhich vulnerable dependencies an attacker can reach
- Exploited liveAn APIsec scan of the running API confirms or clears each one
- Fix what's confirmedEach confirmed exploit names the endpoint to fix
Surface Code Discovery finds the APIs in your source code, registers them as APIsec applications, and keeps them current as the code changes. You don't need an existing OpenAPI specification. It also traces vulnerable dependencies to the endpoints that reach them. APIsec reports each of these as a predicted exploit: a vulnerability the code suggests is reachable, which an APIsec scan of the running API then confirms or clears.
Discovery runs on your own CI runner with the apisec-surface CLI from PyPI. The CLI analyzes the code on the runner and sends the results to APIsec, where further analysis, including AI verification, runs.
What you get
- Your endpoints, registered and kept current, with no spec to write: APIsec publishes the OpenAPI specification.
- Vulnerable dependencies traced to the endpoints that reach them, as predicted exploits.
- Committed secrets and other code findings, verified by AI analysis in APIsec.
Ways to run
| Scope | Guide |
|---|---|
| One repository, in GitHub Actions | Run Surface Code Discovery in GitHub Actions |
| One repository, in Azure Pipelines | Run Surface Code Discovery in Azure Pipelines |
| Every repository in a GitHub organization | Surface Discovery for GitHub |
| One repository, from your machine | Run the Surface CLI |
Each guide needs an APIsec Personal Access Token and your APIsec registration code.
Supported frameworks
| Language | Frameworks |
|---|---|
| Java | Spring Boot, Micronaut, JAX-RS, Servlet. Kotlin source files are not analyzed. |
| Python | FastAPI, Flask, Django |
| JavaScript and TypeScript | Express, Fastify, Koa, NestJS, Firebase Cloud Functions |
| C# | ASP.NET Core, ASP.NET (.NET Framework), gRPC, WCF, Web Forms |
| Ruby | Rails, Sinatra, Grape, Hanami, Padrino, Roda |
| Go | Gin |
GraphQL APIs are detected in Java, Python, JavaScript, and Ruby.
Code Bolt is now Surface Code Discovery, and the Code Bolt GitHub Action is retired. To move a workflow off it, see Migrate from the Code Bolt GitHub Action.
📖 Run the Surface CLI
This guide installs the apisec-surface CLI from PyPI and runs Surface Code Discovery from your own machine. Use it to try Surface on a repository before you add it to CI, or to analyze a repository that has no pipeline. The CLI analyzes the code locally and registers each API it finds as an application in APIsec.
📖 Run in GitHub Actions
This guide adds Surface Code Discovery to one GitHub repository. Each push to main registers or updates the repository's APIs in APIsec. It also analyzes the code's dependencies, authentication, and committed secrets.
📖 Run in Azure Pipelines
This guide adds Surface Code Discovery to one repository in Azure DevOps, using an Azure Pipelines YAML pipeline. Each run on main registers or updates the repository's APIs in APIsec. It also analyzes the code's dependencies, authentication, and committed secrets.
📖 Run on all repos in a GitHub Org
Surface Discovery for GitHub finds the APIs in every repository of a GitHub organization and registers each one as an APIsec application. One repository in your organization runs the APIsec Surface org scan workflow every night. The workflow runs in your organization, on your runners, with your secrets. APIsec receives the results of the Surface Code Discovery analysis.