{
  "openapi": "3.0.1",
  "info": {
    "title": "MCPGuard Security Auditor",
    "description": null,
    "version": "0.0",
    "x-build-id": "rE0ZVM6ebGRqh334j"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zluowa~mcpguard-security-auditor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zluowa-mcpguard-security-auditor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/zluowa~mcpguard-security-auditor/runs": {
      "post": {
        "operationId": "runs-sync-zluowa-mcpguard-security-auditor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/zluowa~mcpguard-security-auditor/run-sync": {
      "post": {
        "operationId": "run-sync-zluowa-mcpguard-security-auditor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "action"
        ],
        "properties": {
          "action": {
            "title": "Audit Action",
            "enum": [
              "audit-mcp",
              "audit-rules",
              "audit-repo-bundle",
              "circuit-break"
            ],
            "type": "string",
            "description": "Choose which deterministic engine to run: audit-mcp ($0.02), audit-rules ($0.02), audit-repo-bundle ($0.04), or circuit-break ($0.01). Platform start event is $0.001 (includes 5s free compute).",
            "default": "audit-mcp"
          },
          "mcpConfig": {
            "title": "MCP Config (JSON/JSONC String)",
            "type": "string",
            "description": "Required for action=audit-mcp. Paste raw mcp.json, claude_desktop_config.json, .cursor/mcp.json, or JSONC string (API callers may also pass a JSON object)."
          },
          "sourceName": {
            "title": "MCP Config Source Name",
            "type": "string",
            "description": "Optional filename label used in audit-mcp findings and SARIF locations.",
            "default": "mcp.json"
          },
          "rulesContent": {
            "title": "Agent Rules / SKILL.md Content",
            "type": "string",
            "description": "Required for action=audit-rules. Raw UTF-8 text of AGENTS.md, CLAUDE.md, GEMINI.md, .cursorrules, or SKILL.md."
          },
          "fileName": {
            "title": "Rules File Name",
            "type": "string",
            "description": "Optional filename label for action=audit-rules.",
            "default": "AGENTS.md"
          },
          "mcpConfigs": {
            "title": "MCP Configs Array (Repo Bundle)",
            "type": "array",
            "description": "Used by action=audit-repo-bundle. Array of { path, content } items (JSON/JSONC string or object). Combined file limit: 100 files / 1 MiB."
          },
          "rulesFiles": {
            "title": "Rules Files Array (Repo Bundle)",
            "type": "array",
            "description": "Used by action=audit-repo-bundle. Array of { path, content } UTF-8 rules/SKILL.md files. Combined file limit: 100 files / 1 MiB."
          },
          "targetName": {
            "title": "Repo Bundle Target Name",
            "type": "string",
            "description": "Optional repository or PR name label for action=audit-repo-bundle.",
            "default": "repo-bundle"
          },
          "rawLog": {
            "title": "Agent Run Log (JSONL or JSON Array String)",
            "type": "string",
            "description": "Used by action=circuit-break (alternative to records array). JSONL or JSON array of agent turn events."
          },
          "records": {
            "title": "Agent Run Records (JSON Array)",
            "type": "array",
            "description": "Used by action=circuit-break (alternative to rawLog). Array of agent turn records with tokens, costUsd, agent, ts/at, eventType."
          },
          "maxTokens": {
            "title": "Max Token Cap (Optional)",
            "minimum": 1,
            "maximum": 100000000,
            "type": "integer",
            "description": "Optional. For audit-rules / audit-repo-bundle: Context Bloat warning threshold (defaults to 4000 when omitted). For circuit-break: optional hard token cap (unlimited when omitted so normal runs are never false-tripped)."
          },
          "maxUsd": {
            "title": "Max USD Budget (Circuit Breaker)",
            "minimum": 0,
            "type": "number",
            "description": "Hard USD spend cap for action=circuit-break (default 5.0).",
            "default": 5
          },
          "maxPingPong": {
            "title": "Max Zero-Output Ping-Pong Wakes",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Maximum allowed consecutive zero-revenue/zero-artifact wake events inside pingPongWindowSec before tripping exitCode=3.",
            "default": 4
          },
          "pingPongWindowSec": {
            "title": "Ping-Pong Sliding Window (Seconds)",
            "minimum": 1,
            "maximum": 86400,
            "type": "integer",
            "description": "Sliding window duration in seconds for ping-pong storm detection (default 300).",
            "default": 300
          },
          "includeSarif": {
            "title": "Include SARIF 2.1.0 Output",
            "type": "boolean",
            "description": "Attach a GitHub Code Scanning compatible SARIF 2.1.0 report for audit-mcp, audit-rules, or audit-repo-bundle.",
            "default": false
          },
          "includeMarkdown": {
            "title": "Include PR Markdown Summary",
            "type": "boolean",
            "description": "Attach a ready-to-post GitHub PR Markdown report (action=audit-repo-bundle).",
            "default": false
          },
          "includeSanitized": {
            "title": "Include Sanitized Output",
            "type": "boolean",
            "description": "Attach secret-redacted MCP config (audit-mcp) or invisibles-stripped rules text (audit-rules).",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}