{"openapi":"3.1.0","info":{"title":"GitHub Code Scanning (BYOK) API","version":"0.1.0","description":"GitHub Code Scanning (BYOK) lets an AI assistant read your own GitHub Code Scanning data through the GitHub Code Scanning API with a key you supply (GitHub personal access token (security_events scope, or repo scope)). Read-only: 7 tools (list_org_code_scanning_alerts, list_code_scanning_analyses, get_code_scanning_analysis, list_alert_instances, get_default_setup, list_codeql_databases,...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://byok-github-code-scanning.connectorbay.com/mcp.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/byok-github-code-scanning/docs"},"termsOfService":"https://connectorbay.com/byok-github-code-scanning/terms"},"servers":[{"url":"https://byok-github-code-scanning.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/byok-github-code-scanning/docs"},"security":[{"upstreamKey":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."},"upstreamKey":{"type":"apiKey","in":"header","name":"X-Upstream-Key","description":"Your own key for the service this connector wraps (bring your own key). Used for that one call only; never stored, logged or cached."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/list_org_code_scanning_alerts":{"post":{"operationId":"list_org_code_scanning_alerts","summary":"List code scanning alerts across all repositories of an organization with rule, severity, state, tool and repository; fi","description":"List code scanning alerts across all repositories of an organization with rule, severity, state, tool and repository; filter by state, severity or tool. Use for \"Which open high-severity code scanning alerts does octo-org have\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"org":{"description":"Organization login, for example 'octo-org'.","maxLength":200,"title":"Org","type":"string"},"state":{"anyOf":[{"enum":["open","closed","dismissed","fixed"],"type":"string"},{"type":"null"}],"default":null,"description":"Only alerts in this state.","title":"State"},"severity":{"anyOf":[{"enum":["critical","high","medium","low","warning","note","error"],"type":"string"},{"type":"null"}],"default":null,"description":"Only alerts of this severity.","title":"Severity"},"tool_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only alerts found by the scanning tool with this name, for example CodeQL.","title":"Tool Name"},"sort":{"anyOf":[{"enum":["created","updated"],"type":"string"},{"type":"null"}],"default":"created","description":"Order by created (default) or updated.","title":"Sort"},"direction":{"anyOf":[{"enum":["desc","asc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort direction: desc (default) or asc.","title":"Direction"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return (1 to 100, default 30).","title":"Per Page"},"after":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Cursor from the previous answer's Link header to fetch the next page.","title":"After"}},"required":["org"],"title":"list_org_code_scanning_alertsArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_code_scanning_analyses":{"post":{"operationId":"list_code_scanning_analyses","summary":"List recent code scanning analyses of a repository (one per tool run and ref) with commit, category, result and rule cou","description":"List recent code scanning analyses of a repository (one per tool run and ref) with commit, category, result and rule counts. Use for \"When did CodeQL last analyze octocat/Hello-World and how many results did it find\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"tool_name":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only analyses by the tool with this name, for example CodeQL.","title":"Tool Name"},"ref":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only analyses of this Git ref, for example refs/heads/main.","title":"Ref"},"pr":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only analyses of this pull request number.","title":"Pr"},"direction":{"anyOf":[{"enum":["desc","asc"],"type":"string"},{"type":"null"}],"default":"desc","description":"Sort direction: desc (default) or asc.","title":"Direction"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return (1 to 100, default 30).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["owner","repo"],"title":"list_code_scanning_analysesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_code_scanning_analysis":{"post":{"operationId":"get_code_scanning_analysis","summary":"Get one code scanning analysis by its numeric ID: tool and version, ref, commit, category, result and rule counts, error","description":"Get one code scanning analysis by its numeric ID: tool and version, ref, commit, category, result and rule counts, errors and warnings. Use for \"Describe code scanning analysis 201 of octocat/Hello-World\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"analysis_id":{"description":"Numeric ID of the analysis (from list_code_scanning_analyses).","title":"Analysis Id","type":"integer"}},"required":["owner","repo","analysis_id"],"title":"get_code_scanning_analysisArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_alert_instances":{"post":{"operationId":"list_alert_instances","summary":"List where a code scanning alert occurs: ref, commit, file path, line range, state and message for each instance. Use fo","description":"List where a code scanning alert occurs: ref, commit, file path, line range, state and message for each instance. Use for \"Where does code scanning alert 4 of octocat/Hello-World occur\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"alert_number":{"description":"Alert number as shown at the end of the alert's URL.","title":"Alert Number","type":"integer"},"ref":{"anyOf":[{"maxLength":200,"type":"string"},{"type":"null"}],"default":null,"description":"Only instances on this Git ref, for example refs/heads/main.","title":"Ref"},"pr":{"anyOf":[{"minimum":1,"type":"integer"},{"type":"null"}],"default":null,"description":"Only instances on this pull request number.","title":"Pr"},"per_page":{"anyOf":[{"maximum":100,"minimum":1,"type":"integer"},{"type":"null"}],"default":30,"description":"How many results to return (1 to 100, default 30).","title":"Per Page"},"page":{"anyOf":[{"maximum":10000,"minimum":1,"type":"integer"},{"type":"null"}],"default":1,"description":"Page number, starting at 1.","title":"Page"}},"required":["owner","repo","alert_number"],"title":"list_alert_instancesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_default_setup":{"post":{"operationId":"get_default_setup","summary":"Get a repository's code scanning default setup: whether it is configured, the languages, query suite, runner type and sc","description":"Get a repository's code scanning default setup: whether it is configured, the languages, query suite, runner type and schedule. Use for \"Is code scanning default setup turned on for octocat/Hello-World\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"}},"required":["owner","repo"],"title":"get_default_setupArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_codeql_databases":{"post":{"operationId":"list_codeql_databases","summary":"List the CodeQL databases stored for a repository with language, size, commit and update time. Use for \"Which CodeQL dat","description":"List the CodeQL databases stored for a repository with language, size, commit and update time. Use for \"Which CodeQL databases exist for octocat/Hello-World\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"}},"required":["owner","repo"],"title":"list_codeql_databasesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/get_sarif_upload_status":{"post":{"operationId":"get_sarif_upload_status","summary":"Check whether an uploaded SARIF file has finished processing (pending, complete or failed) and list any processing error","description":"Check whether an uploaded SARIF file has finished processing (pending, complete or failed) and list any processing errors. Use for \"Did SARIF upload 47177e22-5596-11eb-80a1-c1e54ef945c6 finish processing for octocat/Hello-World\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"owner":{"description":"Account that owns the repository (user or organization login), for example 'octocat'.","maxLength":200,"title":"Owner","type":"string"},"repo":{"description":"Repository name without the owner, for example 'Hello-World'.","maxLength":200,"title":"Repo","type":"string"},"sarif_id":{"description":"SARIF ID returned by the upload, a UUID-style string.","maxLength":200,"title":"Sarif Id","type":"string"}},"required":["owner","repo","sarif_id"],"title":"get_sarif_upload_statusArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}