{
  "openapi": "3.0.1",
  "info": {
    "title": "Agent Security Scanner",
    "description": "Scan AI agent repos, MCP servers, and coding-agent configs for unsafe eval, shell execution, package hallucinations, prompt injection, and MCP security risks.",
    "version": "0.0",
    "x-build-id": "4fZTh8hnuK0uXMyhw"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/folkloric_morale~agent-security-scanner/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-folkloric_morale-agent-security-scanner",
        "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/folkloric_morale~agent-security-scanner/runs": {
      "post": {
        "operationId": "runs-sync-folkloric_morale-agent-security-scanner",
        "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/folkloric_morale~agent-security-scanner/run-sync": {
      "post": {
        "operationId": "run-sync-folkloric_morale-agent-security-scanner",
        "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": [
          "target"
        ],
        "properties": {
          "target": {
            "title": "Target",
            "enum": [
              "repository",
              "mcpServer",
              "agentConfig",
              "code"
            ],
            "type": "string",
            "description": "What kind of artifact should ProofLayer scan?",
            "default": "repository"
          },
          "repoUrl": {
            "title": "Repository URL",
            "type": "string",
            "description": "Git repository URL to clone when target is repository or mcpServer."
          },
          "branch": {
            "title": "Branch",
            "type": "string",
            "description": "Optional branch, tag, or ref to clone."
          },
          "mcpConfigUrl": {
            "title": "MCP Config URL",
            "type": "string",
            "description": "URL returning an MCP server.json-style manifest or agent config JSON."
          },
          "mcpConfigJson": {
            "title": "MCP Config JSON",
            "type": "object",
            "description": "Inline MCP manifest or AI client config JSON. Accepts either a JSON object or a JSON string."
          },
          "sourceCode": {
            "title": "Source Code",
            "type": "string",
            "description": "Inline source code to scan when target is code."
          },
          "ruleSets": {
            "title": "Rule Sets",
            "type": "array",
            "description": "Scanner coverage areas to include in the output metadata.",
            "items": {
              "type": "string",
              "enum": [
                "all",
                "code-security",
                "mcp-tool-poisoning",
                "prompt-injection",
                "supply-chain",
                "compliance"
              ],
              "enumTitles": [
                "All",
                "Code security",
                "MCP tool poisoning",
                "Prompt injection",
                "Supply chain",
                "Compliance"
              ]
            },
            "default": [
              "all"
            ]
          },
          "severityThreshold": {
            "title": "Severity Threshold",
            "enum": [
              "info",
              "low",
              "medium",
              "high",
              "critical"
            ],
            "type": "string",
            "description": "Only publish findings at or above this severity.",
            "default": "info"
          },
          "includeRemediation": {
            "title": "Include Remediation",
            "type": "boolean",
            "description": "Include remediation guidance in dataset rows and summary output.",
            "default": true
          },
          "repositoryScanMode": {
            "title": "Repository Scan Mode",
            "enum": [
              "quick",
              "analyzer"
            ],
            "type": "string",
            "description": "Use quick for fast rule-based repository results. Use analyzer for deeper per-file analysis with a higher runtime cost.",
            "default": "quick"
          },
          "includeTestFiles": {
            "title": "Include Test, Demo, and Fixture Files",
            "type": "boolean",
            "description": "Include tests, demos, benchmarks, and fixtures in repository scans. Disabled by default to reduce noisy findings from intentionally vulnerable examples.",
            "default": false
          },
          "maxRepositoryFiles": {
            "title": "Max Repository Files",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum number of source files to scan for repository targets. Lower values finish faster on large repositories; maximum is 500.",
            "default": 150
          },
          "perFileTimeoutSeconds": {
            "title": "Per-file Timeout Seconds",
            "minimum": 1,
            "maximum": 120,
            "type": "integer",
            "description": "Maximum time to spend on any single repository file before recording a scan error and moving on.",
            "default": 30
          }
        }
      },
      "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
                  }
                }
              },
              "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}