# Public API Exposure Auditor (`bmiller1009/api-exposure-auditor`) Actor

Audit a public OpenAPI 3.0/3.1 description for admin, operator, internal, billing, and debug surfaces that should not be publicly exposed.

- **URL**: https://apify.com/bmiller1009/api-exposure-auditor.md
- **Developed by:** [Sentinel Signal](https://apify.com/bmiller1009) (community)
- **Categories:** Developer tools, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $80.00 / 1,000 api exposure audits

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Public API Exposure Auditor

Audit an OpenAPI 3.0 or 3.1 description for administrative, operator, internal,
billing, debug, and other sensitive surfaces that may have been included in a
public API description unintentionally.

This deterministic OpenAPI security audit helps API developers and platform,
security, and DevSecOps teams review a public API attack surface before release.
It is also useful in CI/CD validation and agent-ready API security reviews.

### Safety model

The Actor analyzes the OpenAPI description itself. It does **not** select, call,
or execute the API operations described by the specification, send exploit
payloads, attempt authentication bypass, or mutate target state.

Safe live verification is optional and off by default. When `verifySafe` is
enabled, the Actor separately makes bounded `GET`, `HEAD`, or `OPTIONS` requests
to a fixed allowlist of operational paths on the supplied `baseUrl`. It does not
derive those requests from the operations in the OpenAPI document.

### What it checks

The current API exposure audit applies deterministic rules for:

- sensitive path names associated with admin, operator, internal, billing, or
  debug functions;
- sensitive routes with explicit anonymous access or no documented security;
- unauthenticated state-changing operations;
- operations explicitly marked for a non-public audience with `x-audience`,
  `x-internal`, or `x-visibility`;
- potentially identifying path parameters such as email, phone, SSN, or token;
- billing, subscription, setup-link, API-key, and impersonation routes;
- publicly documented health, metrics, diagnostics, and other operational
  endpoints, including response schemas that expose verbose internal metadata;
- debug or operator mutations; and
- response schemas containing secret- or credential-like property names.

Each finding reports a stable rule ID, severity, confidence, category, affected
HTTP method and path, evidence, and remediation guidance. Naming signals are not
reported as proof of exploitability.

The analyzer normalizes operation IDs, tags, and server URLs while parsing, but
the current rule set does not infer exposure from those values alone. It is an
OpenAPI analyzer and API security scanner, not a penetration test.

### Input

Provide exactly one OpenAPI source:

- `document`: an inline OpenAPI 3.0/3.1 JSON object;
- `yaml`: an inline UTF-8 OpenAPI YAML string; or
- `sourceUrl`: a public HTTPS URL serving OpenAPI JSON or YAML.

Optional controls are `verifySafe` (default `false`), its required public HTTPS
`baseUrl`, and `failOn`, which accepts `info`, `low`, `medium`, `high`, or
`critical`.

Example input:

```json
{
  "document": {
    "openapi": "3.1.0",
    "info": {"title": "Example API", "version": "1.0.0"},
    "paths": {
      "/admin/users": {
        "get": {
          "operationId": "listAdminUsers",
          "security": [],
          "responses": {"200": {"description": "OK"}}
        }
      }
    }
  }
}
```

### Output

The default dataset receives one result envelope. Its `result.report` contains
the OpenAPI version, operation count, findings, severity counts, limitations,
target details, and optional safe-verification results. The envelope also
contains status, evidence references, warnings, errors, provenance, and timing.
A compact run summary is stored as the `RUN_SUMMARY` key-value-store record.

Representative abbreviated output:

```json
{
  "actor": "api-exposure-auditor",
  "status": "success",
  "target": {"type": "openapi", "identifier": "inline"},
  "result": {
    "report": {
      "openapiVersion": "3.1.0",
      "operationCount": 1,
      "severityCounts": {"info": 0, "low": 0, "medium": 1, "high": 1, "critical": 0},
      "findings": [
        {
          "id": "EXP-AUTH-001",
          "severity": "high",
          "confidence": "high",
          "category": "authentication",
          "method": "GET",
          "path": "/admin/users",
          "title": "Sensitive route explicitly disables authentication",
          "evidence": ["operation.security == [] at GET /admin/users"],
          "remediation": "Require authentication on this route or remove it from the public spec."
        }
      ]
    }
  },
  "warnings": [],
  "errors": []
}
```

Built by Sentinel Signal Systems.

Developer utilities: https://sentinelsignal.io/tools

# Actor input Schema

## `document` (type: `object`):

An inline OpenAPI 3.0 or 3.1 document. Use exactly one input source.

## `yaml` (type: `string`):

An inline UTF-8 OpenAPI YAML document. Use exactly one input source.

## `sourceUrl` (type: `string`):

A public HTTPS URL serving OpenAPI JSON or YAML. Use exactly one input source.

## `baseUrl` (type: `string`):

Public HTTPS origin probed with GET/HEAD/OPTIONS only when verifySafe is enabled. Required only if verifySafe is true.

## `verifySafe` (type: `boolean`):

Issue bounded, read-only requests to confirm live reachability of a small set of operational endpoints.

## `failOn` (type: `string`):

Mark the run status as partial when findings at or above this severity are present.

## Actor input object example

```json
{
  "verifySafe": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `runSummary` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("bmiller1009/api-exposure-auditor").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("bmiller1009/api-exposure-auditor").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call bmiller1009/api-exposure-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bmiller1009/api-exposure-auditor"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/5yuF5BgKmrtFMEfBh/builds/dFcRPK1ltTKwKG3ax/openapi.json
