{
    "components": {"schemas":{"exported.EndpointLocation":{"properties":{"action":{"description":"HTTP verb, gRPC RPC method, or GraphQL operation.field","type":"string"},"path":{"description":"URL path, package.service, or GraphQL endpoint","type":"string"},"type":{"description":"\"http\", \"grpc\", or \"graphql\"","type":"string"}},"type":"object"},"exported.FileLocation":{"properties":{"class_name":{"type":"string"},"file_path":{"type":"string"},"function_signature":{"type":"string"},"hash":{"type":"string"},"line_number":{"type":"integer"},"method_name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"exported.Finding":{"properties":{"agent":{"$ref":"#/components/schemas/exported.FindingAgent"},"comments":{"type":"string"},"created_at":{"type":"string"},"details":{"$ref":"#/components/schemas/exported.FindingDetails"},"id":{"type":"string"},"organization_id":{"type":"string"},"project":{"$ref":"#/components/schemas/exported.FindingProject"},"repo":{"$ref":"#/components/schemas/exported.FindingRepo"},"scan_details":{"$ref":"#/components/schemas/exported.ScanDetails"},"status":{"description":"Status and timestamps","type":"string"},"updated_at":{"type":"string"},"user_status":{"type":"string"}},"type":"object"},"exported.FindingAgent":{"description":"Finding Agent details","properties":{"custom_agent_vector_id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"vector":{"type":"string"}},"type":"object"},"exported.FindingDetails":{"description":"Finding Details","properties":{"code":{"type":"string"},"description":{"type":"string"},"endpoint_locations":{"items":{"$ref":"#/components/schemas/exported.EndpointLocation"},"type":"array","uniqueItems":false},"exploit_feasibility":{"type":"string"},"exploit_walkthrough":{"type":"string"},"fixed_code":{"type":"string"},"location":{"$ref":"#/components/schemas/exported.FileLocation"},"remediation":{"type":"string"},"remediation_effort":{"type":"string"},"severity":{"type":"string"},"supporting_files":{"items":{"$ref":"#/components/schemas/exported.FileLocation"},"type":"array","uniqueItems":false},"title":{"type":"string"},"validation_evidence":{"items":{"$ref":"#/components/schemas/exported.FindingValidationEvidence"},"type":"array","uniqueItems":false}},"type":"object"},"exported.FindingProject":{"properties":{"context":{"$ref":"#/components/schemas/exported.FindingProjectContext"},"id":{"type":"string"},"name":{"type":"string"},"purpose":{"type":"string"}},"type":"object"},"exported.FindingProjectContext":{"properties":{"business_criticality":{"type":"string"},"deployment":{"type":"string"},"exposure":{"type":"string"},"owner":{"type":"string"},"sensitive_data_types":{"items":{"type":"string"},"type":"array","uniqueItems":false}},"type":"object"},"exported.FindingRepo":{"description":"Repo and project details","properties":{"id":{"type":"string"},"name":{"type":"string"},"provider":{"type":"string"},"url":{"type":"string"}},"type":"object"},"exported.FindingValidationEvidence":{"properties":{"criteria":{"type":"string"},"rationale":{"type":"string"}},"type":"object"},"exported.Project":{"properties":{"business_criticality":{"type":"string"},"cast_scan_enabled":{"type":"boolean"},"components":{"items":{"$ref":"#/components/schemas/exported.ProjectComponent"},"type":"array","uniqueItems":false},"created_at":{"type":"string"},"dependencies_file":{"type":"string"},"deployment_usage":{"type":"string"},"deployments":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"enabled":{"type":"boolean"},"evidence":{"type":"string"},"exposure":{"type":"string"},"file_extensions":{"items":{"type":"string"},"type":"array","uniqueItems":false},"findings_count":{"type":"integer"},"frameworks":{"items":{"type":"string"},"type":"array","uniqueItems":false},"has_custom_metadata":{"type":"boolean"},"id":{"type":"string"},"languages":{"items":{"type":"string"},"type":"array","uniqueItems":false},"last_committed_at":{"type":"string"},"last_scan_id":{"type":"string"},"last_scan_status":{"type":"string"},"last_scanned_at":{"type":"string"},"organization_id":{"type":"string"},"owner":{"type":"string"},"primary_framework":{"type":"string"},"primary_language":{"type":"string"},"provider":{"type":"string"},"purpose":{"type":"string"},"relative_path":{"type":"string"},"repo":{"$ref":"#/components/schemas/exported.ProjectRepo"},"scanner_business_criticality":{"type":"string"},"scanner_exposure":{"type":"string"},"scanner_summary":{"type":"string"},"sensitive_data_types":{"items":{"type":"string"},"type":"array","uniqueItems":false},"size":{"type":"integer"},"summary":{"type":"string"},"updated_at":{"type":"string"},"user_business_criticality":{"type":"string"},"user_exposure":{"type":"string"},"user_summary":{"type":"string"}},"type":"object"},"exported.ProjectComponent":{"properties":{"criticality":{"type":"number"},"description":{"type":"string"},"folder_name":{"type":"string"},"type":{"type":"string"}},"type":"object"},"exported.ProjectRepo":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"type":"object"},"exported.Repository":{"properties":{"archived":{"type":"boolean"},"cast_scan_enabled":{"type":"boolean"},"clone_url":{"type":"string"},"created_at":{"type":"string"},"default_branch_name":{"type":"string"},"description":{"type":"string"},"full_name":{"type":"string"},"id":{"type":"string"},"installation_id":{"type":"string"},"languages":{"additionalProperties":{"type":"number"},"type":"object"},"last_commit_hash":{"type":"string"},"last_commit_hash_link":{"type":"string"},"last_committed_at":{"type":"string"},"last_scanned_at":{"type":"string"},"name":{"type":"string"},"organization_id":{"type":"string"},"package_findings":{"type":"integer"},"private":{"type":"boolean"},"projects":{"items":{"$ref":"#/components/schemas/exported.Project"},"type":"array","uniqueItems":false},"provider":{"type":"string"},"provider_id":{"type":"string"},"scan_branch":{"type":"string"},"secret_findings":{"type":"integer"},"size":{"type":"integer"},"summary":{"type":"string"},"updated_at":{"type":"string"},"url":{"type":"string"}},"type":"object"},"exported.ScanDetails":{"description":"Scan details","properties":{"analyzed_at":{"type":"string"},"rejected_at":{"type":"string"},"scan_id":{"type":"string"},"verified_at":{"type":"string"}},"type":"object"},"types.ErrorBadRequest":{"description":"Error response for bad requests","properties":{"error":{"description":"Error message","example":"Invalid request body","type":"string"}},"type":"object"},"types.ErrorInternalServerError":{"description":"Error response for internal server errors","properties":{"error":{"description":"Error message","example":"Internal server error","type":"string"}},"type":"object"},"types.ErrorNotFound":{"properties":{"error":{"description":"Error message","example":"Resource not found","type":"string"}},"type":"object"},"types.ErrorResponse":{"description":"Error response","properties":{"error":{"description":"Error message","example":"Request error","type":"string"}},"type":"object"},"types.ErrorUnauthorized":{"description":"Error response for unauthorized requests","properties":{"error":{"description":"Error message","example":"Unauthorized","type":"string"}},"type":"object"},"types.Finding":{"description":"Security finding information","properties":{"agent_name":{"description":"Name of the security agent that found this issue","example":"race","type":"string"},"attack_feasibility":{"description":"Assessment of how feasible an attack would be","enum":["easy","medium","hard"],"example":"easy","type":"string"},"attack_walkthrough":{"description":"Step-by-step attack walkthrough","example":"1. The attacker authenticates as a valid user and identifies two accounts they control.\n2. The attacker crafts multiple concurrent POST requests to the /api/v3/transfer endpoint.","type":"string"},"class":{"description":"Vulnerability class/category","example":"race","type":"string"},"confidence":{"description":"Confidence level of the finding","enum":["high","medium","low"],"example":"high","type":"string"},"created_at":{"description":"When the finding was created","example":"2025-05-29T22:27:39.047356Z","type":"string"},"description":{"description":"Detailed description of the finding","example":"The MakeTransfer handler performs a read-modify-write sequence on account balances without any locking or database transaction, making it vulnerable to race conditions.","type":"string"},"endpoint_method":{"description":"HTTP method of the vulnerable endpoint","example":"POST","type":"string"},"endpoint_path":{"description":"Path of the vulnerable endpoint","example":"/api/v3/transfer","type":"string"},"fixed_code_block":{"description":"Code snippet showing the fix","example":"tx := db.Begin()\nres := tx.Clauses(clause.Locking{Strength: \"UPDATE\"}).Where(\u0026models.Account{\n\tToken:     input.AccountFrom,\n\tPartition: currentUser.Partition,\n}).First(\u0026source)","type":"string"},"handler_class_name":{"description":"Handler class name where the vulnerability exists","example":"ApiController","type":"string"},"handler_method_name":{"description":"Handler method name where the vulnerability exists","example":"MakeTransfer","type":"string"},"id":{"description":"Finding ID","example":"race-3f1174136e93fdf8d26511869343804fddcfeb0a948aa81aafa352f3612dd500","type":"string"},"location":{"$ref":"#/components/schemas/types.Location"},"name":{"description":"Finding name/title","example":"Race condition in account balance update allows overdrawing via concurrent transfers","type":"string"},"project":{"$ref":"#/components/schemas/types.ProjectContext"},"project_id":{"description":"Project ID where the finding was discovered","example":"5d41402abc4b2a76b9719d911017c592","type":"string"},"remediation":{"description":"Recommended remediation steps","example":"Wrap the balance check and update logic in a database transaction and use row-level locking (e.g., SELECT ... FOR UPDATE) to prevent concurrent modifications.","type":"string"},"remediation_effort":{"description":"Estimated effort to fix the issue","enum":["easy","medium","hard"],"example":"easy","type":"string"},"repo_commit_hash":{"description":"Commit hash where the finding was discovered","example":"981be7365cc7b7da32d5ab28e635f6d35b0ff4f1","type":"string"},"repo_id":{"description":"Repository ID where the finding was discovered","example":"1e7d8c9b-ce80-41ae-8645-5b2a89165615-gitlab-69265683","type":"string"},"repo_url":{"description":"Repository URL","example":"https://gitlab.com/ghostsecurity/ghostbank-go","type":"string"},"secret_type":{"description":"Type of secret for secret findings","example":"api_key","type":"string"},"severity":{"description":"Severity level","enum":["high","medium","low"],"example":"high","type":"string"},"status":{"description":"Current status of the finding","enum":["open","open_muted","closed"],"example":"open","type":"string"},"supporting_files":{"description":"Additional files that support this finding","items":{"$ref":"#/components/schemas/types.Location"},"type":"array","uniqueItems":false},"updated_at":{"description":"When the finding was last updated","example":"2025-05-29T22:27:39.047356Z","type":"string"},"user_status":{"description":"Current user status of the finding","enum":["open","active","muted"],"example":"active","type":"string"},"vulnerable_code_block":{"description":"Code snippet showing the vulnerability","example":"// find source account\nres := db.Where(\u0026models.Account{\n\tToken:     input.AccountFrom,\n\tPartition: currentUser.Partition,\n}).First(\u0026source)","type":"string"}},"type":"object"},"types.FindingsCountResponse":{"description":"Findings count response","properties":{"count":{"description":"Total count of findings matching the filters","example":42,"type":"integer"}},"type":"object"},"types.Framework":{"description":"Framework information","properties":{"language":{"description":"Programming language","example":"Go","type":"string"},"name":{"description":"Framework name","example":"gin","type":"string"}},"type":"object"},"types.Location":{"description":"Location of the vulnerability in the code","properties":{"file_path":{"description":"File path relative to repository root","example":"handlers/transfers.go","type":"string"},"hash":{"description":"Hash of the file content for integrity","example":"70a9f266f7e90b1ea18bd82ed6700128c3da974e95d6d19cae7844b2de44038a","type":"string"},"line":{"description":"Line number in the file","example":23,"type":"integer"},"url":{"description":"Direct URL to the file at the specific line in the repository","example":"https://gitlab.com/ghostsecurity/ghostbank-go/-/blob/981be7365cc7b7da32d5ab28e635f6d35b0ff4f1/handlers/transfers.go#L23","type":"string"}},"type":"object"},"types.PaginatedResponse-exported_Finding":{"properties":{"has_more":{"description":"Indicates if there are more items available","example":true,"type":"boolean"},"items":{"description":"The response items","items":{"$ref":"#/components/schemas/exported.Finding"},"type":"array","uniqueItems":false},"next_cursor":{"description":"Cursor for the next page","example":"eyJzb3J0X3ZhbHVlIjoiMjAyNC0wMS0xNVQxMDozMDowMFoiLCJkb2N1bWVudF9pZCI6InJlcG8xMjMiLCJzb3J0X2ZpZWxkIjoiY3JlYXRlZF9hdCJ9","type":"string"},"total":{"description":"Total count of items (if available)","example":250,"type":"integer"}},"type":"object"},"types.PaginatedResponse-exported_Project":{"properties":{"has_more":{"description":"Indicates if there are more items available","example":true,"type":"boolean"},"items":{"description":"The response items","items":{"$ref":"#/components/schemas/exported.Project"},"type":"array","uniqueItems":false},"next_cursor":{"description":"Cursor for the next page","example":"eyJzb3J0X3ZhbHVlIjoiMjAyNC0wMS0xNVQxMDozMDowMFoiLCJkb2N1bWVudF9pZCI6InJlcG8xMjMiLCJzb3J0X2ZpZWxkIjoiY3JlYXRlZF9hdCJ9","type":"string"},"total":{"description":"Total count of items (if available)","example":250,"type":"integer"}},"type":"object"},"types.PaginatedResponse-exported_Repository":{"properties":{"has_more":{"description":"Indicates if there are more items available","example":true,"type":"boolean"},"items":{"description":"The response items","items":{"$ref":"#/components/schemas/exported.Repository"},"type":"array","uniqueItems":false},"next_cursor":{"description":"Cursor for the next page","example":"eyJzb3J0X3ZhbHVlIjoiMjAyNC0wMS0xNVQxMDozMDowMFoiLCJkb2N1bWVudF9pZCI6InJlcG8xMjMiLCJzb3J0X2ZpZWxkIjoiY3JlYXRlZF9hdCJ9","type":"string"},"total":{"description":"Total count of items (if available)","example":250,"type":"integer"}},"type":"object"},"types.PaginatedResponse-types_Finding":{"properties":{"has_more":{"description":"Indicates if there are more items available","example":true,"type":"boolean"},"items":{"description":"The response items","items":{"$ref":"#/components/schemas/types.Finding"},"type":"array","uniqueItems":false},"next_cursor":{"description":"Cursor for the next page","example":"eyJzb3J0X3ZhbHVlIjoiMjAyNC0wMS0xNVQxMDozMDowMFoiLCJkb2N1bWVudF9pZCI6InJlcG8xMjMiLCJzb3J0X2ZpZWxkIjoiY3JlYXRlZF9hdCJ9","type":"string"},"total":{"description":"Total count of items (if available)","example":250,"type":"integer"}},"type":"object"},"types.PaginatedResponse-types_Repository":{"properties":{"has_more":{"description":"Indicates if there are more items available","example":true,"type":"boolean"},"items":{"description":"The response items","items":{"$ref":"#/components/schemas/types.Repository"},"type":"array","uniqueItems":false},"next_cursor":{"description":"Cursor for the next page","example":"eyJzb3J0X3ZhbHVlIjoiMjAyNC0wMS0xNVQxMDozMDowMFoiLCJkb2N1bWVudF9pZCI6InJlcG8xMjMiLCJzb3J0X2ZpZWxkIjoiY3JlYXRlZF9hdCJ9","type":"string"},"total":{"description":"Total count of items (if available)","example":250,"type":"integer"}},"type":"object"},"types.PaginatedResponse-types_Review":{"properties":{"has_more":{"description":"Indicates if there are more items available","example":true,"type":"boolean"},"items":{"description":"The response items","items":{"$ref":"#/components/schemas/types.Review"},"type":"array","uniqueItems":false},"next_cursor":{"description":"Cursor for the next page","example":"eyJzb3J0X3ZhbHVlIjoiMjAyNC0wMS0xNVQxMDozMDowMFoiLCJkb2N1bWVudF9pZCI6InJlcG8xMjMiLCJzb3J0X2ZpZWxkIjoiY3JlYXRlZF9hdCJ9","type":"string"},"total":{"description":"Total count of items (if available)","example":250,"type":"integer"}},"type":"object"},"types.Project":{"description":"Project information","properties":{"active":{"description":"Whether the project is active and currently exists in the repository","example":true,"type":"boolean"},"business_criticality":{"enum":["critical","high","medium","low"],"example":"high","type":"string"},"cast_scan_enabled":{"description":"Whether scanning is enabled for this project","example":true,"type":"boolean"},"cast_scan_supported":{"description":"Whether scanning is supported for this project","example":true,"type":"boolean"},"deployments":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"endpoints_count":{"description":"Number of API endpoints","example":11,"type":"integer"},"exposure":{"enum":["internal","external","hybrid"],"example":"external","type":"string"},"findings_count":{"description":"Number of security findings","example":5,"type":"integer"},"has_custom_metadata":{"type":"boolean"},"id":{"description":"Project ID (generated from path, language, and framework)","example":"5d41402abc4b2a76b9719d911017c592","type":"string"},"last_scan_id":{"description":"ID of the last scan that was run","example":"123e4567-e89b-12d3-a456-426614174000","type":"string"},"last_scan_status":{"description":"Status of the last scan","enum":["completed","failed"],"example":"success","type":"string"},"last_scanned_at":{"description":"When the last scan was run","example":"2025-05-29T22:24:59.324066Z","type":"string"},"owner":{"example":"platform-team","type":"string"},"primary_framework":{"description":"Primary framework detected","example":"gin","type":"string"},"primary_language":{"description":"Primary programming language","example":"Go","type":"string"},"purposes":{"description":"Project purposes","items":{"type":"string"},"type":"array","uniqueItems":false},"relative_path":{"description":"Relative path from repository root","example":"./api","type":"string"},"scanner_business_criticality":{"type":"string"},"scanner_exposure":{"type":"string"},"scanner_summary":{"description":"Transparency fields (show both scanner and user values)","type":"string"},"size":{"description":"Project size in KB","example":15420,"type":"integer"},"summary":{"description":"Resolved metadata (user override if set, else scanner value)","example":"Main API service","type":"string"}},"type":"object"},"types.ProjectContext":{"description":"Project context for prioritization and ownership","properties":{"business_criticality":{"example":"critical","type":"string"},"deployments":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"type":"object"},"exposure":{"example":"external","type":"string"},"owner":{"example":"platform-team","type":"string"},"summary":{"example":"Main API service","type":"string"}},"type":"object"},"types.RepoReviewInstructions":{"description":"Repository review instructions","properties":{"created_at":{"description":"When the instructions were created","example":"2025-05-29T22:27:39.047356Z","type":"string"},"enabled":{"description":"Whether the instructions are enabled","example":true,"type":"boolean"},"instructions":{"description":"Custom instructions for code reviews","example":"Focus on security vulnerabilities and follow OWASP guidelines.","type":"string"},"updated_at":{"description":"When the instructions were last updated","example":"2025-05-29T22:27:39.047356Z","type":"string"}},"type":"object"},"types.Repository":{"description":"Repository information","properties":{"archived":{"description":"Whether the repository is archived","example":false,"type":"boolean"},"cast_scan_enabled":{"description":"Whether scanning is enabled","example":true,"type":"boolean"},"cast_scan_supported":{"description":"Whether scanning is supported","example":true,"type":"boolean"},"created_at":{"description":"When the repository was created","example":"2025-05-29T22:24:59.324066Z","type":"string"},"default_branch_name":{"description":"Default branch name","example":"main","type":"string"},"description":{"description":"Repository description","example":"Ghostbank Go API","type":"string"},"endpoints_count":{"description":"Number of API endpoints","example":11,"type":"integer"},"findings_count":{"description":"Number of security findings","example":5,"type":"integer"},"frameworks":{"description":"Frameworks detected in the repository","items":{"$ref":"#/components/schemas/types.Framework"},"type":"array","uniqueItems":false},"full_name":{"description":"Full repository name including organization","example":"ghostsecurity/ghostbank-go","type":"string"},"id":{"description":"Repository ID in format {org-id}-{provider}-{provider-id}","example":"1e7d8c9b-ce80-41ae-8645-5b2a89165615-gitlab-69265683","type":"string"},"installation_id":{"description":"Installation ID","example":"2e1d9bbc-1db3-4c88-b4c7-e11e311c9a82","type":"string"},"labels":{"description":"Repository labels/tags","items":{"type":"string"},"type":"array","uniqueItems":false},"languages":{"additionalProperties":{"type":"number"},"description":"Programming languages used with percentages","type":"object"},"last_commit_hash":{"description":"Last commit hash","example":"981be7365cc7b7da32d5ab28e635f6d35b0ff4f1","type":"string"},"last_commit_hash_link":{"description":"Link to the last commit","example":"https://gitlab.com/ghost/ghostbank/go/-/tree/981be7365cc7b7da32d5ab28e635f6d35b0ff4f1","type":"string"},"last_committed_at":{"description":"When the last commit was made","example":"2025-05-14T21:00:08Z","type":"string"},"name":{"description":"Repository name","example":"go","type":"string"},"organization_id":{"description":"Organization ID","example":"1e7d8c9b-ce80-41ae-8645-5b2a89165615","type":"string"},"posture":{"description":"Security posture of the apps in this repository","enum":["internal","external","hybrid"],"example":"internal","type":"string"},"primary_framework":{"description":"Primary framework detected","example":"gin","type":"string"},"primary_language":{"description":"Primary programming language","example":"Go","type":"string"},"private":{"description":"Whether the repository is private","example":true,"type":"boolean"},"projects":{"description":"Projects within the repository","items":{"$ref":"#/components/schemas/types.Project"},"type":"array","uniqueItems":false},"provider":{"description":"Provider (github, gitlab, etc.)","example":"gitlab","type":"string"},"provider_id":{"description":"Provider-specific repository ID","example":"","type":"string"},"purposes":{"description":"Repository purposes","items":{"type":"string"},"type":"array","uniqueItems":false},"review_minimum_severity":{"description":"Review minimum severity to use for this repository","enum":["high","medium","low"],"example":"high","type":"string"},"review_mode":{"description":"Whether to run code reviews for this repository","enum":["auto","manual","none"],"example":"auto","type":"string"},"scan_branch":{"description":"Branch to scan (if different from default branch)","example":"main","type":"string"},"size":{"description":"Repository size in KB","example":32784,"type":"integer"},"summary":{"description":"Repository summary","example":"This repository contains the Go port of the Ghostbank API, designed primarily as a minimal demonstration of application security vulnerabilities.","type":"string"},"topics":{"description":"Repository topics","items":{"type":"string"},"type":"array","uniqueItems":false},"updated_at":{"description":"When the repository was last updated","example":"2025-05-29T22:24:59.324066Z","type":"string"},"url":{"description":"Repository URL","example":"https://gitlab.com/ghostsecurity/ghostbank-go","type":"string"}},"type":"object"},"types.Review":{"description":"Review","properties":{"closed_issue_count":{"example":0,"type":"integer"},"created_at":{"example":"2025-01-01T00:00:00Z","type":"string"},"id":{"example":"csUT18jx0mY","type":"string"},"last_review_at":{"example":"2025-01-01T00:00:00Z","type":"string"},"open_high_count":{"example":0,"type":"integer"},"open_issue_count":{"example":0,"type":"integer"},"open_low_count":{"example":0,"type":"integer"},"open_medium_count":{"example":0,"type":"integer"},"pr_author":{"example":"author","type":"string"},"pr_link":{"example":"https://github.com/owner/repo/pull/1","type":"string"},"pr_number":{"example":1,"type":"integer"},"pr_status":{"example":"open","type":"string"},"pr_title":{"example":"Fix bug","type":"string"},"provider":{"example":"github","type":"string"},"repo_id":{"example":"08PB3zptlr8","type":"string"},"repo_name":{"example":"repo","type":"string"},"repo_owner":{"example":"owner","type":"string"},"repo_url":{"example":"https://github.com/owner/repo","type":"string"},"status_override_available":{"example":true,"type":"boolean"},"updated_at":{"example":"2025-01-01T00:00:00Z","type":"string"}},"type":"object"},"types.ReviewIssue":{"description":"Review issue","properties":{"commit_link":{"example":"https://github.com/owner/repo/commit/abc123","type":"string"},"commit_sha":{"example":"abc123","type":"string"},"created_at":{"example":"2025-01-01T00:00:00Z","type":"string"},"description":{"example":"This is a SQL injection vulnerability","type":"string"},"file_location_link":{"example":"https://github.com/owner/repo/blob/abc123/path/to/file#L42","type":"string"},"file_path":{"example":"/path/to/file","type":"string"},"first_seen_at":{"example":"2025-01-01T00:00:00Z","type":"string"},"id":{"example":"csUT18jx0mY","type":"string"},"last_seen_at":{"example":"2025-01-01T00:00:00Z","type":"string"},"line_number":{"example":42,"type":"integer"},"pr_number":{"example":1,"type":"integer"},"provider":{"example":"github","type":"string"},"repo_id":{"example":"08PB3zptlr8","type":"string"},"repo_name":{"example":"repo","type":"string"},"repo_owner":{"example":"owner","type":"string"},"resolved_at":{"example":"2025-01-01T00:00:00Z","type":"string"},"resolved_by":{"description":"commit SHA","example":"abc123","type":"string"},"review_id":{"example":"csUT18jx0mY","type":"string"},"seen_in_commits":{"example":["5ecf8d2","c13901b"],"items":{"type":"string"},"type":"array","uniqueItems":false},"severity":{"example":"high","type":"string"},"status":{"description":"\"open\", \"resolved\"","example":"open","type":"string"},"title":{"example":"SQL Injection Vulnerability","type":"string"},"updated_at":{"example":"2025-01-01T00:00:00Z","type":"string"}},"type":"object"},"types.UpdateFindingUserStatusRequest":{"description":"Finding user status update request","properties":{"comments":{"description":"Triage comments for the finding","example":"Confirmed with team, real issue","type":"string"},"project_id":{"example":"yhD3A3O2IZY","type":"string"},"repo_id":{"description":"Optional organization and project IDs for v2 API compatibility","example":"08PB3zptlr8","type":"string"},"user_status":{"description":"The new user status for the finding","enum":["open","active","muted"],"example":"active","type":"string"}},"type":"object"},"types.UpdateRepoRequest":{"description":"Repository update request","properties":{"enabled":{"description":"Whether to enable Exorcist scanning for this repository and any projects within it","example":true,"type":"boolean"},"posture":{"description":"Security posture of the apps in this repository","enum":["internal","external","hybrid"],"example":"internal","type":"string"},"review_minimum_severity":{"description":"Review minimum severity to use for this repository","enum":["high","medium","low"],"example":"high","type":"string"},"review_mode":{"description":"Whether to run code reviews for this repository","enum":["auto","manual","none"],"example":"auto","type":"string"},"scan_branch":{"description":"Branch to scan (if different from default branch)","example":"main","maxLength":128,"minLength":3,"type":"string"}},"type":"object"},"types.UpdateRepoReviewInstructionsRequest":{"description":"Repository review instructions update request","properties":{"enabled":{"description":"Whether the instructions are enabled","type":"boolean"},"instructions":{"description":"Custom instructions for code reviews (max 2500 characters)","maxLength":2500,"type":"string"}},"type":"object"},"types.VerifyWebhookPayloadRequest":{"description":"Webhook payload verification request","properties":{"payload":{"type":"string"},"signature":{"type":"string"}},"required":["payload","signature"],"type":"object"},"types.VerifyWebhookPayloadResponse":{"description":"Webhook payload verification response","properties":{"delivery_id":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"valid":{"type":"boolean"}},"type":"object"}},"securitySchemes":{"bearerauth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"}}},
    "info": {"contact":{"email":"support@ghostsecurity.com","name":"Ghost Security","url":"https://ghostsecurity.com/"},"description":"Provide your Bearer token as: Bearer \u003ctoken\u003e","title":"Ghost API","version":"2.0.0"},
    "externalDocs": {"description":"","url":""},
    "paths": {"/v2/findings":{"get":{"description":"Get a paginated list of security findings. Can be scoped to a specific repository or project using query parameters.","parameters":[{"description":"Pagination cursor","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Sort field","in":"query","name":"sort","schema":{"default":"created_at","enum":["created_at","updated_at"],"type":"string"}},{"description":"Sort order","in":"query","name":"order","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Page size","in":"query","name":"size","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Filter by status","in":"query","name":"status","schema":{"enum":["open","active","muted"],"type":"string"}},{"description":"Filter by repository ID","in":"query","name":"repo_id","schema":{"type":"string"}},{"description":"Filter by project ID","in":"query","name":"project_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.PaginatedResponse-exported_Finding"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Get findings","tags":["findings.v2"]}},"/v2/findings/count":{"get":{"description":"Get the total count of findings with optional filters","parameters":[{"description":"Filter by agent name","in":"query","name":"agent","schema":{"type":"string"}},{"description":"Filter by repository ID","in":"query","name":"repo_id","schema":{"type":"string"}},{"description":"Filter by project ID","in":"query","name":"project_id","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.FindingsCountResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Get findings count","tags":["findings.v2"]}},"/v2/findings/{id}":{"patch":{"description":"Update the user defined status of a security finding","parameters":[{"description":"Repository ID","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Project ID","in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Finding ID","in":"path","name":"finding_id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.UpdateFindingUserStatusRequest"}}},"description":"Finding status update data","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/exported.Finding"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorBadRequest"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorNotFound"}}},"description":"Not Found"},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorResponse"}}},"description":"Conflict"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Update finding user status","tags":["findings.v2"]}},"/v2/issues/{id}":{"get":{"description":"Get detailed information about a specific review issue","parameters":[{"description":"Review Issue ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ReviewIssue"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorBadRequest"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorNotFound"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Get review issue","tags":["reviews.v2"]}},"/v2/projects":{"get":{"description":"Get a paginated list of projects for the organization","parameters":[{"description":"Pagination cursor","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Sort field","in":"query","name":"sort","schema":{"default":"created_at","enum":["created_at","updated_at","last_committed_at"],"type":"string"}},{"description":"Sort order","in":"query","name":"order","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Page size","in":"query","name":"size","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.PaginatedResponse-exported_Project"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Get projects","tags":["projects.v2"]}},"/v2/repos":{"get":{"description":"Get a paginated list of repositories for the organization","parameters":[{"description":"Pagination cursor","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Sort field","in":"query","name":"sort","schema":{"default":"created_at","enum":["created_at","updated_at","last_committed_at"],"type":"string"}},{"description":"Sort order","in":"query","name":"order","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Page size","in":"query","name":"size","schema":{"default":100,"maximum":1000,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.PaginatedResponse-exported_Repository"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Get repositories","tags":["repos.v2"]}},"/v2/repos/{id}":{"get":{"description":"Get detaileds about a repository","parameters":[{"description":"Repository ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/exported.Repository"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Get repository","tags":["repos.v2"]},"patch":{"description":"Update repository settings","parameters":[{"description":"Repository ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.UpdateRepoRequest"}}},"description":"Repository update data","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/exported.Repository"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorBadRequest"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Update repository","tags":["repos.v2"]}},"/v2/repos/{id}/instructions/review":{"get":{"description":"Get custom instructions for code reviews on pull requests","parameters":[{"description":"Repository ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.RepoReviewInstructions"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorResponse"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorResponse"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Get repository review instructions","tags":["repos.v2"]},"patch":{"description":"Update custom instructions for code reviews on pull requests","parameters":[{"description":"Repository ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.UpdateRepoReviewInstructionsRequest"}}},"description":"Review instructions data","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.RepoReviewInstructions"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorBadRequest"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorResponse"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Update repository review instructions","tags":["repos.v2"]}},"/v2/repos/{id}/projects/{project_id}":{"get":{"description":"Get detailed information about a specific repository project","parameters":[{"description":"Repository ID","in":"path","name":"id","required":true,"schema":{"type":"string"}},{"description":"Project ID","in":"path","name":"project_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/exported.Project"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorResponse"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Get project","tags":["projects.v2"]}},"/v2/repos/{repo_id}/projects/{project_id}/findings/{finding_id}":{"get":{"description":"Get detailed information about a specific security finding","parameters":[{"description":"Repository ID","in":"path","name":"repo_id","required":true,"schema":{"type":"string"}},{"description":"Project ID","in":"path","name":"project_id","required":true,"schema":{"type":"string"}},{"description":"Finding ID","in":"path","name":"finding_id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/exported.Finding"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorBadRequest"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorNotFound"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Get finding","tags":["findings.v2"]}},"/v2/reviews":{"get":{"description":"Get a paginated list of reviews","parameters":[{"description":"Pagination cursor","in":"query","name":"cursor","schema":{"type":"string"}},{"description":"Sort field","in":"query","name":"sort","schema":{"default":"updated_at","enum":["pr_title","pr_number","pr_status","pr_author","repo_name","open_issue_count","updated_at"],"type":"string"}},{"description":"Sort order","in":"query","name":"order","schema":{"default":"desc","enum":["asc","desc"],"type":"string"}},{"description":"Page size","in":"query","name":"size","schema":{"default":10,"maximum":1000,"minimum":1,"type":"integer"}},{"description":"Filter by start time (RFC3339 format)","in":"query","name":"start_time","schema":{"type":"string"}},{"description":"Filter by end time (RFC3339 format)","in":"query","name":"end_time","schema":{"type":"string"}},{"description":"Filter by PR status (open, closed, merged)","in":"query","name":"status","schema":{"type":"string"}},{"description":"Filter by custom criteria (open_with_issues, merged_with_issues, not_reviewed, reviewed)","in":"query","name":"custom","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.PaginatedResponse-types_Review"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Get reviews","tags":["reviews.v2"]}},"/v2/reviews/{id}":{"get":{"description":"Get detailed information about a specific review","parameters":[{"description":"Review ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.Review"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorBadRequest"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorNotFound"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Get review","tags":["reviews.v2"]}},"/v2/reviews/{id}/issues":{"get":{"description":"Get all issues for a specific review","parameters":[{"description":"Review ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/types.ReviewIssue"},"type":"array"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorBadRequest"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorNotFound"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Get issues for specific review","tags":["reviews.v2"]}},"/v2/webhook-deliveries/{id}/verify":{"post":{"description":"Verify the HMAC-SHA256 signature of a webhook payload against the destination's signing key","parameters":[{"description":"Webhook Delivery ID","in":"path","name":"id","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.VerifyWebhookPayloadRequest"}}},"description":"Payload verification data","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.VerifyWebhookPayloadResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorBadRequest"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorUnauthorized"}}},"description":"Unauthorized"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorNotFound"}}},"description":"Not Found"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/types.ErrorInternalServerError"}}},"description":"Internal Server Error"}},"security":[{"bearerauth":[]}],"summary":"Verify webhook","tags":["integrations.v2"]}}},
    "openapi": "3.1.0",
    "servers": [
        {"description":"Ghost Security API server","url":"https://api.ghostsecurity.ai"}
    ]
}