diff --git a/openapi.json b/openapi.json index 44aa6a9f..4fc3608a 100644 --- a/openapi.json +++ b/openapi.json @@ -44,6 +44,9 @@ { "name": "org-snapshots" }, + { + "name": "alert-policies" + }, { "name": "security-policy" }, @@ -66,10 +69,10 @@ "name": "metadata" }, { - "name": "deprecated" + "name": "events" }, { - "name": "telemetry" + "name": "deprecated" } ], "components": { @@ -288,6 +291,174 @@ }, "description": "Internal server error" }, + "SocketServerFault": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "error": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "message": { + "type": "string", + "description": "", + "default": "" + }, + "details": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "requestId": { + "type": "string", + "description": "Per-request id; also the X-Request-Id header", + "default": "" + }, + "code": { + "type": "string", + "enum": [ + "timeout", + "temporarily_unavailable", + "internal" + ], + "description": "Coarse failure class", + "default": "internal" + }, + "retryable": { + "type": "boolean", + "default": false, + "description": "Whether the same request may succeed on retry" + } + }, + "required": ["code", "requestId", "retryable"] + } + }, + "required": ["details", "message"] + } + }, + "required": ["error"] + } + } + }, + "description": "Internal server error" + }, + "SocketServiceUnavailable": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "error": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "message": { + "type": "string", + "description": "", + "default": "" + }, + "details": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "requestId": { + "type": "string", + "description": "Per-request id; also the X-Request-Id header", + "default": "" + }, + "code": { + "type": "string", + "enum": [ + "timeout", + "temporarily_unavailable", + "internal" + ], + "description": "Coarse failure class", + "default": "internal" + }, + "retryable": { + "type": "boolean", + "default": false, + "description": "Whether the same request may succeed on retry" + } + }, + "required": ["code", "requestId", "retryable"] + } + }, + "required": ["details", "message"] + } + }, + "required": ["error"] + } + } + }, + "description": "Service temporarily unavailable" + }, + "SocketGatewayTimeout": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "error": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "message": { + "type": "string", + "description": "", + "default": "" + }, + "details": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "requestId": { + "type": "string", + "description": "Per-request id; also the X-Request-Id header", + "default": "" + }, + "code": { + "type": "string", + "enum": [ + "timeout", + "temporarily_unavailable", + "internal" + ], + "description": "Coarse failure class", + "default": "internal" + }, + "retryable": { + "type": "boolean", + "default": false, + "description": "Whether the same request may succeed on retry" + } + }, + "required": ["code", "requestId", "retryable"] + } + }, + "required": ["details", "message"] + } + }, + "required": ["error"] + } + } + }, + "description": "Gateway timeout" + }, "SocketConflict": { "content": { "application/json": { @@ -441,6 +612,11 @@ "description": "Hugging Face model, dataset, or space type", "default": "" }, + "publishedAt": { + "type": "string", + "description": "ISO-8601 timestamp of when this package version or artifact was published, when known. Currently populated for PURL types: actions, cargo, composer, go, maven, npm, nuget, openvsx, pypi, and rubygems. Maven and PyPI can use artifact-grain dates when artifact qualifiers identify a concrete artifact; other listed ecosystems use package-version dates.", + "default": "" + }, "alerts": { "type": "array", "items": { @@ -1648,9 +1824,13 @@ "type": "string", "description": "", "default": "" + }, + "retryable": { + "type": "boolean", + "description": "True when the error is transient (timeout or shed resolution) and a retry can succeed. Absent or false means the error is an authoritative verdict for this input." } }, - "required": ["error", "inputPurl"] + "required": ["error", "inputPurl", "retryable"] }, "PurlSummarySchema": { "type": "object", @@ -1805,7 +1985,6 @@ "items": { "type": "object", "additionalProperties": false, - "description": "", "properties": { "type": { "type": "string", @@ -1826,6 +2005,38 @@ "type": "string", "description": "Repository label ID associated with this candidate", "default": "" + }, + "policyId": { + "type": "string", + "description": "ID of the alert policy whose rule matched. Absent when not applicable (alert-policy candidates only)", + "default": "" + }, + "policyName": { + "type": "string", + "description": "Display name of the matched alert policy at evaluation time; null for the default policy. Absent when not applicable (alert-policy candidates only)", + "default": "", + "nullable": true + }, + "ruleId": { + "type": "string", + "description": "ID of the matched alert policy rule: the rule uuid for custom rules, the issue name for baseline rules. Absent when not applicable (alert-policy candidates only)", + "default": "" + }, + "ruleName": { + "type": "string", + "description": "Name of the matched alert policy rule at evaluation time. Absent when not applicable (alert-policy candidates only)", + "default": "" + }, + "ruleIndex": { + "type": "integer", + "description": "0-based position of the matched rule in first-match-wins evaluation order. Absent when not applicable (alert-policy candidates only)", + "default": 0, + "minimum": 0 + }, + "isBaseline": { + "type": "boolean", + "default": false, + "description": "Whether the matched alert policy rule is a baseline rule. Absent when not applicable (alert-policy candidates only)" } }, "required": [ @@ -1840,6 +2051,9 @@ }, "required": ["candidates", "type"] }, + "alertPolicyRule": { + "$ref": "#/components/schemas/SocketAlertPolicyRule" + }, "actionPolicyIndex": { "type": "integer", "description": "Index of the policy rule that triggered this action, for traceability to security policies", @@ -2842,7 +3056,7 @@ "properties": { "type": { "type": "string", - "enum": ["filesystemAccess"] + "enum": ["browserExtensionPermission"] }, "value": { "allOf": [ @@ -2863,13 +3077,18 @@ "additionalProperties": false, "description": "", "properties": { - "module": { + "permission": { "type": "string", "description": "", - "default": "fs" + "default": "" + }, + "permissionType": { + "type": "string", + "description": "", + "default": "" } }, - "required": ["module"] + "required": ["permission", "permissionType"] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -2887,7 +3106,7 @@ "properties": { "type": { "type": "string", - "enum": ["networkAccess"] + "enum": ["browserExtensionHostPermission"] }, "value": { "allOf": [ @@ -2908,13 +3127,18 @@ "additionalProperties": false, "description": "", "properties": { - "module": { + "host": { "type": "string", "description": "", - "default": "net" + "default": "" + }, + "permissionType": { + "type": "string", + "description": "", + "default": "" } }, - "required": ["module"] + "required": ["host", "permissionType"] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -2932,7 +3156,112 @@ "properties": { "type": { "type": "string", - "enum": ["shellAccess"] + "enum": ["browserExtensionWildcardHostPermission"] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "host": { + "type": "string", + "description": "", + "default": "" + }, + "permissionType": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": ["host", "permissionType"] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": ["description", "props"] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": ["browserExtensionContentScript"] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "scriptFile": { + "type": "string", + "description": "", + "default": "" + }, + "matches": { + "type": "string", + "description": "", + "default": "" + }, + "runAt": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": ["matches", "runAt", "scriptFile"] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": ["description", "props"] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": ["filesystemAccess"] }, "value": { "allOf": [ @@ -2956,7 +3285,7 @@ "module": { "type": "string", "description": "", - "default": "child_process" + "default": "fs" } }, "required": ["module"] @@ -2977,7 +3306,97 @@ "properties": { "type": { "type": "string", - "enum": ["debugAccess"] + "enum": ["networkAccess"] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "module": { + "type": "string", + "description": "", + "default": "net" + } + }, + "required": ["module"] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": ["description", "props"] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": ["shellAccess"] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "module": { + "type": "string", + "description": "", + "default": "child_process" + } + }, + "required": ["module"] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": ["description", "props"] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": ["debugAccess"] }, "value": { "allOf": [ @@ -4383,45 +4802,7 @@ "properties": { "type": { "type": "string", - "enum": ["shrinkwrap"] - }, - "value": { - "allOf": [ - { - "$ref": "#/components/schemas/SocketIssueBasics" - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "description": { - "type": "string", - "description": "", - "default": "" - }, - "props": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": {} - }, - "usage": { - "$ref": "#/components/schemas/SocketUsageRef" - } - }, - "required": ["description", "props"] - } - ] - } - } - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": ["tooManyFiles"] + "enum": ["unresolvedYarnDependency"] }, "value": { "allOf": [ @@ -4442,13 +4823,33 @@ "additionalProperties": false, "description": "", "properties": { - "fileCount": { + "manifestFile": { + "type": "string", + "description": "", + "default": "" + }, + "ecosystem": { + "type": "string", + "description": "", + "default": "" + }, + "unresolvedCount": { "type": "integer", "description": "", "default": 0 + }, + "packageNames": { + "type": "string", + "description": "", + "default": "" } }, - "required": ["fileCount"] + "required": [ + "ecosystem", + "manifestFile", + "packageNames", + "unresolvedCount" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -4466,7 +4867,7 @@ "properties": { "type": { "type": "string", - "enum": ["generic"] + "enum": ["unresolvedPomReference"] }, "value": { "allOf": [ @@ -4487,18 +4888,39 @@ "additionalProperties": false, "description": "", "properties": { - "title": { + "manifestFile": { "type": "string", "description": "", "default": "" }, - "description": { + "ecosystem": { + "type": "string", + "description": "", + "default": "" + }, + "referenceKind": { + "type": "string", + "description": "", + "default": "" + }, + "coordinates": { "type": "string", "description": "", "default": "" + }, + "unresolvedCount": { + "type": "integer", + "description": "", + "default": 0 } }, - "required": ["description", "title"] + "required": [ + "coordinates", + "ecosystem", + "manifestFile", + "referenceKind", + "unresolvedCount" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -4516,7 +4938,7 @@ "properties": { "type": { "type": "string", - "enum": ["ghaArgToSink"] + "enum": ["shrinkwrap"] }, "value": { "allOf": [ @@ -4536,32 +4958,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "message": { - "type": "string", - "description": "", - "default": "" - }, - "sourceLocation": { - "type": "object", - "description": "", - "default": null - }, - "sinkLocations": { - "type": "array", - "items": { - "type": "object", - "description": "", - "default": null - }, - "description": "" - } - }, - "required": [ - "message", - "sinkLocations", - "sourceLocation" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -4579,7 +4976,7 @@ "properties": { "type": { "type": "string", - "enum": ["ghaEnvToSink"] + "enum": ["tooManyFiles"] }, "value": { "allOf": [ @@ -4600,31 +4997,13 @@ "additionalProperties": false, "description": "", "properties": { - "message": { - "type": "string", - "description": "", - "default": "" - }, - "sourceLocation": { - "type": "object", + "fileCount": { + "type": "integer", "description": "", - "default": null - }, - "sinkLocations": { - "type": "array", - "items": { - "type": "object", - "description": "", - "default": null - }, - "description": "" + "default": 0 } }, - "required": [ - "message", - "sinkLocations", - "sourceLocation" - ] + "required": ["fileCount"] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -4642,7 +5021,7 @@ "properties": { "type": { "type": "string", - "enum": ["ghaContextToSink"] + "enum": ["generic"] }, "value": { "allOf": [ @@ -4663,31 +5042,18 @@ "additionalProperties": false, "description": "", "properties": { - "message": { + "title": { "type": "string", "description": "", "default": "" }, - "sourceLocation": { - "type": "object", + "description": { + "type": "string", "description": "", - "default": null - }, - "sinkLocations": { - "type": "array", - "items": { - "type": "object", - "description": "", - "default": null - }, - "description": "" + "default": "" } }, - "required": [ - "message", - "sinkLocations", - "sourceLocation" - ] + "required": ["description", "title"] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -4705,7 +5071,7 @@ "properties": { "type": { "type": "string", - "enum": ["ghaArgToOutput"] + "enum": ["ghaArgToSink"] }, "value": { "allOf": [ @@ -4768,7 +5134,196 @@ "properties": { "type": { "type": "string", - "enum": ["ghaArgToEnv"] + "enum": ["ghaEnvToSink"] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "message": { + "type": "string", + "description": "", + "default": "" + }, + "sourceLocation": { + "type": "object", + "description": "", + "default": null + }, + "sinkLocations": { + "type": "array", + "items": { + "type": "object", + "description": "", + "default": null + }, + "description": "" + } + }, + "required": [ + "message", + "sinkLocations", + "sourceLocation" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": ["description", "props"] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": ["ghaContextToSink"] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "message": { + "type": "string", + "description": "", + "default": "" + }, + "sourceLocation": { + "type": "object", + "description": "", + "default": null + }, + "sinkLocations": { + "type": "array", + "items": { + "type": "object", + "description": "", + "default": null + }, + "description": "" + } + }, + "required": [ + "message", + "sinkLocations", + "sourceLocation" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": ["description", "props"] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": ["ghaArgToOutput"] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "message": { + "type": "string", + "description": "", + "default": "" + }, + "sourceLocation": { + "type": "object", + "description": "", + "default": null + }, + "sinkLocations": { + "type": "array", + "items": { + "type": "object", + "description": "", + "default": null + }, + "description": "" + } + }, + "required": [ + "message", + "sinkLocations", + "sourceLocation" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": ["description", "props"] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": ["ghaArgToEnv"] }, "value": { "allOf": [ @@ -10267,6 +10822,8 @@ "cran", "deb", "docker", + "firefox-extension", + "edge-extension", "gem", "generic", "github", @@ -10287,6 +10844,7 @@ "swid", "swift", "vscode", + "vscode-extension", "unknown" ], "description": "Package ecosystem type identifier based on the PURL specification", @@ -10311,6 +10869,53 @@ "description": "", "default": "other" }, + "SocketAlertPolicyRule": { + "type": "object", + "additionalProperties": false, + "description": "The alert policy rule that decided `action`. Included in both normal and `compact=true` responses whenever an alert policy rule decided the action; absent when the action came from any other source. Unrelated to `actionPolicyIndex`, which indexes the legacy security policy", + "properties": { + "policyId": { + "type": "string", + "description": "ID of the alert policy whose rule decided this action: a UUID, or `default` for the default policy until it is first customized", + "default": "" + }, + "policyName": { + "type": "string", + "description": "Display name of that policy at evaluation time; null for the default policy", + "default": "", + "nullable": true + }, + "ruleId": { + "type": "string", + "description": "ID of the rule that decided this action: the rule UUID for custom rules, the alert type name for baseline rules", + "default": "" + }, + "ruleName": { + "type": "string", + "description": "Name of that rule at evaluation time; baseline rules use the alert type name", + "default": "" + }, + "ruleIndex": { + "type": "integer", + "description": "0-based position of the rule in first-match-wins evaluation order (custom rules first, then baseline)", + "default": 0, + "minimum": 0 + }, + "isBaseline": { + "type": "boolean", + "default": false, + "description": "Whether the rule is a baseline rule rather than a custom rule" + } + }, + "required": [ + "isBaseline", + "policyId", + "policyName", + "ruleId", + "ruleIndex", + "ruleName" + ] + }, "SocketPatch": { "type": "object", "additionalProperties": false, @@ -10547,6 +11152,11 @@ "type": "string", "description": "Path to the subproject within the workspace", "default": "" + }, + "viaPrivateDependency": { + "type": "boolean", + "default": false, + "description": "For direct_dependency results: the direct importer is a private/unresolvable package in the project rather than the application manifest" } }, "required": ["type"] @@ -11200,7 +11810,7 @@ "basicAuth": ["packages:list"] } ], - "description": "**This endpoint is deprecated.** Deprecated since 2026-01-05.\n\nBatch retrieval of package metadata and alerts by PURL strings. Compatible with CycloneDX reports.\n\nPackage URLs (PURLs) are an ecosystem agnostic way to identify packages.\nCycloneDX SBOMs use the purl format to identify components.\nThis endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report.\n\n**Note:** This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error.\n\nMore information on purl and CycloneDX:\n\n- [`purl` Spec](https://github.com/package-url/purl-spec)\n- [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components)\n\nThis endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate).\nActively running analysis will be returned when available on subsequent runs.\n\nWhen `alerts=true`, Socket may synthesize two alert types to make partial\nresults actionable:\n\n- `pendingScan`: the package is known but analysis has not completed yet\n- `notFound`: Socket could not resolve the package/version metadata\n\nWhen `purlErrors=true`, unresolved `notFound` inputs keep the legacy\n`purlError` stream shape instead of emitting synthetic `notFound`\nartifacts.\n\nUse `poll=false` (default) to fail open and return the current known state\nquickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for\npending analysis before returning.\n\n## Examples:\n\n### Looking up an npm package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n }\n ]\n}\n```\n\n### Looking up an PyPi package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n }\n ]\n}\n```\n\n### Looking up a Maven package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\n### Batch lookup\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n },\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n },\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\nThis endpoint consumes 100 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- packages:list", + "description": "**This endpoint is deprecated.** Deprecated since 2026-01-05.\n\nBatch retrieval of package metadata and alerts by PURL strings. Compatible with CycloneDX reports.\n\nPackage URLs (PURLs) are an ecosystem agnostic way to identify packages.\nCycloneDX SBOMs use the purl format to identify components.\nThis endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report.\n\n**Note:** This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error.\n\nMore information on purl and CycloneDX:\n\n- [`purl` Spec](https://github.com/package-url/purl-spec)\n- [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components)\n\nThis endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate).\nActively running analysis will be returned when available on subsequent runs.\n\nWhen `alerts=true`, Socket may synthesize two alert types to make partial\nresults actionable:\n\n- `pendingScan`: the package is known but analysis has not completed yet\n- `notFound`: Socket could not resolve the package/version metadata\n\nWhen `purlErrors=true`, unresolved `notFound` inputs keep the legacy\n`purlError` stream shape instead of emitting synthetic `notFound`\nartifacts.\n\nUse `poll=false` (default) to fail open and return the current known state\nquickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for\npending analysis before returning.\n\n**Conda (temporary compatibility):** `pkg:conda` inputs are served from the\nalready-scanned PyPI package with the same normalized name and version when\none exists; the response row keeps the original conda PURL in `inputPurl`\nbut reports `type: pypi`. Conda `build`, `subdir`, `type`, and `channel`\nqualifiers are ignored, and conda packages without a scanned PyPI\ncounterpart return the normal `notFound` result. This mapping will be\nreplaced by native conda support.\n\n## Examples:\n\n### Looking up an npm package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n }\n ]\n}\n```\n\n### Looking up an PyPi package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n }\n ]\n}\n```\n\n### Looking up a Maven package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\n### Batch lookup\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n },\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n },\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\nThis endpoint consumes 100 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- packages:list", "responses": { "200": { "content": { @@ -12748,7 +13358,7 @@ "basicAuth": ["full-scans:list"] } ], - "description": "**This endpoint is deprecated.**\n\nGet the difference between two existing Full Scans. The results are not persisted.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- full-scans:list", + "description": "**This endpoint is deprecated.**\n\nGet the immutable difference between two existing Full Scans. The result uses the policies active when it was computed and may be cached for reuse.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- full-scans:list", "responses": { "200": { "content": { @@ -13038,6 +13648,31 @@ }, "description": "The difference between the two provided Full Scans." }, + "202": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "status": { + "type": "string", + "description": "", + "default": "processing" + }, + "id": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": ["id", "status"] + } + } + }, + "description": "Scan is being processed. Repeat the request later to retrieve results." + }, "400": { "$ref": "#/components/responses/SocketBadRequest" }, @@ -13865,9 +14500,15 @@ "type": "string", "description": "", "default": "The status of the new scan" + }, + "mode": { + "type": "string", + "enum": ["shallow", "deep"], + "description": "The rescan mode actually performed. A \"shallow\" request falls back to \"deep\" when the source scan has no cached data.", + "default": "shallow" } }, - "required": ["id", "status"] + "required": ["id", "mode", "status"] } } }, @@ -14283,6 +14924,15 @@ }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" + }, + "500": { + "$ref": "#/components/responses/SocketServerFault" + }, + "503": { + "$ref": "#/components/responses/SocketServiceUnavailable" + }, + "504": { + "$ref": "#/components/responses/SocketGatewayTimeout" } }, "x-readme": {} @@ -14377,6 +15027,15 @@ }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" + }, + "500": { + "$ref": "#/components/responses/SocketServerFault" + }, + "503": { + "$ref": "#/components/responses/SocketServiceUnavailable" + }, + "504": { + "$ref": "#/components/responses/SocketGatewayTimeout" } }, "x-readme": {} @@ -14501,6 +15160,15 @@ }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" + }, + "500": { + "$ref": "#/components/responses/SocketServerFault" + }, + "503": { + "$ref": "#/components/responses/SocketServiceUnavailable" + }, + "504": { + "$ref": "#/components/responses/SocketGatewayTimeout" } }, "x-readme": {} @@ -14786,7 +15454,7 @@ "name": "cached", "in": "query", "required": false, - "description": "Return cached immutable scan results. When enabled and results are cached, returns the pre-computed scan. When results are not yet cached, returns 202 Accepted and enqueues a background job. Note: When cached=true, the omit_license_details parameter is ignored as cached results always includes license details.", + "description": "Enable polling mode for immutable diff scan results. When results are cached, returns the pre-computed scan. When results are not yet cached, returns 202 Accepted and enqueues a background job. Note: When cached=true, the omit_license_details parameter is ignored as cached results always include license details.", "schema": { "type": "boolean", "default": false @@ -16212,7 +16880,7 @@ "name": "on_duplicate", "in": "query", "required": false, - "description": "Set to \"redirect\" to receive a 302 redirect to the existing diff scan instead of a 409 error when a duplicate is detected.", + "description": "Set to \"redirect\" to receive a 302 redirect to the existing diff scan instead of a 409 error when a duplicate is detected. Set to \"update\" to apply the supplied external_href to the existing diff scan and receive it in a 200 response; when external_href is omitted, the existing value is left untouched.", "schema": { "type": "string" } @@ -16228,7 +16896,303 @@ ], "description": "Create a diff scan from two existing full scan IDs. The full scans must be in the same repository.\nReturns metadata about the diff scan. Once the diff scan is created, fetch the diff scan from\nthe [api_url](/reference/getDiffScanById) URL to get the contents of the diff.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n - diff-scans:create\n- full-scans:list", "responses": { - "201": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "diff_scan": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "id": { + "type": "string", + "description": "The ID of the diff scan.", + "default": "" + }, + "organization_id": { + "type": "string", + "description": "The ID of the organization that owns the diff scan.", + "default": "" + }, + "repository_id": { + "type": "string", + "description": "The ID of the repository the diff scan was run against.", + "default": "" + }, + "created_at": { + "type": "string", + "description": "ISO 8601 timestamp of when the diff scan was created.", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "ISO 8601 timestamp of when the diff scan was last updated.", + "default": "" + }, + "before_full_scan": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "id": { + "type": "string", + "description": "", + "default": "" + }, + "created_at": { + "type": "string", + "description": "", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "", + "default": "" + }, + "organization_id": { + "type": "string", + "description": "", + "default": "" + }, + "organization_slug": { + "type": "string", + "description": "", + "default": "" + }, + "repository_id": { + "type": "string", + "description": "", + "default": "" + }, + "repository_slug": { + "type": "string", + "description": "", + "default": "" + }, + "branch": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "commit_message": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "commit_hash": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "pull_request": { + "type": "integer", + "description": "", + "default": 0, + "nullable": true + }, + "committers": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "html_url": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "api_url": { + "type": "string", + "description": "", + "default": "", + "nullable": true + } + }, + "required": [ + "api_url", + "branch", + "commit_hash", + "commit_message", + "committers", + "created_at", + "html_url", + "id", + "organization_id", + "organization_slug", + "pull_request", + "repository_id", + "repository_slug", + "updated_at" + ] + }, + "after_full_scan": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "id": { + "type": "string", + "description": "", + "default": "" + }, + "created_at": { + "type": "string", + "description": "", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "", + "default": "" + }, + "organization_id": { + "type": "string", + "description": "", + "default": "" + }, + "organization_slug": { + "type": "string", + "description": "", + "default": "" + }, + "repository_id": { + "type": "string", + "description": "", + "default": "" + }, + "repository_slug": { + "type": "string", + "description": "", + "default": "" + }, + "branch": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "commit_message": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "commit_hash": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "pull_request": { + "type": "integer", + "description": "", + "default": 0, + "nullable": true + }, + "committers": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "html_url": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "api_url": { + "type": "string", + "description": "", + "default": "", + "nullable": true + } + }, + "required": [ + "api_url", + "branch", + "commit_hash", + "commit_message", + "committers", + "created_at", + "html_url", + "id", + "organization_id", + "organization_slug", + "pull_request", + "repository_id", + "repository_slug", + "updated_at" + ] + }, + "description": { + "type": "string", + "description": "Human readable description of the diff scan, e.g. the pull request title.", + "default": "", + "nullable": true + }, + "external_href": { + "type": "string", + "description": "Link to the external resource the diff scan was created for, e.g. the pull request URL.", + "default": "", + "nullable": true + }, + "merge": { + "type": "boolean", + "default": false, + "description": "True when the diff scan was created for a merge event rather than an open pull request." + }, + "html_url": { + "type": "string", + "description": "Link to the diff scan report in the Socket dashboard.", + "default": "", + "nullable": true + }, + "api_url": { + "type": "string", + "description": "Link to the diff scan resource in the Socket API.", + "default": "", + "nullable": true + } + }, + "required": [ + "after_full_scan", + "api_url", + "before_full_scan", + "created_at", + "description", + "external_href", + "html_url", + "id", + "merge", + "organization_id", + "repository_id", + "updated_at" + ] + } + }, + "required": ["diff_scan"] + } + } + }, + "description": "The existing diff scan when on_duplicate=update is set and a duplicate is detected. If external_href was supplied, it has been applied to the diff scan." + }, + "201": { "content": { "application/json": { "schema": { @@ -17401,7 +18365,7 @@ "basicAuth": ["alert-resolution:list"] } ], - "description": "List active alert resolutions for an organization. Results are paginated via an opaque cursor and ordered by created_at. Each row includes the anchor fields (alert_type, repo, repo_label, artifact_*) that describe the resolution scope.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-resolution:list", + "description": "List active alert resolutions for an organization. Results are paginated via an opaque cursor and ordered by created_at. Each row includes the anchor fields (alert_type, repo, repo_label, artifact_*) that describe the resolution scope. Tokens restricted to specific repositories only see org-wide resolutions and resolutions anchored to their granted repositories.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-resolution:list", "responses": { "200": { "content": { @@ -17446,6 +18410,11 @@ "default": "", "nullable": true }, + "vigil_selector": { + "type": "object", + "description": "The full selector describing which alerts the resolution applies to. The anchor fields below are a derived summary — compound selectors (e.g. `$or` over several repos) cannot be summarized and read back as null anchors, so this is the source of truth.", + "default": null + }, "alert_type": { "type": "string", "description": "Alert type the resolution scopes to (e.g. criticalCVE). Null if the resolution applies to multiple alert types.", @@ -17519,23 +18488,2425 @@ "repo_label", "resolved_by", "updated_at", - "uuid" + "uuid", + "vigil_selector" ] }, "description": "" }, "endCursor": { "type": "string", - "description": "", - "default": "", - "nullable": true + "description": "", + "default": "", + "nullable": true + } + }, + "required": ["endCursor", "items"] + } + } + }, + "description": "Lists alert resolutions for the specified organization." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + }, + "post": { + "tags": ["alerts"], + "summary": "Create Org Alert Resolution", + "operationId": "createOrgAlertResolution", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "dry_run", + "in": "query", + "required": false, + "description": "Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "reason": { + "type": "string", + "enum": [ + "false_positive", + "remediated", + "tolerable_risk", + "other" + ], + "description": "The reason the alert is resolved. One of: false_positive, remediated, tolerable_risk, other." + }, + "vigil_selector": { + "type": "object", + "description": "Selector describing which alerts the resolution applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{\"finding.alertType\": \"criticalCVE\", \"artifact.name\": \"lodash\"}`).", + "default": null + }, + "reason_text": { + "type": "string", + "description": "Free-form reason text, mainly for when `reason` is `other` (1-256 characters).", + "default": "", + "nullable": true + }, + "comment": { + "type": "string", + "description": "Operator-provided comment (1-1024 characters).", + "default": "", + "nullable": true + } + }, + "required": ["reason", "vigil_selector"] + } + } + }, + "required": true + }, + "security": [ + { + "bearerAuth": ["alert-resolution:create"] + }, + { + "basicAuth": ["alert-resolution:create"] + } + ], + "description": "Create an alert resolution. The `vigil_selector` describes which alerts the resolution applies to; matching alerts are hidden after the next org snapshot. Returns the same row shape as the list endpoint. Tokens restricted to specific repositories may only create resolutions anchored to a single granted repository via `location.repo`; org-wide or multi-repository selectors require an org-wide token.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-resolution:create", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "description": "The UUID of the resolution.", + "default": "" + }, + "reason": { + "type": "string", + "enum": [ + "false_positive", + "remediated", + "tolerable_risk", + "other" + ], + "description": "The reason the alert was resolved. One of: false_positive, remediated, tolerable_risk, other.", + "default": "other" + }, + "reason_text": { + "type": "string", + "description": "Free-form reason text when `reason` is `other`.", + "default": "", + "nullable": true + }, + "comment": { + "type": "string", + "description": "Operator-provided comment.", + "default": "", + "nullable": true + }, + "vigil_selector": { + "type": "object", + "description": "The full selector describing which alerts the resolution applies to. The anchor fields below are a derived summary — compound selectors (e.g. `$or` over several repos) cannot be summarized and read back as null anchors, so this is the source of truth.", + "default": null + }, + "alert_type": { + "type": "string", + "description": "Alert type the resolution scopes to (e.g. criticalCVE). Null if the resolution applies to multiple alert types.", + "default": "", + "nullable": true + }, + "repo": { + "type": "string", + "description": "Repository full name the resolution scopes to. Null if not scoped to a single repo.", + "default": "", + "nullable": true + }, + "repo_label": { + "type": "string", + "description": "Repository label the resolution scopes to. Null if not scoped to a label.", + "default": "", + "nullable": true + }, + "artifact_type": { + "type": "string", + "description": "Package ecosystem the resolution scopes to (e.g. npm, pypi). Null if not scoped to a single ecosystem.", + "default": "", + "nullable": true + }, + "artifact_namespace": { + "type": "string", + "description": "Package namespace/scope the resolution scopes to. Null if not scoped to a namespace.", + "default": "", + "nullable": true + }, + "artifact_name": { + "type": "string", + "description": "Package name the resolution scopes to. Null if not scoped to a single package.", + "default": "", + "nullable": true + }, + "artifact_version": { + "type": "string", + "description": "Package version the resolution scopes to. Extracted from the resolution selector at read time; null if the resolution applies to multiple versions or no single version.", + "default": "", + "nullable": true + }, + "resolved_by": { + "type": "string", + "description": "User ID that created the resolution. Null for system-created resolutions.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp.", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp.", + "default": "" + }, + "dry_run": { + "type": "boolean", + "default": false, + "description": "True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted." + } + }, + "required": [ + "alert_type", + "artifact_name", + "artifact_namespace", + "artifact_type", + "artifact_version", + "comment", + "created_at", + "reason", + "reason_text", + "repo", + "repo_label", + "resolved_by", + "updated_at", + "uuid", + "vigil_selector" + ] + } + } + }, + "description": "Dry-run: the write was not persisted." + }, + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "description": "The UUID of the resolution.", + "default": "" + }, + "reason": { + "type": "string", + "enum": [ + "false_positive", + "remediated", + "tolerable_risk", + "other" + ], + "description": "The reason the alert was resolved. One of: false_positive, remediated, tolerable_risk, other.", + "default": "other" + }, + "reason_text": { + "type": "string", + "description": "Free-form reason text when `reason` is `other`.", + "default": "", + "nullable": true + }, + "comment": { + "type": "string", + "description": "Operator-provided comment.", + "default": "", + "nullable": true + }, + "vigil_selector": { + "type": "object", + "description": "The full selector describing which alerts the resolution applies to. The anchor fields below are a derived summary — compound selectors (e.g. `$or` over several repos) cannot be summarized and read back as null anchors, so this is the source of truth.", + "default": null + }, + "alert_type": { + "type": "string", + "description": "Alert type the resolution scopes to (e.g. criticalCVE). Null if the resolution applies to multiple alert types.", + "default": "", + "nullable": true + }, + "repo": { + "type": "string", + "description": "Repository full name the resolution scopes to. Null if not scoped to a single repo.", + "default": "", + "nullable": true + }, + "repo_label": { + "type": "string", + "description": "Repository label the resolution scopes to. Null if not scoped to a label.", + "default": "", + "nullable": true + }, + "artifact_type": { + "type": "string", + "description": "Package ecosystem the resolution scopes to (e.g. npm, pypi). Null if not scoped to a single ecosystem.", + "default": "", + "nullable": true + }, + "artifact_namespace": { + "type": "string", + "description": "Package namespace/scope the resolution scopes to. Null if not scoped to a namespace.", + "default": "", + "nullable": true + }, + "artifact_name": { + "type": "string", + "description": "Package name the resolution scopes to. Null if not scoped to a single package.", + "default": "", + "nullable": true + }, + "artifact_version": { + "type": "string", + "description": "Package version the resolution scopes to. Extracted from the resolution selector at read time; null if the resolution applies to multiple versions or no single version.", + "default": "", + "nullable": true + }, + "resolved_by": { + "type": "string", + "description": "User ID that created the resolution. Null for system-created resolutions.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp.", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp.", + "default": "" + }, + "dry_run": { + "type": "boolean", + "default": false, + "description": "True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted." + } + }, + "required": [ + "alert_type", + "artifact_name", + "artifact_namespace", + "artifact_type", + "artifact_version", + "comment", + "created_at", + "reason", + "reason_text", + "repo", + "repo_label", + "resolved_by", + "updated_at", + "uuid", + "vigil_selector" + ] + } + } + }, + "description": "The created alert resolution." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "409": { + "$ref": "#/components/responses/SocketConflict" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/alerts/resolutions/{uuid}": { + "get": { + "tags": ["alerts"], + "summary": "Get Org Alert Resolution", + "operationId": "getOrgAlertResolution", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "uuid", + "in": "path", + "required": true, + "description": "The UUID of the alert resolution to fetch", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "bearerAuth": ["alert-resolution:read"] + }, + { + "basicAuth": ["alert-resolution:read"] + } + ], + "description": "Fetch a single active alert resolution by UUID. Returns the same row shape as the list endpoint. Tokens restricted to specific repositories cannot read resolutions anchored to repositories outside their grants.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-resolution:read", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "uuid": { + "type": "string", + "description": "The UUID of the resolution.", + "default": "" + }, + "reason": { + "type": "string", + "enum": [ + "false_positive", + "remediated", + "tolerable_risk", + "other" + ], + "description": "The reason the alert was resolved. One of: false_positive, remediated, tolerable_risk, other.", + "default": "other" + }, + "reason_text": { + "type": "string", + "description": "Free-form reason text when `reason` is `other`.", + "default": "", + "nullable": true + }, + "comment": { + "type": "string", + "description": "Operator-provided comment.", + "default": "", + "nullable": true + }, + "vigil_selector": { + "type": "object", + "description": "The full selector describing which alerts the resolution applies to. The anchor fields below are a derived summary — compound selectors (e.g. `$or` over several repos) cannot be summarized and read back as null anchors, so this is the source of truth.", + "default": null + }, + "alert_type": { + "type": "string", + "description": "Alert type the resolution scopes to (e.g. criticalCVE). Null if the resolution applies to multiple alert types.", + "default": "", + "nullable": true + }, + "repo": { + "type": "string", + "description": "Repository full name the resolution scopes to. Null if not scoped to a single repo.", + "default": "", + "nullable": true + }, + "repo_label": { + "type": "string", + "description": "Repository label the resolution scopes to. Null if not scoped to a label.", + "default": "", + "nullable": true + }, + "artifact_type": { + "type": "string", + "description": "Package ecosystem the resolution scopes to (e.g. npm, pypi). Null if not scoped to a single ecosystem.", + "default": "", + "nullable": true + }, + "artifact_namespace": { + "type": "string", + "description": "Package namespace/scope the resolution scopes to. Null if not scoped to a namespace.", + "default": "", + "nullable": true + }, + "artifact_name": { + "type": "string", + "description": "Package name the resolution scopes to. Null if not scoped to a single package.", + "default": "", + "nullable": true + }, + "artifact_version": { + "type": "string", + "description": "Package version the resolution scopes to. Extracted from the resolution selector at read time; null if the resolution applies to multiple versions or no single version.", + "default": "", + "nullable": true + }, + "resolved_by": { + "type": "string", + "description": "User ID that created the resolution. Null for system-created resolutions.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp.", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp.", + "default": "" + } + }, + "required": [ + "alert_type", + "artifact_name", + "artifact_namespace", + "artifact_type", + "artifact_version", + "comment", + "created_at", + "reason", + "reason_text", + "repo", + "repo_label", + "resolved_by", + "updated_at", + "uuid", + "vigil_selector" + ] + } + } + }, + "description": "The requested alert resolution." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + }, + "delete": { + "tags": ["alerts"], + "summary": "Delete Org Alert Resolution", + "operationId": "deleteOrgAlertResolution", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "uuid", + "in": "path", + "required": true, + "description": "The UUID of the alert resolution to delete", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "bearerAuth": ["alert-resolution:delete"] + }, + { + "basicAuth": ["alert-resolution:delete"] + } + ], + "description": "Delete an alert resolution by UUID. Once deleted, alerts previously hidden by this resolution will reappear after the next org snapshot. Tokens restricted to specific repositories may only delete resolutions anchored to a granted repository.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-resolution:delete", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "result": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": ["result"] + } + } + }, + "description": "Deleted Alert Resolution" + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/alert-policies": { + "get": { + "tags": ["alert-policies"], + "summary": "List Org Alert Policies", + "operationId": "getOrgAlertPolicies", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "bearerAuth": ["alert-policy:list"] + }, + { + "basicAuth": ["alert-policy:list"] + } + ], + "description": "List the alert policies of an organization. The default policy (which applies to all repositories without a policy label) is always first, followed by custom policies ordered by creation time. Requires a token with org-wide repository access; repo-restricted tokens receive 403.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-policy:list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "id": { + "type": "string", + "description": "The ID of the policy: a UUID, or `default` for the default policy until it is first customized.", + "default": "" + }, + "name": { + "type": "string", + "description": "The policy name. Null for the default policy, which applies to all repositories without a policy label.", + "default": "", + "nullable": true + }, + "description": { + "type": "string", + "description": "Operator-provided description.", + "default": "", + "nullable": true + }, + "apply_method": { + "type": "string", + "enum": ["labeled_repos", "unlabeled_repos"], + "description": "How the policy scopes to repositories: `labeled_repos` applies to repositories carrying the policy repo label; `unlabeled_repos` is the default policy for all unlabeled repositories.", + "default": "labeled_repos" + }, + "repo_label_id": { + "type": "string", + "description": "The repo label that scopes this policy. Null for the default policy.", + "default": "", + "nullable": true + }, + "repository_ids": { + "type": "array", + "items": { + "type": "string", + "description": "A repository UUID.", + "default": "" + }, + "description": "Repositories the policy scopes to. Empty for the default policy and for policies with no repository assignments." + }, + "baseline": { + "type": "string", + "description": "Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null when the policy has no baseline.", + "default": "", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "User ID that created the policy.", + "default": "", + "nullable": true + }, + "updated_by": { + "type": "string", + "description": "User ID that last updated the policy.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp. Null for the default policy until it is first customized.", + "default": "", + "nullable": true + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp. Null for the default policy until it is first customized.", + "default": "", + "nullable": true + } + }, + "required": [ + "apply_method", + "baseline", + "created_at", + "created_by", + "description", + "id", + "name", + "repo_label_id", + "repository_ids", + "updated_at", + "updated_by" + ] + }, + "description": "" + } + }, + "required": ["items"] + } + } + }, + "description": "Lists alert policies for the specified organization." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + }, + "post": { + "tags": ["alert-policies"], + "summary": "Create Org Alert Policy", + "operationId": "createOrgAlertPolicy", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "dry_run", + "in": "query", + "required": false, + "description": "Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The policy name (1-120 characters). Also used as the name of the repo label that scopes the policy." + }, + "description": { + "type": "string", + "description": "Operator-provided description (up to 256 characters).", + "default": "", + "nullable": true + }, + "repository_ids": { + "type": "array", + "items": { + "type": "string", + "description": "A repository UUID.", + "default": "" + }, + "description": "Repositories to scope the policy to.", + "nullable": true + }, + "baseline": { + "type": "string", + "description": "Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null for no baseline.", + "default": "", + "nullable": true + } + }, + "required": ["name"] + } + } + }, + "required": true + }, + "security": [ + { + "bearerAuth": ["alert-policy:create"] + }, + { + "basicAuth": ["alert-policy:create"] + } + ], + "description": "Create an alert policy. A repo label with the same name is created to scope the policy; repositories carrying that label are governed by the policy. Requires a token with org-wide repository access; repo-restricted tokens receive 403.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-policy:create", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The ID of the policy: a UUID, or `default` for the default policy until it is first customized.", + "default": "" + }, + "name": { + "type": "string", + "description": "The policy name. Null for the default policy, which applies to all repositories without a policy label.", + "default": "", + "nullable": true + }, + "description": { + "type": "string", + "description": "Operator-provided description.", + "default": "", + "nullable": true + }, + "apply_method": { + "type": "string", + "enum": ["labeled_repos", "unlabeled_repos"], + "description": "How the policy scopes to repositories: `labeled_repos` applies to repositories carrying the policy repo label; `unlabeled_repos` is the default policy for all unlabeled repositories.", + "default": "labeled_repos" + }, + "repo_label_id": { + "type": "string", + "description": "The repo label that scopes this policy. Null for the default policy.", + "default": "", + "nullable": true + }, + "repository_ids": { + "type": "array", + "items": { + "type": "string", + "description": "A repository UUID.", + "default": "" + }, + "description": "Repositories the policy scopes to. Empty for the default policy and for policies with no repository assignments." + }, + "baseline": { + "type": "string", + "description": "Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null when the policy has no baseline.", + "default": "", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "User ID that created the policy.", + "default": "", + "nullable": true + }, + "updated_by": { + "type": "string", + "description": "User ID that last updated the policy.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp. Null for the default policy until it is first customized.", + "default": "", + "nullable": true + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp. Null for the default policy until it is first customized.", + "default": "", + "nullable": true + }, + "dry_run": { + "type": "boolean", + "default": false, + "description": "True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted." + } + }, + "required": [ + "apply_method", + "baseline", + "created_at", + "created_by", + "description", + "id", + "name", + "repo_label_id", + "repository_ids", + "updated_at", + "updated_by" + ] + } + } + }, + "description": "Dry-run: the write was not persisted." + }, + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The ID of the policy: a UUID, or `default` for the default policy until it is first customized.", + "default": "" + }, + "name": { + "type": "string", + "description": "The policy name. Null for the default policy, which applies to all repositories without a policy label.", + "default": "", + "nullable": true + }, + "description": { + "type": "string", + "description": "Operator-provided description.", + "default": "", + "nullable": true + }, + "apply_method": { + "type": "string", + "enum": ["labeled_repos", "unlabeled_repos"], + "description": "How the policy scopes to repositories: `labeled_repos` applies to repositories carrying the policy repo label; `unlabeled_repos` is the default policy for all unlabeled repositories.", + "default": "labeled_repos" + }, + "repo_label_id": { + "type": "string", + "description": "The repo label that scopes this policy. Null for the default policy.", + "default": "", + "nullable": true + }, + "repository_ids": { + "type": "array", + "items": { + "type": "string", + "description": "A repository UUID.", + "default": "" + }, + "description": "Repositories the policy scopes to. Empty for the default policy and for policies with no repository assignments." + }, + "baseline": { + "type": "string", + "description": "Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null when the policy has no baseline.", + "default": "", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "User ID that created the policy.", + "default": "", + "nullable": true + }, + "updated_by": { + "type": "string", + "description": "User ID that last updated the policy.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp. Null for the default policy until it is first customized.", + "default": "", + "nullable": true + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp. Null for the default policy until it is first customized.", + "default": "", + "nullable": true + }, + "dry_run": { + "type": "boolean", + "default": false, + "description": "True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted." + } + }, + "required": [ + "apply_method", + "baseline", + "created_at", + "created_by", + "description", + "id", + "name", + "repo_label_id", + "repository_ids", + "updated_at", + "updated_by" + ] + } + } + }, + "description": "The created alert policy." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "409": { + "$ref": "#/components/responses/SocketConflict" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/alert-policies/{policy_id}": { + "get": { + "tags": ["alert-policies"], + "summary": "Get Org Alert Policy", + "operationId": "getOrgAlertPolicy", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "policy_id", + "in": "path", + "required": true, + "description": "The ID of the alert policy: a UUID, or `default` for the default policy", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "bearerAuth": ["alert-policy:read"] + }, + { + "basicAuth": ["alert-policy:read"] + } + ], + "description": "Fetch a single alert policy by ID. Use `default` as the ID for the default policy, which applies to all repositories without a policy label. Requires a token with org-wide repository access; repo-restricted tokens receive 403.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-policy:read", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "id": { + "type": "string", + "description": "The ID of the policy: a UUID, or `default` for the default policy until it is first customized.", + "default": "" + }, + "name": { + "type": "string", + "description": "The policy name. Null for the default policy, which applies to all repositories without a policy label.", + "default": "", + "nullable": true + }, + "description": { + "type": "string", + "description": "Operator-provided description.", + "default": "", + "nullable": true + }, + "apply_method": { + "type": "string", + "enum": ["labeled_repos", "unlabeled_repos"], + "description": "How the policy scopes to repositories: `labeled_repos` applies to repositories carrying the policy repo label; `unlabeled_repos` is the default policy for all unlabeled repositories.", + "default": "labeled_repos" + }, + "repo_label_id": { + "type": "string", + "description": "The repo label that scopes this policy. Null for the default policy.", + "default": "", + "nullable": true + }, + "repository_ids": { + "type": "array", + "items": { + "type": "string", + "description": "A repository UUID.", + "default": "" + }, + "description": "Repositories the policy scopes to. Empty for the default policy and for policies with no repository assignments." + }, + "baseline": { + "type": "string", + "description": "Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null when the policy has no baseline.", + "default": "", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "User ID that created the policy.", + "default": "", + "nullable": true + }, + "updated_by": { + "type": "string", + "description": "User ID that last updated the policy.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp. Null for the default policy until it is first customized.", + "default": "", + "nullable": true + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp. Null for the default policy until it is first customized.", + "default": "", + "nullable": true + } + }, + "required": [ + "apply_method", + "baseline", + "created_at", + "created_by", + "description", + "id", + "name", + "repo_label_id", + "repository_ids", + "updated_at", + "updated_by" + ] + } + } + }, + "description": "The requested alert policy." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + }, + "put": { + "tags": ["alert-policies"], + "summary": "Update Org Alert Policy", + "operationId": "updateOrgAlertPolicy", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "policy_id", + "in": "path", + "required": true, + "description": "The ID of the alert policy: a UUID, or `default` for the default policy", + "schema": { + "type": "string" + } + }, + { + "name": "dry_run", + "in": "query", + "required": false, + "description": "Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The policy name (1-120 characters). The default policy cannot be renamed.", + "default": "" + }, + "description": { + "type": "string", + "description": "Operator-provided description (up to 256 characters).", + "default": "", + "nullable": true + }, + "repository_ids": { + "type": "array", + "items": { + "type": "string", + "description": "A repository UUID.", + "default": "" + }, + "description": "Full replacement set of repositories the policy scopes to. The default policy scope is implicit and cannot be set.", + "nullable": true + }, + "baseline": { + "type": "string", + "description": "Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null to remove the baseline.", + "default": "", + "nullable": true + } + }, + "description": "" + } + } + }, + "required": true + }, + "security": [ + { + "bearerAuth": ["alert-policy:update"] + }, + { + "basicAuth": ["alert-policy:update"] + } + ], + "description": "Update an alert policy. Only the provided fields change; `repository_ids` replaces the full set of repositories the policy scopes to. The default policy cannot be renamed and its scope is implicit. Requires a token with org-wide repository access; repo-restricted tokens receive 403.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-policy:update", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The ID of the policy: a UUID, or `default` for the default policy until it is first customized.", + "default": "" + }, + "name": { + "type": "string", + "description": "The policy name. Null for the default policy, which applies to all repositories without a policy label.", + "default": "", + "nullable": true + }, + "description": { + "type": "string", + "description": "Operator-provided description.", + "default": "", + "nullable": true + }, + "apply_method": { + "type": "string", + "enum": ["labeled_repos", "unlabeled_repos"], + "description": "How the policy scopes to repositories: `labeled_repos` applies to repositories carrying the policy repo label; `unlabeled_repos` is the default policy for all unlabeled repositories.", + "default": "labeled_repos" + }, + "repo_label_id": { + "type": "string", + "description": "The repo label that scopes this policy. Null for the default policy.", + "default": "", + "nullable": true + }, + "repository_ids": { + "type": "array", + "items": { + "type": "string", + "description": "A repository UUID.", + "default": "" + }, + "description": "Repositories the policy scopes to. Empty for the default policy and for policies with no repository assignments." + }, + "baseline": { + "type": "string", + "description": "Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null when the policy has no baseline.", + "default": "", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "User ID that created the policy.", + "default": "", + "nullable": true + }, + "updated_by": { + "type": "string", + "description": "User ID that last updated the policy.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp. Null for the default policy until it is first customized.", + "default": "", + "nullable": true + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp. Null for the default policy until it is first customized.", + "default": "", + "nullable": true + }, + "dry_run": { + "type": "boolean", + "default": false, + "description": "True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted." + } + }, + "required": [ + "apply_method", + "baseline", + "created_at", + "created_by", + "description", + "id", + "name", + "repo_label_id", + "repository_ids", + "updated_at", + "updated_by" + ] + } + } + }, + "description": "The updated alert policy. Dry-run responses include `dry_run: true` and were not persisted." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "409": { + "$ref": "#/components/responses/SocketConflict" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + }, + "delete": { + "tags": ["alert-policies"], + "summary": "Delete Org Alert Policy", + "operationId": "deleteOrgAlertPolicy", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "policy_id", + "in": "path", + "required": true, + "description": "The UUID of the alert policy to delete", + "schema": { + "type": "string" + } + }, + { + "name": "dry_run", + "in": "query", + "required": false, + "description": "Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "security": [ + { + "bearerAuth": ["alert-policy:delete"] + }, + { + "basicAuth": ["alert-policy:delete"] + } + ], + "description": "Delete an alert policy along with its rules and repo label. Repositories previously scoped to the policy fall back to the default policy after the next org snapshot. The default policy cannot be deleted. Requires a token with org-wide repository access; repo-restricted tokens receive 403.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-policy:delete", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "result": { + "type": "string", + "description": "Present on a persisted delete.", + "default": "" + }, + "dry_run": { + "type": "boolean", + "default": false, + "description": "True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted." + } + } + } + } + }, + "description": "Deleted the alert policy, or rehearsed the delete when `dry_run` is true." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "409": { + "$ref": "#/components/responses/SocketConflict" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/alert-policies/{policy_id}/rules": { + "get": { + "tags": ["alert-policies"], + "summary": "List Org Alert Policy Rules", + "operationId": "getOrgAlertPolicyRules", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "policy_id", + "in": "path", + "required": true, + "description": "The ID of the alert policy: a UUID, or `default` for the default policy", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "bearerAuth": ["alert-policy:list"] + }, + { + "basicAuth": ["alert-policy:list"] + } + ], + "description": "List the custom rules of an alert policy in evaluation order (ascending rank). Rules are evaluated before the policy baseline; the first matching rule decides the alert action. Requires a token with org-wide repository access; repo-restricted tokens receive 403.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-policy:list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "id": { + "type": "string", + "description": "The UUID of the rule.", + "default": "" + }, + "alert_policy_id": { + "type": "string", + "description": "The UUID of the policy the rule belongs to.", + "default": "" + }, + "rank": { + "type": "string", + "description": "Fractional-index rank; rules are evaluated in ascending rank order.", + "default": "" + }, + "name": { + "type": "string", + "description": "The rule name.", + "default": "" + }, + "vigil_selector": { + "type": "object", + "description": "Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{\"finding.alertType\": \"criticalCVE\", \"artifact.name\": \"lodash\"}`).", + "default": null + }, + "action": { + "type": "string", + "enum": ["error", "warn", "monitor", "ignore"], + "description": "The action applied to matching alerts. One of: error, warn, monitor, ignore.", + "default": "monitor" + }, + "note": { + "type": "string", + "description": "Operator-provided note.", + "default": "", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "User ID that created the rule.", + "default": "", + "nullable": true + }, + "updated_by": { + "type": "string", + "description": "User ID that last updated the rule.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp.", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp.", + "default": "" + } + }, + "required": [ + "action", + "alert_policy_id", + "created_at", + "created_by", + "id", + "name", + "note", + "rank", + "updated_at", + "updated_by", + "vigil_selector" + ] + }, + "description": "" + } + }, + "required": ["items"] + } + } + }, + "description": "Lists the rules of the specified alert policy." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + }, + "post": { + "tags": ["alert-policies"], + "summary": "Create Org Alert Policy Rule", + "operationId": "createOrgAlertPolicyRule", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "policy_id", + "in": "path", + "required": true, + "description": "The ID of the alert policy: a UUID, or `default` for the default policy", + "schema": { + "type": "string" + } + }, + { + "name": "dry_run", + "in": "query", + "required": false, + "description": "Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The rule name (1-128 characters)." + }, + "vigil_selector": { + "type": "object", + "description": "Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{\"finding.alertType\": \"criticalCVE\", \"artifact.name\": \"lodash\"}`).", + "default": null + }, + "action": { + "type": "string", + "description": "The action applied to matching alerts. One of: error, warn, monitor, ignore." + }, + "note": { + "type": "string", + "description": "Operator-provided note (up to 256 characters).", + "default": "", + "nullable": true + }, + "position": { + "type": "string", + "description": "Where to place the rule within the policy: `first` or `last`. Mutually exclusive with `rank`, `before_rule_id`, and `after_rule_id`; when no position is provided a created rule is placed first.", + "default": "" + }, + "rank": { + "type": "string", + "description": "Explicit rank, as a `fractional-indexing` base62 order key (e.g. `a0`, `a0V`). Prefer `position`, `before_rule_id`, or `after_rule_id`; a rank that is not a valid order key is rejected.", + "default": "" + }, + "before_rule_id": { + "type": "string", + "description": "Place the rule immediately before this rule UUID.", + "default": "", + "nullable": true + }, + "after_rule_id": { + "type": "string", + "description": "Place the rule immediately after this rule UUID.", + "default": "", + "nullable": true + } + }, + "required": ["action", "name", "vigil_selector"] + } + } + }, + "required": true + }, + "security": [ + { + "bearerAuth": ["alert-policy:create"] + }, + { + "basicAuth": ["alert-policy:create"] + } + ], + "description": "Create a rule on an alert policy. Rules are evaluated in ascending rank order and the first matching rule decides the alert action. Provide at most one of `position`, `rank`, `before_rule_id`, or `after_rule_id`; the rule is placed first when no position is provided. Requires a token with org-wide repository access; repo-restricted tokens receive 403.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-policy:create", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUID of the rule.", + "default": "" + }, + "alert_policy_id": { + "type": "string", + "description": "The UUID of the policy the rule belongs to.", + "default": "" + }, + "rank": { + "type": "string", + "description": "Fractional-index rank; rules are evaluated in ascending rank order.", + "default": "" + }, + "name": { + "type": "string", + "description": "The rule name.", + "default": "" + }, + "vigil_selector": { + "type": "object", + "description": "Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{\"finding.alertType\": \"criticalCVE\", \"artifact.name\": \"lodash\"}`).", + "default": null + }, + "action": { + "type": "string", + "enum": ["error", "warn", "monitor", "ignore"], + "description": "The action applied to matching alerts. One of: error, warn, monitor, ignore.", + "default": "monitor" + }, + "note": { + "type": "string", + "description": "Operator-provided note.", + "default": "", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "User ID that created the rule.", + "default": "", + "nullable": true + }, + "updated_by": { + "type": "string", + "description": "User ID that last updated the rule.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp.", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp.", + "default": "" + }, + "dry_run": { + "type": "boolean", + "default": false, + "description": "True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted." + } + }, + "required": [ + "action", + "alert_policy_id", + "created_at", + "created_by", + "id", + "name", + "note", + "rank", + "updated_at", + "updated_by", + "vigil_selector" + ] + } + } + }, + "description": "Dry-run: the write was not persisted." + }, + "201": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUID of the rule.", + "default": "" + }, + "alert_policy_id": { + "type": "string", + "description": "The UUID of the policy the rule belongs to.", + "default": "" + }, + "rank": { + "type": "string", + "description": "Fractional-index rank; rules are evaluated in ascending rank order.", + "default": "" + }, + "name": { + "type": "string", + "description": "The rule name.", + "default": "" + }, + "vigil_selector": { + "type": "object", + "description": "Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{\"finding.alertType\": \"criticalCVE\", \"artifact.name\": \"lodash\"}`).", + "default": null + }, + "action": { + "type": "string", + "enum": ["error", "warn", "monitor", "ignore"], + "description": "The action applied to matching alerts. One of: error, warn, monitor, ignore.", + "default": "monitor" + }, + "note": { + "type": "string", + "description": "Operator-provided note.", + "default": "", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "User ID that created the rule.", + "default": "", + "nullable": true + }, + "updated_by": { + "type": "string", + "description": "User ID that last updated the rule.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp.", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp.", + "default": "" + }, + "dry_run": { + "type": "boolean", + "default": false, + "description": "True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted." + } + }, + "required": [ + "action", + "alert_policy_id", + "created_at", + "created_by", + "id", + "name", + "note", + "rank", + "updated_at", + "updated_by", + "vigil_selector" + ] + } + } + }, + "description": "The created alert policy rule." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "409": { + "$ref": "#/components/responses/SocketConflict" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/alert-policies/{policy_id}/rules/{rule_id}": { + "get": { + "tags": ["alert-policies"], + "summary": "Get Org Alert Policy Rule", + "operationId": "getOrgAlertPolicyRule", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "policy_id", + "in": "path", + "required": true, + "description": "The ID of the alert policy: a UUID, or `default` for the default policy", + "schema": { + "type": "string" + } + }, + { + "name": "rule_id", + "in": "path", + "required": true, + "description": "The UUID of the rule to fetch", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "bearerAuth": ["alert-policy:read"] + }, + { + "basicAuth": ["alert-policy:read"] + } + ], + "description": "Fetch a single alert policy rule by UUID. Returns the same row shape as the rules list endpoint. Requires a token with org-wide repository access; repo-restricted tokens receive 403.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-policy:read", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "id": { + "type": "string", + "description": "The UUID of the rule.", + "default": "" + }, + "alert_policy_id": { + "type": "string", + "description": "The UUID of the policy the rule belongs to.", + "default": "" + }, + "rank": { + "type": "string", + "description": "Fractional-index rank; rules are evaluated in ascending rank order.", + "default": "" + }, + "name": { + "type": "string", + "description": "The rule name.", + "default": "" + }, + "vigil_selector": { + "type": "object", + "description": "Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{\"finding.alertType\": \"criticalCVE\", \"artifact.name\": \"lodash\"}`).", + "default": null + }, + "action": { + "type": "string", + "enum": ["error", "warn", "monitor", "ignore"], + "description": "The action applied to matching alerts. One of: error, warn, monitor, ignore.", + "default": "monitor" + }, + "note": { + "type": "string", + "description": "Operator-provided note.", + "default": "", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "User ID that created the rule.", + "default": "", + "nullable": true + }, + "updated_by": { + "type": "string", + "description": "User ID that last updated the rule.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp.", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp.", + "default": "" + } + }, + "required": [ + "action", + "alert_policy_id", + "created_at", + "created_by", + "id", + "name", + "note", + "rank", + "updated_at", + "updated_by", + "vigil_selector" + ] + } + } + }, + "description": "The requested alert policy rule." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + }, + "put": { + "tags": ["alert-policies"], + "summary": "Update Org Alert Policy Rule", + "operationId": "updateOrgAlertPolicyRule", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "policy_id", + "in": "path", + "required": true, + "description": "The ID of the alert policy: a UUID, or `default` for the default policy", + "schema": { + "type": "string" + } + }, + { + "name": "rule_id", + "in": "path", + "required": true, + "description": "The UUID of the rule to update", + "schema": { + "type": "string" + } + }, + { + "name": "dry_run", + "in": "query", + "required": false, + "description": "Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The rule name (1-128 characters).", + "default": "" + }, + "vigil_selector": { + "type": "object", + "description": "Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{\"finding.alertType\": \"criticalCVE\", \"artifact.name\": \"lodash\"}`).", + "default": null + }, + "action": { + "type": "string", + "description": "The action applied to matching alerts. One of: error, warn, monitor, ignore.", + "default": "" + }, + "note": { + "type": "string", + "description": "Operator-provided note (up to 256 characters).", + "default": "", + "nullable": true + }, + "position": { + "type": "string", + "description": "Where to place the rule within the policy: `first` or `last`. Mutually exclusive with `rank`, `before_rule_id`, and `after_rule_id`; when no position is provided a created rule is placed first.", + "default": "" + }, + "rank": { + "type": "string", + "description": "Explicit rank, as a `fractional-indexing` base62 order key (e.g. `a0`, `a0V`). Prefer `position`, `before_rule_id`, or `after_rule_id`; a rank that is not a valid order key is rejected.", + "default": "" + }, + "before_rule_id": { + "type": "string", + "description": "Move the rule immediately before this rule UUID.", + "default": "", + "nullable": true + }, + "after_rule_id": { + "type": "string", + "description": "Move the rule immediately after this rule UUID.", + "default": "", + "nullable": true + } + }, + "description": "" + } + } + }, + "required": true + }, + "security": [ + { + "bearerAuth": ["alert-policy:update"] + }, + { + "basicAuth": ["alert-policy:update"] + } + ], + "description": "Update an alert policy rule. Only the provided fields change. To move the rule, provide at most one of `position`, `rank`, `before_rule_id`, or `after_rule_id`. Requires a token with org-wide repository access; repo-restricted tokens receive 403.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-policy:update", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "The UUID of the rule.", + "default": "" + }, + "alert_policy_id": { + "type": "string", + "description": "The UUID of the policy the rule belongs to.", + "default": "" + }, + "rank": { + "type": "string", + "description": "Fractional-index rank; rules are evaluated in ascending rank order.", + "default": "" + }, + "name": { + "type": "string", + "description": "The rule name.", + "default": "" + }, + "vigil_selector": { + "type": "object", + "description": "Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{\"finding.alertType\": \"criticalCVE\", \"artifact.name\": \"lodash\"}`).", + "default": null + }, + "action": { + "type": "string", + "enum": ["error", "warn", "monitor", "ignore"], + "description": "The action applied to matching alerts. One of: error, warn, monitor, ignore.", + "default": "monitor" + }, + "note": { + "type": "string", + "description": "Operator-provided note.", + "default": "", + "nullable": true + }, + "created_by": { + "type": "string", + "description": "User ID that created the rule.", + "default": "", + "nullable": true + }, + "updated_by": { + "type": "string", + "description": "User ID that last updated the rule.", + "default": "", + "nullable": true + }, + "created_at": { + "type": "string", + "description": "ISO-8601 creation timestamp.", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "ISO-8601 last-update timestamp.", + "default": "" + }, + "dry_run": { + "type": "boolean", + "default": false, + "description": "True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted." + } + }, + "required": [ + "action", + "alert_policy_id", + "created_at", + "created_by", + "id", + "name", + "note", + "rank", + "updated_at", + "updated_by", + "vigil_selector" + ] + } + } + }, + "description": "The updated alert policy rule. Dry-run responses include `dry_run: true` and were not persisted." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "409": { + "$ref": "#/components/responses/SocketConflict" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + }, + "delete": { + "tags": ["alert-policies"], + "summary": "Delete Org Alert Policy Rule", + "operationId": "deleteOrgAlertPolicyRule", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "policy_id", + "in": "path", + "required": true, + "description": "The ID of the alert policy: a UUID, or `default` for the default policy", + "schema": { + "type": "string" + } + }, + { + "name": "rule_id", + "in": "path", + "required": true, + "description": "The UUID of the rule to delete", + "schema": { + "type": "string" + } + }, + { + "name": "dry_run", + "in": "query", + "required": false, + "description": "Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "security": [ + { + "bearerAuth": ["alert-policy:delete"] + }, + { + "basicAuth": ["alert-policy:delete"] + } + ], + "description": "Delete an alert policy rule. Alerts previously matched by this rule are re-evaluated against the remaining rules and baseline after the next org snapshot. Requires a token with org-wide repository access; repo-restricted tokens receive 403.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-policy:delete", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "result": { + "type": "string", + "description": "Present on a persisted delete.", + "default": "" + }, + "dry_run": { + "type": "boolean", + "default": false, + "description": "True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted." } - }, - "required": ["endCursor", "items"] + } } } }, - "description": "Lists alert resolutions for the specified organization." + "description": "Deleted the alert policy rule, or rehearsed the delete when `dry_run` is true." }, "400": { "$ref": "#/components/responses/SocketBadRequest" @@ -17549,6 +20920,9 @@ "404": { "$ref": "#/components/responses/SocketNotFoundResponse" }, + "409": { + "$ref": "#/components/responses/SocketConflict" + }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } @@ -17556,11 +20930,11 @@ "x-readme": {} } }, - "/orgs/{org_slug}/alerts/resolutions/{uuid}": { + "/orgs/{org_slug}/alert-policies/migration/status": { "get": { - "tags": ["alerts"], - "summary": "Get Org Alert Resolution", - "operationId": "getOrgAlertResolution", + "tags": ["alert-policies"], + "summary": "Get Org Alert Policy Migration Status", + "operationId": "getOrgAlertPolicyMigrationStatus", "parameters": [ { "name": "org_slug", @@ -17570,26 +20944,17 @@ "schema": { "type": "string" } - }, - { - "name": "uuid", - "in": "path", - "required": true, - "description": "The UUID of the alert resolution to fetch", - "schema": { - "type": "string" - } } ], "security": [ { - "bearerAuth": ["alert-resolution:read"] + "bearerAuth": ["alert-policy:list"] }, { - "basicAuth": ["alert-resolution:read"] + "basicAuth": ["alert-policy:list"] } ], - "description": "Fetch a single active alert resolution by UUID. Returns the same row shape as the list endpoint.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-resolution:read", + "description": "Retrieve the alert policy migration status of an organization. This is read-only and does not enroll organizations or start migration windows. Requires a token with org-wide repository access; repo-restricted tokens receive 403.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-policy:list", "responses": { "200": { "content": { @@ -17599,113 +20964,67 @@ "additionalProperties": false, "description": "", "properties": { - "uuid": { - "type": "string", - "description": "The UUID of the resolution.", - "default": "" - }, - "reason": { + "state": { "type": "string", "enum": [ - "false_positive", - "remediated", - "tolerable_risk", - "other" + "pending", + "previewing", + "accepted", + "auto_finalized", + "rolled_back" ], - "description": "The reason the alert was resolved. One of: false_positive, remediated, tolerable_risk, other.", - "default": "other" - }, - "reason_text": { - "type": "string", - "description": "Free-form reason text when `reason` is `other`.", - "default": "", - "nullable": true - }, - "comment": { - "type": "string", - "description": "Operator-provided comment.", - "default": "", - "nullable": true - }, - "alert_type": { - "type": "string", - "description": "Alert type the resolution scopes to (e.g. criticalCVE). Null if the resolution applies to multiple alert types.", - "default": "", - "nullable": true - }, - "repo": { - "type": "string", - "description": "Repository full name the resolution scopes to. Null if not scoped to a single repo.", - "default": "", - "nullable": true - }, - "repo_label": { - "type": "string", - "description": "Repository label the resolution scopes to. Null if not scoped to a label.", - "default": "", - "nullable": true - }, - "artifact_type": { - "type": "string", - "description": "Package ecosystem the resolution scopes to (e.g. npm, pypi). Null if not scoped to a single ecosystem.", - "default": "", + "description": "Current migration state. Null when the organization is not enrolled.", + "default": "pending", "nullable": true }, - "artifact_namespace": { + "finalized_at": { "type": "string", - "description": "Package namespace/scope the resolution scopes to. Null if not scoped to a namespace.", + "description": "ISO-8601 timestamp when migration finalized.", "default": "", "nullable": true }, - "artifact_name": { + "deadline_at": { "type": "string", - "description": "Package name the resolution scopes to. Null if not scoped to a single package.", + "description": "ISO-8601 auto-finalization deadline.", "default": "", "nullable": true }, - "artifact_version": { + "window_end_at": { "type": "string", - "description": "Package version the resolution scopes to. Extracted from the resolution selector at read time; null if the resolution applies to multiple versions or no single version.", + "description": "ISO-8601 end of the organization migration window.", "default": "", "nullable": true }, - "resolved_by": { + "deadline_admin_paused_at": { "type": "string", - "description": "User ID that created the resolution. Null for system-created resolutions.", + "description": "ISO-8601 timestamp when an administrator paused the deadline.", "default": "", "nullable": true }, - "created_at": { - "type": "string", - "description": "ISO-8601 creation timestamp.", - "default": "" + "alert_policies_enabled": { + "type": "boolean", + "default": false, + "description": "Whether the alert policy layer evaluates for this organization. True for migrated organizations and for organizations that started on Rules & Policies." }, - "updated_at": { - "type": "string", - "description": "ISO-8601 last-update timestamp.", - "default": "" + "legacy_evaluation_enabled": { + "type": "boolean", + "default": true, + "description": "Whether legacy alert triage and the legacy security policy still evaluate for this organization." } }, "required": [ - "alert_type", - "artifact_name", - "artifact_namespace", - "artifact_type", - "artifact_version", - "comment", - "created_at", - "reason", - "reason_text", - "repo", - "repo_label", - "resolved_by", - "updated_at", - "uuid" + "alert_policies_enabled", + "deadline_admin_paused_at", + "deadline_at", + "finalized_at", + "legacy_evaluation_enabled", + "state", + "window_end_at" ] } } }, - "description": "The requested alert resolution." + "description": "The alert policy migration status of the organization." }, "400": { "$ref": "#/components/responses/SocketBadRequest" @@ -17724,11 +21043,13 @@ } }, "x-readme": {} - }, - "delete": { - "tags": ["alerts"], - "summary": "Delete Org Alert Resolution", - "operationId": "deleteOrgAlertResolution", + } + }, + "/orgs/{org_slug}/alert-policies/migration/translate": { + "post": { + "tags": ["alert-policies"], + "summary": "Translate Org Alert Triage", + "operationId": "translateOrgAlertPolicyMigrationTriage", "parameters": [ { "name": "org_slug", @@ -17738,26 +21059,133 @@ "schema": { "type": "string" } - }, - { - "name": "uuid", - "in": "path", - "required": true, - "description": "The UUID of the alert resolution to delete", - "schema": { - "type": "string" - } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "alertTriage": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "description": "The UUID of the triage entry. Omit to create a new entry; provide to update an existing one.", + "default": "", + "nullable": true + }, + "packageType": { + "type": "string", + "description": "The package ecosystem type (e.g., npm, pypi). Use null or \"*\" for wildcard.", + "default": "", + "nullable": true + }, + "packageNamespace": { + "type": "string", + "description": "The package namespace or scope. Use null or \"*\" for wildcard.", + "default": "", + "nullable": true + }, + "packageName": { + "type": "string", + "description": "The package name. Use null or \"*\" for wildcard.", + "default": "", + "nullable": true + }, + "packageVersion": { + "type": "string", + "description": "The package version. Supports a \"*\" suffix for wildcard prefix matching. Use null for any version.", + "default": "", + "nullable": true + }, + "alertKey": { + "type": "string", + "description": "The specific alert key to target.", + "default": "", + "nullable": true + }, + "alertType": { + "type": "string", + "description": "The alert type (e.g., criticalCVE, highCVE).", + "default": "", + "nullable": true + }, + "fixAvailable": { + "type": "string", + "enum": ["available", "unavailable", "*"], + "description": "Whether a fix is available, unavailable, or * for any" + }, + "patchAvailable": { + "type": "string", + "enum": ["available", "unavailable", "*"], + "description": "Whether a patch is available, unavailable, or * for any" + }, + "kevs": { + "type": "string", + "enum": ["exist", "none", "*"], + "description": "Whether the alert has a CISA KEV, can be exist, none, or * for any" + }, + "cveOrGhsaId": { + "type": "string", + "description": "CVE or GHSA ID to match against.", + "default": "", + "nullable": true + }, + "reachability": { + "type": "string", + "enum": ["reachable", "unreachable", "other", "*"], + "description": "The reachability of the alert, can be reachable, unreachable, other, or * for any" + }, + "cvssScoreCmp": { + "type": "string", + "description": "CVSS score comparison operator and value (e.g., >=7.5, >5.0, ==8.0).", + "default": "", + "nullable": true + }, + "note": { + "type": "string", + "description": "A note or comment for the triage action.", + "default": "" + }, + "state": { + "type": "string", + "enum": [ + "block", + "ignore", + "inherit", + "monitor", + "warn" + ], + "description": "The triage state of the alert" + } + }, + "description": "" + }, + "description": "" + } + }, + "required": ["alertTriage"] + } + } + }, + "required": true + }, "security": [ { - "bearerAuth": ["alert-resolution:delete"] + "bearerAuth": [] }, { - "basicAuth": ["alert-resolution:delete"] + "basicAuth": [] } ], - "description": "Delete an alert resolution by UUID. Once deleted, alerts previously hidden by this resolution will reappear after the next org snapshot.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- alert-resolution:delete", + "description": "Translate a legacy alert triage payload — the same body as `POST /v0/orgs/{org_slug}/triage/alerts` — into the resolution or policy-rule requests that replace it. Nothing is created. Policy-rule translations target the default (Main) policy, which covers repositories without a policy label; labeled policies do not inherit those rules, so POST the same body to `/alert-policies/{id}/rules` if the rule should apply there. Entries that cannot be translated are returned in `untranslatable`; the rest are in `translations`. Requires one of: `triage:alerts-update`, `alert-policy:read`, or `alert-resolution:create`.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- No Scopes Required, but authentication is required", "responses": { "200": { "content": { @@ -17767,17 +21195,93 @@ "additionalProperties": false, "description": "", "properties": { - "result": { - "type": "string", - "description": "", - "default": "" + "translations": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "index": { + "type": "integer", + "description": "Zero-based position of the source entry in the submitted `alertTriage` array.", + "default": 0, + "minimum": 0 + }, + "target": { + "type": "string", + "enum": ["alert_resolution", "alert_policy_rule"], + "description": "Which API replaces this triage entry.", + "default": "alert_resolution" + }, + "method": { + "type": "string", + "enum": ["POST"], + "description": "HTTP method of the new request.", + "default": "POST" + }, + "path": { + "type": "string", + "description": "Path of the new request. Policy rules target the default (Main) policy, which covers repositories without a policy label. Labeled policies do not inherit Main — replace `default` with that policy id if the rule should apply there.", + "default": "" + }, + "body": { + "type": "object", + "description": "Request body to send. Resolutions: `{ reason, comment, vigil_selector }` (`reason` is `other`). Rules: `{ name, action, note, vigil_selector }` (`block` becomes `error`).", + "default": null + } + }, + "required": [ + "body", + "index", + "method", + "path", + "target" + ] + }, + "description": "" + }, + "untranslatable": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "index": { + "type": "integer", + "description": "Zero-based position of the source entry in the submitted `alertTriage` array.", + "default": 0, + "minimum": 0 + }, + "code": { + "type": "string", + "enum": [ + "inherit_not_translatable", + "alert_key_not_translatable", + "matches_all_alerts", + "filter_not_translatable", + "note_too_long" + ], + "description": "Why the entry was not translated.", + "default": "alert_key_not_translatable" + }, + "reason": { + "type": "string", + "description": "What to do instead. Safe to show to API clients.", + "default": "" + } + }, + "required": ["code", "index", "reason"] + }, + "description": "" } }, - "required": ["result"] + "required": ["translations", "untranslatable"] } } }, - "description": "Deleted Alert Resolution" + "description": "Translated requests, plus any entries that have no equivalent." }, "400": { "$ref": "#/components/responses/SocketBadRequest" @@ -19863,6 +23367,82 @@ }, "required": ["action"] }, + "browserExtensionPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionHostPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionHostPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionWildcardHostPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionWildcardHostPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionContentScript": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionContentScript issues." + } + }, + "required": ["action"] + }, "filesystemAccess": { "type": "object", "additionalProperties": false, @@ -20186,6 +23766,44 @@ }, "required": ["action"] }, + "unresolvedYarnDependency": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for unresolvedYarnDependency issues." + } + }, + "required": ["action"] + }, + "unresolvedPomReference": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for unresolvedPomReference issues." + } + }, + "required": ["action"] + }, "shrinkwrap": { "type": "object", "additionalProperties": false, @@ -22569,6 +26187,82 @@ }, "required": ["action"] }, + "browserExtensionPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionHostPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionHostPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionWildcardHostPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionWildcardHostPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionContentScript": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionContentScript issues." + } + }, + "required": ["action"] + }, "filesystemAccess": { "type": "object", "additionalProperties": false, @@ -22892,6 +26586,44 @@ }, "required": ["action"] }, + "unresolvedYarnDependency": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for unresolvedYarnDependency issues." + } + }, + "required": ["action"] + }, + "unresolvedPomReference": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for unresolvedPomReference issues." + } + }, + "required": ["action"] + }, "shrinkwrap": { "type": "object", "additionalProperties": false, @@ -25565,6 +29297,82 @@ }, "required": ["action"] }, + "browserExtensionPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionHostPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionHostPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionWildcardHostPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionWildcardHostPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionContentScript": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionContentScript issues." + } + }, + "required": ["action"] + }, "filesystemAccess": { "type": "object", "additionalProperties": false, @@ -25888,6 +29696,44 @@ }, "required": ["action"] }, + "unresolvedYarnDependency": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for unresolvedYarnDependency issues." + } + }, + "required": ["action"] + }, + "unresolvedPomReference": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for unresolvedPomReference issues." + } + }, + "required": ["action"] + }, "shrinkwrap": { "type": "object", "additionalProperties": false, @@ -28262,6 +32108,82 @@ }, "required": ["action"] }, + "browserExtensionPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionHostPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionHostPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionWildcardHostPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionWildcardHostPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionContentScript": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionContentScript issues." + } + }, + "required": ["action"] + }, "filesystemAccess": { "type": "object", "additionalProperties": false, @@ -28585,6 +32507,44 @@ }, "required": ["action"] }, + "unresolvedYarnDependency": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for unresolvedYarnDependency issues." + } + }, + "required": ["action"] + }, + "unresolvedPomReference": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for unresolvedPomReference issues." + } + }, + "required": ["action"] + }, "shrinkwrap": { "type": "object", "additionalProperties": false, @@ -30920,6 +34880,82 @@ }, "required": ["action"] }, + "browserExtensionPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionHostPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionHostPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionWildcardHostPermission": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionWildcardHostPermission issues." + } + }, + "required": ["action"] + }, + "browserExtensionContentScript": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for browserExtensionContentScript issues." + } + }, + "required": ["action"] + }, "filesystemAccess": { "type": "object", "additionalProperties": false, @@ -31243,6 +35279,44 @@ }, "required": ["action"] }, + "unresolvedYarnDependency": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for unresolvedYarnDependency issues." + } + }, + "required": ["action"] + }, + "unresolvedPomReference": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for unresolvedPomReference issues." + } + }, + "required": ["action"] + }, "shrinkwrap": { "type": "object", "additionalProperties": false, @@ -37582,16 +41656,28 @@ "type": "string", "enum": [ "AddLicenseOverlayNote", + "AdminAlertTypeUpdated", + "AdminBotSkipIpsUpdated", + "AdminLinkGithubInstall", + "AdminSyncGithubInstall", + "AdminTriggerFullScan", + "AdminUnlinkGithubInstall", + "AdminUpdateGithubInstallWorkspace", "AssociateLabel", + "AuthorizeOauthCimdClient", "CancelInvitation", "ChangeMemberRole", "ChangePlanSubscriptionSeats", "CreateApiToken", "CreateArtifact", + "CreateAccessPolicyAttachment", + "CreateAccessPolicy", "CreateAlertPolicy", + "CreateAlertPolicyRule", "CreateFirewallCustomRegistry", "CreateFirewallDeploymentConfig", "CreateLabel", + "CreateOauthClientCredentialsToken", "CreateOauthRefreshToken", "CreateRepoAccessRule", "CreateUserWithPassword", @@ -37602,9 +41688,13 @@ "CoanaCliLegacyModeDemoteOrg", "CoanaCliLegacyModePromoteOrg", "CreateAlertResolution", + "DeleteAccessPolicy", "DeleteAlertPolicy", + "DeleteAlertPolicyRule", + "DeleteAlertNote", "DeleteAlertResolution", "DeleteAlertTriage", + "DeleteAccessPolicyAttachment", "DeleteApiToken", "DeleteFirewallCustomRegistry", "DeleteFirewallDeploymentConfig", @@ -37616,9 +41706,12 @@ "DeleteRepository", "DeleteTicketingConfiguration", "DeleteWebhook", + "DisableAccessPolicyAttachment", + "DisableAccessPolicy", "DisablePythonCliRunStreamingOverride", "DisassociateLabel", "DisconnectAsanaIntegration", + "DisconnectClickupIntegration", "DisconnectJiraIntegration", "DisconnectLinearIntegration", "DowngradeOrganizationPlan", @@ -37626,18 +41719,28 @@ "EnqueueAutopatchMergeRun", "EnqueueAutopatchPrepareJob", "FinalizeAlertPolicyMigration", + "OptOutRulesAndPolicies", + "RestoreRulesAndPolicies", + "SetRulesAndPoliciesNewOrgCutoff", "JoinOrganization", "AsanaIntegrationConnected", + "ClickupIntegrationConnected", "JiraIntegrationConnected", + "InvalidateOauthCimdClientGrants", "LinearIntegrationConnected", + "NpmStagingTokenSaved", + "NpmStagingTokenRemoved", "MemberAdded", "MemberRemoved", "MemberRoleChanged", + "OpenFixPullRequest", "RemoveLicenseOverlay", "RemoveMember", + "ReorderAlertPolicyRules", "RollbackAlertPolicyMigration", "ResetInvitationLink", "ResetOrganizationSettingToDefault", + "ResolveOauthCimdClientMetadata", "RevokeOauthToken", "RotateOauthRefreshToken", "RevokeApiToken", @@ -37647,12 +41750,24 @@ "SetLabelSettingToDefault", "SetSsoBypassMemberships", "SetSsoBypassRbacRoles", + "StartAlertPolicyMigrationPreview", "SSOEmailVerificationCompleted", "SSOLoginCompleted", "SvdBackfillLegacyOverlay", + "SvdImportLegacyOnlyGhsas", + "SvdImportLegacyOverlay", "SvdReprocessClusters", + "SvdRetransformGhsaMirror", + "SvdSeedLegacyGithubMatches", + "SvdTruncateRederive", + "SvdWorkerPause", "SyncOrganization", "TransferOwnership", + "UpdateAlertPolicy", + "UpdateAlertPolicyRule", + "UpdateAlertNote", + "UpdateAccessPolicyAttachment", + "UpdateAccessPolicy", "UpdateAlertTriage", "UpdateApiTokenCommitter", "UpdateApiTokenMaxQuota", @@ -37673,7 +41788,8 @@ "UpgradeOrganizationPlan", "UserMagicLinkSent", "UserSignedIn", - "UserSignedOut" + "UserSignedOut", + "PurgeOrganizationData" ] } }, @@ -37883,6 +41999,12 @@ "alerts", "alerts:list", "alerts:trend", + "alert-policy", + "alert-policy:list", + "alert-policy:read", + "alert-policy:create", + "alert-policy:update", + "alert-policy:delete", "alert-resolution", "alert-resolution:list", "alert-resolution:create", @@ -38315,6 +42437,12 @@ "alerts", "alerts:list", "alerts:trend", + "alert-policy", + "alert-policy:list", + "alert-policy:read", + "alert-policy:create", + "alert-policy:update", + "alert-policy:delete", "alert-resolution", "alert-resolution:list", "alert-resolution:create", @@ -38511,6 +42639,12 @@ "alerts", "alerts:list", "alerts:trend", + "alert-policy", + "alert-policy:list", + "alert-policy:read", + "alert-policy:create", + "alert-policy:update", + "alert-policy:delete", "alert-resolution", "alert-resolution:list", "alert-resolution:create", @@ -39154,12 +43288,15 @@ "clawhub", "composer", "chrome", + "firefox-extension", + "edge-extension", "golang", "huggingface", "maven", "npm", "nuget", "vscode", + "vscode-extension", "pypi", "gem", "swift" @@ -39445,12 +43582,15 @@ "clawhub", "composer", "chrome", + "firefox-extension", + "edge-extension", "golang", "huggingface", "maven", "npm", "nuget", "vscode", + "vscode-extension", "pypi", "gem", "swift" @@ -39761,7 +43901,7 @@ "basicAuth": ["packages:list"] } ], - "description": "Batch retrieval of package metadata and alerts by PURL strings for a specific organization. Compatible with CycloneDX reports.\n\nPackage URLs (PURLs) are an ecosystem agnostic way to identify packages.\nCycloneDX SBOMs use the purl format to identify components.\nThis endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report.\n\n**Note:** This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error.\n\nMore information on purl and CycloneDX:\n\n- [`purl` Spec](https://github.com/package-url/purl-spec)\n- [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components)\n\nThis endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate).\nActively running analysis will be returned when available on subsequent runs.\n\nWhen `alerts=true`, Socket may synthesize two alert types to make partial\nresults actionable:\n\n- `pendingScan`: the package is known but analysis has not completed yet\n- `notFound`: Socket could not resolve the package/version metadata\n\nWhen `purlErrors=true`, unresolved `notFound` inputs keep the legacy\n`purlError` stream shape instead of emitting synthetic `notFound`\nartifacts.\n\nUse `poll=false` (default) to fail open and return the current known state\nquickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for\npending analysis before returning.\n\n## Query Parameters\n\nThis endpoint supports all query parameters from `POST /v0/purl` including: `alerts`, `actions`, `compact`, `fixable`, `licenseattrib`, `licensedetails`, `purlErrors`, `poll`, `cachedResultsOnly`, and `summary`.\n\nAdditionally, you may provide a `labels` query parameter to apply a repository label's security policies. Pass the label slug as the value (e.g., `?labels=production`). Only one label is currently supported.\n\n## Examples:\n\n### Looking up an npm package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n }\n ]\n}\n```\n\n### Looking up a PyPi package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n }\n ]\n}\n```\n\n### Looking up a Maven package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\n### Batch lookup\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n },\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n },\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\n### With label and options (query parameters):\n\n```\nPOST /v0/orgs/{org_slug}/purl?labels=production&alerts=true&compact=true\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n }\n ]\n}\n```\n\nThis endpoint consumes 100 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- packages:list", + "description": "Batch retrieval of package metadata and alerts by PURL strings for a specific organization. Compatible with CycloneDX reports.\n\nPackage URLs (PURLs) are an ecosystem agnostic way to identify packages.\nCycloneDX SBOMs use the purl format to identify components.\nThis endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report.\n\n**Note:** This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error.\n\nMore information on purl and CycloneDX:\n\n- [`purl` Spec](https://github.com/package-url/purl-spec)\n- [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components)\n\nThis endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate).\nActively running analysis will be returned when available on subsequent runs.\n\nWhen `alerts=true`, Socket may synthesize two alert types to make partial\nresults actionable:\n\n- `pendingScan`: the package is known but analysis has not completed yet\n- `notFound`: Socket could not resolve the package/version metadata\n\nWhen `purlErrors=true`, unresolved `notFound` inputs keep the legacy\n`purlError` stream shape instead of emitting synthetic `notFound`\nartifacts.\n\nUse `poll=false` (default) to fail open and return the current known state\nquickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for\npending analysis before returning.\n\n**Conda (temporary compatibility):** `pkg:conda` inputs are served from the\nalready-scanned PyPI package with the same normalized name and version when\none exists; the response row keeps the original conda PURL in `inputPurl`\nbut reports `type: pypi`. Conda `build`, `subdir`, `type`, and `channel`\nqualifiers are ignored, and conda packages without a scanned PyPI\ncounterpart return the normal `notFound` result. This mapping will be\nreplaced by native conda support.\n\n## Query Parameters\n\nThis endpoint supports all query parameters from `POST /v0/purl` including: `alerts`, `actions`, `compact`, `fixable`, `licenseattrib`, `licensedetails`, `purlErrors`, `poll`, `cachedResultsOnly`, and `summary`.\n\nAdditionally, you may provide a `labels` query parameter to apply a repository label's security policies. Pass the label slug as the value (e.g., `?labels=production`). Only one label is currently supported.\n\n## Examples:\n\n### Looking up an npm package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n }\n ]\n}\n```\n\n### Looking up a PyPi package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n }\n ]\n}\n```\n\n### Looking up a Maven package:\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\n### Batch lookup\n\n```json\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n },\n {\n \"purl\": \"pkg:pypi/django@5.0.6\"\n },\n {\n \"purl\": \"pkg:maven/log4j/log4j@1.2.17\"\n }\n ]\n}\n```\n\n### With label and options (query parameters):\n\n```\nPOST /v0/orgs/{org_slug}/purl?labels=production&alerts=true&compact=true\n{\n \"components\": [\n {\n \"purl\": \"pkg:npm/express@4.19.2\"\n }\n ]\n}\n```\n\nThis endpoint consumes 100 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- packages:list", "responses": { "200": { "content": { @@ -39921,7 +44061,7 @@ "basicAuth": ["fixes:list"] } ], - "description": "Fetches available fixes for vulnerabilities in a repository, scan, or uploaded manifest.\nRequires exactly one of repo_slug, full_scan_id, or tar_hash, as well as vulnerability_ids to be provided.\nvulnerability_ids can be a comma-separated list of GHSA or CVE IDs, or \"*\" for all vulnerabilities.\n\n## Response Structure\n\nThe response contains a `fixDetails` object where each key is a vulnerability ID (GHSA or CVE) and the value is a discriminated union based on the `type` field.\n\n### Common Fields\n\nAll response variants include:\n- `type`: Discriminator field (one of: \"fixFound\", \"partialFixFound\", \"noFixAvailable\", \"fixNotApplicable\", \"errorComputingFix\")\n- `value`: Object containing the variant-specific data\n\nThe `value` object always contains:\n- `ghsa`: string | null - The GHSA ID\n- `cve`: string | null - The CVE ID (if available)\n- `advisoryDetails`: object | null - Advisory details (only if include_details=true)\n\n### Response Variants\n\n**fixFound**: A complete fix is available for all vulnerable packages\n- `value.fixDetails.fixes`: Array of fix objects, each containing:\n - `purl`: Package URL to upgrade\n - `fixedVersion`: Version to upgrade to\n - `manifestFiles`: Array of manifest files containing the package\n - `updateType`: \"patch\" | \"minor\" | \"major\" | \"unknown\"\n- `value.fixDetails.responsibleDirectDependencies`: (optional) Map of direct dependencies responsible for the vulnerability\n\n**partialFixFound**: Fixes available for some but not all vulnerable packages\n- Same as fixFound, plus:\n- `value.fixDetails.unfixablePurls`: Array of packages that cannot be fixed, each containing:\n - `purl`: Package URL\n - `manifestFiles`: Array of manifest files\n - `reasons`: Human-readable explanations of why the package cannot be upgraded. May contain multiple distinct entries when different dependency chains are blocked for different causes (e.g. one chain has no compatible upstream version; another would require a major version bump skipped by `--no-major-updates`).\n\n**noFixAvailable**: No fix exists for this vulnerability (no patched version published)\n- `value.vulnerableArtifacts`: Array of vulnerable packages with their manifest files; each carries a static `reasons` entry stating that no patched version has been published\n\n**fixNotApplicable**: A patched version of the vulnerable package exists but cannot be applied. The most common cause is that there is no upgrade path through the dependency tree — for example, given a chain `App → A@1.0.0 → B@1.0.0` where `B < 2.0.0` is vulnerable, if no version of `A` accepts `B@2.0.0` the fix cannot be applied without a manual override (e.g. `pnpm overrides`). Other causes include callers passing `--no-major-updates` when the only patched version is a major bump.\n- `value.vulnerableArtifacts`: Array of vulnerable packages with their manifest files, each with per-artifact `reasons` explaining why the fix could not be applied (omitted when no explanation is available)\n\n**errorComputingFix**: An error occurred while computing fixes\n- `value.message`: Error description\n\n### Fix version alignment\n\nWhen several requested vulnerabilities are fixed by upgrading the same package, their fix entries carry the SAME `fixedVersion` — the server computes a version that clears all of them together and verifies it against each advisory's affected ranges. Clients can apply the fixes per package without reconciling versions. Only when no single in-policy version fixes all advisories on a package (non-monotonic affected ranges) can entries differ; each is then the minimal upgrade for its own advisory.\n\n### Advisory Details (when include_details=true)\n\n- `title`: string | null\n- `description`: string | null\n- `cwes`: string[] - CWE identifiers\n- `severity`: \"LOW\" | \"MODERATE\" | \"HIGH\" | \"CRITICAL\"\n- `cvssVector`: string | null\n- `publishedAt`: string (ISO date)\n- `kev`: boolean - Whether it's a Known Exploited Vulnerability\n- `epss`: number | null - Exploit Prediction Scoring System score\n- `affectedPurls`: Array of affected packages with version ranges\n\n### Stateful Alert IDs (when include_stateful_alert_ids=true)\n\nTop-level `statefulAlertIds` field — a map of GHSA ID → array of open stateful alert IDs (the human-readable `SOCKET-XXX-N` identifiers also returned by `/v0/orgs/{org_slug}/alerts`). The lookup is org-scoped, so the same GHSA may map to multiple alert IDs when it appears in alerts across different repos or branches. Callers that need a repo/branch filter should intersect this map with results from the alerts API.\n\nThe lookup honors the same scan-type visibility as `/v0/orgs/{org_slug}/alerts` — when the `enableTier1OrgAlertApiRead` feature flag is off for the org, only `socket` scans are visible (no `socket_tier1`).\n\nNote on scopes: this field surfaces identifiers that are otherwise reachable via `/v0/orgs/{org_slug}/alerts` (which requires `alerts:list`). The fixes route is gated on `fixes:list` alone; the GHSAs the alert IDs are keyed to are already part of every `/fixes` response, and exposing the matching alert IDs through this opt-in flag is intentional — it lets a caller with only `fixes:list` complete the correlation back to /alerts on a token that already has that scope. If you require strict scope separation, do not enable this flag.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- fixes:list", + "description": "Fetches available fixes for vulnerabilities in a repository, scan, or uploaded manifest.\nRequires exactly one of repo_slug, full_scan_id, or tar_hash, as well as vulnerability_ids to be provided.\nvulnerability_ids can be a comma-separated list of GHSA or CVE IDs, or \"*\" for all vulnerabilities.\n\n## Response Structure\n\nThe response contains a `fixDetails` object where each key is a vulnerability ID (GHSA or CVE) and the value is a discriminated union based on the `type` field.\n\n### Common Fields\n\nAll response variants include:\n- `type`: Discriminator field (one of: \"fixFound\", \"partialFixFound\", \"noFixAvailable\", \"fixNotApplicable\", \"errorComputingFix\")\n- `value`: Object containing the variant-specific data\n\nThe `value` object always contains:\n- `ghsa`: string | null - The GHSA ID\n- `cve`: string | null - The CVE ID (if available)\n- `advisoryDetails`: object | null - Advisory details (only if include_details=true)\n\n### Response Variants\n\n**fixFound**: A complete fix is available for all vulnerable packages\n- `value.fixDetails.fixes`: Array of fix objects, each containing:\n - `purl`: Package URL to upgrade\n - `fixedVersion`: Version to upgrade to\n - `manifestFiles`: Array of manifest files containing the package\n - `updateType`: \"patch\" | \"minor\" | \"major\" | \"unknown\"\n- `value.fixDetails.responsibleDirectDependencies`: (optional) Map of direct dependencies responsible for the vulnerability\n\n**partialFixFound**: Fixes available for some but not all vulnerable packages\n- Same as fixFound, plus:\n- `value.fixDetails.unfixablePurls`: Array of packages that cannot be fixed, each containing:\n - `purl`: Package URL\n - `manifestFiles`: Array of manifest files\n - `reasons`: Human-readable explanations of why the package cannot be upgraded. May contain multiple distinct entries when different dependency chains are blocked for different causes (e.g. one chain has no compatible upstream version; another would require a major version bump skipped by `--no-major-updates`).\n - `dependencyChain`: (optional) Installed PURLs along the dependency chain where the fix search was blocked, from the blocking package down to this package. Present only when a chain was recorded; the first `reasons` entry describes this chain.\n - `withheldFix`: (optional) Present when a fix exists but this request's policy withheld it: `{ purl, version, reason }` where `purl` is the package (without version), `version` the lowest safe version the policy removed from the fix search, and `reason` one of `majorUpdate` (a major update while `allow_major_updates=false`), `releaseAge` (younger than `minimum_release_age`) or `publishDateUnknown` (publish date unavailable, so `minimum_release_age` cannot be verified). Lifting the policy is not guaranteed to make the fix applicable — other version constraints in the dependency tree may still block this version.\n\n**noFixAvailable**: No fix exists for this vulnerability (no patched version published)\n- `value.vulnerableArtifacts`: Array of vulnerable packages with their manifest files; each carries a static `reasons` entry stating that no patched version has been published\n\n**fixNotApplicable**: A patched version of the vulnerable package exists but cannot be applied. The most common cause is that there is no upgrade path through the dependency tree — for example, given a chain `App → A@1.0.0 → B@1.0.0` where `B < 2.0.0` is vulnerable, if no version of `A` accepts `B@2.0.0` the fix cannot be applied without a manual override (e.g. `pnpm overrides`). Other causes include callers passing `--no-major-updates` when the only patched version is a major bump.\n- `value.vulnerableArtifacts`: Array of vulnerable packages with their manifest files, each with per-artifact `reasons` explaining why the fix could not be applied (always at least one entry; a static fallback when the fix search reported no per-package cause) and an optional `dependencyChain` — installed PURLs from the package that blocked the upgrade down to the vulnerable package, present when a chain was recorded (the first `reasons` entry describes it), and an optional `withheldFix` — present when a fix exists but this request's policy withheld it (see the partialFixFound field list)\n\n**errorComputingFix**: An error occurred while computing fixes\n- `value.message`: Error description\n\n### Fix version alignment\n\nWhen several requested vulnerabilities are fixed by upgrading the same package, their fix entries carry the SAME `fixedVersion` — the server computes a version that clears all of them together and verifies it against each advisory's affected ranges. Clients can apply the fixes per package without reconciling versions. Only when no single in-policy version fixes all advisories on a package (non-monotonic affected ranges) can entries differ; each is then the minimal upgrade for its own advisory.\n\n### Advisory Details (when include_details=true)\n\n- `title`: string | null\n- `description`: string | null\n- `cwes`: string[] - CWE identifiers\n- `severity`: \"LOW\" | \"MODERATE\" | \"HIGH\" | \"CRITICAL\"\n- `cvssVector`: string | null\n- `publishedAt`: string (ISO date)\n- `kev`: boolean - Whether it's a Known Exploited Vulnerability\n- `epss`: number | null - Exploit Prediction Scoring System score\n- `affectedPurls`: Array of affected packages with version ranges\n\n### Stateful Alert IDs (when include_stateful_alert_ids=true)\n\nTop-level `statefulAlertIds` field — a map of GHSA ID → array of open stateful alert IDs (the human-readable `SOCKET-XXX-N` identifiers also returned by `/v0/orgs/{org_slug}/alerts`). The lookup is org-scoped, so the same GHSA may map to multiple alert IDs when it appears in alerts across different repos or branches. Callers that need a repo/branch filter should intersect this map with results from the alerts API.\n\nThe lookup honors the same scan-type visibility as `/v0/orgs/{org_slug}/alerts` — when the `enableTier1OrgAlertApiRead` feature flag is off for the org, only `socket` scans are visible (no `socket_tier1`).\n\nNote on scopes: this field surfaces identifiers that are otherwise reachable via `/v0/orgs/{org_slug}/alerts` (which requires `alerts:list`). The fixes route is gated on `fixes:list` alone; the GHSAs the alert IDs are keyed to are already part of every `/fixes` response, and exposing the matching alert IDs through this opt-in flag is intentional — it lets a caller with only `fixes:list` complete the correlation back to /alerts on a token that already has that scope. If you require strict scope separation, do not enable this flag.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- fixes:list", "responses": { "200": { "content": { @@ -39991,7 +44131,7 @@ }, "/orgs/{org_slug}/telemetry/config": { "get": { - "tags": ["telemetry"], + "tags": ["events"], "summary": "Get Organization Telemetry Config", "operationId": "getOrgTelemetryConfig", "parameters": [ @@ -40062,7 +44202,7 @@ "x-readme": {} }, "put": { - "tags": ["telemetry"], + "tags": ["events"], "summary": "Update Telemetry Config", "operationId": "updateOrgTelemetryConfig", "parameters": [ diff --git a/src/types/strict.mts b/src/types/strict.mts index 0ddb6e1d..5d0efda5 100644 --- a/src/types/strict.mts +++ b/src/types/strict.mts @@ -270,7 +270,7 @@ export type RepositoryListItem = { */ export type StrictErrorResult = { cause?: string | undefined - data?: undefined + data?: undefined | undefined error: string status: number success: false @@ -281,9 +281,9 @@ export type StrictErrorResult = { */ export type StrictResult = | { - cause?: undefined + cause?: undefined | undefined data: T - error?: undefined + error?: undefined | undefined status: number success: true } @@ -293,9 +293,9 @@ export type StrictResult = * Strict type for full scan list result. */ export type FullScanListResult = { - cause?: undefined + cause?: undefined | undefined data: FullScanListData - error?: undefined + error?: undefined | undefined status: number success: true } @@ -304,9 +304,9 @@ export type FullScanListResult = { * Strict type for single full scan result. */ export type FullScanResult = { - cause?: undefined + cause?: undefined | undefined data: FullScanItem - error?: undefined + error?: undefined | undefined status: number success: true } @@ -326,11 +326,11 @@ export type StreamFullScanOptions = { * Record so consumers iterate with Object.values()/Object.entries(). */ export type OrganizationsResult = { - cause?: undefined + cause?: undefined | undefined data: { organizations: Record } - error?: undefined + error?: undefined | undefined status: number success: true } @@ -339,9 +339,9 @@ export type OrganizationsResult = { * Strict type for repositories list result. */ export type RepositoriesListResult = { - cause?: undefined + cause?: undefined | undefined data: RepositoriesListData - error?: undefined + error?: undefined | undefined status: number success: true } @@ -350,9 +350,9 @@ export type RepositoriesListResult = { * Strict type for delete operation result. */ export type DeleteResult = { - cause?: undefined + cause?: undefined | undefined data: { success: boolean } - error?: undefined + error?: undefined | undefined status: number success: true } @@ -361,9 +361,9 @@ export type DeleteResult = { * Strict type for single repository result. */ export type RepositoryResult = { - cause?: undefined + cause?: undefined | undefined data: RepositoryItem - error?: undefined + error?: undefined | undefined status: number success: true } @@ -372,9 +372,9 @@ export type RepositoryResult = { * Strict type for repository labels list result. */ export type RepositoryLabelsListResult = { - cause?: undefined + cause?: undefined | undefined data: RepositoryLabelsListData - error?: undefined + error?: undefined | undefined status: number success: true } @@ -383,9 +383,9 @@ export type RepositoryLabelsListResult = { * Strict type for single repository label result. */ export type RepositoryLabelResult = { - cause?: undefined + cause?: undefined | undefined data: RepositoryLabelItem - error?: undefined + error?: undefined | undefined status: number success: true } @@ -394,9 +394,9 @@ export type RepositoryLabelResult = { * Strict type for delete repository label result. */ export type DeleteRepositoryLabelResult = { - cause?: undefined + cause?: undefined | undefined data: { status: string } - error?: undefined + error?: undefined | undefined status: number success: true } diff --git a/types/api.d.ts b/types/api.d.ts index 439dc047..cae056aa 100644 --- a/types/api.d.ts +++ b/types/api.d.ts @@ -3,36 +3,51 @@ * Do not make direct changes to the file. */ + export interface paths { - '/purl': { + "/purl": { /** - * Get Packages by PURL. - * - * _This endpoint is deprecated._* Deprecated since 2026-01-05. Batch - * retrieval of package metadata and alerts by PURL strings. Compatible with - * CycloneDX reports. Package URLs (PURLs) are an ecosystem agnostic way to - * identify packages. CycloneDX SBOMs use the purl format to identify - * components. This endpoint supports fetching metadata and alerts for - * multiple packages at once by passing an array of purl strings, or by - * passing an entire CycloneDX report. **Note:** This endpoint has a batch - * size limit (default: 1024 PURLs per request). Requests exceeding this - * limit will return a 400 Bad Request error. More information on purl and - * CycloneDX: + * Get Packages by PURL + * @deprecated + * @description **This endpoint is deprecated.** Deprecated since 2026-01-05. + * + * Batch retrieval of package metadata and alerts by PURL strings. Compatible with CycloneDX reports. + * + * Package URLs (PURLs) are an ecosystem agnostic way to identify packages. + * CycloneDX SBOMs use the purl format to identify components. + * This endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report. + * + * **Note:** This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error. + * + * More information on purl and CycloneDX: * * - [`purl` Spec](https://github.com/package-url/purl-spec) - * - [CycloneDX - * Spec](https://cyclonedx.org/specification/overview/#components) This - * endpoint returns the latest available alert data for artifacts in the - * batch (stale while revalidate). Actively running analysis will be - * returned when available on subsequent runs. When `alerts=true`, Socket - * may synthesize two alert types to make partial results actionable: + * - [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components) + * + * This endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate). + * Actively running analysis will be returned when available on subsequent runs. + * + * When `alerts=true`, Socket may synthesize two alert types to make partial + * results actionable: + * * - `pendingScan`: the package is known but analysis has not completed yet - * - `notFound`: Socket could not resolve the package/version metadata When - * `purlErrors=true`, unresolved `notFound` inputs keep the legacy - * `purlError` stream shape instead of emitting synthetic `notFound` - * artifacts. Use `poll=false` (default) to fail open and return the - * current known state quickly. Use `poll=true` to fail closed and wait up - * to `timeoutSec` for pending analysis before returning. + * - `notFound`: Socket could not resolve the package/version metadata + * + * When `purlErrors=true`, unresolved `notFound` inputs keep the legacy + * `purlError` stream shape instead of emitting synthetic `notFound` + * artifacts. + * + * Use `poll=false` (default) to fail open and return the current known state + * quickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for + * pending analysis before returning. + * + * **Conda (temporary compatibility):** `pkg:conda` inputs are served from the + * already-scanned PyPI package with the same normalized name and version when + * one exists; the response row keeps the original conda PURL in `inputPurl` + * but reports `type: pypi`. Conda `build`, `subdir`, `type`, and `channel` + * qualifiers are ignored, and conda packages without a scanned PyPI + * counterpart return the normal `notFound` result. This mapping will be + * replaced by native conda support. * * ## Examples: * @@ -91,214 +106,237 @@ export interface paths { * ``` * * This endpoint consumes 100 units of your quota. - * This endpoint requires the following org token scopes: - * - * - Packages:list * - * @deprecated + * This endpoint requires the following org token scopes: + * - packages:list */ - post: operations['batchPackageFetch'] - } - '/dependencies/search': { + post: operations["batchPackageFetch"]; + }; + "/dependencies/search": { /** - * Search dependencies. + * Search dependencies + * @description Search for any dependency that is being used in your organization. * - * Search for any dependency that is being used in your organization. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - No Scopes Required, but authentication is required. + * - No Scopes Required, but authentication is required */ - post: operations['searchDependencies'] - } - '/dependencies/upload': { + post: operations["searchDependencies"]; + }; + "/dependencies/upload": { /** - * Create a snapshot of all dependencies from manifest information. + * Create a snapshot of all dependencies from manifest information + * @deprecated + * @description **This endpoint is deprecated.** * - * _This endpoint is deprecated._* Upload a set of manifest or lockfiles to - * get your dependency tree analyzed by Socket. You can upload multiple - * lockfiles in the same request, but each filename must be unique. The name - * of the file must be in the supported list. For example, these are valid - * filenames: "requirements.txt", "package.json", "folder/package.json", and - * "deep/nested/folder/package.json". This endpoint consumes 100 units of - * your quota. This endpoint requires the following org token scopes: + * Upload a set of manifest or lockfiles to get your dependency tree analyzed by Socket. + * You can upload multiple lockfiles in the same request, but each filename must be unique. * - * - Report:write + * The name of the file must be in the supported list. * - * @deprecated + * For example, these are valid filenames: "requirements.txt", "package.json", "folder/package.json", and "deep/nested/folder/package.json". + * + * This endpoint consumes 100 units of your quota. + * + * This endpoint requires the following org token scopes: + * - report:write */ - post: operations['createDependenciesSnapshot'] - } - '/orgs/{org_slug}/full-scans': { + post: operations["createDependenciesSnapshot"]; + }; + "/orgs/{org_slug}/full-scans": { /** - * List full scans. + * List full scans + * @description Returns a paginated list of all full scans in an org, excluding SBOM artifacts. * - * Returns a paginated list of all full scans in an org, excluding SBOM - * artifacts. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - full-scans:list. + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:list */ - get: operations['getOrgFullScanList'] + get: operations["getOrgFullScanList"]; /** - * Create full scan. - * - * Create a full scan from a set of package manifest files. Returns a full - * scan including all SBOM artifacts. To get a list of supported filetypes - * that can be uploaded in a full-scan, see the [Get supported file - * types](/reference/getsupportedfiles) endpoint. The maximum number of - * files you can upload at a time is 10000 and each file can be no bigger - * than 268 MB. **Query Parameters:** - * - * - `scan_type` (optional): The type of scan to perform. Defaults to - * 'socket'. Must be 32 characters or less. Used for categorizing multiple - * SBOM heads per repository branch. This endpoint consumes 1 unit of your - * quota. This endpoint requires the following org token scopes: - * - Full-scans:create + * Create full scan + * @description Create a full scan from a set of package manifest files. Returns a full scan including all SBOM artifacts. + * + * To get a list of supported filetypes that can be uploaded in a full-scan, see the [Get supported file types](/reference/getsupportedfiles) endpoint. + * + * The maximum number of files you can upload at a time is 10000 and each file can be no bigger than 268 MB. + * + * **Query Parameters:** + * - `scan_type` (optional): The type of scan to perform. Defaults to 'socket'. Must be 32 characters or less. Used for categorizing multiple SBOM heads per repository branch. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:create */ - post: operations['CreateOrgFullScan'] - } - '/orgs/{org_slug}/full-scans/{full_scan_id}': { + post: operations["CreateOrgFullScan"]; + }; + "/orgs/{org_slug}/full-scans/{full_scan_id}": { /** - * Stream full scan. + * Stream full scan + * @description Stream all SBOM artifacts for a full scan. + * + * This endpoint returns the latest, available alert data for artifacts in the full scan (stale while revalidate). + * Actively running analysis will be returned when available on subsequent runs. + * + * This endpoint consumes 1 unit of your quota. * - * Stream all SBOM artifacts for a full scan. This endpoint returns the - * latest, available alert data for artifacts in the full scan (stale while - * revalidate). Actively running analysis will be returned when available on - * subsequent runs. This endpoint consumes 1 unit of your quota. This - * endpoint requires the following org token scopes: - full-scans:list. + * This endpoint requires the following org token scopes: + * - full-scans:list */ - get: operations['getOrgFullScan'] + get: operations["getOrgFullScan"]; /** - * Delete full scan. + * Delete full scan + * @description Delete an existing full scan. * - * Delete an existing full scan. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - full-scans:delete. + * - full-scans:delete */ - delete: operations['deleteOrgFullScan'] - } - '/orgs/{org_slug}/full-scans/{full_scan_id}/metadata': { + delete: operations["deleteOrgFullScan"]; + }; + "/orgs/{org_slug}/full-scans/{full_scan_id}/metadata": { /** - * Get full scan metadata. + * Get full scan metadata + * @description Get metadata for a single full scan * - * Get metadata for a single full scan * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - full-scans:list. + * - full-scans:list */ - get: operations['getOrgFullScanMetadata'] - } - '/orgs/{org_slug}/full-scans/diff': { + get: operations["getOrgFullScanMetadata"]; + }; + "/orgs/{org_slug}/full-scans/diff": { /** - * Diff Full Scans. + * Diff Full Scans + * @deprecated + * @description **This endpoint is deprecated.** * - * _This endpoint is deprecated._* Get the difference between two existing - * Full Scans. The results are not persisted. This endpoint consumes 1 unit - * of your quota. This endpoint requires the following org token scopes: + * Get the immutable difference between two existing Full Scans. The result uses the policies active when it was computed and may be cached for reuse. * - * - Full-scans:list + * This endpoint consumes 1 unit of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - full-scans:list */ - get: operations['GetOrgDiffScan'] - } - '/orgs/{org_slug}/full-scans/diff/gfm': { + get: operations["GetOrgDiffScan"]; + }; + "/orgs/{org_slug}/full-scans/diff/gfm": { /** - * SCM Comment for Scan Diff. + * SCM Comment for Scan Diff + * @deprecated + * @description **This endpoint is deprecated.** * - * _This endpoint is deprecated._* Get the dependency overview and - * dependency alert comments in GitHub flavored markdown between the diff - * between two existing full scans. This endpoint consumes 1 unit of your - * quota. This endpoint requires the following org token scopes: + * Get the dependency overview and dependency alert comments in GitHub flavored markdown between the diff between two existing full scans. * - * - Full-scans:list + * This endpoint consumes 1 unit of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - full-scans:list */ - get: operations['GetOrgFullScanDiffGfm'] - } - '/orgs/{org_slug}/full-scans/{full_scan_id}/files/tar': { + get: operations["GetOrgFullScanDiffGfm"]; + }; + "/orgs/{org_slug}/full-scans/{full_scan_id}/files/tar": { /** - * Download full scan files as tarball. + * Download full scan files as tarball + * @description Download all files associated with a full scan in tar format. * - * Download all files associated with a full scan in tar format. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - full-scans:list. + * - full-scans:list */ - get: operations['downloadOrgFullScanFilesAsTar'] - } - '/orgs/{org_slug}/full-scans/archive': { + get: operations["downloadOrgFullScanFilesAsTar"]; + }; + "/orgs/{org_slug}/full-scans/archive": { /** - * Create full scan from archive. - * - * Create a full scan by uploading one or more archives. Supported archive - * formats include **.tar**, **.tar.gz/.tgz**, and **.zip**. Each uploaded - * archive is extracted server-side and any supported manifest files (like - * package.json, package-lock.json, pnpm-lock.yaml, etc.) are ingested for - * the scan. If you upload multiple archives in a single request, the - * manifests from every archive are merged into one full scan. The response - * includes any files that were ignored. The maximum combined number of - * files extracted from your upload is 10000 and each extracted file can be - * no bigger than 268 MB. This endpoint consumes 1 unit of your quota. This - * endpoint requires the following org token scopes: - * - * - Full-scans:create + * Create full scan from archive + * @description Create a full scan by uploading one or more archives. Supported archive formats include **.tar**, **.tar.gz/.tgz**, and **.zip**. + * + * Each uploaded archive is extracted server-side and any supported manifest files (like package.json, package-lock.json, pnpm-lock.yaml, etc.) are ingested for the scan. If you upload multiple archives in a single request, the manifests from every archive are merged into one full scan. The response includes any files that were ignored. + * + * The maximum combined number of files extracted from your upload is 10000 and each extracted file can be no bigger than 268 MB. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:create */ - post: operations['CreateOrgFullScanArchive'] - } - '/orgs/{org_slug}/full-scans/{full_scan_id}/rescan': { + post: operations["CreateOrgFullScanArchive"]; + }; + "/orgs/{org_slug}/full-scans/{full_scan_id}/rescan": { /** - * Rescan full scan. - * - * Create a new full scan by rescanning an existing scan. A "shallow" rescan - * reapplies the latest policies to the previously cached dependency - * resolution results. A "deep" rescan reruns dependency resolution and - * applies the latest policies to the results. This endpoint consumes 1 unit - * of your quota. This endpoint requires the following org token scopes: - - * full-scans:create. + * Rescan full scan + * @description Create a new full scan by rescanning an existing scan. A "shallow" rescan reapplies the latest policies to the previously cached dependency resolution results. A "deep" rescan reruns dependency resolution and applies the latest policies to the results. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:create */ - post: operations['rescanOrgFullScan'] - } - '/orgs/{org_slug}/full-scans/{full_scan_id}/format/csv': { + post: operations["rescanOrgFullScan"]; + }; + "/orgs/{org_slug}/full-scans/{full_scan_id}/format/csv": { /** - * Export CSV of alerts for full scan. - * - * Export a CSV file containing all alerts from a full scan. The CSV - * includes details about each alert and the affected packages. You can - * optionally filter using the request body "filters" array. Supported - * filter IDs include: - alert.action (error|warn|monitor|ignore) - - * alert.type - alert.category - alert.severity - * (low|medium|middle|high|critical or 0-3) - artifact.type (purl type, e.g. - * npm, pypi) - dependency.type (direct|transitive) - dependency.scope - * (dev|normal) - dependency.usage (used|unused) - manifest.file This - * endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: - full-scans:list. + * Export CSV of alerts for full scan + * @description Export a CSV file containing all alerts from a full scan. + * + * The CSV includes details about each alert and the affected packages. + * You can optionally filter using the request body "filters" array. Supported filter IDs include: + * - alert.action (error|warn|monitor|ignore) + * - alert.type + * - alert.category + * - alert.severity (low|medium|middle|high|critical or 0-3) + * - artifact.type (purl type, e.g. npm, pypi) + * - dependency.type (direct|transitive) + * - dependency.scope (dev|normal) + * - dependency.usage (used|unused) + * - manifest.file + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:list */ - post: operations['getOrgFullScanCsv'] - } - '/orgs/{org_slug}/full-scans/{full_scan_id}/format/pdf': { + post: operations["getOrgFullScanCsv"]; + }; + "/orgs/{org_slug}/full-scans/{full_scan_id}/format/pdf": { /** - * Generate PDF report for full scan. - * - * Generate a PDF report for all alerts in a full scan. This endpoint - * streams a PDF document containing all alerts found in the full scan, with - * optional filtering and grouping options. Supported request body filter - * IDs include: - alert.action (error|warn|monitor|ignore) - alert.type - - * alert.category - alert.severity (low|medium|middle|high|critical or 0-3) - * - artifact.type (purl type, e.g. npm, pypi) - dependency.type - * (direct|transitive) - dependency.scope (dev|normal) - dependency.usage - * (used|unused) - manifest.file This endpoint consumes 1 unit of your - * quota. This endpoint requires the following org token scopes: - - * full-scans:list. + * Generate PDF report for full scan + * @description Generate a PDF report for all alerts in a full scan. + * + * This endpoint streams a PDF document containing all alerts found in the full scan, + * with optional filtering and grouping options. + * + * Supported request body filter IDs include: + * - alert.action (error|warn|monitor|ignore) + * - alert.type + * - alert.category + * - alert.severity (low|medium|middle|high|critical or 0-3) + * - artifact.type (purl type, e.g. npm, pypi) + * - dependency.type (direct|transitive) + * - dependency.scope (dev|normal) + * - dependency.usage (used|unused) + * - manifest.file + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:list */ - post: operations['getOrgFullScanPdf'] - } - '/orgs/{org_slug}/export/cdx/{id}': { + post: operations["getOrgFullScanPdf"]; + }; + "/orgs/{org_slug}/export/cdx/{id}": { /** * Export CycloneDX SBOM (Beta) + * @description Export a Socket SBOM as a CycloneDX SBOM * - * Export a Socket SBOM as a CycloneDX SBOM * Supported ecosystems: + * * - crates * - go * - maven @@ -308,42 +346,48 @@ export interface paths { * - rubygems * - spdx * - cdx + * * Unsupported ecosystems are filtered from the export. + * * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - report:read. + * - report:read */ - get: operations['exportCDX'] - } - '/orgs/{org_slug}/export/openvex/{id}': { + get: operations["exportCDX"]; + }; + "/orgs/{org_slug}/export/openvex/{id}": { /** * Export OpenVEX Document (Beta) + * @description Export vulnerability exploitability data as an OpenVEX v0.2.0 document. * - * Export vulnerability exploitability data as an OpenVEX v0.2.0 document. * OpenVEX (Vulnerability Exploitability eXchange) documents communicate the - * exploitability status of vulnerabilities in software products. This - * export includes: + * exploitability status of vulnerabilities in software products. This export + * includes: * - * - **Patch data**: Vulnerabilities fixed by applied Socket patches are - * marked as "fixed" - * - **Reachability analysis**: Code reachability determines if vulnerable - * code is exploitable: + * - **Patch data**: Vulnerabilities fixed by applied Socket patches are marked as "fixed" + * - **Reachability analysis**: Code reachability determines if vulnerable code is exploitable: * - Unreachable code → "not_affected" with justification * - Reachable code → "affected" - * - Unknown/pending → "under_investigation" Each statement in the document - * represents a single artifact-vulnerability pair for granular - * reachability information. This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - Report:read + * - Unknown/pending → "under_investigation" + * + * Each statement in the document represents a single artifact-vulnerability pair + * for granular reachability information. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - report:read */ - get: operations['exportOpenVEX'] - } - '/orgs/{org_slug}/export/spdx/{id}': { + get: operations["exportOpenVEX"]; + }; + "/orgs/{org_slug}/export/spdx/{id}": { /** * Export SPDX SBOM (Beta) + * @description Export a Socket SBOM as a SPDX SBOM * - * Export a Socket SBOM as a SPDX SBOM * Supported ecosystems: + * * - crates * - go * - maven @@ -353,707 +397,892 @@ export interface paths { * - rubygems * - spdx * - cdx + * * Unsupported ecosystems are filtered from the export. + * * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - report:read. + * - report:read */ - get: operations['exportSPDX'] - } - '/orgs/{org_slug}/diff-scans': { + get: operations["exportSPDX"]; + }; + "/orgs/{org_slug}/diff-scans": { /** - * List diff scans. + * List diff scans + * @description Returns a paginated list of all diff scans in an organization. * - * Returns a paginated list of all diff scans in an organization. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - diff-scans:list. + * - diff-scans:list */ - get: operations['listOrgDiffScans'] - } - '/orgs/{org_slug}/diff-scans/{diff_scan_id}': { + get: operations["listOrgDiffScans"]; + }; + "/orgs/{org_slug}/diff-scans/{diff_scan_id}": { /** - * Get diff scan. + * Get diff scan + * @description Get the difference between two full scans from an existing diff scan resource. * - * Get the difference between two full scans from an existing diff scan - * resource. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - diff-scans:list. + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - diff-scans:list */ - get: operations['getDiffScanById'] + get: operations["getDiffScanById"]; /** - * Delete diff scan. + * Delete diff scan + * @description Delete an existing diff scan. * - * Delete an existing diff scan. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - diff-scans:delete. + * - diff-scans:delete */ - delete: operations['deleteOrgDiffScan'] - } - '/orgs/{org_slug}/diff-scans/{diff_scan_id}/gfm': { + delete: operations["deleteOrgDiffScan"]; + }; + "/orgs/{org_slug}/diff-scans/{diff_scan_id}/gfm": { /** - * SCM Comment for Diff Scan. + * SCM Comment for Diff Scan + * @description Get the dependency overview and dependency alert comments in GitHub flavored markdown for an existing diff scan. * - * Get the dependency overview and dependency alert comments in GitHub - * flavored markdown for an existing diff scan. This endpoint consumes 1 - * unit of your quota. This endpoint requires the following org token - * scopes: - diff-scans:list. - */ - get: operations['GetDiffScanGfm'] - } - '/orgs/{org_slug}/diff-scans/from-repo/{repo_slug}': { - /** - * Create diff scan from repository HEAD full-scan. - * - * Create a diff scan between the repository's current HEAD full scan and a - * new full scan from uploaded manifest files. Returns metadata about the - * diff scan. Once the diff scan is created, fetch the diff scan from the - * [api_url](/reference/getDiffScanById) URL to get the contents of the - * diff. The maximum number of files you can upload at a time is 10000 and - * each file can be no bigger than 268 MB. This endpoint consumes 1 unit of - * your quota. This endpoint requires the following org token scopes: - * - * - Repo:list - * - Diff-scans:create - * - Full-scans:create + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - diff-scans:list */ - post: operations['createOrgRepoDiff'] - } - '/orgs/{org_slug}/diff-scans/from-ids': { + get: operations["GetDiffScanGfm"]; + }; + "/orgs/{org_slug}/diff-scans/from-repo/{repo_slug}": { /** - * Create diff scan from full scan IDs. + * Create diff scan from repository HEAD full-scan + * @description Create a diff scan between the repository's current HEAD full scan and a new full scan from uploaded manifest files. + * Returns metadata about the diff scan. Once the diff scan is created, fetch the diff scan from + * the [api_url](/reference/getDiffScanById) URL to get the contents of the diff. + * + * The maximum number of files you can upload at a time is 10000 and each file can be no bigger than 268 MB. * - * Create a diff scan from two existing full scan IDs. The full scans must - * be in the same repository. Returns metadata about the diff scan. Once the - * diff scan is created, fetch the diff scan from the - * [api_url](/reference/getDiffScanById) URL to get the contents of the - * diff. This endpoint consumes 1 unit of your quota. This endpoint requires - * the following org token scopes: + * This endpoint consumes 1 unit of your quota. * - * - Diff-scans:create - * - Full-scans:list + * This endpoint requires the following org token scopes: + * - repo:list + * - diff-scans:create + * - full-scans:create */ - post: operations['createOrgDiffScanFromIds'] - } - '/orgs/{org_slug}/triage/alerts': { + post: operations["createOrgRepoDiff"]; + }; + "/orgs/{org_slug}/diff-scans/from-ids": { /** - * List Org Alert Triage. + * Create diff scan from full scan IDs + * @description Create a diff scan from two existing full scan IDs. The full scans must be in the same repository. + * Returns metadata about the diff scan. Once the diff scan is created, fetch the diff scan from + * the [api_url](/reference/getDiffScanById) URL to get the contents of the diff. * - * List triage actions for an organization. Results are paginated and can be - * sorted by created_at or updated_at. This endpoint consumes 1 unit of your - * quota. This endpoint requires the following org token scopes: + * This endpoint consumes 1 unit of your quota. * - * - Triage:alerts-list - */ - get: operations['getOrgTriage'] - /** - * Create/Update Org Alert Triage. - * - * Create or update triage actions on organization alerts. Accepts a batch - * of triage entries. Omit `uuid` to create a new entry; provide an existing - * `uuid` to update it. Use `?force=true` for broad triages that lack a - * specific `alertKey` or granular package information. This endpoint - * consumes 1 unit of your quota. This endpoint requires the following org - * token scopes: - triage:alerts-update. + * This endpoint requires the following org token scopes: + * - diff-scans:create + * - full-scans:list */ - post: operations['updateOrgAlertTriage'] - } - '/orgs/{org_slug}/triage/alerts/{uuid}': { + post: operations["createOrgDiffScanFromIds"]; + }; + "/orgs/{org_slug}/triage/alerts": { /** - * Delete Org Alert Triage. + * List Org Alert Triage + * @description List triage actions for an organization. Results are paginated and can be sorted by created_at or updated_at. * - * Delete a specific triage rule by UUID. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - triage:alerts-update. + * - triage:alerts-list */ - delete: operations['deleteOrgAlertTriage'] - } - '/orgs/{org_slug}/alerts/resolutions': { + get: operations["getOrgTriage"]; /** - * List Org Alert Resolutions. + * Create/Update Org Alert Triage + * @description Create or update triage actions on organization alerts. Accepts a batch of triage entries. Omit `uuid` to create a new entry; provide an existing `uuid` to update it. Use `?force=true` for broad triages that lack a specific `alertKey` or granular package information. * - * List active alert resolutions for an organization. Results are paginated - * via an opaque cursor and ordered by created_at. Each row includes the - * anchor fields (alert_type, repo, repo_label, artifact_*) that describe - * the resolution scope. This endpoint consumes 1 unit of your quota. This - * endpoint requires the following org token scopes: + * This endpoint consumes 1 unit of your quota. * - * - Alert-resolution:list + * This endpoint requires the following org token scopes: + * - triage:alerts-update */ - get: operations['getOrgAlertResolutions'] - } - '/orgs/{org_slug}/alerts/resolutions/{uuid}': { + post: operations["updateOrgAlertTriage"]; + }; + "/orgs/{org_slug}/triage/alerts/{uuid}": { /** - * Get Org Alert Resolution. + * Delete Org Alert Triage + * @description Delete a specific triage rule by UUID. * - * Fetch a single active alert resolution by UUID. Returns the same row - * shape as the list endpoint. This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - - * alert-resolution:read. - */ - get: operations['getOrgAlertResolution'] - /** - * Delete Org Alert Resolution. + * This endpoint consumes 1 unit of your quota. * - * Delete an alert resolution by UUID. Once deleted, alerts previously - * hidden by this resolution will reappear after the next org snapshot. This - * endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: - alert-resolution:delete. + * This endpoint requires the following org token scopes: + * - triage:alerts-update */ - delete: operations['deleteOrgAlertResolution'] - } - '/orgs/{org_slug}/repos': { + delete: operations["deleteOrgAlertTriage"]; + }; + "/orgs/{org_slug}/alerts/resolutions": { /** - * List repositories. + * List Org Alert Resolutions + * @description List active alert resolutions for an organization. Results are paginated via an opaque cursor and ordered by created_at. Each row includes the anchor fields (alert_type, repo, repo_label, artifact_*) that describe the resolution scope. Tokens restricted to specific repositories only see org-wide resolutions and resolutions anchored to their granted repositories. * - * Lists repositories for the specified organization. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - repo:list. + * - alert-resolution:list */ - get: operations['getOrgRepoList'] + get: operations["getOrgAlertResolutions"]; /** - * Create repository. + * Create Org Alert Resolution + * @description Create an alert resolution. The `vigil_selector` describes which alerts the resolution applies to; matching alerts are hidden after the next org snapshot. Returns the same row shape as the list endpoint. Tokens restricted to specific repositories may only create resolutions anchored to a single granted repository via `location.repo`; org-wide or multi-repository selectors require an org-wide token. * - * Create a repository. Repos collect Full scans and Diff scans and are - * typically associated with a git repo. This endpoint consumes 1 unit of - * your quota. This endpoint requires the following org token scopes: - - * repo:create. + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-resolution:create */ - post: operations['createOrgRepo'] - } - '/orgs/{org_slug}/repos/{repo_slug}': { + post: operations["createOrgAlertResolution"]; + }; + "/orgs/{org_slug}/alerts/resolutions/{uuid}": { /** - * Get repository. + * Get Org Alert Resolution + * @description Fetch a single active alert resolution by UUID. Returns the same row shape as the list endpoint. Tokens restricted to specific repositories cannot read resolutions anchored to repositories outside their grants. * - * Retrieve a repository associated with an organization. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - repo:list. + * - alert-resolution:read */ - get: operations['getOrgRepo'] + get: operations["getOrgAlertResolution"]; /** - * Update repository. + * Delete Org Alert Resolution + * @description Delete an alert resolution by UUID. Once deleted, alerts previously hidden by this resolution will reappear after the next org snapshot. Tokens restricted to specific repositories may only delete resolutions anchored to a granted repository. * - * Update details of an existing repository. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - repo:update. + * - alert-resolution:delete */ - post: operations['updateOrgRepo'] + delete: operations["deleteOrgAlertResolution"]; + }; + "/orgs/{org_slug}/alert-policies": { /** - * Delete repository. + * List Org Alert Policies + * @description List the alert policies of an organization. The default policy (which applies to all repositories without a policy label) is always first, followed by custom policies ordered by creation time. Requires a token with org-wide repository access; repo-restricted tokens receive 403. * - * Delete a single repository and all of its associated Full scans and Diff - * scans. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - repo:delete. - */ - delete: operations['deleteOrgRepo'] - } - '/orgs/{org_slug}/repos/labels/{label_id}/associate': { - /** - * Associate repository label (beta) + * This endpoint consumes 1 unit of your quota. * - * Associate a repository label with a repository. Labels can be used to - * group and organize repositories and to apply security/license policies. - * This endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: - repo-label:update. + * This endpoint requires the following org token scopes: + * - alert-policy:list */ - post: operations['associateOrgRepoLabel'] - } - '/orgs/{org_slug}/repos/labels': { + get: operations["getOrgAlertPolicies"]; /** - * List repository labels (beta) + * Create Org Alert Policy + * @description Create an alert policy. A repo label with the same name is created to scope the policy; repositories carrying that label are governed by the policy. Requires a token with org-wide repository access; repo-restricted tokens receive 403. * - * Lists repository labels for the specified organization. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - repo-label:list. + * - alert-policy:create */ - get: operations['getOrgRepoLabelList'] + post: operations["createOrgAlertPolicy"]; + }; + "/orgs/{org_slug}/alert-policies/{policy_id}": { /** - * Create repository label (beta) + * Get Org Alert Policy + * @description Fetch a single alert policy by ID. Use `default` as the ID for the default policy, which applies to all repositories without a policy label. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. * - * Create a repository label. Labels can be used to group and organize - * repositories and to apply security/license policies. This endpoint - * consumes 1 unit of your quota. This endpoint requires the following org - * token scopes: - repo-label:create. + * This endpoint requires the following org token scopes: + * - alert-policy:read */ - post: operations['createOrgRepoLabel'] - } - '/orgs/{org_slug}/repos/labels/{label_id}': { + get: operations["getOrgAlertPolicy"]; /** - * Get repository label (beta) + * Update Org Alert Policy + * @description Update an alert policy. Only the provided fields change; `repository_ids` replaces the full set of repositories the policy scopes to. The default policy cannot be renamed and its scope is implicit. Requires a token with org-wide repository access; repo-restricted tokens receive 403. * - * Retrieve a repository label associated with an organization and label ID. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - repo-label:list. + * - alert-policy:update */ - get: operations['getOrgRepoLabel'] + put: operations["updateOrgAlertPolicy"]; /** - * Update repository label (beta) + * Delete Org Alert Policy + * @description Delete an alert policy along with its rules and repo label. Repositories previously scoped to the policy fall back to the default policy after the next org snapshot. The default policy cannot be deleted. Requires a token with org-wide repository access; repo-restricted tokens receive 403. * - * Update a repository label name. Labels can be used to group and organize - * repositories and to apply security/license policies. This endpoint - * consumes 1 unit of your quota. This endpoint requires the following org - * token scopes: - repo-label:update. - */ - put: operations['updateOrgRepoLabel'] - /** - * Delete repository label (beta) + * This endpoint consumes 1 unit of your quota. * - * Delete a repository label and all of its associations (repositories, - * security policy, license policy, etc.). This endpoint consumes 1 unit of - * your quota. This endpoint requires the following org token scopes: - - * repo-label:delete. + * This endpoint requires the following org token scopes: + * - alert-policy:delete */ - delete: operations['deleteOrgRepoLabel'] - } - '/orgs/{org_slug}/repos/labels/{label_id}/label-setting': { + delete: operations["deleteOrgAlertPolicy"]; + }; + "/orgs/{org_slug}/alert-policies/{policy_id}/rules": { /** - * Get repository label setting (beta) + * List Org Alert Policy Rules + * @description List the custom rules of an alert policy in evaluation order (ascending rank). Rules are evaluated before the policy baseline; the first matching rule decides the alert action. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. * - * Retrieve the setting (e.g. security/license policy) for a repository - * label. Note that repository label settings currently only support - * `issueRules`, `issueRulesPolicyDefault`, `licensePolicy`, and - * `recentlyPublishedThresholdMs`. A policy is considered "active" for a - * given repository label if the `issueRulesPolicyDefault` is set, and - * inactive when not set. `issueRules` can be used to further refine the - * alert triage strategy. This endpoint consumes 1 unit of your quota. This - * endpoint requires the following org token scopes: - repo-label:list. + * This endpoint requires the following org token scopes: + * - alert-policy:list */ - get: operations['getOrgRepoLabelSetting'] + get: operations["getOrgAlertPolicyRules"]; /** - * Update repository label setting (beta) + * Create Org Alert Policy Rule + * @description Create a rule on an alert policy. Rules are evaluated in ascending rank order and the first matching rule decides the alert action. Provide at most one of `position`, `rank`, `before_rule_id`, or `after_rule_id`; the rule is placed first when no position is provided. Requires a token with org-wide repository access; repo-restricted tokens receive 403. * - * Update the setting (e.g. security/license policy) for a repository label. - * Note that repository label settings currently only support `issueRules`, - * `issueRulesPolicyDefault`, `licensePolicy`, and - * `recentlyPublishedThresholdMs`. A policy is considered "active" - * for a given repository label if the `issueRulesPolicyDefault` is - * set, and inactive when not set. `issueRules` can be used to further - * refine the alert triage strategy. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - repo-label:update. + * - alert-policy:create */ - put: operations['updateOrgRepoLabelSetting'] + post: operations["createOrgAlertPolicyRule"]; + }; + "/orgs/{org_slug}/alert-policies/{policy_id}/rules/{rule_id}": { /** - * Delete repository label setting (beta) + * Get Org Alert Policy Rule + * @description Fetch a single alert policy rule by UUID. Returns the same row shape as the rules list endpoint. Requires a token with org-wide repository access; repo-restricted tokens receive 403. * - * Delete the setting (e.g. security/license policy) for a repository label. - * Note that repository label settings currently only support `issueRules`, - * `issueRulesPolicyDefault`, `licensePolicy`, and - * `recentlyPublishedThresholdMs`. A policy is considered "active" - * for a given repository label if the `issueRulesPolicyDefault` is - * set, and inactive when not set. `issueRules` can be used to further - * refine the alert triage strategy. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - repo-label:update. + * - alert-policy:read */ - delete: operations['deleteOrgRepoLabelSetting'] - } - '/orgs/{org_slug}/repos/labels/{label_id}/disassociate': { + get: operations["getOrgAlertPolicyRule"]; /** - * Disassociate repository label (beta) + * Update Org Alert Policy Rule + * @description Update an alert policy rule. Only the provided fields change. To move the rule, provide at most one of `position`, `rank`, `before_rule_id`, or `after_rule_id`. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. * - * Disassociate a repository label from a repository. Labels can be used to - * group and organize repositories and to apply security/license policies. - * This endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: - repo-label:update. + * This endpoint requires the following org token scopes: + * - alert-policy:update */ - post: operations['disassociateOrgRepoLabel'] - } - '/orgs/{org_slug}/settings/integrations/{integration_id}/events': { + put: operations["updateOrgAlertPolicyRule"]; /** - * Get integration events. + * Delete Org Alert Policy Rule + * @description Delete an alert policy rule. Alerts previously matched by this rule are re-evaluated against the remaining rules and baseline after the next org snapshot. Requires a token with org-wide repository access; repo-restricted tokens receive 403. * * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - integration:list. + * - alert-policy:delete */ - get: operations['getIntegrationEvents'] - } - '/orgs/{org_slug}/settings/security-policy': { + delete: operations["deleteOrgAlertPolicyRule"]; + }; + "/orgs/{org_slug}/alert-policies/migration/status": { /** - * Get Organization Security Policy. + * Get Org Alert Policy Migration Status + * @description Retrieve the alert policy migration status of an organization. This is read-only and does not enroll organizations or start migration windows. Requires a token with org-wide repository access; repo-restricted tokens receive 403. * - * Retrieve the security policy of an organization. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - security-policy:read. + * - alert-policy:list */ - get: operations['getOrgSecurityPolicy'] + get: operations["getOrgAlertPolicyMigrationStatus"]; + }; + "/orgs/{org_slug}/alert-policies/migration/translate": { /** - * Update Security Policy. + * Translate Org Alert Triage + * @description Translate a legacy alert triage payload — the same body as `POST /v0/orgs/{org_slug}/triage/alerts` — into the resolution or policy-rule requests that replace it. Nothing is created. Policy-rule translations target the default (Main) policy, which covers repositories without a policy label; labeled policies do not inherit those rules, so POST the same body to `/alert-policies/{id}/rules` if the rule should apply there. Entries that cannot be translated are returned in `untranslatable`; the rest are in `translations`. Requires one of: `triage:alerts-update`, `alert-policy:read`, or `alert-resolution:create`. * - * Update the security policy of an organization. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - security-policy:update. + * - No Scopes Required, but authentication is required */ - post: operations['updateOrgSecurityPolicy'] - } - '/orgs/{org_slug}/settings/license-policy': { + post: operations["translateOrgAlertPolicyMigrationTriage"]; + }; + "/orgs/{org_slug}/repos": { /** - * Get Organization License Policy. + * List repositories + * @description Lists repositories for the specified organization. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/viewlicensepolicy) instead. - * Retrieve the license policy of an organization. This endpoint consumes 1 - * unit of your quota. This endpoint requires the following org token - * scopes: - * - * - License-policy:read + * This endpoint consumes 1 unit of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - repo:list */ - get: operations['getOrgLicensePolicy'] + get: operations["getOrgRepoList"]; /** - * Update License Policy. - * - * Set the organization's license policy. - * - * ## License policy schema - * - * ```json - * { - * allow?: Array - * warn?: Array - * options?: Array - * } - * ``` - * - * Elements of the `allow` and `warn` arrays strings representing items - * which should be allowed, or which should trigger a warning; license data - * found in package which not present in either array will produce a license - * violation (effectively a "hard" error). For example, to allow Apache-2.0 - * and MIT to the allow list, simply add the strings "Apache-2.0" and "MIT" - * to the `allow` array. Strings appearing in these arrays are generally - * "what you see is what you get", with two important exceptions: strings - * which are recognized as license classes and strings which are recognized - * as PURLs are handled differently to allow for more flexible license - * policy creation. - * - * ## License Classes - * - * Strings which are license classes will expand to a list of licenses known - * to be in that particular license class. Recognized license classes are: - * 'permissive', 'permissive (model)', 'permissive (gold)', 'permissive - * (silver)', 'permissive (bronze)', 'permissive (lead)', 'copyleft', - * 'maximal copyleft', 'network copyleft', 'strong copyleft', 'weak - * copyleft', 'contributor license agreement', 'public domain', 'proprietary - * free', 'source available', 'proprietary', 'commercial', 'patent' Users - * can learn more about [copyleft - * tiers](https://blueoakcouncil.org/copyleft) and [permissive - * tiers](https://blueoakcouncil.org/list) by reading the linked resources. - * - * ## PURLs - * - * Users may also modify their license policy's allow and warn lists by - * using [package URLs](https://github.com/package-url/purl-spec) (aka - * PURLs), which support glob patterns to allow a range of versions, files - * and directories, etc. purl qualifiers which support globs are `filename`, - * `version_glob`, `artifact_id` and `license_provenance` (primarily used - * for allowing data from registry metadata). - * - * ### Examples: + * Create repository + * @description Create a repository. * - * Allow all license data found in a specific version of a package 4.14.1: - * `pkg:npm/lodash@4.14.1` Allow all license data found in a version range - * of a package: `pkg:npm/lodash?version_glob=15.*` Allow all license data - * in the test directory of a given package for certain version ranges: - * `pkg:npm/lodash@15.*.*?file_name=lodash/test/*` Allow all license data - * taken from the package registry for a package and version range: - * `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata` + * Repos collect Full scans and Diff scans and are typically associated with a git repo. * - * ## Available options + * This endpoint consumes 1 unit of your quota. * - * `toplevelOnly`: only apply the license policy to "top level" license data - * in a package, which includes registry metadata, LICENSE files, and - * manifest files which are closest to the root of the package. - * `applyToUnidentified`: Apply license policy to found but unidentified - * license data. If enabled, the license policy will be applied to license - * data which could not be affirmatively identified as a known license (this - * will effectively merge the license policy violation and unidentified - * license alerts). If disabled, license policy alerts will only be shown - * for license data which is positively identified as something not allowed - * or set to warn by the license policy. This endpoint consumes 1 unit of - * your quota. This endpoint requires the following org token scopes: - * - * - License-policy:update + * This endpoint requires the following org token scopes: + * - repo:create */ - post: operations['updateOrgLicensePolicy'] - } - '/orgs/{org_slug}/settings/license-policy/view': { + post: operations["createOrgRepo"]; + }; + "/orgs/{org_slug}/repos/{repo_slug}": { /** - * Get License Policy (Beta) + * Get repository + * @description Retrieve a repository associated with an organization. * - * Returns an organization's license policy including allow, warn, monitor, - * and deny categories. The deny category contains all licenses that are not - * explicitly categorized as allow, warn, or monitor. This endpoint consumes - * 1 unit of your quota. This endpoint requires the following org token - * scopes: - license-policy:read. - */ - get: operations['viewLicensePolicy'] - } - '/orgs/{org_slug}/settings/socket-basics': { - /** - * Get Socket Basics configuration, including toggles for the various tools - * it supports. - * - * Socket Basics is a CI/CD security scanning suite that runs on your source - * code, designed to complement Socket SCA and provide full coverage. - * - * - **SAST** - Find issues and risks with your code via static analysis using - * best in class Open Source tools - * - **Secret Scanning** - Detected potentially leaked secrets and credentials - * within your code - * - **Container Security** - Docker image and Dockerfile vulnerability - * scanning This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - * - Socket-basics:read - */ - get: operations['getSocketBasicsConfig'] - } - '/orgs/{org_slug}/historical/alerts': { - /** - * List historical alerts (Beta) + * This endpoint consumes 1 unit of your quota. * - * List historical alerts. Pagination: keep requesting pages (passing the - * previous response's `endCursor` as `startAfterCursor`) until `endCursor` - * is `null`. Do not stop when `items` is empty — an empty page can be - * returned while more results still remain on later pages, so `endCursor` - * being `null` is the only reliable end-of-results signal. This endpoint - * consumes 10 units of your quota. This endpoint requires the following org - * token scopes: - historical:alerts-list. + * This endpoint requires the following org token scopes: + * - repo:list */ - get: operations['historicalAlertsList'] - } - '/orgs/{org_slug}/historical/alerts/trend': { + get: operations["getOrgRepo"]; /** - * Trend of historical alerts (Beta) + * Update repository + * @description Update details of an existing repository. + * + * This endpoint consumes 1 unit of your quota. * - * Trend analytics of historical alerts. - * This endpoint consumes 10 units of your quota. * This endpoint requires the following org token scopes: - * - historical:alerts-trend. + * - repo:update */ - get: operations['historicalAlertsTrend'] - } - '/orgs/{org_slug}/historical/dependencies/trend': { + post: operations["updateOrgRepo"]; /** - * Trend of historical dependencies (Beta) + * Delete repository + * @description Delete a single repository and all of its associated Full scans and Diff scans. + * + * This endpoint consumes 1 unit of your quota. * - * Trend analytics of historical dependencies. - * This endpoint consumes 10 units of your quota. * This endpoint requires the following org token scopes: - * - historical:dependencies-trend. + * - repo:delete */ - get: operations['historicalDependenciesTrend'] - } - '/orgs/{org_slug}/historical/snapshots': { + delete: operations["deleteOrgRepo"]; + }; + "/orgs/{org_slug}/repos/labels/{label_id}/associate": { /** - * List details of periodic historical data snapshots (Beta) + * Associate repository label (beta) + * @description Associate a repository label with a repository. * - * This API endpoint is used to list the details of historical snapshots. - * Snapshots of organization data are taken periodically, and each - * historical snapshot record contains high-level overview metrics about the - * data that was collected. Other [Historical Data - * Endpoints](/reference/historical-data-endpoints) can be used to fetch the - * raw data associated with each snapshot. Historical snapshots contain - * details and raw data for the following resources: + * Labels can be used to group and organize repositories and to apply security/license policies. * - * - Repositories - * - Alerts - * - Dependencies - * - Artifacts - * - Users - * - Settings Daily snapshot data is bucketed to the nearest day which is - * described in more detail at: [Historical Data - * Endpoints](/reference/historical-data-endpoints) This endpoint consumes - * 10 units of your quota. This endpoint requires the following org token - * scopes: - * - Historical:snapshots-list + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo-label:update */ - get: operations['historicalSnapshotsList'] + post: operations["associateOrgRepoLabel"]; + }; + "/orgs/{org_slug}/repos/labels": { /** - * Start historical data snapshot job (Beta) + * List repository labels (beta) + * @description Lists repository labels for the specified organization. * - * This API endpoint is used to start a historical snapshot job. While - * snapshots are typically taken multiple times a day for paid plans and - * once a day for free plans, this endpoint can be used to start an "on - * demand" snapshot job to ensure the latest data is collected and stored - * for historical purposes. An historical snapshot will contain details and - * raw data for the following resources: + * This endpoint consumes 1 unit of your quota. * - * - Repositories - * - Alerts - * - Dependencies - * - Artifacts - * - Users - * - Settings Historical snapshot data is bucketed to the nearest day which is - * described in more detail at: [Historical Data - * Endpoints](/reference/historical-data-endpoints) This endpoint consumes - * 10 units of your quota. This endpoint requires the following org token - * scopes: - * - Historical:snapshots-start + * This endpoint requires the following org token scopes: + * - repo-label:list */ - post: operations['historicalSnapshotsStart'] - } - '/orgs/{org_slug}/audit-log': { + get: operations["getOrgRepoLabelList"]; /** - * Get Audit Log Events. + * Create repository label (beta) + * @description Create a repository label. + * + * Labels can be used to group and organize repositories and to apply security/license policies. * - * Paginated list of audit log events. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - audit-log:list. + * - repo-label:create */ - get: operations['getAuditLogEvents'] - } - '/orgs/{org_slug}/api-tokens': { + post: operations["createOrgRepoLabel"]; + }; + "/orgs/{org_slug}/repos/labels/{label_id}": { /** - * List API Tokens. + * Get repository label (beta) + * @description Retrieve a repository label associated with an organization and label ID. + * + * This endpoint consumes 1 unit of your quota. * - * List all API Tokens. - * This endpoint consumes 10 units of your quota. * This endpoint requires the following org token scopes: - * - api-tokens:list. + * - repo-label:list */ - get: operations['getAPITokens'] + get: operations["getOrgRepoLabel"]; /** - * Create API Token. + * Update repository label (beta) + * @description Update a repository label name. * - * Create an API Token. The API Token created must use a subset of - * permissions the API token creating them. This endpoint consumes 10 units - * of your quota. This endpoint requires the following org token scopes: - - * api-tokens:create. - */ - post: operations['postAPIToken'] - } - '/orgs/{org_slug}/api-tokens/update': { - /** - * Update API Token. + * Labels can be used to group and organize repositories and to apply security/license policies. * - * Update an API Token. The API Token created must use a subset of - * permissions the API token creating them. This endpoint consumes 10 units - * of your quota. This endpoint requires the following org token scopes: - - * api-tokens:create. - */ - post: operations['postAPITokenUpdate'] - } - '/orgs/{org_slug}/api-tokens/rotate': { - /** - * Rotate API Token. + * This endpoint consumes 1 unit of your quota. * - * Rotate an API Token - * This endpoint consumes 10 units of your quota. * This endpoint requires the following org token scopes: - * - api-tokens:rotate. + * - repo-label:update */ - post: operations['postAPITokensRotate'] - } - '/orgs/{org_slug}/api-tokens/revoke': { + put: operations["updateOrgRepoLabel"]; /** - * Revoke API Token. + * Delete repository label (beta) + * @description Delete a repository label and all of its associations (repositories, security policy, license policy, etc.). + * + * This endpoint consumes 1 unit of your quota. * - * Revoke an API Token - * This endpoint consumes 10 units of your quota. * This endpoint requires the following org token scopes: - * - api-tokens:revoke. + * - repo-label:delete */ - post: operations['postAPITokensRevoke'] - } - '/orgs/{org_slug}/supported-files': { + delete: operations["deleteOrgRepoLabel"]; + }; + "/orgs/{org_slug}/repos/labels/{label_id}/label-setting": { /** - * Get supported file types. - * - * Get a list of supported files for full scan generation. Files are - * categorized first by environment (e.g. NPM or PyPI), then by name. Files - * whose names match the patterns returned by this endpoint can be uploaded - * for report generation. Examples of supported filenames include - * `package.json`, `package-lock.json`, and `yarn.lock`. This endpoint - * consumes 1 unit of your quota. This endpoint requires the following org - * token scopes: - No Scopes Required, but authentication is required. - */ - get: operations['getSupportedFiles'] - } - '/threat-feed': { - /** - * Get Threat Feed Items (Deprecated) - * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/getorgthreatfeeditems) - * instead. Paginated list of threat feed items. This endpoint requires an - * Enterprise Plan with Threat Feed add-on. - * [Contact](https://socket.dev/demo?utm_source=api-docs&utm_medium=referral&utm_campaign=tracking) - * our sales team for more details. This endpoint consumes 1 unit of your - * quota. This endpoint requires the following org token scopes: + * Get repository label setting (beta) + * @description Retrieve the setting (e.g. security/license policy) for a repository label. * - * - Threat-feed:list * - * @deprecated - */ - get: operations['getThreatFeedItems'] - } - '/orgs/{org_slug}/threat-feed': { - /** - * Get Threat Feed Items (Beta) + * Note that repository label settings currently only support `issueRules`, + * `issueRulesPolicyDefault`, `licensePolicy`, and + * `recentlyPublishedThresholdMs`. A policy is considered "active" + * for a given repository label if the `issueRulesPolicyDefault` is + * set, and inactive when not set. `issueRules` can be used to further + * refine the alert triage strategy. * - * Paginated list of threats, sorted by updated_at by default. Set - * updated_after to the unix timestamp of your last sync while sorting by - * updated_at to synchronize all new or updated threats in the feed. This - * endpoint requires an Enterprise Plan with Threat Feed add-on. - * [Contact](https://socket.dev/demo?utm_source=api-docs&utm_medium=referral&utm_campaign=tracking) - * our sales team for more details. This endpoint consumes 1 unit of your - * quota. This endpoint requires the following org token scopes: + * This endpoint consumes 1 unit of your quota. * - * - Threat-feed:list + * This endpoint requires the following org token scopes: + * - repo-label:list */ - get: operations['getOrgThreatFeedItems'] - } - '/orgs/{org_slug}/purl': { + get: operations["getOrgRepoLabelSetting"]; /** - * Get Packages by PURL (Org Scoped) + * Update repository label setting (beta) + * @description Update the setting (e.g. security/license policy) for a repository label. * - * Batch retrieval of package metadata and alerts by PURL strings for a - * specific organization. Compatible with CycloneDX reports. Package URLs - * (PURLs) are an ecosystem agnostic way to identify packages. CycloneDX - * SBOMs use the purl format to identify components. This endpoint supports - * fetching metadata and alerts for multiple packages at once by passing an - * array of purl strings, or by passing an entire CycloneDX report. - * **Note:** This endpoint has a batch size limit (default: 1024 PURLs per - * request). Requests exceeding this limit will return a 400 Bad Request - * error. More information on purl and CycloneDX: * - * - [`purl` Spec](https://github.com/package-url/purl-spec) - * - [CycloneDX - * Spec](https://cyclonedx.org/specification/overview/#components) This - * endpoint returns the latest available alert data for artifacts in the - * batch (stale while revalidate). Actively running analysis will be - * returned when available on subsequent runs. When `alerts=true`, Socket - * may synthesize two alert types to make partial results actionable: + * Note that repository label settings currently only support `issueRules`, + * `issueRulesPolicyDefault`, `licensePolicy`, and + * `recentlyPublishedThresholdMs`. A policy is considered "active" + * for a given repository label if the `issueRulesPolicyDefault` is + * set, and inactive when not set. `issueRules` can be used to further + * refine the alert triage strategy. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo-label:update + */ + put: operations["updateOrgRepoLabelSetting"]; + /** + * Delete repository label setting (beta) + * @description Delete the setting (e.g. security/license policy) for a repository label. + * + * + * Note that repository label settings currently only support `issueRules`, + * `issueRulesPolicyDefault`, `licensePolicy`, and + * `recentlyPublishedThresholdMs`. A policy is considered "active" + * for a given repository label if the `issueRulesPolicyDefault` is + * set, and inactive when not set. `issueRules` can be used to further + * refine the alert triage strategy. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo-label:update + */ + delete: operations["deleteOrgRepoLabelSetting"]; + }; + "/orgs/{org_slug}/repos/labels/{label_id}/disassociate": { + /** + * Disassociate repository label (beta) + * @description Disassociate a repository label from a repository. + * + * Labels can be used to group and organize repositories and to apply security/license policies. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo-label:update + */ + post: operations["disassociateOrgRepoLabel"]; + }; + "/orgs/{org_slug}/settings/integrations/{integration_id}/events": { + /** + * Get integration events + * @description This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - integration:list + */ + get: operations["getIntegrationEvents"]; + }; + "/orgs/{org_slug}/settings/security-policy": { + /** + * Get Organization Security Policy + * @description Retrieve the security policy of an organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - security-policy:read + */ + get: operations["getOrgSecurityPolicy"]; + /** + * Update Security Policy + * @description Update the security policy of an organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - security-policy:update + */ + post: operations["updateOrgSecurityPolicy"]; + }; + "/orgs/{org_slug}/settings/license-policy": { + /** + * Get Organization License Policy + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/viewlicensepolicy) instead. + * + * Retrieve the license policy of an organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - license-policy:read + */ + get: operations["getOrgLicensePolicy"]; + /** + * Update License Policy + * @description Set the organization's license policy + * + * ## License policy schema + * + * ```json + * { + * allow?: Array + * warn?: Array + * options?: Array + * } + * ``` + * + * Elements of the `allow` and `warn` arrays strings representing items which should be allowed, or which should trigger a warning; license data found in package which not present in either array will produce a license violation (effectively a "hard" error). For example, to allow Apache-2.0 and MIT to the allow list, simply add the strings "Apache-2.0" and "MIT" to the `allow` array. Strings appearing in these arrays are generally "what you see is what you get", with two important exceptions: strings which are recognized as license classes and strings which are recognized as PURLs are handled differently to allow for more flexible license policy creation. + * + * ## License Classes + * + * Strings which are license classes will expand to a list of licenses known to be in that particular license class. Recognized license classes are: + * 'permissive', + * 'permissive (model)', + * 'permissive (gold)', + * 'permissive (silver)', + * 'permissive (bronze)', + * 'permissive (lead)', + * 'copyleft', + * 'maximal copyleft', + * 'network copyleft', + * 'strong copyleft', + * 'weak copyleft', + * 'contributor license agreement', + * 'public domain', + * 'proprietary free', + * 'source available', + * 'proprietary', + * 'commercial', + * 'patent' + * + * Users can learn more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and [permissive tiers](https://blueoakcouncil.org/list) by reading the linked resources. + * + * + * ## PURLs + * + * Users may also modify their license policy's allow and warn lists by using [package URLs](https://github.com/package-url/purl-spec) (aka PURLs), which support glob patterns to allow a range of versions, files and directories, etc. + * + * purl qualifiers which support globs are `filename`, `version_glob`, `artifact_id` and `license_provenance` (primarily used for allowing data from registry metadata). + * + * ### Examples: + * Allow all license data found in a specific version of a package 4.14.1: `pkg:npm/lodash@4.14.1` + * Allow all license data found in a version range of a package: `pkg:npm/lodash?version_glob=15.*` + * Allow all license data in the test directory of a given package for certain version ranges: `pkg:npm/lodash@15.*.*?file_name=lodash/test/*` + * Allow all license data taken from the package registry for a package and version range: `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata` + * + * ## Available options + * + * `toplevelOnly`: only apply the license policy to "top level" license data in a package, which includes registry metadata, LICENSE files, and manifest files which are closest to the root of the package. + * + * `applyToUnidentified`: Apply license policy to found but unidentified license data. If enabled, the license policy will be applied to license data which could not be affirmatively identified as a known license (this will effectively merge the license policy violation and unidentified license alerts). If disabled, license policy alerts will only be shown for license data which is positively identified as something not allowed or set to warn by the license policy. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - license-policy:update + */ + post: operations["updateOrgLicensePolicy"]; + }; + "/orgs/{org_slug}/settings/license-policy/view": { + /** + * Get License Policy (Beta) + * @description Returns an organization's license policy including allow, warn, monitor, and deny categories. + * The deny category contains all licenses that are not explicitly categorized as allow, warn, or monitor. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - license-policy:read + */ + get: operations["viewLicensePolicy"]; + }; + "/orgs/{org_slug}/settings/socket-basics": { + /** + * Get Socket Basics configuration, including toggles for the various tools it supports. + * @description Socket Basics is a CI/CD security scanning suite that runs on your source code, designed to complement Socket SCA and provide full coverage. + * + * - **SAST** - Find issues and risks with your code via static analysis using best in class Open Source tools + * - **Secret Scanning** - Detected potentially leaked secrets and credentials within your code + * - **Container Security** - Docker image and Dockerfile vulnerability scanning + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - socket-basics:read + */ + get: operations["getSocketBasicsConfig"]; + }; + "/orgs/{org_slug}/historical/alerts": { + /** + * List historical alerts (Beta) + * @description List historical alerts. + * + * Pagination: keep requesting pages (passing the previous response's `endCursor` as `startAfterCursor`) until `endCursor` is `null`. Do not stop when `items` is empty — an empty page can be returned while more results still remain on later pages, so `endCursor` being `null` is the only reliable end-of-results signal. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - historical:alerts-list + */ + get: operations["historicalAlertsList"]; + }; + "/orgs/{org_slug}/historical/alerts/trend": { + /** + * Trend of historical alerts (Beta) + * @description Trend analytics of historical alerts. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - historical:alerts-trend + */ + get: operations["historicalAlertsTrend"]; + }; + "/orgs/{org_slug}/historical/dependencies/trend": { + /** + * Trend of historical dependencies (Beta) + * @description Trend analytics of historical dependencies. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - historical:dependencies-trend + */ + get: operations["historicalDependenciesTrend"]; + }; + "/orgs/{org_slug}/historical/snapshots": { + /** + * List details of periodic historical data snapshots (Beta) + * @description This API endpoint is used to list the details of historical snapshots. + * Snapshots of organization data are taken periodically, and each historical snapshot record contains high-level overview metrics about the data that was collected. + * Other [Historical Data Endpoints](/reference/historical-data-endpoints) can be used to fetch the raw data associated with each snapshot. + * + * Historical snapshots contain details and raw data for the following resources: + * + * - Repositories + * - Alerts + * - Dependencies + * - Artifacts + * - Users + * - Settings + * + * Daily snapshot data is bucketed to the nearest day which is described in more detail at: [Historical Data Endpoints](/reference/historical-data-endpoints) + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - historical:snapshots-list + */ + get: operations["historicalSnapshotsList"]; + /** + * Start historical data snapshot job (Beta) + * @description This API endpoint is used to start a historical snapshot job. + * While snapshots are typically taken multiple times a day for paid plans and once a day for free plans, this endpoint can be used to start an "on demand" snapshot job to ensure the latest data is collected and stored for historical purposes. + * + * An historical snapshot will contain details and raw data for the following resources: + * + * - Repositories + * - Alerts + * - Dependencies + * - Artifacts + * - Users + * - Settings + * + * Historical snapshot data is bucketed to the nearest day which is described in more detail at: [Historical Data Endpoints](/reference/historical-data-endpoints) + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - historical:snapshots-start + */ + post: operations["historicalSnapshotsStart"]; + }; + "/orgs/{org_slug}/audit-log": { + /** + * Get Audit Log Events + * @description Paginated list of audit log events. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - audit-log:list + */ + get: operations["getAuditLogEvents"]; + }; + "/orgs/{org_slug}/api-tokens": { + /** + * List API Tokens + * @description List all API Tokens. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - api-tokens:list + */ + get: operations["getAPITokens"]; + /** + * Create API Token + * @description Create an API Token. The API Token created must use a subset of permissions the API token creating them. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - api-tokens:create + */ + post: operations["postAPIToken"]; + }; + "/orgs/{org_slug}/api-tokens/update": { + /** + * Update API Token + * @description Update an API Token. The API Token created must use a subset of permissions the API token creating them. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - api-tokens:create + */ + post: operations["postAPITokenUpdate"]; + }; + "/orgs/{org_slug}/api-tokens/rotate": { + /** + * Rotate API Token + * @description Rotate an API Token + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - api-tokens:rotate + */ + post: operations["postAPITokensRotate"]; + }; + "/orgs/{org_slug}/api-tokens/revoke": { + /** + * Revoke API Token + * @description Revoke an API Token + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - api-tokens:revoke + */ + post: operations["postAPITokensRevoke"]; + }; + "/orgs/{org_slug}/supported-files": { + /** + * Get supported file types + * @description Get a list of supported files for full scan generation. + * Files are categorized first by environment (e.g. NPM or PyPI), then by name. + * + * Files whose names match the patterns returned by this endpoint can be uploaded for report generation. + * Examples of supported filenames include `package.json`, `package-lock.json`, and `yarn.lock`. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - No Scopes Required, but authentication is required + */ + get: operations["getSupportedFiles"]; + }; + "/threat-feed": { + /** + * Get Threat Feed Items (Deprecated) + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/getorgthreatfeeditems) instead. + * + * Paginated list of threat feed items. + * + * This endpoint requires an Enterprise Plan with Threat Feed add-on. [Contact](https://socket.dev/demo?utm_source=api-docs&utm_medium=referral&utm_campaign=tracking) our sales team for more details. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - threat-feed:list + */ + get: operations["getThreatFeedItems"]; + }; + "/orgs/{org_slug}/threat-feed": { + /** + * Get Threat Feed Items (Beta) + * @description Paginated list of threats, sorted by updated_at by default. Set updated_after to the unix timestamp of your last sync while sorting by updated_at to synchronize all new or updated threats in the feed. + * + * This endpoint requires an Enterprise Plan with Threat Feed add-on. [Contact](https://socket.dev/demo?utm_source=api-docs&utm_medium=referral&utm_campaign=tracking) our sales team for more details. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - threat-feed:list + */ + get: operations["getOrgThreatFeedItems"]; + }; + "/orgs/{org_slug}/purl": { + /** + * Get Packages by PURL (Org Scoped) + * @description Batch retrieval of package metadata and alerts by PURL strings for a specific organization. Compatible with CycloneDX reports. + * + * Package URLs (PURLs) are an ecosystem agnostic way to identify packages. + * CycloneDX SBOMs use the purl format to identify components. + * This endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report. + * + * **Note:** This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error. + * + * More information on purl and CycloneDX: + * + * - [`purl` Spec](https://github.com/package-url/purl-spec) + * - [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components) + * + * This endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate). + * Actively running analysis will be returned when available on subsequent runs. + * + * When `alerts=true`, Socket may synthesize two alert types to make partial + * results actionable: + * * - `pendingScan`: the package is known but analysis has not completed yet - * - `notFound`: Socket could not resolve the package/version metadata When - * `purlErrors=true`, unresolved `notFound` inputs keep the legacy - * `purlError` stream shape instead of emitting synthetic `notFound` - * artifacts. Use `poll=false` (default) to fail open and return the - * current known state quickly. Use `poll=true` to fail closed and wait up - * to `timeoutSec` for pending analysis before returning. + * - `notFound`: Socket could not resolve the package/version metadata + * + * When `purlErrors=true`, unresolved `notFound` inputs keep the legacy + * `purlError` stream shape instead of emitting synthetic `notFound` + * artifacts. + * + * Use `poll=false` (default) to fail open and return the current known state + * quickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for + * pending analysis before returning. + * + * **Conda (temporary compatibility):** `pkg:conda` inputs are served from the + * already-scanned PyPI package with the same normalized name and version when + * one exists; the response row keeps the original conda PURL in `inputPurl` + * but reports `type: pypi`. Conda `build`, `subdir`, `type`, and `channel` + * qualifiers are ignored, and conda packages without a scanned PyPI + * counterpart return the normal `notFound` result. This mapping will be + * replaced by native conda support. * * ## Query Parameters * - * This endpoint supports all query parameters from `POST /v0/purl` - * including: `alerts`, `actions`, `compact`, `fixable`, `licenseattrib`, - * `licensedetails`, `purlErrors`, `poll`, `cachedResultsOnly`, and - * `summary`. Additionally, you may provide a `labels` query parameter to - * apply a repository label's security policies. Pass the label slug as the - * value (e.g., `?labels=production`). Only one label is currently - * supported. + * This endpoint supports all query parameters from `POST /v0/purl` including: `alerts`, `actions`, `compact`, `fixable`, `licenseattrib`, `licensedetails`, `purlErrors`, `poll`, `cachedResultsOnly`, and `summary`. + * + * Additionally, you may provide a `labels` query parameter to apply a repository label's security policies. Pass the label slug as the value (e.g., `?labels=production`). Only one label is currently supported. * * ## Examples: * @@ -1113,102 +1342,77 @@ export interface paths { * * ### With label and options (query parameters): * - * POST /v0/orgs/{org_slug}/purl?labels=production&alerts=true&compact=true - * { - * "components": [ + * ``` + * POST /v0/orgs/{org_slug}/purl?labels=production&alerts=true&compact=true + * { + * "components": [ * { - * "purl": "pkg:npm/express@4.19.2" - * } - * ] + * "purl": "pkg:npm/express@4.19.2" * } + * ] + * } + * ``` * * This endpoint consumes 100 units of your quota. - * This endpoint requires the following org token scopes: * - * - Packages:list + * This endpoint requires the following org token scopes: + * - packages:list */ - post: operations['batchPackageFetchByOrg'] - } - '/orgs/{org_slug}/fixes': { + post: operations["batchPackageFetchByOrg"]; + }; + "/orgs/{org_slug}/fixes": { /** - * Fetch fixes for vulnerabilities in a repository, scan, or uploaded - * manifest. - * - * Fetches available fixes for vulnerabilities in a repository, scan, or - * uploaded manifest. Requires exactly one of repo_slug, full_scan_id, or - * tar_hash, as well as vulnerability_ids to be provided. vulnerability_ids - * can be a comma-separated list of GHSA or CVE IDs, or "*" for all - * vulnerabilities. + * Fetch fixes for vulnerabilities in a repository, scan, or uploaded manifest + * @description Fetches available fixes for vulnerabilities in a repository, scan, or uploaded manifest. + * Requires exactly one of repo_slug, full_scan_id, or tar_hash, as well as vulnerability_ids to be provided. + * vulnerability_ids can be a comma-separated list of GHSA or CVE IDs, or "*" for all vulnerabilities. * * ## Response Structure * - * The response contains a `fixDetails` object where each key is a - * vulnerability ID (GHSA or CVE) and the value is a discriminated union - * based on the `type` field. + * The response contains a `fixDetails` object where each key is a vulnerability ID (GHSA or CVE) and the value is a discriminated union based on the `type` field. * * ### Common Fields * * All response variants include: + * - `type`: Discriminator field (one of: "fixFound", "partialFixFound", "noFixAvailable", "fixNotApplicable", "errorComputingFix") + * - `value`: Object containing the variant-specific data * - * - `type`: Discriminator field (one of: "fixFound", "partialFixFound", - * "noFixAvailable", "fixNotApplicable", "errorComputingFix") - * - `value`: Object containing the variant-specific data The `value` object - * always contains: + * The `value` object always contains: * - `ghsa`: string | null - The GHSA ID * - `cve`: string | null - The CVE ID (if available) - * - `advisoryDetails`: object | null - Advisory details (only if - * include_details=true) + * - `advisoryDetails`: object | null - Advisory details (only if include_details=true) * * ### Response Variants * - * **fixFound**: A complete fix is available for all vulnerable packages. - * + * **fixFound**: A complete fix is available for all vulnerable packages * - `value.fixDetails.fixes`: Array of fix objects, each containing: - * - `purl`: Package URL to upgrade - * - `fixedVersion`: Version to upgrade to - * - `manifestFiles`: Array of manifest files containing the package - * - `updateType`: "patch" | "minor" | "major" | "unknown" - * - `value.fixDetails.responsibleDirectDependencies`: (optional) Map of - * direct dependencies responsible for the vulnerability - * **partialFixFound**: Fixes available for some but not all vulnerable - * packages + * - `purl`: Package URL to upgrade + * - `fixedVersion`: Version to upgrade to + * - `manifestFiles`: Array of manifest files containing the package + * - `updateType`: "patch" | "minor" | "major" | "unknown" + * - `value.fixDetails.responsibleDirectDependencies`: (optional) Map of direct dependencies responsible for the vulnerability + * + * **partialFixFound**: Fixes available for some but not all vulnerable packages * - Same as fixFound, plus: - * - `value.fixDetails.unfixablePurls`: Array of packages that cannot be - * fixed, each containing: - * - `purl`: Package URL - * - `manifestFiles`: Array of manifest files - * - `reasons`: Human-readable explanations of why the package cannot be - * upgraded. May contain multiple distinct entries when different - * dependency chains are blocked for different causes (e.g. one chain has - * no compatible upstream version; another would require a major version - * bump skipped by `--no-major-updates`). **noFixAvailable**: No fix - * exists for this vulnerability (no patched version published) - * - `value.vulnerableArtifacts`: Array of vulnerable packages with their - * manifest files; each carries a static `reasons` entry stating that no - * patched version has been published **fixNotApplicable**: A patched - * version of the vulnerable package exists but cannot be applied. The - * most common cause is that there is no upgrade path through the - * dependency tree — for example, given a chain `App → A@1.0.0 → B@1.0.0` - * where `B < 2.0.0` is vulnerable, if no version of `A` accepts `B@2.0.0` - * the fix cannot be applied without a manual override (e.g. `pnpm - * overrides`). Other causes include callers passing `--no-major-updates` - * when the only patched version is a major bump. - * - `value.vulnerableArtifacts`: Array of vulnerable packages with their - * manifest files, each with per-artifact `reasons` explaining why the fix - * could not be applied (omitted when no explanation is available) - * **errorComputingFix**: An error occurred while computing fixes + * - `value.fixDetails.unfixablePurls`: Array of packages that cannot be fixed, each containing: + * - `purl`: Package URL + * - `manifestFiles`: Array of manifest files + * - `reasons`: Human-readable explanations of why the package cannot be upgraded. May contain multiple distinct entries when different dependency chains are blocked for different causes (e.g. one chain has no compatible upstream version; another would require a major version bump skipped by `--no-major-updates`). + * - `dependencyChain`: (optional) Installed PURLs along the dependency chain where the fix search was blocked, from the blocking package down to this package. Present only when a chain was recorded; the first `reasons` entry describes this chain. + * - `withheldFix`: (optional) Present when a fix exists but this request's policy withheld it: `{ purl, version, reason }` where `purl` is the package (without version), `version` the lowest safe version the policy removed from the fix search, and `reason` one of `majorUpdate` (a major update while `allow_major_updates=false`), `releaseAge` (younger than `minimum_release_age`) or `publishDateUnknown` (publish date unavailable, so `minimum_release_age` cannot be verified). Lifting the policy is not guaranteed to make the fix applicable — other version constraints in the dependency tree may still block this version. + * + * **noFixAvailable**: No fix exists for this vulnerability (no patched version published) + * - `value.vulnerableArtifacts`: Array of vulnerable packages with their manifest files; each carries a static `reasons` entry stating that no patched version has been published + * + * **fixNotApplicable**: A patched version of the vulnerable package exists but cannot be applied. The most common cause is that there is no upgrade path through the dependency tree — for example, given a chain `App → A@1.0.0 → B@1.0.0` where `B < 2.0.0` is vulnerable, if no version of `A` accepts `B@2.0.0` the fix cannot be applied without a manual override (e.g. `pnpm overrides`). Other causes include callers passing `--no-major-updates` when the only patched version is a major bump. + * - `value.vulnerableArtifacts`: Array of vulnerable packages with their manifest files, each with per-artifact `reasons` explaining why the fix could not be applied (always at least one entry; a static fallback when the fix search reported no per-package cause) and an optional `dependencyChain` — installed PURLs from the package that blocked the upgrade down to the vulnerable package, present when a chain was recorded (the first `reasons` entry describes it), and an optional `withheldFix` — present when a fix exists but this request's policy withheld it (see the partialFixFound field list) + * + * **errorComputingFix**: An error occurred while computing fixes * - `value.message`: Error description * * ### Fix version alignment * - * When several requested vulnerabilities are fixed by upgrading the same - * package, their fix entries carry the SAME `fixedVersion` — the server - * computes a version that clears all of them together and verifies it - * against each advisory's affected ranges. Clients can apply the fixes per - * package without reconciling versions. Only when no single in-policy - * version fixes all advisories on a package (non-monotonic affected ranges) - * can entries differ; each is then the minimal upgrade for its own - * advisory. + * When several requested vulnerabilities are fixed by upgrading the same package, their fix entries carry the SAME `fixedVersion` — the server computes a version that clears all of them together and verifies it against each advisory's affected ranges. Clients can apply the fixes per package without reconciling versions. Only when no single in-policy version fixes all advisories on a package (non-monotonic affected ranges) can entries differ; each is then the minimal upgrade for its own advisory. * * ### Advisory Details (when include_details=true) * @@ -1224,266 +1428,252 @@ export interface paths { * * ### Stateful Alert IDs (when include_stateful_alert_ids=true) * - * Top-level `statefulAlertIds` field — a map of GHSA ID → array of open - * stateful alert IDs (the human-readable `SOCKET-XXX-N` identifiers also - * returned by `/v0/orgs/{org_slug}/alerts`). The lookup is org-scoped, so - * the same GHSA may map to multiple alert IDs when it appears in alerts - * across different repos or branches. Callers that need a repo/branch - * filter should intersect this map with results from the alerts API. The - * lookup honors the same scan-type visibility as - * `/v0/orgs/{org_slug}/alerts` — when the `enableTier1OrgAlertApiRead` - * feature flag is off for the org, only `socket` scans are visible (no - * `socket_tier1`). Note on scopes: this field surfaces identifiers that are - * otherwise reachable via `/v0/orgs/{org_slug}/alerts` (which requires - * `alerts:list`). The fixes route is gated on `fixes:list` alone; the GHSAs - * the alert IDs are keyed to are already part of every `/fixes` response, - * and exposing the matching alert IDs through this opt-in flag is - * intentional — it lets a caller with only `fixes:list` complete the - * correlation back to /alerts on a token that already has that scope. If - * you require strict scope separation, do not enable this flag. This - * endpoint consumes 10 units of your quota. This endpoint requires the - * following org token scopes: - * - * - Fixes:list + * Top-level `statefulAlertIds` field — a map of GHSA ID → array of open stateful alert IDs (the human-readable `SOCKET-XXX-N` identifiers also returned by `/v0/orgs/{org_slug}/alerts`). The lookup is org-scoped, so the same GHSA may map to multiple alert IDs when it appears in alerts across different repos or branches. Callers that need a repo/branch filter should intersect this map with results from the alerts API. + * + * The lookup honors the same scan-type visibility as `/v0/orgs/{org_slug}/alerts` — when the `enableTier1OrgAlertApiRead` feature flag is off for the org, only `socket` scans are visible (no `socket_tier1`). + * + * Note on scopes: this field surfaces identifiers that are otherwise reachable via `/v0/orgs/{org_slug}/alerts` (which requires `alerts:list`). The fixes route is gated on `fixes:list` alone; the GHSAs the alert IDs are keyed to are already part of every `/fixes` response, and exposing the matching alert IDs through this opt-in flag is intentional — it lets a caller with only `fixes:list` complete the correlation back to /alerts on a token that already has that scope. If you require strict scope separation, do not enable this flag. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - fixes:list */ - get: operations['fetch-fixes'] - } - '/orgs/{org_slug}/telemetry/config': { + get: operations["fetch-fixes"]; + }; + "/orgs/{org_slug}/telemetry/config": { /** - * Get Organization Telemetry Config. + * Get Organization Telemetry Config + * @description Retrieve the telemetry config of an organization. * - * Retrieve the telemetry config of an organization. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: */ - get: operations['getOrgTelemetryConfig'] + get: operations["getOrgTelemetryConfig"]; /** - * Update Telemetry Config. + * Update Telemetry Config + * @description Update the telemetry config of an organization. * - * Update the telemetry config of an organization. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - telemetry-policy:update. + * - telemetry-policy:update */ - put: operations['updateOrgTelemetryConfig'] - } - '/orgs/{org_slug}/webhooks': { + put: operations["updateOrgTelemetryConfig"]; + }; + "/orgs/{org_slug}/webhooks": { /** - * List all webhooks. + * List all webhooks + * @description List all webhooks in the specified organization. * - * List all webhooks in the specified organization. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - webhooks:list. + * - webhooks:list */ - get: operations['getOrgWebhooksList'] + get: operations["getOrgWebhooksList"]; /** - * Create a webhook. + * Create a webhook + * @description Create a new webhook. Returns the created webhook details. * - * Create a new webhook. Returns the created webhook details. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - webhooks:create. + * - webhooks:create */ - post: operations['createOrgWebhook'] - } - '/orgs/{org_slug}/webhooks/{webhook_id}': { + post: operations["createOrgWebhook"]; + }; + "/orgs/{org_slug}/webhooks/{webhook_id}": { /** - * Get webhook. + * Get webhook + * @description Get a webhook for the specified organization. * - * Get a webhook for the specified organization. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - webhooks:list. + * - webhooks:list */ - get: operations['getOrgWebhook'] + get: operations["getOrgWebhook"]; /** - * Update webhook. + * Update webhook + * @description Update details of an existing webhook. * - * Update details of an existing webhook. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - webhooks:update. + * - webhooks:update */ - put: operations['updateOrgWebhook'] + put: operations["updateOrgWebhook"]; /** - * Delete webhook. + * Delete webhook + * @description Delete a webhook. This will stop all future webhook deliveries to the webhook URL. + * + * This endpoint consumes 1 unit of your quota. * - * Delete a webhook. This will stop all future webhook deliveries to the - * webhook URL. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - webhooks:delete. + * This endpoint requires the following org token scopes: + * - webhooks:delete */ - delete: operations['deleteOrgWebhook'] - } - '/orgs/{org_slug}/alerts': { + delete: operations["deleteOrgWebhook"]; + }; + "/orgs/{org_slug}/alerts": { /** * List latest alerts (Beta) + * @description List latest alerts. + * + * Pagination: keep requesting pages (passing the previous response's `endCursor` as `startAfterCursor`) until `endCursor` is `null`. Do not stop when `items` is empty — an empty page can be returned while more results still remain on later pages, so `endCursor` being `null` is the only reliable end-of-results signal. + * + * This endpoint consumes 10 units of your quota. * - * List latest alerts. Pagination: keep requesting pages (passing the - * previous response's `endCursor` as `startAfterCursor`) until `endCursor` - * is `null`. Do not stop when `items` is empty — an empty page can be - * returned while more results still remain on later pages, so `endCursor` - * being `null` is the only reliable end-of-results signal. This endpoint - * consumes 10 units of your quota. This endpoint requires the following org - * token scopes: - alerts:list. + * This endpoint requires the following org token scopes: + * - alerts:list */ - get: operations['alertsList'] - } - '/orgs/{org_slug}/alert-full-scan-search': { + get: operations["alertsList"]; + }; + "/orgs/{org_slug}/alert-full-scan-search": { /** * List full scans associated with alert (Beta) + * @description List full scans associated with alert. * - * List full scans associated with alert. * This endpoint consumes 10 units of your quota. + * * This endpoint requires the following org token scopes: - * - alerts:list. + * - alerts:list */ - get: operations['alertFullScans'] - } - '/license-policy': { + get: operations["alertFullScans"]; + }; + "/license-policy": { /** * License Policy (Beta) + * @description Compare the license data found for a list of packages (given as PURL strings) with the contents of a configurable license policy, + * returning information about license data which does not comply with the license allow list. * - * Compare the license data found for a list of packages (given as PURL - * strings) with the contents of a configurable license policy, returning - * information about license data which does not comply with the license - * allow list. + * ## Example request body: * - * ## Example request body: - * - * ```json - * { - * "components": [ - * { - * "purl": "pkg:npm/lodash@4.17.21" - * }, + * ```json * { - * "purl": "pkg:npm/lodash@4.14.1" + * "components": [ + * { + * "purl": "pkg:npm/lodash@4.17.21" + * }, + * { + * "purl": "pkg:npm/lodash@4.14.1" + * } + * ], + * "allow": [ + * "permissive", + * "pkg:npm/lodash?file_name=foo/test/*&version_glob=4.17.*" + * ], + * "warn": [ + * "copyleft", + * "pkg:npm/lodash?file_name=foo/prod/*&version_glob=4.14.*" + * ], + * "options": ["toplevelOnly"] * } - * ], - * "allow": [ - * "permissive", - * "pkg:npm/lodash?file_name=foo/test/*&version_glob=4.17.*" - * ], - * "warn": [ - * "copyleft", - * "pkg:npm/lodash?file_name=foo/prod/*&version_glob=4.14.*" - * ], - * "options": ["toplevelOnly"] - * } - * ``` + * ``` * - * ## Return value * - * For each requested PURL, an array is returned. Each array contains a list - * of license policy violations detected for the requested PURL. Violations - * are accompanied by a string identifying the offending license data as - * `spdxAtomOrExtraData`, a message describing why the license data is - * believed to be incompatible with the license policy, and a list of - * locations (by filepath or other provenance information) where the - * offending license data may be found. + * ## Return value * - * ```json - * Array< - * Array<{ - * filepathOrProvenance: Array, - * level: "warning" | "violation", - * purl: string, - * spdxAtomOrExtraData: string, - * violationExplanation: string - * }> - * > - * ``` + * For each requested PURL, an array is returned. Each array contains a list of license policy violations + * detected for the requested PURL. + * + * Violations are accompanied by a string identifying the offending license data as `spdxAtomOrExtraData`, + * a message describing why the license data is believed to be incompatible with the license policy, and a list + * of locations (by filepath or other provenance information) where the offending license data may be found. * - * ## License policy schema + * ```json + * Array< + * Array<{ + * filepathOrProvenance: Array, + * level: "warning" | "violation", + * purl: string, + * spdxAtomOrExtraData: string, + * violationExplanation: string + * }> + * > + * ``` + * + * ## License policy schema * * ```json * { - * allow?: Array - * warn?: Array - * options?: Array + * allow?: Array + * warn?: Array + * options?: Array * } * ``` * - * Elements of the `allow` and `warn` arrays strings representing items - * which should be allowed, or which should trigger a warning; license data - * found in package which not present in either array will produce a license - * violation (effectively a "hard" error). For example, to allow Apache-2.0 - * and MIT to the allow list, simply add the strings "Apache-2.0" and "MIT" - * to the `allow` array. Strings appearing in these arrays are generally - * "what you see is what you get", with two important exceptions: strings - * which are recognized as license classes and strings which are recognized - * as PURLs are handled differently to allow for more flexible license - * policy creation. + * Elements of the `allow` and `warn` arrays strings representing items which should be allowed, or which should trigger a warning; license data found in package which not present in either array will produce a license violation (effectively a "hard" error). For example, to allow Apache-2.0 and MIT to the allow list, simply add the strings "Apache-2.0" and "MIT" to the `allow` array. Strings appearing in these arrays are generally "what you see is what you get", with two important exceptions: strings which are recognized as license classes and strings which are recognized as PURLs are handled differently to allow for more flexible license policy creation. * * ## License Classes * - * Strings which are license classes will expand to a list of licenses known - * to be in that particular license class. Recognized license classes are: - * 'permissive', 'permissive (model)', 'permissive (gold)', 'permissive - * (silver)', 'permissive (bronze)', 'permissive (lead)', 'copyleft', - * 'maximal copyleft', 'network copyleft', 'strong copyleft', 'weak - * copyleft', 'contributor license agreement', 'public domain', 'proprietary - * free', 'source available', 'proprietary', 'commercial', 'patent' Users - * can learn more about [copyleft - * tiers](https://blueoakcouncil.org/copyleft) and [permissive - * tiers](https://blueoakcouncil.org/list) by reading the linked resources. + * Strings which are license classes will expand to a list of licenses known to be in that particular license class. Recognized license classes are: + * 'permissive', + * 'permissive (model)', + * 'permissive (gold)', + * 'permissive (silver)', + * 'permissive (bronze)', + * 'permissive (lead)', + * 'copyleft', + * 'maximal copyleft', + * 'network copyleft', + * 'strong copyleft', + * 'weak copyleft', + * 'contributor license agreement', + * 'public domain', + * 'proprietary free', + * 'source available', + * 'proprietary', + * 'commercial', + * 'patent' + * + * Users can learn more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and [permissive tiers](https://blueoakcouncil.org/list) by reading the linked resources. + * * * ## PURLs * - * Users may also modify their license policy's allow and warn lists by - * using [package URLs](https://github.com/package-url/purl-spec) (aka - * PURLs), which support glob patterns to allow a range of versions, files - * and directories, etc. purl qualifiers which support globs are `filename`, - * `version_glob`, `artifact_id` and `license_provenance` (primarily used - * for allowing data from registry metadata). + * Users may also modify their license policy's allow and warn lists by using [package URLs](https://github.com/package-url/purl-spec) (aka PURLs), which support glob patterns to allow a range of versions, files and directories, etc. * - * ### Examples: + * purl qualifiers which support globs are `filename`, `version_glob`, `artifact_id` and `license_provenance` (primarily used for allowing data from registry metadata). * - * Allow all license data found in a specific version of a package 4.14.1: - * `pkg:npm/lodash@4.14.1` Allow all license data found in a version range - * of a package: `pkg:npm/lodash?version_glob=15.*` Allow all license data - * in the test directory of a given package for certain version ranges: - * `pkg:npm/lodash@15.*.*?file_name=lodash/test/*` Allow all license data - * taken from the package registry for a package and version range: - * `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata` + * ### Examples: + * Allow all license data found in a specific version of a package 4.14.1: `pkg:npm/lodash@4.14.1` + * Allow all license data found in a version range of a package: `pkg:npm/lodash?version_glob=15.*` + * Allow all license data in the test directory of a given package for certain version ranges: `pkg:npm/lodash@15.*.*?file_name=lodash/test/*` + * Allow all license data taken from the package registry for a package and version range: `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata` * * ## Available options * - * `toplevelOnly`: only apply the license policy to "top level" license data - * in a package, which includes registry metadata, LICENSE files, and - * manifest files which are closest to the root of the package. - * `applyToUnidentified`: Apply license policy to found but unidentified - * license data. If enabled, the license policy will be applied to license - * data which could not be affirmatively identified as a known license (this - * will effectively merge the license policy violation and unidentified - * license alerts). If disabled, license policy alerts will only be shown - * for license data which is positively identified as something not allowed - * or set to warn by the license policy. This endpoint consumes 100 units of - * your quota. This endpoint requires the following org token scopes: - * - * - Packages:list - * - License-policy:read + * `toplevelOnly`: only apply the license policy to "top level" license data in a package, which includes registry metadata, LICENSE files, and manifest files which are closest to the root of the package. + * + * `applyToUnidentified`: Apply license policy to found but unidentified license data. If enabled, the license policy will be applied to license data which could not be affirmatively identified as a known license (this will effectively merge the license policy violation and unidentified license alerts). If disabled, license policy alerts will only be shown for license data which is positively identified as something not allowed or set to warn by the license policy. + * + * This endpoint consumes 100 units of your quota. + * + * This endpoint requires the following org token scopes: + * - packages:list + * - license-policy:read */ - post: operations['licensePolicy'] - } - '/saturate-license-policy': { + post: operations["licensePolicy"]; + }; + "/saturate-license-policy": { /** * Saturate License Policy (Legacy) + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/updateorglicensepolicy) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/updateorglicensepolicy) - * instead. Get the "saturated" version of a license policy's allow list, - * filling in the entire set of allowed license data. For example, the - * saturated form of a license allow list which only specifies that licenses - * in the tier "maximal copyleft" are allowed is shown below (note the - * expanded `allowedStrings` property): + * Get the "saturated" version of a license policy's allow list, filling in the entire set of allowed + * license data. For example, the saturated form of a license allow list which only specifies that + * licenses in the tier "maximal copyleft" are allowed is shown below (note the expanded `allowedStrings` property): * * ```json * { * "allowedApprovalSources": [], * "allowedFamilies": [], - * "allowedTiers": ["maximal copyleft"], + * "allowedTiers": [ + * "maximal copyleft" + * ], * "allowedStrings": [ * "Parity-6.0.0", * "QPL-1.0-INRIA-2004", @@ -1496,19 +1686,19 @@ export interface paths { * } * ``` * - * This may be helpful for users who want to compose more complex sets of - * allowed license data via the "allowedStrings" property, or for users who - * want to know more about the contents of a particular license group - * (family, tier, or approval source). + * This may be helpful for users who want to compose more complex sets of allowed license data via + * the "allowedStrings" property, or for users who want to know more about the contents of a particular + * license group (family, tier, or approval source). * * ## Allow List Schema * * ```json * ``` * - * Where PermissiveTier ::= "model permissive" | "gold" | "silver" | - * "bronze" | "lead" CopyleftTier ::= "maximal copyleft" | "network - * copyleft" | "strong copyleft" | "weak copyleft" + * where + * + * PermissiveTier ::= "model permissive" | "gold" | "silver" | "bronze" | "lead" + * CopyleftTier ::= "maximal copyleft" | "network copyleft" | "strong copyleft" | "weak copyleft" * * ## Return Value * @@ -1516,24 +1706,23 @@ export interface paths { * * ```json * { - * allowedApprovalSources?: Array<"fsf" | "osi">, - * allowedFamilies?: Array<"copyleft" | "permissive">, - * allowedTiers?: Array, - * allowedStrings?: Array - * allowedPURLs?: Array - * focusAlertsHere?: boolean + * allowedApprovalSources?: Array<"fsf" | "osi">, + * allowedFamilies?: Array<"copyleft" | "permissive">, + * allowedTiers?: Array, + * allowedStrings?: Array + * allowedPURLs?: Array + * focusAlertsHere?: boolean * } * ``` * - * Where PermissiveTier ::= "model permissive" | "gold" | "silver" | - * "bronze" | "lead" CopyleftTier ::= "maximal copyleft" | "network - * copyleft" | "strong copyleft" | "weak copyleft" readers can learn more - * about [copyleft tiers](https://blueoakcouncil.org/copyleft) and - * [permissive tiers](https://blueoakcouncil.org/list) by reading the linked - * resources. + * where * - * ### Example request bodies: + * PermissiveTier ::= "model permissive" | "gold" | "silver" | "bronze" | "lead" + * CopyleftTier ::= "maximal copyleft" | "network copyleft" | "strong copyleft" | "weak copyleft" * + * readers can learn more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and [permissive tiers](https://blueoakcouncil.org/list) by reading the linked resources. + * + * ### Example request bodies: * ```json * { * "allowedApprovalSources": ["fsf"], @@ -1546,23958 +1735,19258 @@ export interface paths { * ``` * * This endpoint consumes 100 units of your quota. - * This endpoint requires the following org token scopes: - * - * - Packages:list * - * @deprecated + * This endpoint requires the following org token scopes: + * - packages:list */ - post: operations['saturateLicensePolicy'] - } - '/license-metadata': { + post: operations["saturateLicensePolicy"]; + }; + "/license-metadata": { /** - * License Metadata. + * License Metadata + * @description For an array of license identifiers or names (short form SPDX identifiers, or long form license names), + * returns an array of metadata for the corresponding license, if the license is recognized. If the query + * parameter `includetext=true` is set, the returned metadata will also include the license text. * - * For an array of license identifiers or names (short form SPDX - * identifiers, or long form license names), returns an array of metadata - * for the corresponding license, if the license is recognized. If the query - * parameter `includetext=true` is set, the returned metadata will also - * include the license text. * - * ## Example request body: + * ## Example request body: * - * ```json - * ["Apache-2.0", "BSD Zero Clause License"] - * ``` + * ```json + * [ + * "Apache-2.0", + * "BSD Zero Clause License" + * ] + * ``` * - * ## Return value * - * ```json - * // Response schema: - * Array<{ - * licenseId: string, - * name?: string, - * deprecated?: string, - * crossref?: string - * classes: Array - * text?: string - * }> - * // Example response: - * [ - * { - * "licenseId": "Apache-2.0", - * "name": "Apache License 2.0", - * "deprecated": false, - * "crossref": "https://spdx.org/licenses/Apache-2.0.html", - * "classes": [ - * "fsf libre", - * "osi approved", - * "permissive (silver)" - * ] - * }, - * { - * "licenseId": "0BSD", - * "name": "BSD Zero Clause License", - * "deprecated": false, - * "crossref": "https://spdx.org/licenses/0BSD.html", - * "classes": [ - * "osi approved", - * "permissive (bronze)" - * ] - * } - * ] - * ``` + * ## Return value * - * ## License policy schema + * ```json + * // Response schema: + * Array<{ + * licenseId: string, + * name?: string, + * deprecated?: string, + * crossref?: string + * classes: Array + * text?: string + * }> + * + * // Example response: + * [ + * { + * "licenseId": "Apache-2.0", + * "name": "Apache License 2.0", + * "deprecated": false, + * "crossref": "https://spdx.org/licenses/Apache-2.0.html", + * "classes": [ + * "fsf libre", + * "osi approved", + * "permissive (silver)" + * ] + * }, + * { + * "licenseId": "0BSD", + * "name": "BSD Zero Clause License", + * "deprecated": false, + * "crossref": "https://spdx.org/licenses/0BSD.html", + * "classes": [ + * "osi approved", + * "permissive (bronze)" + * ] + * } + * ] + * ``` + * + * ## License policy schema * * ```json * { - * allow?: Array - * warn?: Array - * options?: Array + * allow?: Array + * warn?: Array + * options?: Array * } * ``` * - * Elements of the `allow` and `warn` arrays strings representing items - * which should be allowed, or which should trigger a warning; license data - * found in package which not present in either array will produce a license - * violation (effectively a "hard" error). For example, to allow Apache-2.0 - * and MIT to the allow list, simply add the strings "Apache-2.0" and "MIT" - * to the `allow` array. Strings appearing in these arrays are generally - * "what you see is what you get", with two important exceptions: strings - * which are recognized as license classes and strings which are recognized - * as PURLs are handled differently to allow for more flexible license - * policy creation. + * Elements of the `allow` and `warn` arrays strings representing items which should be allowed, or which should trigger a warning; license data found in package which not present in either array will produce a license violation (effectively a "hard" error). For example, to allow Apache-2.0 and MIT to the allow list, simply add the strings "Apache-2.0" and "MIT" to the `allow` array. Strings appearing in these arrays are generally "what you see is what you get", with two important exceptions: strings which are recognized as license classes and strings which are recognized as PURLs are handled differently to allow for more flexible license policy creation. * * ## License Classes * - * Strings which are license classes will expand to a list of licenses known - * to be in that particular license class. Recognized license classes are: - * 'permissive', 'permissive (model)', 'permissive (gold)', 'permissive - * (silver)', 'permissive (bronze)', 'permissive (lead)', 'copyleft', - * 'maximal copyleft', 'network copyleft', 'strong copyleft', 'weak - * copyleft', 'contributor license agreement', 'public domain', 'proprietary - * free', 'source available', 'proprietary', 'commercial', 'patent' Users - * can learn more about [copyleft - * tiers](https://blueoakcouncil.org/copyleft) and [permissive - * tiers](https://blueoakcouncil.org/list) by reading the linked resources. + * Strings which are license classes will expand to a list of licenses known to be in that particular license class. Recognized license classes are: + * 'permissive', + * 'permissive (model)', + * 'permissive (gold)', + * 'permissive (silver)', + * 'permissive (bronze)', + * 'permissive (lead)', + * 'copyleft', + * 'maximal copyleft', + * 'network copyleft', + * 'strong copyleft', + * 'weak copyleft', + * 'contributor license agreement', + * 'public domain', + * 'proprietary free', + * 'source available', + * 'proprietary', + * 'commercial', + * 'patent' + * + * Users can learn more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and [permissive tiers](https://blueoakcouncil.org/list) by reading the linked resources. + * * * ## PURLs * - * Users may also modify their license policy's allow and warn lists by - * using [package URLs](https://github.com/package-url/purl-spec) (aka - * PURLs), which support glob patterns to allow a range of versions, files - * and directories, etc. purl qualifiers which support globs are `filename`, - * `version_glob`, `artifact_id` and `license_provenance` (primarily used - * for allowing data from registry metadata). + * Users may also modify their license policy's allow and warn lists by using [package URLs](https://github.com/package-url/purl-spec) (aka PURLs), which support glob patterns to allow a range of versions, files and directories, etc. * - * ### Examples: + * purl qualifiers which support globs are `filename`, `version_glob`, `artifact_id` and `license_provenance` (primarily used for allowing data from registry metadata). * - * Allow all license data found in a specific version of a package 4.14.1: - * `pkg:npm/lodash@4.14.1` Allow all license data found in a version range - * of a package: `pkg:npm/lodash?version_glob=15.*` Allow all license data - * in the test directory of a given package for certain version ranges: - * `pkg:npm/lodash@15.*.*?file_name=lodash/test/*` Allow all license data - * taken from the package registry for a package and version range: - * `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata` + * ### Examples: + * Allow all license data found in a specific version of a package 4.14.1: `pkg:npm/lodash@4.14.1` + * Allow all license data found in a version range of a package: `pkg:npm/lodash?version_glob=15.*` + * Allow all license data in the test directory of a given package for certain version ranges: `pkg:npm/lodash@15.*.*?file_name=lodash/test/*` + * Allow all license data taken from the package registry for a package and version range: `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata` * * ## Available options * - * `toplevelOnly`: only apply the license policy to "top level" license data - * in a package, which includes registry metadata, LICENSE files, and - * manifest files which are closest to the root of the package. - * `applyToUnidentified`: Apply license policy to found but unidentified - * license data. If enabled, the license policy will be applied to license - * data which could not be affirmatively identified as a known license (this - * will effectively merge the license policy violation and unidentified - * license alerts). If disabled, license policy alerts will only be shown - * for license data which is positively identified as something not allowed - * or set to warn by the license policy. This endpoint consumes 1 unit of - * your quota. This endpoint requires the following org token scopes: + * `toplevelOnly`: only apply the license policy to "top level" license data in a package, which includes registry metadata, LICENSE files, and manifest files which are closest to the root of the package. + * + * `applyToUnidentified`: Apply license policy to found but unidentified license data. If enabled, the license policy will be applied to license data which could not be affirmatively identified as a known license (this will effectively merge the license policy violation and unidentified license alerts). If disabled, license policy alerts will only be shown for license data which is positively identified as something not allowed or set to warn by the license policy. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: */ - post: operations['licenseMetadata'] - } - '/alert-types': { + post: operations["licenseMetadata"]; + }; + "/alert-types": { /** - * Alert Types Metadata. + * Alert Types Metadata + * @description For an array of alert type identifiers, returns metadata for each alert type. Optionally, specify a language via the 'language' query parameter. * - * For an array of alert type identifiers, returns metadata for each alert - * type. Optionally, specify a language via the 'language' query parameter. - * This endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: */ - post: operations['alertTypes'] - } - '/openapi': { + post: operations["alertTypes"]; + }; + "/openapi": { /** - * Returns the OpenAPI definition. + * Returns the OpenAPI definition + * @description Retrieve the API specification in an Openapi JSON format. * - * Retrieve the API specification in an Openapi JSON format. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: */ - get: operations['getOpenAPI'] - } - '/openapi.json': { + get: operations["getOpenAPI"]; + }; + "/openapi.json": { /** - * Returns the OpenAPI definition. + * Returns the OpenAPI definition + * @description Retrieve the API specification in an Openapi JSON format. * - * Retrieve the API specification in an Openapi JSON format. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: */ - get: operations['getOpenAPIJSON'] - } - '/quota': { + get: operations["getOpenAPIJSON"]; + }; + "/quota": { /** - * Get quota. + * Get quota + * @description Get your current API quota. You can use this endpoint to prevent doing requests that might spend all your quota. + * + * This endpoint consumes 0 units of your quota. * - * Get your current API quota. You can use this endpoint to prevent doing - * requests that might spend all your quota. This endpoint consumes 0 units - * of your quota. This endpoint requires the following org token scopes: - - * No Scopes Required, but authentication is required. + * This endpoint requires the following org token scopes: + * - No Scopes Required, but authentication is required */ - get: operations['getQuota'] - } - '/organizations': { + get: operations["getQuota"]; + }; + "/organizations": { /** - * List organizations. + * List organizations + * @description Get information on the current organizations associated with the API token. * - * Get information on the current organizations associated with the API - * token. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - No Scopes Required, but - * authentication is required. + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - No Scopes Required, but authentication is required */ - get: operations['getOrganizations'] - } - '/settings': { + get: operations["getOrganizations"]; + }; + "/settings": { /** - * Calculate settings. + * Calculate settings + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/updateorgsecuritypolicy) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/updateorgsecuritypolicy) - * instead. Get current settings for the requested organizations and default - * settings to allow deferrals. This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: + * Get current settings for the requested organizations and default settings to allow deferrals. * - * - No Scopes Required, but authentication is required + * This endpoint consumes 1 unit of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - No Scopes Required, but authentication is required */ - post: operations['postSettings'] - } - '/report/supported': { + post: operations["postSettings"]; + }; + "/report/supported": { /** - * Get supported files for report. - * - * _This endpoint is deprecated._* Deprecated since 2023-01-15. Use the - * [successor version](https://docs.socket.dev/reference/getsupportedfiles) - * instead. This route has been moved to the - * `orgs/{org_slug}/supported-files` endpoint. Get a list of supported files - * for project report generation. Files are categorized first by environment - * (e.g. NPM or PyPI), then by name. Files whose names match the patterns - * returned by this endpoint can be uploaded for report generation. Examples - * of supported filenames include `package.json`, `package-lock.json`, and - * `yarn.lock`. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - * + * Get supported files for report * @deprecated + * @description **This endpoint is deprecated.** Deprecated since 2023-01-15. Use the [successor version](https://docs.socket.dev/reference/getsupportedfiles) instead. + * + * This route has been moved to the `orgs/{org_slug}/supported-files` endpoint. + * + * Get a list of supported files for project report generation. + * Files are categorized first by environment (e.g. NPM or PyPI), then by name. + * + * Files whose names match the patterns returned by this endpoint can be uploaded for report generation. + * Examples of supported filenames include `package.json`, `package-lock.json`, and `yarn.lock`. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: */ - get: operations['getReportSupportedFiles'] - } - '/report/delete/{id}': { + get: operations["getReportSupportedFiles"]; + }; + "/report/delete/{id}": { /** - * Delete a report. + * Delete a report + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference) instead. Deprecated: Use - * `/orgs/{org_slug}/full-scans` instead. Delete a specific project report - * generated with the GitHub app. This endpoint consumes 10 units of your - * quota. This endpoint requires the following org token scopes: + * Deprecated: Use `/orgs/{org_slug}/full-scans` instead. Delete a specific project report generated with the GitHub app. * - * - Report:write + * This endpoint consumes 10 units of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - report:write */ - delete: operations['deleteReport'] - } - '/report/list': { + delete: operations["deleteReport"]; + }; + "/report/list": { /** - * Get list of reports. + * Get list of reports + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference) instead. Deprecated: Use - * `/orgs/{org_slug}/full-scans` instead. Get all your project reports - * generated with the GitHub app. This endpoint consumes 10 units of your - * quota. This endpoint requires the following org token scopes: + * Deprecated: Use `/orgs/{org_slug}/full-scans` instead. Get all your project reports generated with the GitHub app. * - * - Report:list + * This endpoint consumes 10 units of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - report:list */ - get: operations['getReportList'] - } - '/report/upload': { + get: operations["getReportList"]; + }; + "/report/upload": { /** - * Create a report. + * Create a report + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/createorgfullscan) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/createorgfullscan) instead. - * Deprecated: Use `/orgs/{org_slug}/full-scans` instead. Upload a lockfile - * to get your project analyzed by Socket. You can upload multiple lockfiles - * in the same request, but each filename must be unique. The name of the - * file must be in the supported list. For example, these are valid - * filenames: `package.json`, `folder/package.json` and - * `deep/nested/folder/package.json`. This endpoint consumes 100 units of - * your quota. This endpoint requires the following org token scopes: + * Deprecated: Use `/orgs/{org_slug}/full-scans` instead. * - * - Report:write + * Upload a lockfile to get your project analyzed by Socket. + * You can upload multiple lockfiles in the same request, but each filename must be unique. * - * @deprecated + * The name of the file must be in the supported list. + * + * For example, these are valid filenames: `package.json`, `folder/package.json` and `deep/nested/folder/package.json`. + * + * This endpoint consumes 100 units of your quota. + * + * This endpoint requires the following org token scopes: + * - report:write */ - put: operations['createReport'] - } - '/report/view/{id}': { + put: operations["createReport"]; + }; + "/report/view/{id}": { /** - * View a report. + * View a report + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/getorgfullscan) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/getorgfullscan) instead. - * Deprecated: Use `/orgs/{org_slug}/full-scans` instead. Get all the - * issues, packages, and scores related to an specific project report. This - * endpoint consumes 10 units of your quota. This endpoint requires the - * following org token scopes: + * Deprecated: Use `/orgs/{org_slug}/full-scans` instead. Get all the issues, packages, and scores related to an specific project report. * - * - Report:read + * This endpoint consumes 10 units of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - report:read */ - get: operations['getReport'] - } - '/repo/list': { + get: operations["getReport"]; + }; + "/repo/list": { /** - * List GitHub repositories. + * List GitHub repositories + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/getorgrepolist) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/getorgrepolist) instead. - * Deprecated: Use `/orgs/{org_slug}/repos` instead. Get all GitHub - * repositories associated with a Socket org. This endpoint consumes 1 unit - * of your quota. This endpoint requires the following org token scopes: + * Deprecated: Use `/orgs/{org_slug}/repos` instead. Get all GitHub repositories associated with a Socket org. * - * - Repo:list + * This endpoint consumes 1 unit of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - repo:list */ - get: operations['getRepoList'] - } - '/npm/{package}/{version}/issues': { + get: operations["getRepoList"]; + }; + "/npm/{package}/{version}/issues": { /** - * Get issues by package. + * Get issues by package + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference) instead. Get all the issues - * related with a particular npm package version. This endpoint returns the - * issue type, location, and additional details related to each issue in the - * `props` attribute. You can [see here](https://socket.dev/alerts) the full - * list of issues. This endpoint consumes 1 unit of your quota. This - * endpoint requires the following org token scopes: + * Get all the issues related with a particular npm package version. + * This endpoint returns the issue type, location, and additional details related to each issue in the `props` attribute. * - * - No Scopes Required, but authentication is required + * You can [see here](https://socket.dev/alerts) the full list of issues. * - * @deprecated + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - No Scopes Required, but authentication is required */ - get: operations['getIssuesByNPMPackage'] - } - '/npm/{package}/{version}/score': { + get: operations["getIssuesByNPMPackage"]; + }; + "/npm/{package}/{version}/score": { /** - * Get score by package. - * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/batchpackagefetch) instead. - * Get all the scores and metrics by category that are used to evaluate the - * package version. - * - * - Depscore: The average of all score factors. (0-1) - * - SupplyChainRisk: Score factors relating to supply chain security (0-1) - * - DownloadCount: The number of downloads for the package. Higher downloads - * contribute to a higher score. - * - SupplyChainRiskIssueLow/Mid/High/Critical: The number of supply chain - * risk issues of varying severity. Lower numbers contribute to a higher - * score. - * - DependencyCount: The number of production dependencies. Lower count - * contributes to a higher score. - * - DevDependencyCount: The number of development dependencies. Lower count - * contributes to a higher score. - * - TransitiveDependencyCount: The number of transitive dependencies. Lower - * count contributes to a higher score. - * - TotalDependencyCount: The total number of dependencies (production + - * development + transitive). Lower count contributes to a higher score. - * - Quality: Score factors relating to code quality (0-1) - * - QualityIssueLow/Mid/High/Critical: The number of code quality issues of - * varying severity. Lower numbers contribute to a higher score. - * - LinesOfCode: The number of lines of code in the package. Lower count - * contributes to a higher score. - * - ReadmeLength: The length of the package's README file. Longer READMEs - * contribute to a higher score. - * - Maintenance: Score factors relating to package maintenance (0-1) - * - MaintainerCount: The number of maintainers for the package. More - * maintainers contribute to a higher score. - * - VersionsLastWeek/Month/TwoMonths/Year: The number of versions released in - * different time periods. More recent releases contribute to a higher - * score. - * - VersionCount: The total number of versions released. Higher count - * contributes to a higher score. - * - MaintenanceIssueLow/Mid/High/Critical: The number of maintenance issues - * of varying severity. Lower numbers contribute to a higher score. - * - Vulnerability: Score factors relating to package vulnerabilities (0-1) - * - VulnerabilityIssueLow/Mid/High/Critical: The number of vulnerability - * issues of varying severity. Lower numbers contribute to a higher - * score. - * - DependencyVulnerabilityCount: The number of vulnerabilities in the - * package's dependencies. Lower count contributes to a higher score. - * - VulnerabilityCount: The number of vulnerabilities in the package itself. - * Lower count contributes to a higher score. - * - License: Score factors relating to package licensing (0-1) - * - LicenseIssueLow/Mid/High/Critical: The number of license issues of - * varying severity. Lower numbers contribute to a higher score. - * - LicenseQuality: A score indicating the quality/permissiveness of the - * package's license. Higher quality contributes to a higher score. - * - Miscellaneous: Miscellaneous metadata about the package version. - * - VersionAuthorName/Email: The name and email of the version author. - * - FileCount: The number of files in the package. - * - ByteCount: The total size in bytes of the package. - * - TypeModule: Whether the package declares a "type": "module" field. This - * endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: - * - No Scopes Required, but authentication is required - * + * Get score by package * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/batchpackagefetch) instead. + * + * Get all the scores and metrics by category that are used to evaluate the package version. + * + * - depscore: The average of all score factors. (0-1) + * - supplyChainRisk: Score factors relating to supply chain security (0-1) + * - downloadCount: The number of downloads for the package. Higher downloads contribute to a higher score. + * - supplyChainRiskIssueLow/Mid/High/Critical: The number of supply chain risk issues of varying severity. Lower numbers contribute to a higher score. + * - dependencyCount: The number of production dependencies. Lower count contributes to a higher score. + * - devDependencyCount: The number of development dependencies. Lower count contributes to a higher score. + * - transitiveDependencyCount: The number of transitive dependencies. Lower count contributes to a higher score. + * - totalDependencyCount: The total number of dependencies (production + development + transitive). Lower count contributes to a higher score. + * - quality: Score factors relating to code quality (0-1) + * - qualityIssueLow/Mid/High/Critical: The number of code quality issues of varying severity. Lower numbers contribute to a higher score. + * - linesOfCode: The number of lines of code in the package. Lower count contributes to a higher score. + * - readmeLength: The length of the package's README file. Longer READMEs contribute to a higher score. + * - maintenance: Score factors relating to package maintenance (0-1) + * - maintainerCount: The number of maintainers for the package. More maintainers contribute to a higher score. + * - versionsLastWeek/Month/TwoMonths/Year: The number of versions released in different time periods. More recent releases contribute to a higher score. + * - versionCount: The total number of versions released. Higher count contributes to a higher score. + * - maintenanceIssueLow/Mid/High/Critical: The number of maintenance issues of varying severity. Lower numbers contribute to a higher score. + * - vulnerability: Score factors relating to package vulnerabilities (0-1) + * - vulnerabilityIssueLow/Mid/High/Critical: The number of vulnerability issues of varying severity. Lower numbers contribute to a higher score. + * - dependencyVulnerabilityCount: The number of vulnerabilities in the package's dependencies. Lower count contributes to a higher score. + * - vulnerabilityCount: The number of vulnerabilities in the package itself. Lower count contributes to a higher score. + * - license: Score factors relating to package licensing (0-1) + * - licenseIssueLow/Mid/High/Critical: The number of license issues of varying severity. Lower numbers contribute to a higher score. + * - licenseQuality: A score indicating the quality/permissiveness of the package's license. Higher quality contributes to a higher score. + * - miscellaneous: Miscellaneous metadata about the package version. + * - versionAuthorName/Email: The name and email of the version author. + * - fileCount: The number of files in the package. + * - byteCount: The total size in bytes of the package. + * - typeModule: Whether the package declares a "type": "module" field. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - No Scopes Required, but authentication is required */ - get: operations['getScoreByNPMPackage'] - } - '/analytics/org/{filter}': { + get: operations["getScoreByNPMPackage"]; + }; + "/analytics/org/{filter}": { /** * Get organization analytics (unstable) + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/historicalalertstrend) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/historicalalertstrend) - * instead. Please implement against the [Historical - * dependencies](/reference/historicaldependenciestrend) or [Historical - * alerts](/reference/historicalalertstrend) endpoints. Get analytics data - * regarding the number of alerts found across all active repositories. This - * endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: + * Please implement against the [Historical dependencies](/reference/historicaldependenciestrend) or [Historical alerts](/reference/historicalalertstrend) endpoints. * - * - Report:write + * Get analytics data regarding the number of alerts found across all active repositories. * - * @deprecated + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - report:write */ - get: operations['getOrgAnalytics'] - } - '/analytics/repo/{name}/{filter}': { + get: operations["getOrgAnalytics"]; + }; + "/analytics/repo/{name}/{filter}": { /** - * Get repository analytics. + * Get repository analytics + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/historicalalertstrend) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/historicalalertstrend) - * instead. Please implement against the [Historical - * dependencies](/reference/historicaldependenciestrend) or [Historical - * alerts](/reference/historicalalertstrend) endpoints. Get analytics data - * regarding the number of alerts found in a single repository. This - * endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: + * Please implement against the [Historical dependencies](/reference/historicaldependenciestrend) or [Historical alerts](/reference/historicalalertstrend) endpoints. * - * - Report:write + * Get analytics data regarding the number of alerts found in a single repository. * - * @deprecated + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - report:write */ - get: operations['getRepoAnalytics'] - } + get: operations["getRepoAnalytics"]; + }; } -export type webhooks = Record +export type webhooks = Record; export interface components { schemas: { - BatchPurlStreamSchema: - | components['schemas']['SocketArtifact'] - | { - /** - * @enum {string} - */ - _type: 'purlError' - value: components['schemas']['PurlErrorSchema'] - } - | { - /** - * @enum {string} - */ - _type: 'summary' - value: components['schemas']['PurlSummarySchema'] - } + BatchPurlStreamSchema: components["schemas"]["SocketArtifact"] | { + /** @enum {string} */ + _type: "purlError"; + value: components["schemas"]["PurlErrorSchema"]; + } | { + /** @enum {string} */ + _type: "summary"; + value: components["schemas"]["PurlSummarySchema"]; + }; SocketOrgBatchPURLFetch: { - components: Array - } - SocketArtifact: components['schemas']['SocketPURL'] & - components['schemas']['SocketArtifactLink'] & { - id?: components['schemas']['SocketId'] - /** - * List of package authors or maintainers. - */ - author?: string[] - /** - * Total size of the package artifact in bytes. - * - * @default 0 - */ - size?: number - /** - * Hugging Face model, dataset, or space type. - * - * @default - */ - repositoryType?: string - alerts?: Array - score?: components['schemas']['SocketScore'] - patch?: components['schemas']['SocketArtifactPatch'] - /** - * Original unmodified PURL input string before normalization. - * - * @default - */ - inputPurl?: string - /** - * Deprecated: Always 0. Previously used for batch ordering but replaced - * by inputPurl for better tracking. - * - * @default 0 - */ - batchIndex?: number - /** - * @default - */ - license?: string - licenseDetails?: components['schemas']['LicenseDetails'] - licenseAttrib?: components['schemas']['SAttrib1_N'] - } - /** - * Mapping of supply chain risk alert types to their computed score - * contributions and formulas used for calculation. This allows for detailed - * breakdowns of how each alert type impacts the overall supply chain - * security score, with the ability to include custom formulas and - * components for each alert type. - */ + components: Array; + }; + SocketArtifact: components["schemas"]["SocketPURL"] & components["schemas"]["SocketArtifactLink"] & { + id?: components["schemas"]["SocketId"]; + /** @description List of package authors or maintainers */ + author?: string[]; + /** + * @description Total size of the package artifact in bytes + * @default 0 + */ + size?: number; + /** + * @description Hugging Face model, dataset, or space type + * @default + */ + repositoryType?: string; + /** + * @description ISO-8601 timestamp of when this package version or artifact was published, when known. Currently populated for PURL types: actions, cargo, composer, go, maven, npm, nuget, openvsx, pypi, and rubygems. Maven and PyPI can use artifact-grain dates when artifact qualifiers identify a concrete artifact; other listed ecosystems use package-version dates. + * @default + */ + publishedAt?: string; + alerts?: Array; + score?: components["schemas"]["SocketScore"]; + patch?: components["schemas"]["SocketArtifactPatch"]; + /** + * @description Original unmodified PURL input string before normalization + * @default + */ + inputPurl?: string; + /** + * @description Deprecated: Always 0. Previously used for batch ordering but replaced by inputPurl for better tracking. + * @default 0 + */ + batchIndex?: number; + /** @default */ + license?: string; + licenseDetails?: components["schemas"]["LicenseDetails"]; + licenseAttrib?: components["schemas"]["SAttrib1_N"]; + }; + /** @description Mapping of supply chain risk alert types to their computed score contributions and formulas used for calculation. This allows for detailed breakdowns of how each alert type impacts the overall supply chain security score, with the ability to include custom formulas and components for each alert type. */ SocketSBOMScore: { [key: string]: { value: { /** - * Score from 0.0 to 1.0 for the scanned repository, computed from - * supply chain risk alerts using weighted exponential decay per - * direct dependency. - * + * @description Score from 0.0 to 1.0 for the scanned repository, computed from supply chain risk alerts using weighted exponential decay per direct dependency * @default 0 */ - result: number - /** - * Components used to compute result of the formula. - */ + result: number; + /** @description Components used to compute result of the formula */ components?: { - [key: string]: number - } + [key: string]: number; + }; /** - * Formula used to compute the supply chain security score. - * + * @description Formula used to compute the supply chain security score * @default */ - formula?: string - } - } - } - SocketDiffArtifact: components['schemas']['SocketPURL'] & { - diffType: components['schemas']['SocketDiffArtifactType'] - id?: components['schemas']['SocketId'] + formula?: string; + }; + }; + }; + SocketDiffArtifact: components["schemas"]["SocketPURL"] & { + diffType: components["schemas"]["SocketDiffArtifactType"]; + id?: components["schemas"]["SocketId"]; + /** @description List of package authors or maintainers */ + author?: string[]; + /** @description Artifact links from the base/before state */ + base?: Array; + capabilities?: components["schemas"]["Capabilities"]; + /** @description Artifact links from the head/after state */ + head?: Array; + qualifiers?: components["schemas"]["Qualifiers"]; + /** + * @description Total size of the package artifact in bytes + * @default 0 + */ + size?: number; + /** @default */ + license?: string; + licenseDetails?: components["schemas"]["LicenseDetails"]; + licenseAttrib?: components["schemas"]["SAttrib1_N"]; + score?: components["schemas"]["SocketScore"]; + alerts?: Array; + }; + CDXManifestSchema: { + /** @default CycloneDX */ + bomFormat: string; + /** @default 1.5 */ + specVersion: string; + /** @default */ + serialNumber: string; + /** @default 0 */ + version: number; + metadata: { + /** @default */ + timestamp: string; + tools: { + components: Array<(components["schemas"]["CDXComponentSchema"] & { + /** @default Socket */ + author?: string; + authors?: string[]; + /** @default Socket */ + publisher?: string; + })>; + }; + authors: Array<{ + /** @default Socket */ + name: string; + }>; + /** @default */ + supplier?: string; + lifecycles: Array<{ + /** @default build */ + phase: string; + }>; + component: components["schemas"]["CDXComponentSchema"]; + properties?: Array<{ + /** @default */ + name: string; + /** @default */ + value: string; + }>; + }; + components: Array; + dependencies: Array<{ + /** @default */ + ref: string; + dependsOn?: string[]; + }>; + vulnerabilities?: Array<{ + /** @default */ + id: string; + /** @default */ + ref?: string; + source?: { + /** @default */ + name?: string; + /** @default */ + url?: string; + }; + ratings?: { + source?: { + /** @default */ + name?: string; + /** @default */ + url?: string; + }; + /** @default 0 */ + score?: number; + /** @default */ + severity?: string; + /** @default */ + method?: string; + /** @default */ + vector?: string; + }[]; + cwes?: number[]; + /** @default */ + description?: string; + /** @default */ + detail?: string; + /** @default */ + recommendation?: string; + advisories?: { + /** @default */ + url: string; + /** @default */ + title?: string; + }[]; + /** @default */ + created?: string; + /** @default */ + published?: string; + /** @default */ + updated?: string; + affects?: { + /** @default */ + ref: string; + versions?: { + /** @default */ + version?: string; + /** @default */ + status?: string; + }[]; + }[]; + analysis?: { + /** @default */ + state?: string; + /** @default */ + justification?: string; + response?: string[]; + /** @default */ + detail?: string; + /** @default */ + firstIssued?: string; + /** @default */ + lastUpdated?: string; + }; + }>; + }; + OpenVEXDocumentSchema: { + /** @default https://openvex.dev/ns/v0.2.0 */ + "@context": string; + /** @default */ + "@id": string; + /** @default Socket Security */ + author: string; + /** @default */ + timestamp: string; + /** @default 1 */ + version: number; + statements: Array; + /** @default VEX Generator */ + role?: string; + /** @default */ + last_updated?: string; + /** @default Socket Security VEX Generator */ + tooling?: string; + }; + SPDXManifestSchema: { + /** @default SPDX-2.3 */ + spdxVersion: string; + /** @default CC0-1.0 */ + dataLicense: string; + /** @default SPDXRef-DOCUMENT */ + SPDXID: string; + /** @default */ + name: string; + /** @default */ + documentNamespace: string; + creationInfo: { + /** @default */ + created: string; + creators: string[]; + }; + documentDescribes: string[]; + packages: Array<{ + /** @default */ + name: string; + /** @default */ + SPDXID: string; + /** @default */ + versionInfo: string; + /** @default */ + packageFileName: string; + /** @default */ + description?: string; + /** @default */ + primaryPackagePurpose?: string; + /** @default */ + downloadLocation?: string; + /** @default false */ + filesAnalyzed: boolean; + /** @default NOASSERTION */ + homepage: string; + /** @default NOASSERTION */ + licenseDeclared: string; + externalRefs: { + /** @default PACKAGE-MANAGER */ + referenceCategory: string; + /** @default purl */ + referenceType: string; + /** @default */ + referenceLocator: string; + }[]; + checksums?: { + /** @default */ + algorithm: string; + /** @default */ + checksumValue: string; + }[]; + }>; + relationships: Array<{ + /** @default SPDXRef-DOCUMENT */ + spdxElementId: string; + /** @default */ + relatedSpdxElement: string; + /** @default DESCRIBES */ + relationshipType: string; + }>; + }; + /** @default null */ + LicenseAllowListRequest: Record; + SStoredLicensePolicy: { + allow: string[] | null; + warn: string[] | null; + monitor: string[] | null; + deny: string[] | null; + options: string[] | null; + }; + Capabilities: { + /** + * @description Package can read or modify environment variables + * @default false + */ + env: boolean; + /** + * @description Package uses dynamic code evaluation (eval, Function constructor, etc.) + * @default false + */ + eval: boolean; + /** + * @description Package can read or write to the file system + * @default false + */ + fs: boolean; /** - * List of package authors or maintainers. + * @description Package can make network requests or create servers + * @default false + */ + net: boolean; + /** + * @description Package can execute shell commands or spawn processes + * @default false */ - author?: string[] + shell: boolean; /** - * Artifact links from the base/before state. + * @description Package uses unsafe or dangerous operations that could compromise security + * @default false */ - base?: Array - capabilities?: components['schemas']['Capabilities'] + unsafe: boolean; /** - * Artifact links from the head/after state. + * @description Package contains remote URL(s) in the source code + * @default false */ - head?: Array - qualifiers?: components['schemas']['Qualifiers'] + url: boolean; + }; + Qualifiers: unknown; + SocketScore: { /** - * Total size of the package artifact in bytes. - * + * @description Score from 0.0 to 1.0 evaluating license permissiveness and compatibility * @default 0 */ - size?: number + license: number; /** - * @default + * @description Score from 0.0 to 1.0 evaluating project maintenance health and activity + * @default 0 */ - license?: string - licenseDetails?: components['schemas']['LicenseDetails'] - licenseAttrib?: components['schemas']['SAttrib1_N'] - score?: components['schemas']['SocketScore'] - alerts?: Array - } - CDXManifestSchema: { + maintenance: number; + /** + * @description Combined score from 0.0 to 1.0 representing overall package health and safety + * @default 0 + */ + overall: number; + /** + * @description Score from 0.0 to 1.0 evaluating code quality, testing, and documentation + * @default 0 + */ + quality: number; /** - * @default CycloneDX + * @description Score from 0.0 to 1.0 evaluating supply chain security and provenance + * @default 0 */ - bomFormat: string + supplyChain: number; /** - * @default 1.5 + * @description Score from 0.0 to 1.0 based on known vulnerabilities and their severity + * @default 0 */ - specVersion: string + vulnerability: number; + }; + SocketManifestReference: { /** + * @description Path to the manifest file (e.g., package.json, pom.xml) * @default */ - serialNumber: string + file: string; /** + * @description Starting line or position in the manifest file * @default 0 */ - version: number - metadata: { - /** - * @default - */ - timestamp: string - tools: { - components: Array< - components['schemas']['CDXComponentSchema'] & { - /** - * @default Socket - */ - author?: string - authors?: string[] - /** - * @default Socket - */ - publisher?: string - } - > - } - authors: Array<{ - /** - * @default Socket - */ - name: string - }> - /** - * @default - */ - supplier?: string - lifecycles: Array<{ - /** - * @default build - */ - phase: string - }> - component: components['schemas']['CDXComponentSchema'] - properties?: Array<{ - /** - * @default - */ - name: string - /** - * @default - */ - value: string - }> - } - components: Array - dependencies: Array<{ - /** - * @default - */ - ref: string - dependsOn?: string[] - }> - vulnerabilities?: Array<{ - /** - * @default - */ - id: string - /** - * @default - */ - ref?: string - source?: { - /** - * @default - */ - name?: string - /** - * @default - */ - url?: string - } - ratings?: { - source?: { - /** - * @default - */ - name?: string - /** - * @default - */ - url?: string - } - /** - * @default 0 - */ - score?: number - /** - * @default - */ - severity?: string - /** - * @default - */ - method?: string - /** - * @default - */ - vector?: string - }[] - cwes?: number[] - /** - * @default - */ - description?: string - /** - * @default - */ - detail?: string - /** - * @default - */ - recommendation?: string - advisories?: { - /** - * @default - */ - url: string - /** - * @default - */ - title?: string - }[] - /** - * @default - */ - created?: string - /** - * @default - */ - published?: string - /** - * @default - */ - updated?: string - affects?: { - /** - * @default - */ - ref: string - versions?: { - /** - * @default - */ - version?: string - /** - * @default - */ - status?: string - }[] - }[] - analysis?: { - /** - * @default - */ - state?: string - /** - * @default - */ - justification?: string - response?: string[] - /** - * @default - */ - detail?: string - /** - * @default - */ - firstIssued?: string - /** - * @default - */ - lastUpdated?: string - } - }> - } - OpenVEXDocumentSchema: { + start?: number; /** - * @default https://openvex.dev/ns/v0.2.0 + * @description Ending line or position in the manifest file + * @default 0 */ - '@context': string + end?: number; + }; + /** @default */ + SocketId: string; + LicensePolicy: { + allow: components["schemas"]["LicenseAllowListElabbed"]; + warn: components["schemas"]["LicenseAllowListElabbed"]; + monitor: components["schemas"]["LicenseAllowListElabbed"]; + }; + LicenseAllowList: { + strings: string[]; + }; + /** @default null */ + SLicenseMetaRes: Record; + /** @default null */ + SLicenseMetaReq: Record; + SocketReport: { + /** @default */ + id: string; + /** @default false */ + healthy: boolean; + issues: components["schemas"]["SocketIssueList"]; + score: { + /** @default 0 */ + avgSupplyChainRisk: number; + /** @default 0 */ + avgQuality: number; + /** @default 0 */ + avgMaintenance: number; + /** @default 0 */ + avgVulnerability: number; + /** @default 0 */ + avgLicense: number; + }; + /** @default */ + url: string; + }; + SocketIssueList: Array; + SocketPackageScore: { + supplyChainRisk: components["schemas"]["SocketMetricSchema"]; + quality: components["schemas"]["SocketMetricSchema"]; + maintenance: components["schemas"]["SocketMetricSchema"]; + vulnerability: components["schemas"]["SocketMetricSchema"]; + license: components["schemas"]["SocketMetricSchema"]; + miscellaneous: components["schemas"]["SocketMetricSchema"]; + /** @default 0 */ + depscore: number; + }; + PurlErrorSchema: { + /** @default */ + error: string; + /** @default */ + inputPurl: string; + /** @description True when the error is transient (timeout or shed resolution) and a retry can succeed. Absent or false means the error is an authoritative verdict for this input. */ + retryable: boolean; + }; + PurlSummarySchema: { + /** @default 0 */ + purl_input: number; + /** @default 0 */ + resolved: number; + errors: { + /** @default 0 */ + purl_malformed: number; + /** @default 0 */ + purl_ecosystem_not_enabled: number; + /** @default 0 */ + package_not_found: number; + }; + }; + SocketBatchPURLRequest: { + /** @default */ + purl: string; + }; + SocketPURL: { + type: components["schemas"]["SocketPURL_Type"]; /** + * @description Package namespace or scope, such as npm organizations (@angular), Maven groupIds, or Docker image owners * @default */ - '@id': string + namespace?: string; /** - * @default Socket Security + * @description Package name within its ecosystem + * @default */ - author: string + name?: string; /** + * @description Package version string * @default */ - timestamp: string + version?: string; /** - * @default 1 + * @description Path within the package to a specific file or directory, used to reference nested components + * @default */ - version: number - statements: Array + subpath?: string; /** - * @default VEX Generator + * @description Package-specific release identifier, such as PyPI's artifact ID or the specific build/release version + * @default */ - role?: string + release?: string; + }; + SocketAlert: { /** + * @description Unique identifier for this alert instance, used for deduplication and tracking across scans * @default */ - last_updated?: string + key: string; /** - * @default Socket Security VEX Generator + * @description Alert type identifier referencing the alert type definition + * @default */ - tooling?: string - } - SPDXManifestSchema: { + type: string; + severity?: components["schemas"]["SocketIssueSeverity"]; + category?: components["schemas"]["SocketCategory"]; /** - * @default SPDX-2.3 + * @description File path where this alert was detected + * @default */ - spdxVersion: string + file?: string; /** - * @default CC0-1.0 + * @description Starting position of the alert in the file + * @default 0 */ - dataLicense: string + start?: number; /** - * @default SPDXRef-DOCUMENT + * @description Ending position of the alert in the file + * @default 0 */ - SPDXID: string + end?: number; /** - * @default + * @description Additional alert-specific properties and metadata that vary by alert type. For vulnerability alerts this includes the `cveId` and `ghsaId` identifiers, either of which may be an empty string when GitHub has not assigned that identifier to the advisory. + * @default null */ - name: string + props?: Record; /** + * @description Action to take for this alert (e.g., error, warn, ignore) * @default */ - documentNamespace: string - creationInfo: { - /** - * @default - */ - created: string - creators: string[] - } - documentDescribes: string[] - packages: Array<{ + action?: string; + actionSource?: { /** + * @description Type of action source (e.g., policy, override) * @default */ - name: string + type: string; + candidates: Array<({ + /** + * @description Type of action candidate + * @default + */ + type: string; + /** + * @description Proposed action for this candidate + * @default + */ + action: string; + /** + * @description Index of the policy rule for this candidate + * @default 0 + */ + actionPolicyIndex: number; + /** + * @description Repository label ID associated with this candidate + * @default + */ + repoLabelId: string; + /** + * @description ID of the alert policy whose rule matched. Absent when not applicable (alert-policy candidates only) + * @default + */ + policyId?: string; + /** + * @description Display name of the matched alert policy at evaluation time; null for the default policy. Absent when not applicable (alert-policy candidates only) + * @default + */ + policyName?: string | null; + /** + * @description ID of the matched alert policy rule: the rule uuid for custom rules, the issue name for baseline rules. Absent when not applicable (alert-policy candidates only) + * @default + */ + ruleId?: string; + /** + * @description Name of the matched alert policy rule at evaluation time. Absent when not applicable (alert-policy candidates only) + * @default + */ + ruleName?: string; + /** + * @description 0-based position of the matched rule in first-match-wins evaluation order. Absent when not applicable (alert-policy candidates only) + * @default 0 + */ + ruleIndex?: number; + /** + * @description Whether the matched alert policy rule is a baseline rule. Absent when not applicable (alert-policy candidates only) + * @default false + */ + isBaseline?: boolean; + })>; + }; + alertPolicyRule?: components["schemas"]["SocketAlertPolicyRule"]; + /** + * @description Index of the policy rule that triggered this action, for traceability to security policies + * @default 0 + */ + actionPolicyIndex?: number; + fix?: { /** + * @description Type of fix available (e.g., upgrade, remove, cve) * @default */ - SPDXID: string + type: string; /** + * @description Human-readable description of how to fix this issue * @default */ - versionInfo: string + description: string; + /** @description Patches available to fix this specific alert */ + patch?: Array<({ + /** + * @description Unique identifier for this patch + * @default + */ + uuid: string; + /** + * @description Access tier required for this patch (free or paid) + * @default free + * @enum {string} + */ + tier: "free" | "paid"; + /** + * @description Indicates if this patch is deprecated and should not be used + * @default false + */ + deprecated?: boolean; + })>; + }; + patch?: components["schemas"]["SocketPatch"]; + reachability?: { + head?: components["schemas"]["ReachabilityResult"]; + base?: components["schemas"]["ReachabilityResult"]; + }; + /** + * @description Generic alert sub-type + * @default + */ + subType?: string; + }; + SocketArtifactPatch: { + appliedPatch?: components["schemas"]["SocketPatch"]; + /** @description List of available patches that can be applied to fix vulnerabilities */ + availablePatches?: Array; + }; + LicenseDetails: Array<{ /** + * @description SPDX license expression in disjunctive normal form (e.g., '(MIT OR Apache-2.0)') * @default */ - packageFileName: string + spdxDisj: string; + /** @description List of authors found in the license text */ + authors: string[]; /** + * @description Error details if license parsing failed * @default */ - description?: string + errorData: string; /** + * @description Source where this license information was detected (e.g., 'package.json', 'LICENSE file', 'README') * @default */ - primaryPackagePurpose?: string + provenance: string; /** + * @description Path to the file containing this license information * @default */ - downloadLocation?: string - /** - * @default false - */ - filesAnalyzed: boolean + filepath: string; /** - * @default NOASSERTION + * @description Confidence score from 0.0 to 1.0 indicating how well the detected license matches the source text + * @default 0 */ - homepage: string + match_strength: number; + }>; + SAttrib1_N: Array<{ /** - * @default NOASSERTION + * @description Full text of the license attribution or copyright notice found in the package + * @default */ - licenseDeclared: string - externalRefs: { + attribText: string; + attribData: { + /** + * @description Package URL this attribution applies to + * @default + */ + purl: string; + /** + * @description File path where this attribution was found + * @default + */ + foundInFilepath: string; + /** + * @description SPDX license expression parsed from the attribution text + * @default + */ + spdxExpr: string; + /** @description Authors mentioned in this attribution */ + foundAuthors: string[]; + }[]; + }>; + SocketArtifactLink: { + /** + * @description Indicates if this is a direct dependency (not transitive) + * @default false + */ + direct?: boolean; + /** + * @description Indicates if this is a development-only dependency not used in production + * @default false + */ + dev?: boolean; + /** + * @description Indicates if this package is deprecated, abandoned, or no longer maintained + * @default false + */ + dead?: boolean; + manifestFiles?: Array; + /** @description IDs of the root-level packages in the dependency tree that depend on this package */ + topLevelAncestors?: Array; + /** @description IDs of packages that this package directly depends on */ + dependencies?: Array; + /** @description Computed priority scores for each alert type based on severity, reachability, and fixability factors */ + alertPriorities?: { + [key: string]: { /** - * @default PACKAGE-MANAGER + * @description Computed priority score for this alert + * @default 0 */ - referenceCategory: string + result: number; + components?: { + isFixable: { + /** + * @description Contribution of fixability to the priority score + * @default 0 + */ + result: number; + /** + * @description Whether a fix is available for this alert + * @default false + */ + value: boolean; + }; + isReachable: { + /** + * @description Contribution of reachability to the priority score + * @default 0 + */ + result: number; + /** + * @description Whether the vulnerable code is reachable + * @default false + */ + value: boolean; + /** + * @description Specific reachability type value such as 'unreachable', 'maybe_reachable', or 'reachable' + * @default + */ + specificValue: string; + }; + severity: { + /** + * @description Contribution of severity to the priority score + * @default 0 + */ + result: number; + /** + * @description Numeric severity level + * @default 0 + */ + value: number; + }; + }; /** - * @default purl + * @description Formula used to calculate the priority score + * @default */ - referenceType: string + formula?: string; + }; + }; + artifact?: components["schemas"]["SocketPURL"] & { + id: components["schemas"]["SocketId"]; + }; + /** @description Deprecated: mapping of alert keys to arrays of reachability types found across different manifest files or code locations. This field is derived from alertKeysToReachabilitySummaries for backward compatibility; use that property instead. */ + alertKeysToReachabilityTypes?: { + [key: string]: string[]; + }; + /** @description Mapping of alert keys to arrays of reachability summaries. Each summary contains a reachability type indicating the result of reachability analysis for the corresponding vulnerability alert. */ + alertKeysToReachabilitySummaries?: { + [key: string]: Array<{ + /** @default */ + type: string; + }>; + }; + }; + /** + * @description Type of change detected for this artifact in the diff + * @default unchanged + * @enum {string} + */ + SocketDiffArtifactType: "added" | "removed" | "updated" | "replaced" | "unchanged"; + CDXComponentSchema: { + /** @default */ + author?: string; + /** @default */ + publisher?: string; + /** @default */ + group: string; + /** @default */ + name: string; + /** @default */ + version: string; + /** @default */ + description?: string; + /** @default */ + scope?: string; + hashes?: Array<{ + /** @default */ + alg: string; + /** @default */ + content: string; + }>; + licenses?: Array<{ + /** @default */ + expression?: string; + license?: { + /** @default */ + id?: string; + /** @default */ + name?: string; + /** @default */ + url?: string; + }; + }>; + /** @default */ + purl: string; + externalReferences?: Array<{ + /** @default */ + type: string; + /** @default */ + url: string; + }>; + /** @default application */ + type: string; + /** @default */ + "bom-ref": string; + evidence?: { + identity: { + /** @default */ + field: string; + /** @default 0 */ + confidence: number; + methods: Array<{ + /** @default */ + technique: string; + /** @default 0 */ + confidence: number; + /** @default */ + value: string; + }>; + }; + occurrences?: Array<{ + /** @default */ + location: string; + }>; + }; + tags?: string[]; + properties?: Array<{ + /** @default */ + name: string; + /** @default */ + value: string; + }>; + cryptoProperties?: Array<{ + /** @default */ + assetType: string; + algorithmProperties: { + /** @default */ + executionEnvironment: string; + /** @default */ + implementationPlatform: string; + }; + }>; + components?: Array; + }; + OpenVEXStatementSchema: { + vulnerability: components["schemas"]["OpenVEXVulnerabilitySchema"]; + products: Array; + /** @default affected */ + status: string; + /** @default */ + "@id"?: string; + /** @default 0 */ + version?: number; + /** @default */ + timestamp?: string; + /** @default */ + last_updated?: string; + /** @default */ + supplier?: string; + /** @default */ + status_notes?: string; + /** @default */ + justification?: string; + /** @default */ + impact_statement?: string; + /** @default */ + action_statement?: string; + /** @default */ + action_statement_timestamp?: string; + }; + LicenseAllowListElabbed: { + strings: string[]; + classes: string[]; + packageURLs: string[]; + disjs: string[]; + }; + SocketIssue: ({ + /** @enum {string} */ + type?: "gptSecurity"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "gptAnomaly"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; /** + * @default medium + * @enum {string} + */ + risk: "low" | "medium" | "high"; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "gptMalware"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "browserExtensionPermission"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + permission: string; + /** @default */ + permissionType: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "browserExtensionHostPermission"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + host: string; + /** @default */ + permissionType: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "browserExtensionWildcardHostPermission"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + host: string; + /** @default */ + permissionType: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "browserExtensionContentScript"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + scriptFile: string; + /** @default */ + matches: string; + /** @default */ + runAt: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "filesystemAccess"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default fs */ + module: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "networkAccess"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default net */ + module: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "shellAccess"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default child_process */ + module: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "debugAccess"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default vm */ + module: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "chromePermission"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + permission: string; + /** @default */ + permissionType: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "chromeHostPermission"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + host: string; + /** @default */ + permissionType: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "chromeWildcardHostPermission"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + host: string; + /** @default */ + permissionType: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "chromeContentScript"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + scriptFile: string; + /** @default */ + matches: string; + /** @default */ + runAt: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "criticalCVE"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** + * @description Common Vulnerabilities and Exposures identifier (e.g., CVE-2021-44228) * @default */ - referenceLocator: string - }[] - checksums?: { + cveId: string; + cwes: Array<{ + /** @default */ + description: string; + /** + * @description Common Weakness Enumeration identifier (e.g., CWE-79) + * @default + */ + id: string; + /** @default */ + name: string; + }>; + /** @description Common Vulnerability Scoring System metrics */ + cvss: { + /** + * @description CVSS base score ranging from 0.0 to 10.0 + * @default 0 + */ + score: number; + /** + * @description CVSS vector string (e.g., CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) + * @default + */ + vectorString: string; + }; + /** @default */ + description: string; /** + * @description The first version that includes a patch for this vulnerability * @default */ - algorithm: string + firstPatchedVersionIdentifier: string; /** + * @description GitHub Security Advisory identifier (e.g., GHSA-1234-5678-9abc) * @default */ - checksumValue: string - }[] - }> - relationships: Array<{ - /** - * @default SPDXRef-DOCUMENT - */ - spdxElementId: string - /** - * @default - */ - relatedSpdxElement: string - /** - * @default DESCRIBES - */ - relationshipType: string - }> - } - /** - * @default null - */ - LicenseAllowListRequest: Record - SStoredLicensePolicy: { - allow: string[] | null - warn: string[] | null - monitor: string[] | null - deny: string[] | null - options: string[] | null - } - Capabilities: { - /** - * Package can read or modify environment variables. - * - * @default false - */ - env: boolean - /** - * Package uses dynamic code evaluation (eval, Function constructor, etc.) - * - * @default false - */ - eval: boolean - /** - * Package can read or write to the file system. - * - * @default false - */ - fs: boolean - /** - * Package can make network requests or create servers. - * - * @default false - */ - net: boolean - /** - * Package can execute shell commands or spawn processes. - * - * @default false - */ - shell: boolean - /** - * Package uses unsafe or dangerous operations that could compromise - * security. - * - * @default false - */ - unsafe: boolean - /** - * Package contains remote URL(s) in the source code. - * - * @default false - */ - url: boolean - } - Qualifiers: unknown - SocketScore: { - /** - * Score from 0.0 to 1.0 evaluating license permissiveness and - * compatibility. - * - * @default 0 - */ - license: number - /** - * Score from 0.0 to 1.0 evaluating project maintenance health and - * activity. - * - * @default 0 - */ - maintenance: number - /** - * Combined score from 0.0 to 1.0 representing overall package health and - * safety. - * - * @default 0 - */ - overall: number - /** - * Score from 0.0 to 1.0 evaluating code quality, testing, and - * documentation. - * - * @default 0 - */ - quality: number - /** - * Score from 0.0 to 1.0 evaluating supply chain security and provenance. - * - * @default 0 - */ - supplyChain: number - /** - * Score from 0.0 to 1.0 based on known vulnerabilities and their - * severity. - * - * @default 0 - */ - vulnerability: number - } - SocketManifestReference: { - /** - * Path to the manifest file (e.g., package.json, pom.xml) - * - * @default - */ - file: string - /** - * Starting line or position in the manifest file. - * - * @default 0 - */ - start?: number - /** - * Ending line or position in the manifest file. - * - * @default 0 - */ - end?: number - } + ghsaId: string; + /** @default critical */ + severity: string; + /** @default */ + title: string; + /** @default */ + url: string; + /** + * @description Version range affected by this vulnerability (e.g., >= 2.0.0, < 2.17.1) + * @default + */ + vulnerableVersionRange: string; + kevs: (Array<({ + /** @default */ + vulnerabilityName: string; + /** @default */ + shortDescription: string | null; + /** @default */ + requiredAction: string | null; + /** + * @description Date when added to CISA KEV catalog (ISO 8601 format) + * @default + */ + dateAdded: string; + /** + * @description Remediation deadline for federal agencies (ISO 8601 format) + * @default + */ + dueDate: string | null; + /** + * @description Known, Unknown, or specific ransomware campaign names + * @default + */ + knownRansomwareCampaignUse: string | null; + /** @default */ + notes: string | null; + /** @default */ + vendorProject: string; + /** @default */ + product: string; + })>) | null; + /** @description Exploit Prediction Scoring System https://www.first.org/epss/ */ + epss: { + /** @default 0 */ + score: number; + /** @default 0 */ + percentile: number; + } | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "cve"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** + * @description Common Vulnerabilities and Exposures identifier (e.g., CVE-2021-44228) + * @default + */ + cveId: string; + cwes: Array<{ + /** @default */ + description: string; + /** + * @description Common Weakness Enumeration identifier (e.g., CWE-79) + * @default + */ + id: string; + /** @default */ + name: string; + }>; + /** @description Common Vulnerability Scoring System metrics */ + cvss: { + /** + * @description CVSS base score ranging from 0.0 to 10.0 + * @default 0 + */ + score: number; + /** + * @description CVSS vector string (e.g., CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) + * @default + */ + vectorString: string; + }; + /** @default */ + description: string; + /** + * @description The first version that includes a patch for this vulnerability + * @default + */ + firstPatchedVersionIdentifier: string; + /** + * @description GitHub Security Advisory identifier (e.g., GHSA-1234-5678-9abc) + * @default + */ + ghsaId: string; + /** @default critical */ + severity: string; + /** @default */ + title: string; + /** @default */ + url: string; + /** + * @description Version range affected by this vulnerability (e.g., >= 2.0.0, < 2.17.1) + * @default + */ + vulnerableVersionRange: string; + kevs: (Array<({ + /** @default */ + vulnerabilityName: string; + /** @default */ + shortDescription: string | null; + /** @default */ + requiredAction: string | null; + /** + * @description Date when added to CISA KEV catalog (ISO 8601 format) + * @default + */ + dateAdded: string; + /** + * @description Remediation deadline for federal agencies (ISO 8601 format) + * @default + */ + dueDate: string | null; + /** + * @description Known, Unknown, or specific ransomware campaign names + * @default + */ + knownRansomwareCampaignUse: string | null; + /** @default */ + notes: string | null; + /** @default */ + vendorProject: string; + /** @default */ + product: string; + })>) | null; + /** @description Exploit Prediction Scoring System https://www.first.org/epss/ */ + epss: { + /** @default 0 */ + score: number; + /** @default 0 */ + percentile: number; + } | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "mediumCVE"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** + * @description Common Vulnerabilities and Exposures identifier (e.g., CVE-2021-44228) + * @default + */ + cveId: string; + cwes: Array<{ + /** @default */ + description: string; + /** + * @description Common Weakness Enumeration identifier (e.g., CWE-79) + * @default + */ + id: string; + /** @default */ + name: string; + }>; + /** @description Common Vulnerability Scoring System metrics */ + cvss: { + /** + * @description CVSS base score ranging from 0.0 to 10.0 + * @default 0 + */ + score: number; + /** + * @description CVSS vector string (e.g., CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) + * @default + */ + vectorString: string; + }; + /** @default */ + description: string; + /** + * @description The first version that includes a patch for this vulnerability + * @default + */ + firstPatchedVersionIdentifier: string; + /** + * @description GitHub Security Advisory identifier (e.g., GHSA-1234-5678-9abc) + * @default + */ + ghsaId: string; + /** @default critical */ + severity: string; + /** @default */ + title: string; + /** @default */ + url: string; + /** + * @description Version range affected by this vulnerability (e.g., >= 2.0.0, < 2.17.1) + * @default + */ + vulnerableVersionRange: string; + kevs: (Array<({ + /** @default */ + vulnerabilityName: string; + /** @default */ + shortDescription: string | null; + /** @default */ + requiredAction: string | null; + /** + * @description Date when added to CISA KEV catalog (ISO 8601 format) + * @default + */ + dateAdded: string; + /** + * @description Remediation deadline for federal agencies (ISO 8601 format) + * @default + */ + dueDate: string | null; + /** + * @description Known, Unknown, or specific ransomware campaign names + * @default + */ + knownRansomwareCampaignUse: string | null; + /** @default */ + notes: string | null; + /** @default */ + vendorProject: string; + /** @default */ + product: string; + })>) | null; + /** @description Exploit Prediction Scoring System https://www.first.org/epss/ */ + epss: { + /** @default 0 */ + score: number; + /** @default 0 */ + percentile: number; + } | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "mildCVE"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** + * @description Common Vulnerabilities and Exposures identifier (e.g., CVE-2021-44228) + * @default + */ + cveId: string; + cwes: Array<{ + /** @default */ + description: string; + /** + * @description Common Weakness Enumeration identifier (e.g., CWE-79) + * @default + */ + id: string; + /** @default */ + name: string; + }>; + /** @description Common Vulnerability Scoring System metrics */ + cvss: { + /** + * @description CVSS base score ranging from 0.0 to 10.0 + * @default 0 + */ + score: number; + /** + * @description CVSS vector string (e.g., CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) + * @default + */ + vectorString: string; + }; + /** @default */ + description: string; + /** + * @description The first version that includes a patch for this vulnerability + * @default + */ + firstPatchedVersionIdentifier: string; + /** + * @description GitHub Security Advisory identifier (e.g., GHSA-1234-5678-9abc) + * @default + */ + ghsaId: string; + /** @default critical */ + severity: string; + /** @default */ + title: string; + /** @default */ + url: string; + /** + * @description Version range affected by this vulnerability (e.g., >= 2.0.0, < 2.17.1) + * @default + */ + vulnerableVersionRange: string; + kevs: (Array<({ + /** @default */ + vulnerabilityName: string; + /** @default */ + shortDescription: string | null; + /** @default */ + requiredAction: string | null; + /** + * @description Date when added to CISA KEV catalog (ISO 8601 format) + * @default + */ + dateAdded: string; + /** + * @description Remediation deadline for federal agencies (ISO 8601 format) + * @default + */ + dueDate: string | null; + /** + * @description Known, Unknown, or specific ransomware campaign names + * @default + */ + knownRansomwareCampaignUse: string | null; + /** @default */ + notes: string | null; + /** @default */ + vendorProject: string; + /** @default */ + product: string; + })>) | null; + /** @description Exploit Prediction Scoring System https://www.first.org/epss/ */ + epss: { + /** @default 0 */ + score: number; + /** @default 0 */ + percentile: number; + } | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "emptyPackage"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "trivialPackage"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default 0 */ + linesOfCode: number; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "noREADME"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "missingLockfile"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + manifestFile: string; + /** @default */ + ecosystem: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "oversizedManifest"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + manifestFile: string; + /** @default */ + ecosystem: string; + /** @default 0 */ + size: number; + /** @default 0 */ + limit: number; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "unresolvedYarnDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + manifestFile: string; + /** @default */ + ecosystem: string; + /** @default 0 */ + unresolvedCount: number; + /** @default */ + packageNames: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "unresolvedPomReference"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + manifestFile: string; + /** @default */ + ecosystem: string; + /** @default */ + referenceKind: string; + /** @default */ + coordinates: string; + /** @default 0 */ + unresolvedCount: number; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "shrinkwrap"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "tooManyFiles"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default 0 */ + fileCount: number; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "generic"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + title: string; + /** @default */ + description: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "ghaArgToSink"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + message: string; + /** @default null */ + sourceLocation: Record; + sinkLocations: Array>; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "ghaEnvToSink"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + message: string; + /** @default null */ + sourceLocation: Record; + sinkLocations: Array>; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "ghaContextToSink"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + message: string; + /** @default null */ + sourceLocation: Record; + sinkLocations: Array>; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "ghaArgToOutput"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + message: string; + /** @default null */ + sourceLocation: Record; + sinkLocations: Array>; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "ghaArgToEnv"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + message: string; + /** @default null */ + sourceLocation: Record; + sinkLocations: Array>; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "ghaContextToOutput"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + message: string; + /** @default null */ + sourceLocation: Record; + sinkLocations: Array>; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "ghaContextToEnv"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + message: string; + /** @default null */ + sourceLocation: Record; + sinkLocations: Array>; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "recentlyPublished"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + publishedAt: string; + /** @default */ + checkedAt: string; + /** + * @description Org-configured recently published threshold in days. + * @default 0 + */ + thresholdDays: number; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "licenseSpdxDisj"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + spdxDisj: string; + /** @default */ + licenseScanResult: string; + violationData: Array>; + warnData: Array>; + monitorData: Array>; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "unsafeCopyright"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "licenseChange"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + prevLicenseId: string; + /** @default */ + newLicenseId: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "nonOSILicense"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + licenseId: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "deprecatedLicense"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + licenseId: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "missingLicense"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "nonSPDXLicense"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "unclearLicense"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + possibleLicenseId: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "mixedLicense"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + licenseId: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "notice"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "modifiedLicense"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + licenseId: string; + /** @default 0 */ + similarity: number; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "modifiedException"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + exceptionId: string; + /** @default 0 */ + similarity: number; + /** @default */ + comments: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "licenseException"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + exceptionId: string; + /** @default */ + comments: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "deprecatedException"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + exceptionId: string; + /** @default */ + comments: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "miscLicenseIssues"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + description: string; + /** @default */ + location: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "unidentifiedLicense"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + location: string; + /** @default {} */ + maybeByteSpan: Record; + /** @default */ + maybeTruncatedSource: string; + /** @default 0 */ + match_strength: number; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "noLicenseFound"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "explicitlyUnlicensedItem"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + location: string; + /** @default {} */ + maybeByteSpan: Record; + /** @default */ + maybeTruncatedSource: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "copyleftLicense"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + licenseId: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "nonpermissiveLicense"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + licenseId: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "ambiguousClassifier"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + classifier: string; + /** @default */ + filepathOrProvenance: string; + /** @default {} */ + maybeByteSpan: Record; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "invalidPackageJSON"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "httpDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + packageName: string; + /** @default */ + url: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "gitDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + packageName: string; + /** @default */ + url: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "gitHubDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + packageName: string; + /** @default */ + githubUser: string; + /** @default */ + githubRepo: string; + /** @default */ + commitsh: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "fileDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + packageName: string; + /** @default */ + filePath: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "noTests"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "noRepository"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "badSemver"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "badSemverDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + packageName: string; + /** @default */ + packageVersion: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "noV1"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "noWebsite"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "noBugTracker"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "noAuthorData"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "typeModuleCompatibility"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "floatingDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + dependency: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "manifestConfusion"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + key: string; + /** @default */ + description: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "malware"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default 0 */ + id: number; + /** @default */ + note: string; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "telemetry"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default 0 */ + id: number; + /** @default */ + note: string; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "troll"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default 0 */ + id: number; + /** @default */ + note: string; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "pendingScan"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "deprecated"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default This package is deprecated */ + reason: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "chronoAnomaly"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + prevChronoDate: string; + /** @default */ + prevChronoVersion: string; + /** @default */ + prevSemverDate: string; + /** @default */ + prevSemverVersion: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "compromisedSSHKey"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + fingerprint: string; + /** @default */ + sshKey: string; + /** @default */ + username: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "semverAnomaly"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + prevVersion: string; + /** @default */ + newVersion: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "newAuthor"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + prevAuthor: string; + /** @default */ + newAuthor: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "unstableOwnership"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + author: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "missingAuthor"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "unmaintained"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + lastPublish: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "unpublished"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + version: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "majorRefactor"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default 0 */ + linesChanged: number; + /** @default 0 */ + prevSize: number; + /** @default 0 */ + curSize: number; + /** @default 0 */ + changedPercent: number; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "missingTarball"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "suspiciousStarActivity"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default 0 */ + percentageSuspiciousStars: number; + /** @default */ + repository: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "notFound"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "unpopularPackage"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "policy"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "skillAutonomyAbuse"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "skillCommandInjection"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "skillDataExfiltration"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "skillDiscoveryAbuse"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "skillHardcodedSecrets"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "skillObfuscation"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "skillPreExecution"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "skillPromptInjection"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "skillResourceAbuse"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "skillSupplyChain"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "skillToolAbuse"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "skillToolChaining"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "skillTransitiveTrust"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + notes: string; + /** @default 0 */ + confidence: number; + /** @default 0 */ + severity: number; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "socketUpgradeAvailable"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + categories: string[]; + /** @default false */ + deprecated: boolean; + interop: string[]; + /** @default */ + replacementPURL: string; + /** @default */ + version: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "longStrings"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "highEntropyStrings"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "urlStrings"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + urls: string[]; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "usesEval"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default eval */ + evalType: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "dynamicRequire"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "envVars"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + envVars: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "missingDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + name: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "unusedDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + name: string; + /** @default */ + version: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "peerDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + name: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "uncaughtOptionalDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + name: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "unresolvedRequire"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "extraneousDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "obfuscatedRequire"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "obfuscatedFile"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default 0 */ + confidence: number; + /** @default */ + notes: string; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "minifiedFile"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default 0 */ + confidence: number; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "installScripts"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + script: string; + /** @default */ + source: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "hasNativeCode"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "binScriptConfusion"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + binScript: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "shellScriptOverride"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + binScript: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "didYouMean"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + alternatePackage: string; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "gptDidYouMean"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + alternatePackage: string; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "bidi"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "zeroWidth"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "badEncoding"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default utf8 */ + encoding: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "homoglyphs"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "invisibleChars"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "suspiciousString"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + pattern: string; + /** @default */ + explanation: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "potentialVulnerability"; + value?: components["schemas"]["SocketIssueBasics"] & ({ + /** @default */ + description: string; + props: { + /** @default */ + note: string; + /** + * @default medium + * @enum {string} + */ + risk: "low" | "medium" | "high"; + /** @default */ + detectedAt: string | null; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }); + }) | ({ + /** @enum {string} */ + type?: "vsxProposedApiUsage"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + proposals: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "vsxActivationWildcard"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + event: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "vsxWorkspaceContainsActivation"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + pattern: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "vsxUntrustedWorkspaceSupported"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + supported: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "vsxVirtualWorkspaceSupported"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + supported: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "vsxWebviewContribution"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "vsxDebuggerContribution"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: Record; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "vsxExtensionDependency"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + extension: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }) | ({ + /** @enum {string} */ + type?: "vsxExtensionPack"; + value?: components["schemas"]["SocketIssueBasics"] & { + /** @default */ + description: string; + props: { + /** @default */ + count: string; + }; + usage?: components["schemas"]["SocketUsageRef"]; + }; + }); + SocketMetricSchema: { + /** @default 0 */ + score: number; + components: { + [key: string]: components["schemas"]["SocketMetricComponent"]; + }; + /** @default 0 */ + limit?: number; + /** @default */ + limitingMetric?: string; + }; /** - * @default + * @description Package ecosystem type identifier based on the PURL specification + * @default unknown + * @enum {string} */ - SocketId: string - LicensePolicy: { - allow: components['schemas']['LicenseAllowListElabbed'] - warn: components['schemas']['LicenseAllowListElabbed'] - monitor: components['schemas']['LicenseAllowListElabbed'] - } - LicenseAllowList: { - strings: string[] - } + SocketPURL_Type: "alpm" | "apk" | "bitbucket" | "cocoapods" | "cargo" | "chrome" | "clawhub" | "composer" | "conan" | "conda" | "cran" | "deb" | "docker" | "firefox-extension" | "edge-extension" | "gem" | "generic" | "github" | "golang" | "hackage" | "hex" | "huggingface" | "maven" | "mlflow" | "npm" | "nuget" | "qpkg" | "oci" | "pub" | "pypi" | "rpm" | "socket" | "swid" | "swift" | "vscode" | "vscode-extension" | "unknown"; /** - * @default null + * @default low + * @enum {string} */ - SLicenseMetaRes: Record + SocketIssueSeverity: "low" | "middle" | "high" | "critical"; /** - * @default null + * @default other + * @enum {string} */ - SLicenseMetaReq: Record - SocketReport: { + SocketCategory: "supplyChainRisk" | "quality" | "maintenance" | "vulnerability" | "license" | "other"; + /** @description The alert policy rule that decided `action`. Included in both normal and `compact=true` responses whenever an alert policy rule decided the action; absent when the action came from any other source. Unrelated to `actionPolicyIndex`, which indexes the legacy security policy */ + SocketAlertPolicyRule: { /** + * @description ID of the alert policy whose rule decided this action: a UUID, or `default` for the default policy until it is first customized * @default */ - id: string - /** - * @default false - */ - healthy: boolean - issues: components['schemas']['SocketIssueList'] - score: { - /** - * @default 0 - */ - avgSupplyChainRisk: number - /** - * @default 0 - */ - avgQuality: number - /** - * @default 0 - */ - avgMaintenance: number - /** - * @default 0 - */ - avgVulnerability: number - /** - * @default 0 - */ - avgLicense: number - } + policyId: string; /** + * @description Display name of that policy at evaluation time; null for the default policy * @default */ - url: string - } - SocketIssueList: Array - SocketPackageScore: { - supplyChainRisk: components['schemas']['SocketMetricSchema'] - quality: components['schemas']['SocketMetricSchema'] - maintenance: components['schemas']['SocketMetricSchema'] - vulnerability: components['schemas']['SocketMetricSchema'] - license: components['schemas']['SocketMetricSchema'] - miscellaneous: components['schemas']['SocketMetricSchema'] - /** - * @default 0 - */ - depscore: number - } - PurlErrorSchema: { + policyName: string | null; /** + * @description ID of the rule that decided this action: the rule UUID for custom rules, the alert type name for baseline rules * @default */ - error: string + ruleId: string; /** + * @description Name of that rule at evaluation time; baseline rules use the alert type name * @default */ - inputPurl: string - } - PurlSummarySchema: { + ruleName: string; /** + * @description 0-based position of the rule in first-match-wins evaluation order (custom rules first, then baseline) * @default 0 */ - purl_input: number + ruleIndex: number; /** - * @default 0 + * @description Whether the rule is a baseline rule rather than a custom rule + * @default false */ - resolved: number - errors: { - /** - * @default 0 - */ - purl_malformed: number - /** - * @default 0 - */ - purl_ecosystem_not_enabled: number - /** - * @default 0 - */ - package_not_found: number - } - } - SocketBatchPURLRequest: { + isBaseline: boolean; + }; + SocketPatch: { /** + * @description Unique identifier for this patch * @default */ - purl: string - } - SocketPURL: { - type: components['schemas']['SocketPURL_Type'] + uuid: string; /** - * Package namespace or scope, such as npm organizations (@angular), Maven - * groupIds, or Docker image owners. - * - * @default + * @description Access tier required for this patch (free or paid) + * @default free + * @enum {string} */ - namespace?: string + tier: "free" | "paid"; /** - * Package name within its ecosystem. - * - * @default + * @description Indicates if this patch is deprecated and should not be used + * @default false */ - name?: string + deprecated?: boolean; + }; + ReachabilityResult: { /** - * Package version string. - * - * @default + * @description Type of reachability analysis performed + * @default precomputed + * @enum {string} */ - version?: string + type: "precomputed" | "full-scan"; + /** @description Reachability analysis results for each vulnerability */ + results: Array; + }; + OpenVEXVulnerabilitySchema: { + /** @default */ + name: string; + /** @default */ + "@id"?: string; + /** @default */ + description?: string; + aliases?: string[]; + }; + OpenVEXProductSchema: { + /** @default */ + "@id": string; + identifiers?: components["schemas"]["OpenVEXIdentifiersSchema"]; + hashes?: components["schemas"]["OpenVEXHashesSchema"]; + subcomponents?: Array; + }; + SocketIssueBasics: { + severity: components["schemas"]["SocketIssueSeverity"]; + category: components["schemas"]["SocketCategory"]; + locations: components["schemas"]["SocketRefList"]; + /** @default */ + label: string; + }; + SocketUsageRef: { + file: components["schemas"]["SocketRefFile"]; + dependencies: components["schemas"]["SocketRefList"]; + }; + SocketMetricComponent: { + /** @default 0 */ + score: number; + /** @default 0 */ + maxScore: number; + /** @default 0 */ + limit: number; + /** @default null */ + value: Record; + }; + ReachabilityResultItem: { + type: components["schemas"]["ReachabilityType"]; /** - * Path within the package to a specific file or directory, used to - * reference nested components. - * - * @default + * @description Indicates if the reachability analysis was stopped early due to depth or complexity limits + * @default false */ - subpath?: string + truncated?: boolean; /** - * Package-specific release identifier, such as PyPI's artifact ID or the - * specific build/release version. - * + * @description Error message if reachability analysis failed * @default */ - release?: string - } - SocketAlert: { - /** - * Unique identifier for this alert instance, used for deduplication and - * tracking across scans. - * + error?: string; + matches?: { + /** @enum {string} */ + type?: "function-level"; + value?: Array; + } | { + /** @enum {string} */ + type?: "class-level"; + value?: Array; + }; + /** + * @description Path to the workspace root for multi-workspace projects * @default */ - key: string + workspacePath?: string; /** - * Alert type identifier referencing the alert type definition. - * + * @description Path to the subproject within the workspace * @default */ - type: string - severity?: components['schemas']['SocketIssueSeverity'] - category?: components['schemas']['SocketCategory'] + subprojectPath?: string; /** - * File path where this alert was detected. - * - * @default + * @description For direct_dependency results: the direct importer is a private/unresolvable package in the project rather than the application manifest + * @default false */ - file?: string + viaPrivateDependency?: boolean; + }; + OpenVEXIdentifiersSchema: { + /** @default */ + purl?: string; + /** @default */ + cpe23?: string; + /** @default */ + cpe22?: string; + }; + OpenVEXHashesSchema: { + /** @default */ + md5?: string; + /** @default */ + sha1?: string; + /** @default */ + "sha-256"?: string; + /** @default */ + "sha-384"?: string; + /** @default */ + "sha-512"?: string; + /** @default */ + "sha3-224"?: string; + /** @default */ + "sha3-256"?: string; + /** @default */ + "sha3-384"?: string; + /** @default */ + "sha3-512"?: string; + /** @default */ + "blake2s-256"?: string; + /** @default */ + "blake2b-256"?: string; + /** @default */ + "blake2b-512"?: string; + }; + OpenVEXComponentSchema: { + /** @default */ + "@id"?: string; + identifiers?: components["schemas"]["OpenVEXIdentifiersSchema"]; + hashes?: components["schemas"]["OpenVEXHashesSchema"]; + }; + SocketRefList: Array; + SocketRefFile: { + /** @default */ + path: string; + range?: components["schemas"]["SocketRefTextRange"]; + bytes?: components["schemas"]["SocketRefByteRange"]; + }; + /** + * @description Status of reachability analysis for vulnerable code paths + * @default unknown + * @enum {string} + */ + ReachabilityType: "missing_support" | "undeterminable_reachability" | "pending" | "unreachable" | "unknown" | "direct_dependency" | "error" | "maybe_reachable" | "reachable"; + CallStackItem: { /** - * Starting position of the alert in the file. - * - * @default 0 + * @description Package URL (PURL) of the dependency containing this code + * @default */ - start?: number + purl?: string; + sourceLocation?: components["schemas"]["SourceLocation"]; /** - * Ending position of the alert in the file. - * + * @description Confidence score from 0.0 to 1.0 indicating how certain the reachability analysis is about this result * @default 0 */ - end?: number + confidence?: number; + }; + ClassStackItem: { /** - * Additional alert-specific properties and metadata that vary by alert - * type. For vulnerability alerts this includes the `cveId` and `ghsaId` - * identifiers, either of which may be an empty string when GitHub has not - * assigned that identifier to the advisory. - * - * @default null + * @description Package URL (PURL) of the dependency containing this class + * @default */ - props?: Record + purl?: string; /** - * Action to take for this alert (e.g., error, warn, ignore) - * + * @description Name of the class in the dependency * @default */ - action?: string - actionSource?: { - /** - * Type of action source (e.g., policy, override) - * - * @default - */ - type: string - candidates: Array<{ - /** - * Type of action candidate. - * - * @default - */ - type: string - /** - * Proposed action for this candidate. - * - * @default - */ - action: string - /** - * Index of the policy rule for this candidate. - * - * @default 0 - */ - actionPolicyIndex: number - /** - * Repository label ID associated with this candidate. - * - * @default - */ - repoLabelId: string - }> - } + class?: string; /** - * Index of the policy rule that triggered this action, for traceability - * to security policies. - * + * @description Confidence score from 0.0 to 1.0 indicating how certain the reachability analysis is about this result * @default 0 */ - actionPolicyIndex?: number - fix?: { + confidence?: number; + }; + SocketRef: { + /** @enum {string} */ + type?: "unknown"; + value?: Record; + } | { + /** @enum {string} */ + type?: "npm"; + value?: components["schemas"]["SocketRefNPM"]; + } | { + /** @enum {string} */ + type?: "git"; + value?: components["schemas"]["SocketRefGit"]; + } | { + /** @enum {string} */ + type?: "web"; + value?: components["schemas"]["SocketRefWeb"]; + } | { + /** @enum {string} */ + type?: "pypi"; + value?: components["schemas"]["SocketRefPyPI"]; + } | { + /** @enum {string} */ + type?: "go"; + value?: components["schemas"]["SocketRefGo"]; + }; + SocketRefTextRange: { + /** @default 0 */ + startLine: number; + /** @default 0 */ + startColumn: number; + /** @default 0 */ + endLine: number; + /** @default 0 */ + endColumn: number; + }; + SocketRefByteRange: { + /** @default 0 */ + start: number; + /** @default 0 */ + end: number; + }; + SourceLocation: { + start: { /** - * Type of fix available (e.g., upgrade, remove, cve) - * - * @default + * @description Line number in the source file + * @default 0 */ - type: string + line: number; /** - * Human-readable description of how to fix this issue. - * - * @default + * @description Column number in the source file + * @default 0 */ - description: string + column: number; /** - * Patches available to fix this specific alert. + * @description Absolute byte position from the beginning of the file, used for precise location tracking + * @default 0 */ - patch?: Array<{ - /** - * Unique identifier for this patch. - * - * @default - */ - uuid: string - /** - * Access tier required for this patch (free or paid) - * - * @default free - * - * @enum {string} - */ - tier: 'free' | 'paid' - /** - * Indicates if this patch is deprecated and should not be used. - * - * @default false - */ - deprecated?: boolean - }> - } - patch?: components['schemas']['SocketPatch'] - reachability?: { - head?: components['schemas']['ReachabilityResult'] - base?: components['schemas']['ReachabilityResult'] - } + byteOffset: number; + }; + end: { + /** + * @description Line number in the source file + * @default 0 + */ + line?: number; + /** + * @description Column number in the source file + * @default 0 + */ + column?: number; + /** + * @description Absolute byte position from the beginning of the file, used for precise location tracking + * @default 0 + */ + byteOffset?: number; + }; /** - * Generic alert sub-type. - * + * @description Path to the source file * @default */ - subType?: string - } - SocketArtifactPatch: { - appliedPatch?: components['schemas']['SocketPatch'] - /** - * List of available patches that can be applied to fix vulnerabilities. - */ - availablePatches?: Array - } - LicenseDetails: Array<{ + filename: string; /** - * SPDX license expression in disjunctive normal form (e.g., '(MIT OR - * Apache-2.0)') - * + * @description Hash of the source file for integrity verification * @default */ - spdxDisj: string - /** - * List of authors found in the license text. - */ - authors: string[] - /** - * Error details if license parsing failed. - * - * @default - */ - errorData: string - /** - * Source where this license information was detected (e.g., - * 'package.json', 'LICENSE file', 'README') - * - * @default - */ - provenance: string - /** - * Path to the file containing this license information. - * - * @default - */ - filepath: string - /** - * Confidence score from 0.0 to 1.0 indicating how well the detected - * license matches the source text. - * - * @default 0 - */ - match_strength: number - }> - SAttrib1_N: Array<{ - /** - * Full text of the license attribution or copyright notice found in the - * package. - * - * @default - */ - attribText: string - attribData: { - /** - * Package URL this attribution applies to. - * - * @default - */ - purl: string - /** - * File path where this attribution was found. - * - * @default - */ - foundInFilepath: string - /** - * SPDX license expression parsed from the attribution text. - * - * @default - */ - spdxExpr: string + fileHash: string; + }; + SocketRefNPM: { + /** @default */ + package: string; + /** @default */ + version?: string; + file?: components["schemas"]["SocketRefFile"]; + }; + SocketRefGit: { + /** @default */ + url: string; + /** @default */ + commit?: string; + /** @default */ + tag?: string; + file?: components["schemas"]["SocketRefFile"]; + }; + SocketRefWeb: { + /** @default */ + url: string; + file?: components["schemas"]["SocketRefFile"]; + }; + SocketRefPyPI: { + /** @default */ + package: string; + /** @default */ + version?: string; + /** @default */ + artifact?: string; + file?: components["schemas"]["SocketRefFile"]; + }; + SocketRefGo: { + /** @default */ + package: string; + /** @default */ + version?: string; + file?: components["schemas"]["SocketRefFile"]; + }; + }; + responses: { + /** @description Bad request */ + SocketBadRequest: { + content: { + "application/json": { + error: { + /** @default */ + message: string; + /** @default null */ + details: Record | null; + }; + }; + }; + }; + /** @description Unauthorized */ + SocketUnauthorized: { + content: { + "application/json": { + error: { + /** @default */ + message: string; + /** @default null */ + details: Record | null; + }; + }; + }; + }; + /** @description Insufficient max_quota for API method */ + SocketForbidden: { + content: { + "application/json": { + error: { + /** @default */ + message: string; + /** @default null */ + details: Record | null; + }; + }; + }; + }; + /** @description Resource not found */ + SocketNotFoundResponse: { + content: { + "application/json": { + error: { + /** @default */ + message: string; + /** @default null */ + details: Record | null; + }; + }; + }; + }; + /** @description Insufficient quota for API route */ + SocketTooManyRequestsResponse: { + headers: { /** - * Authors mentioned in this attribution. + * @description Retry contacting the endpoint *at least* after seconds. + * See https://tools.ietf.org/html/rfc7231#section-7.1.3 */ - foundAuthors: string[] - }[] - }> - SocketArtifactLink: { - /** - * Indicates if this is a direct dependency (not transitive) - * - * @default false - */ - direct?: boolean - /** - * Indicates if this is a development-only dependency not used in - * production. - * - * @default false - */ - dev?: boolean - /** - * Indicates if this package is deprecated, abandoned, or no longer - * maintained. - * - * @default false - */ - dead?: boolean - manifestFiles?: Array - /** - * IDs of the root-level packages in the dependency tree that depend on - * this package. - */ - topLevelAncestors?: Array - /** - * IDs of packages that this package directly depends on. - */ - dependencies?: Array - /** - * Computed priority scores for each alert type based on severity, - * reachability, and fixability factors. - */ - alertPriorities?: { - [key: string]: { - /** - * Computed priority score for this alert. - * - * @default 0 - */ - result: number - components?: { - isFixable: { - /** - * Contribution of fixability to the priority score. - * - * @default 0 - */ - result: number + "Retry-After"?: number; + }; + content: { + "application/json": { + error: { + /** @default */ + message: string; + /** @default null */ + details: Record | null; + }; + }; + }; + }; + /** @description Internal server error */ + SocketInternalServerError: { + content: { + "application/json": { + error: { + /** @default */ + message: string; + /** @default null */ + details: Record | null; + }; + }; + }; + }; + /** @description Internal server error */ + SocketServerFault: { + content: { + "application/json": { + error: { + /** @default */ + message: string; + details: { /** - * Whether a fix is available for this alert. - * - * @default false + * @description Per-request id; also the X-Request-Id header + * @default */ - value: boolean - } - isReachable: { + requestId: string; /** - * Contribution of reachability to the priority score. - * - * @default 0 + * @description Coarse failure class + * @default internal + * @enum {string} */ - result: number + code: "timeout" | "temporarily_unavailable" | "internal"; /** - * Whether the vulnerable code is reachable. - * + * @description Whether the same request may succeed on retry * @default false */ - value: boolean + retryable: boolean; + }; + }; + }; + }; + }; + /** @description Service temporarily unavailable */ + SocketServiceUnavailable: { + content: { + "application/json": { + error: { + /** @default */ + message: string; + details: { /** - * Specific reachability type value such as 'unreachable', - * 'maybe_reachable', or 'reachable' - * + * @description Per-request id; also the X-Request-Id header * @default */ - specificValue: string - } - severity: { + requestId: string; /** - * Contribution of severity to the priority score. - * - * @default 0 + * @description Coarse failure class + * @default internal + * @enum {string} */ - result: number + code: "timeout" | "temporarily_unavailable" | "internal"; /** - * Numeric severity level. - * - * @default 0 + * @description Whether the same request may succeed on retry + * @default false */ - value: number - } - } - /** - * Formula used to calculate the priority score. - * - * @default - */ - formula?: string - } - } - artifact?: components['schemas']['SocketPURL'] & { - id: components['schemas']['SocketId'] - } - /** - * Deprecated: mapping of alert keys to arrays of reachability types found - * across different manifest files or code locations. This field is - * derived from alertKeysToReachabilitySummaries for backward - * compatibility; use that property instead. - */ - alertKeysToReachabilityTypes?: { - [key: string]: string[] - } - /** - * Mapping of alert keys to arrays of reachability summaries. Each summary - * contains a reachability type indicating the result of reachability - * analysis for the corresponding vulnerability alert. - */ - alertKeysToReachabilitySummaries?: { - [key: string]: Array<{ - /** - * @default - */ - type: string - }> - } - } - /** - * Type of change detected for this artifact in the diff. - * - * @default unchanged - * - * @enum {string} - */ - SocketDiffArtifactType: - | 'added' - | 'removed' - | 'updated' - | 'replaced' - | 'unchanged' - CDXComponentSchema: { - /** - * @default - */ - author?: string - /** - * @default - */ - publisher?: string - /** - * @default - */ - group: string - /** - * @default - */ - name: string - /** - * @default - */ - version: string - /** - * @default - */ - description?: string - /** - * @default - */ - scope?: string - hashes?: Array<{ - /** - * @default - */ - alg: string - /** - * @default - */ - content: string - }> - licenses?: Array<{ - /** - * @default - */ - expression?: string - license?: { - /** - * @default - */ - id?: string - /** - * @default - */ - name?: string - /** - * @default - */ - url?: string - } - }> - /** - * @default - */ - purl: string - externalReferences?: Array<{ - /** - * @default - */ - type: string - /** - * @default - */ - url: string - }> - /** - * @default application - */ - type: string - /** - * @default - */ - 'bom-ref': string - evidence?: { - identity: { - /** - * @default - */ - field: string - /** - * @default 0 - */ - confidence: number - methods: Array<{ - /** - * @default - */ - technique: string - /** - * @default 0 - */ - confidence: number - /** - * @default - */ - value: string - }> - } - occurrences?: Array<{ - /** - * @default - */ - location: string - }> - } - tags?: string[] - properties?: Array<{ - /** - * @default - */ - name: string - /** - * @default - */ - value: string - }> - cryptoProperties?: Array<{ - /** - * @default - */ - assetType: string - algorithmProperties: { - /** - * @default - */ - executionEnvironment: string - /** - * @default - */ - implementationPlatform: string - } - }> - components?: Array - } - OpenVEXStatementSchema: { - vulnerability: components['schemas']['OpenVEXVulnerabilitySchema'] - products: Array - /** - * @default affected - */ - status: string - /** - * @default - */ - '@id'?: string - /** - * @default 0 - */ - version?: number - /** - * @default - */ - timestamp?: string - /** - * @default - */ - last_updated?: string - /** - * @default - */ - supplier?: string - /** - * @default - */ - status_notes?: string - /** - * @default - */ - justification?: string - /** - * @default - */ - impact_statement?: string - /** - * @default - */ - action_statement?: string - /** - * @default - */ - action_statement_timestamp?: string - } - LicenseAllowListElabbed: { - strings: string[] - classes: string[] - packageURLs: string[] - disjs: string[] - } - SocketIssue: - | { - /** - * @enum {string} - */ - type?: 'gptSecurity' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { + retryable: boolean; + }; + }; + }; + }; + }; + /** @description Gateway timeout */ + SocketGatewayTimeout: { + content: { + "application/json": { + error: { + /** @default */ + message: string; + details: { /** + * @description Per-request id; also the X-Request-Id header * @default */ - notes: string - /** - * @default 0 - */ - confidence: number + requestId: string; /** - * @default 0 + * @description Coarse failure class + * @default internal + * @enum {string} */ - severity: number + code: "timeout" | "temporarily_unavailable" | "internal"; /** - * @default + * @description Whether the same request may succeed on retry + * @default false */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'gptAnomaly' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default medium - * - * @enum {string} - */ - risk: 'low' | 'medium' | 'high' - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'gptMalware' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'filesystemAccess' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default + retryable: boolean; + }; + }; + }; + }; + }; + /** @description Resource already exists */ + SocketConflict: { + content: { + "application/json": { + error: { + /** @default */ + message: string; + /** @default null */ + details: Record | null; + }; + }; + }; + }; + /** @description Gone */ + SocketGone: { + content: { + "application/json": { + error: { + /** @default */ + message: string; + /** @default null */ + details: Record | null; + }; + }; + }; + }; + }; + parameters: never; + requestBodies: { + }; + headers: never; + pathItems: never; +} + +export type $defs = Record; + +export type external = Record; + +export interface operations { + + /** + * Get Packages by PURL + * @deprecated + * @description **This endpoint is deprecated.** Deprecated since 2026-01-05. + * + * Batch retrieval of package metadata and alerts by PURL strings. Compatible with CycloneDX reports. + * + * Package URLs (PURLs) are an ecosystem agnostic way to identify packages. + * CycloneDX SBOMs use the purl format to identify components. + * This endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report. + * + * **Note:** This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error. + * + * More information on purl and CycloneDX: + * + * - [`purl` Spec](https://github.com/package-url/purl-spec) + * - [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components) + * + * This endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate). + * Actively running analysis will be returned when available on subsequent runs. + * + * When `alerts=true`, Socket may synthesize two alert types to make partial + * results actionable: + * + * - `pendingScan`: the package is known but analysis has not completed yet + * - `notFound`: Socket could not resolve the package/version metadata + * + * When `purlErrors=true`, unresolved `notFound` inputs keep the legacy + * `purlError` stream shape instead of emitting synthetic `notFound` + * artifacts. + * + * Use `poll=false` (default) to fail open and return the current known state + * quickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for + * pending analysis before returning. + * + * **Conda (temporary compatibility):** `pkg:conda` inputs are served from the + * already-scanned PyPI package with the same normalized name and version when + * one exists; the response row keeps the original conda PURL in `inputPurl` + * but reports `type: pypi`. Conda `build`, `subdir`, `type`, and `channel` + * qualifiers are ignored, and conda packages without a scanned PyPI + * counterpart return the normal `notFound` result. This mapping will be + * replaced by native conda support. + * + * ## Examples: + * + * ### Looking up an npm package: + * + * ```json + * { + * "components": [ + * { + * "purl": "pkg:npm/express@4.19.2" + * } + * ] + * } + * ``` + * + * ### Looking up an PyPi package: + * + * ```json + * { + * "components": [ + * { + * "purl": "pkg:pypi/django@5.0.6" + * } + * ] + * } + * ``` + * + * ### Looking up a Maven package: + * + * ```json + * { + * "components": [ + * { + * "purl": "pkg:maven/log4j/log4j@1.2.17" + * } + * ] + * } + * ``` + * + * ### Batch lookup + * + * ```json + * { + * "components": [ + * { + * "purl": "pkg:npm/express@4.19.2" + * }, + * { + * "purl": "pkg:pypi/django@5.0.6" + * }, + * { + * "purl": "pkg:maven/log4j/log4j@1.2.17" + * } + * ] + * } + * ``` + * + * This endpoint consumes 100 units of your quota. + * + * This endpoint requires the following org token scopes: + * - packages:list + */ + batchPackageFetch: { + parameters: { + query?: { + /** @description Include alert metadata. */ + alerts?: boolean; + /** @description Include only alerts with comma separated actions defined by security policy. */ + actions?: Array<("error" | "monitor" | "warn" | "ignore")>; + /** @description Compact metadata. When enabled, excludes metadata fields like author, scores, size, dependencies, and manifest files. Always includes: id, type, name, version, release, namespace, subpath, alerts, and alertPriorities. */ + compact?: boolean; + /** @description Include only fixable alerts. */ + fixable?: boolean; + /** @description Include license attribution data, including license text and author information. Maps attribution/license text to a list of data objects to which that attribution info applies. */ + licenseattrib?: boolean; + /** @description Include detailed license information, including location and match strength, for each license datum. */ + licensedetails?: boolean; + /** @description Return errors found with handling PURLs as error objects in the stream. */ + purlErrors?: boolean; + /** @description When true, wait up to timeoutSec for pending analysis to complete before returning. When false (default), return the current known state immediately, including synthesized pendingScan and notFound alerts when alerts=true unless purlErrors=true keeps legacy not-found errors. */ + poll?: boolean; + /** @description Legacy fallback for older clients. Only used when poll is omitted: cachedResultsOnly=true behaves like poll=false, while cachedResultsOnly=false preserves the older blocking behavior. */ + cachedResultsOnly?: boolean; + /** @description Include a summary object at the end of the stream with counts of malformed, resolved, and not found PURLs. */ + summary?: boolean; + /** @description Maximum time in seconds to wait for package resolution and, when poll=true, pending analysis. Inputs that have not completed processing when the timeout is reached return pendingScan alerts when alerts=true, or errors when purlErrors=true. */ + timeoutSec?: number; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SocketOrgBatchPURLFetch"]; + }; + }; + responses: { + /** @description Socket issue lists and scores for all packages, and optional metadata objects */ + 200: { + content: { + "application/x-ndjson": components["schemas"]["BatchPurlStreamSchema"]; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Search dependencies + * @description Search for any dependency that is being used in your organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - No Scopes Required, but authentication is required + */ + searchDependencies: { + requestBody?: { + content: { + "application/json": { + /** @default 50 */ + limit: number; + /** @default 0 */ + offset: number; + purls?: string[]; + }; + }; + }; + responses: { + /** @description Search dependencies response */ + 200: { + content: { + "application/json": { + /** @default false */ + end: boolean; + /** @default 1000 */ + limit: number; + /** @default 0 */ + offset: number; + purlFilters: { + valid: string[]; + invalid: string[]; + }; + rows: Array<{ + /** @default */ + branch: string; + /** @default false */ + direct: boolean; + /** @default */ + id: string; + /** @default */ + name: string; + /** @default */ + repository: string; + /** @default */ + type: string; + /** @default */ + namespace?: string; + /** @default */ + version?: string; + /** @default */ + release?: string; + /** @default */ + workspace?: string; + }>; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Create a snapshot of all dependencies from manifest information + * @deprecated + * @description **This endpoint is deprecated.** + * + * Upload a set of manifest or lockfiles to get your dependency tree analyzed by Socket. + * You can upload multiple lockfiles in the same request, but each filename must be unique. + * + * The name of the file must be in the supported list. + * + * For example, these are valid filenames: "requirements.txt", "package.json", "folder/package.json", and "deep/nested/folder/package.json". + * + * This endpoint consumes 100 units of your quota. + * + * This endpoint requires the following org token scopes: + * - report:write + */ + createDependenciesSnapshot: { + parameters: { + query?: { + repository?: string; + branch?: string; + }; + }; + requestBody?: { + content: { + "multipart/form-data": { + /** @default */ + repository?: string; + /** @default */ + branch?: string; + [key: string]: undefined; + }; + }; + }; + responses: { + /** @description ID of the dependencies snapshot */ + 200: { + content: { + "application/json": Record; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + 500: components["responses"]["SocketInternalServerError"]; + }; + }; + /** + * List full scans + * @description Returns a paginated list of all full scans in an org, excluding SBOM artifacts. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:list + */ + getOrgFullScanList: { + parameters: { + query?: { + /** @description Specify Sort order. */ + sort?: "name" | "created_at"; + /** @description Specify sort direction. */ + direction?: "asc" | "desc"; + /** @description Specify the maximum number of results to return per page. */ + per_page?: number; + /** @description The page number to return when using offset-style pagination. Ignored when cursor pagination is used. */ + page?: number; + /** @description Cursor token for pagination. Pass the returned nextPageCursor from previous responses to fetch the next set of results. */ + startAfterCursor?: string; + /** @description Set to true on the first request to opt into cursor-based pagination. */ + use_cursor?: boolean; + /** @description A Unix timestamp in seconds that filters full-scans prior to the date. */ + from?: string; + /** @description A repository workspace to filter full-scans by. */ + workspace?: string; + /** @description A repository slug to filter full-scans by. */ + repo?: string; + /** @description A branch name to filter full-scans by. */ + branch?: string; + /** @description A PR number to filter full-scans by. */ + pull_request?: string; + /** @description A commit hash to filter full-scans by. */ + commit_hash?: string; + /** @description A scan type to filter full-scans by (e.g. socket, socket_tier1, socket_basics). */ + scan_type?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Lists repositories for the specified organization. The authenticated user must be a member of the organization. */ + 200: { + content: { + "application/json": { + results: Array<({ + /** @default */ + id?: string; + /** @default */ + created_at?: string; + /** @default */ + updated_at?: string; + /** @default */ + organization_id?: string; + /** @default */ + organization_slug?: string; + /** @default */ + repository_id?: string; + /** @default */ + repository_slug?: string; + /** @default */ + branch?: string | null; + /** @default */ + commit_message?: string | null; + /** @default */ + commit_hash?: string | null; + /** @default 0 */ + pull_request?: number | null; + committers?: string[]; + /** @default */ + html_url?: string | null; + /** @default */ + api_url?: string | null; + /** @default */ + workspace?: string; + /** @default */ + repo?: string; + /** @default */ + html_report_url?: string; + /** @default */ + integration_type?: string | null; + /** @default */ + integration_repo_url?: string | null; + /** @default */ + integration_branch_url?: string | null; + /** @default */ + integration_commit_url?: string | null; + /** @default */ + integration_pull_request_url?: string | null; + /** @default */ + scan_type?: string | null; + /** + * @description The current processing status of the SBOM + * @default pending + * @enum {string|null} + */ + scan_state?: "pending" | "precrawl" | "resolve" | "scan" | null; + })>; + /** @default */ + nextPageCursor: string | null; + /** @default 0 */ + nextPage: number | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Create full scan + * @description Create a full scan from a set of package manifest files. Returns a full scan including all SBOM artifacts. + * + * To get a list of supported filetypes that can be uploaded in a full-scan, see the [Get supported file types](/reference/getsupportedfiles) endpoint. + * + * The maximum number of files you can upload at a time is 10000 and each file can be no bigger than 268 MB. + * + * **Query Parameters:** + * - `scan_type` (optional): The type of scan to perform. Defaults to 'socket'. Must be 32 characters or less. Used for categorizing multiple SBOM heads per repository branch. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:create + */ + CreateOrgFullScan: { + parameters: { + query: { + /** @description The slug of the repository to associate the full-scan with. */ + repo: string; + /** @description The workspace of the repository to associate the full-scan with. */ + workspace?: string; + /** @description The branch name to associate the full-scan with. Branch names must follow Git branch name rules: be 1–255 characters long; cannot be exactly @; cannot begin or end with /, ., or .lock; cannot contain "//", "..", or "@{"; and cannot include control characters, spaces, or any of ~^:?*[. */ + branch?: string; + /** @description The commit message to associate the full-scan with. */ + commit_message?: string; + /** @description The commit hash to associate the full-scan with. */ + commit_hash?: string; + /** @description The pull request number to associate the full-scan with. */ + pull_request?: number; + /** @description The committers to associate with the full-scan. Set query more than once to set multiple. */ + committers?: string; + /** @description The integration type to associate the full-scan with. Defaults to "Api" if omitted. */ + integration_type?: "api" | "github" | "gitlab" | "bitbucket" | "azure" | "web"; + /** @description The integration org slug to associate the full-scan with. If omitted, the Socket org name will be used. This is used to generate links and badges. */ + integration_org_slug?: string; + /** @description Set the default branch of the repository to the branch of this full-scan. A branch name is required with this option. */ + make_default_branch?: boolean; + /** @description Designate this full-scan as the latest scan of a given branch. Default branch head scans are included in org alerts. This is only supported on the default branch. A branch name is required with this option. */ + set_as_pending_head?: boolean; + /** @description Create a temporary full-scan that is not listed in the reports dashboard. Cannot be used when set_as_pending_head=true. */ + tmp?: boolean; + /** @description The type of scan to perform. Defaults to 'socket'. Must be 32 characters or less. Used for categorizing multiple SBOM heads per repository branch. */ + scan_type?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody?: { + content: { + "multipart/form-data": { + [key: string]: never; + }; + }; + }; + responses: { + /** @description The details of the created full scan. */ + 201: { + content: { + "application/json": { + /** @default */ + id?: string; + /** @default */ + created_at?: string; + /** @default */ + updated_at?: string; + /** @default */ + organization_id?: string; + /** @default */ + organization_slug?: string; + /** @default */ + repository_id?: string; + /** @default */ + repository_slug?: string; + /** @default */ + branch?: string | null; + /** @default */ + commit_message?: string | null; + /** @default */ + commit_hash?: string | null; + /** @default 0 */ + pull_request?: number | null; + committers?: string[]; + /** @default */ + html_url?: string | null; + /** @default */ + api_url?: string | null; + /** @default */ + workspace?: string; + /** @default */ + repo?: string; + /** @default */ + html_report_url?: string; + /** @default */ + integration_type?: string | null; + /** @default */ + integration_repo_url?: string | null; + /** @default */ + integration_branch_url?: string | null; + /** @default */ + integration_commit_url?: string | null; + /** @default */ + integration_pull_request_url?: string | null; + /** @default */ + scan_type?: string | null; + /** + * @description The current processing status of the SBOM + * @default pending + * @enum {string|null} */ - description: string - props: { - /** - * @default fs - */ - module: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'networkAccess' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default + scan_state?: "pending" | "precrawl" | "resolve" | "scan" | null; + unmatchedFiles?: string[]; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Stream full scan + * @description Stream all SBOM artifacts for a full scan. + * + * This endpoint returns the latest, available alert data for artifacts in the full scan (stale while revalidate). + * Actively running analysis will be returned when available on subsequent runs. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:list + */ + getOrgFullScan: { + parameters: { + query: { + /** @description Control which alert priority fields to include in the response. Set to "true" to include all fields, "false" to exclude all fields, or specify individual fields like "components,formula" to include only those fields. */ + include_alert_priority_details?: boolean | (Array<("component" | "formula")>); + /** @description Include scores event in the response. include_scores_details implies this flag */ + include_scores: boolean; + /** @description Control which score detail fields to include in the scores event. Set to "true" to include all fields, "false" to exclude all fields, or specify individual fields like "components,formula" to include only those fields. */ + include_scores_details?: boolean | (Array<("components" | "formula")>); + /** @description Include license details in the response. This can increase the response size significantly. */ + include_license_details: boolean; + /** @description Return cached immutable scan results. When enabled and results are cached, returns the pre-computed scan. When results are not yet cached, returns 202 Accepted and enqueues a background job. */ + cached?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the full scan */ + full_scan_id: string; + }; + }; + responses: { + /** @description Socket issue lists and scores for all packages, followed by a final scores event */ + 200: { + content: { + "application/x-ndjson": components["schemas"]["SocketArtifact"] | { + /** @enum {string} */ + _type: "scores"; + value: components["schemas"]["SocketSBOMScore"]; + }; + }; + }; + /** @description Scan is being processed. Poll again later to retrieve results. */ + 202: { + content: { + "application/json": { + /** @default processing */ + status: string; + /** @default */ + id: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Delete full scan + * @description Delete an existing full scan. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:delete + */ + deleteOrgFullScan: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the full scan */ + full_scan_id: string; + }; + }; + responses: { + /** @description Success */ + 200: { + content: { + "application/json": { + /** @default ok */ + status: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get full scan metadata + * @description Get metadata for a single full scan + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:list + */ + getOrgFullScanMetadata: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the full scan */ + full_scan_id: string; + }; + }; + responses: { + /** @description The data from the full scan */ + 200: { + content: { + "application/json": { + /** @default */ + id?: string; + /** @default */ + created_at?: string; + /** @default */ + updated_at?: string; + /** @default */ + organization_id?: string; + /** @default */ + organization_slug?: string; + /** @default */ + repository_id?: string; + /** @default */ + repository_slug?: string; + /** @default */ + branch?: string | null; + /** @default */ + commit_message?: string | null; + /** @default */ + commit_hash?: string | null; + /** @default 0 */ + pull_request?: number | null; + committers?: string[]; + /** @default */ + html_url?: string | null; + /** @default */ + api_url?: string | null; + /** @default */ + workspace?: string; + /** @default */ + repo?: string; + /** @default */ + html_report_url?: string; + /** @default */ + integration_type?: string | null; + /** @default */ + integration_repo_url?: string | null; + /** @default */ + integration_branch_url?: string | null; + /** @default */ + integration_commit_url?: string | null; + /** @default */ + integration_pull_request_url?: string | null; + /** @default */ + scan_type?: string | null; + /** + * @description The current processing status of the SBOM + * @default pending + * @enum {string|null} */ - description: string - props: { - /** - * @default net - */ - module: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'shellAccess' - value?: components['schemas']['SocketIssueBasics'] & { + scan_state?: "pending" | "precrawl" | "resolve" | "scan" | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Diff Full Scans + * @deprecated + * @description **This endpoint is deprecated.** + * + * Get the immutable difference between two existing Full Scans. The result uses the policies active when it was computed and may be cached for reuse. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:list + */ + GetOrgDiffScan: { + parameters: { + query: { + /** @description The full scan ID of the base/target of the diff (older) */ + after: string; + /** @description The full scan ID of the head/changed side of the diff (newer) */ + before: string; + /** @description Include license details in the response. This can increase the response size significantly. */ + include_license_details?: boolean; + /** @description Omit unchanged artifacts from the response. When set to true, the unchanged field will be set to null. */ + omit_unchanged?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description The difference between the two provided Full Scans. */ + 200: { + content: { + "application/json": { + before: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + after: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + /** @description Artifacts in the diff grouped by how they changed between the before and after scans. */ + artifacts: { + /** @description Artifacts present in the after scan but not the before scan. */ + added: Array; + /** @description Artifacts present in the before scan but not the after scan. */ + removed: Array; + /** @description Artifacts present in both scans with no changes. Null when omitted via the omit_unchanged query parameter. */ + unchanged: Array | null; + /** @description Artifacts replaced between the scans, e.g. the same package supplied by a different source. */ + replaced: Array; + /** @description Artifacts whose version changed between the scans. */ + updated: Array; + }; + /** @default false */ + directDependenciesChanged: boolean; + /** @default */ + diff_report_url: string | null; + }; + }; + }; + /** @description Scan is being processed. Repeat the request later to retrieve results. */ + 202: { + content: { + "application/json": { + /** @default processing */ + status: string; + /** @default */ + id: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * SCM Comment for Scan Diff + * @deprecated + * @description **This endpoint is deprecated.** + * + * Get the dependency overview and dependency alert comments in GitHub flavored markdown between the diff between two existing full scans. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:list + */ + GetOrgFullScanDiffGfm: { + parameters: { + query: { + /** @description The head full scan ID (newer) */ + after: string; + /** @description The base full scan ID (older) */ + before: string; + /** @description The ID of the GitHub installation. This will be used to get the GitHub installation settings. If not provided, the default GitHub installation settings will be used. */ + github_installation_id?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Metadata about the full scans and the dependency overview and dependency alert comment. Can be used in a pull request context. */ + 200: { + content: { + "application/json": { + before: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + after: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + comments: { + /** @default */ + overview: string; + /** @default */ + alerts: string; + }; /** - * @default + * @description True when either side of the diff was truncated at the plan's dependency limit. When set, the comments contain a limit-exceeded notice instead of a report rendered from the imbalanced diff. + * @default false */ - description: string - props: { - /** - * @default child_process - */ - module: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'debugAccess' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default + incomplete: boolean; + /** @default false */ + directDependenciesChanged: boolean; + /** @default */ + diff_report_url: string | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Download full scan files as tarball + * @description Download all files associated with a full scan in tar format. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:list + */ + downloadOrgFullScanFilesAsTar: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the full scan */ + full_scan_id: string; + }; + }; + responses: { + /** @description Tar archive of full scan files */ + 200: { + content: { + "application/x-tar": unknown; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Create full scan from archive + * @description Create a full scan by uploading one or more archives. Supported archive formats include **.tar**, **.tar.gz/.tgz**, and **.zip**. + * + * Each uploaded archive is extracted server-side and any supported manifest files (like package.json, package-lock.json, pnpm-lock.yaml, etc.) are ingested for the scan. If you upload multiple archives in a single request, the manifests from every archive are merged into one full scan. The response includes any files that were ignored. + * + * The maximum combined number of files extracted from your upload is 10000 and each extracted file can be no bigger than 268 MB. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:create + */ + CreateOrgFullScanArchive: { + parameters: { + query: { + /** @description The slug of the repository to associate the full-scan with. */ + repo: string; + /** @description The workspace of the repository to associate the full-scan with. */ + workspace?: string; + /** @description The branch name to associate the full-scan with. Branch names must follow Git branch name rules: be 1–255 characters long; cannot be exactly @; cannot begin or end with /, ., or .lock; cannot contain "//", "..", or "@{"; and cannot include control characters, spaces, or any of ~^:?*[. */ + branch?: string; + /** @description The commit message to associate the full-scan with. */ + commit_message?: string; + /** @description The commit hash to associate the full-scan with. */ + commit_hash?: string; + /** @description The pull request number to associate the full-scan with. */ + pull_request?: number; + /** @description The committers to associate with the full-scan. Set query more than once to set multiple. */ + committers?: string; + /** @description The integration type to associate the full-scan with. Defaults to "Api" if omitted. */ + integration_type?: "api" | "github" | "gitlab" | "bitbucket" | "azure" | "web"; + /** @description The integration org slug to associate the full-scan with. If omitted, the Socket org name will be used. This is used to generate links and badges. */ + integration_org_slug?: string; + /** @description Set the default branch of the repository to the branch of this full-scan. A branch name is required with this option. */ + make_default_branch?: boolean; + /** @description Designate this full-scan as the latest scan of a given branch. Default branch head scans are included in org alerts. This is only supported on the default branch. A branch name is required with this option. */ + set_as_pending_head?: boolean; + /** @description Create a temporary full-scan that is not listed in the reports dashboard. Cannot be used when set_as_pending_head=true. */ + tmp?: boolean; + /** @description The type of scan to perform. Defaults to 'socket'. Must be 32 characters or less. Used for categorizing multiple SBOM heads per repository branch. */ + scan_type?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody?: { + content: { + "multipart/form-data": { + [key: string]: never; + }; + }; + }; + responses: { + /** @description The details of the created full scan. */ + 201: { + content: { + "application/json": { + /** @default */ + id?: string; + /** @default */ + created_at?: string; + /** @default */ + updated_at?: string; + /** @default */ + organization_id?: string; + /** @default */ + organization_slug?: string; + /** @default */ + repository_id?: string; + /** @default */ + repository_slug?: string; + /** @default */ + branch?: string | null; + /** @default */ + commit_message?: string | null; + /** @default */ + commit_hash?: string | null; + /** @default 0 */ + pull_request?: number | null; + committers?: string[]; + /** @default */ + html_url?: string | null; + /** @default */ + api_url?: string | null; + /** @default */ + workspace?: string; + /** @default */ + repo?: string; + /** @default */ + html_report_url?: string; + /** @default */ + integration_type?: string | null; + /** @default */ + integration_repo_url?: string | null; + /** @default */ + integration_branch_url?: string | null; + /** @default */ + integration_commit_url?: string | null; + /** @default */ + integration_pull_request_url?: string | null; + /** @default */ + scan_type?: string | null; + /** + * @description The current processing status of the SBOM + * @default pending + * @enum {string|null} */ - description: string - props: { - /** - * @default vm - */ - module: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'chromePermission' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default + scan_state?: "pending" | "precrawl" | "resolve" | "scan" | null; + unmatchedFiles?: string[]; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Rescan full scan + * @description Create a new full scan by rescanning an existing scan. A "shallow" rescan reapplies the latest policies to the previously cached dependency resolution results. A "deep" rescan reruns dependency resolution and applies the latest policies to the results. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:create + */ + rescanOrgFullScan: { + parameters: { + query?: { + /** @description The rescan mode: "shallow" (default) re-applies policies to cached data, "deep" re-fetches the SBOM stream. */ + mode?: "shallow" | "deep"; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the full scan to rescan */ + full_scan_id: string; + }; + }; + responses: { + /** @description Rescan initiated successfully */ + 201: { + content: { + "application/json": { + /** @default The ID of the newly created full scan */ + id: string; + /** @default The status of the new scan */ + status: string; + /** + * @description The rescan mode actually performed. A "shallow" request falls back to "deep" when the source scan has no cached data. + * @default shallow + * @enum {string} */ - description: string - props: { + mode: "shallow" | "deep"; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Export CSV of alerts for full scan + * @description Export a CSV file containing all alerts from a full scan. + * + * The CSV includes details about each alert and the affected packages. + * You can optionally filter using the request body "filters" array. Supported filter IDs include: + * - alert.action (error|warn|monitor|ignore) + * - alert.type + * - alert.category + * - alert.severity (low|medium|middle|high|critical or 0-3) + * - artifact.type (purl type, e.g. npm, pypi) + * - dependency.type (direct|transitive) + * - dependency.scope (dev|normal) + * - dependency.usage (used|unused) + * - manifest.file + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:list + */ + getOrgFullScanCsv: { + parameters: { + query: { + /** @description Control which alert priority fields to include in the response. Set to "true" to include all fields, "false" to exclude all fields, or specify individual fields like "components,formula" to include only those fields. */ + include_alert_priority_details?: boolean | (Array<("component" | "formula")>); + /** @description Include license details in the response. */ + include_license_details: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the full scan */ + full_scan_id: string; + }; + }; + requestBody?: { + content: { + "application/json": { + filters?: Array<{ + /** @default */ + id: string; + value: string[]; + }>; + }; + }; + }; + responses: { + /** @description CSV export of alerts */ + 200: { + content: { + "text/csv": unknown; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Generate PDF report for full scan + * @description Generate a PDF report for all alerts in a full scan. + * + * This endpoint streams a PDF document containing all alerts found in the full scan, + * with optional filtering and grouping options. + * + * Supported request body filter IDs include: + * - alert.action (error|warn|monitor|ignore) + * - alert.type + * - alert.category + * - alert.severity (low|medium|middle|high|critical or 0-3) + * - artifact.type (purl type, e.g. npm, pypi) + * - dependency.type (direct|transitive) + * - dependency.scope (dev|normal) + * - dependency.usage (used|unused) + * - manifest.file + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - full-scans:list + */ + getOrgFullScanPdf: { + parameters: { + query: { + /** @description Control which alert priority fields to include in the response. Set to "true" to include all fields, "false" to exclude all fields, or specify individual fields like "components,formula" to include only those fields. */ + include_alert_priority_details?: boolean | (Array<("component" | "formula")>); + /** @description Include license details in the response. */ + include_license_details: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the full scan */ + full_scan_id: string; + }; + }; + requestBody?: { + content: { + "application/json": { + filters?: Array<{ + /** @default */ + id: string; + value: string[]; + }>; + /** @default */ + groupBy?: string; + /** @default */ + additionalInformation?: string; + }; + }; + }; + responses: { + /** @description PDF report of alerts */ + 200: { + content: { + "application/pdf": unknown; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Export CycloneDX SBOM (Beta) + * @description Export a Socket SBOM as a CycloneDX SBOM + * + * Supported ecosystems: + * + * - crates + * - go + * - maven + * - npm + * - nuget + * - pypi + * - rubygems + * - spdx + * - cdx + * + * Unsupported ecosystems are filtered from the export. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - report:read + */ + exportCDX: { + parameters: { + query?: { + /** + * @description The person(s) who created the BOM. + * Set this value if you're intending the modify the BOM and claim authorship. + */ + author?: string; + /** @description Dependency track project group */ + project_group?: string; + /** @description Dependency track project name. Default use the directory name */ + project_name?: string; + /** @description Dependency track project version */ + project_version?: string; + /** @description Dependency track project id. Either provide the id or the project name and version together */ + project_id?: string; + /** @description Include vulnerability information in the SBOM. Also includes reachability/VEX if available */ + include_vulnerabilities?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The full scan OR sbom report ID */ + id: string; + }; + }; + responses: { + /** @description CycloneDX SBOM */ + 200: { + content: { + "application/json": components["schemas"]["CDXManifestSchema"]; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + 500: components["responses"]["SocketServerFault"]; + 503: components["responses"]["SocketServiceUnavailable"]; + 504: components["responses"]["SocketGatewayTimeout"]; + }; + }; + /** + * Export OpenVEX Document (Beta) + * @description Export vulnerability exploitability data as an OpenVEX v0.2.0 document. + * + * OpenVEX (Vulnerability Exploitability eXchange) documents communicate the + * exploitability status of vulnerabilities in software products. This export + * includes: + * + * - **Patch data**: Vulnerabilities fixed by applied Socket patches are marked as "fixed" + * - **Reachability analysis**: Code reachability determines if vulnerable code is exploitable: + * - Unreachable code → "not_affected" with justification + * - Reachable code → "affected" + * - Unknown/pending → "under_investigation" + * + * Each statement in the document represents a single artifact-vulnerability pair + * for granular reachability information. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - report:read + */ + exportOpenVEX: { + parameters: { + query?: { + /** @description The author of the VEX document. Should be an individual or organization. */ + author?: string; + /** @description The role of the document author (e.g., "VEX Generator", "Security Team"). */ + role?: string; + /** @description Custom IRI for the VEX document. If not provided, a default IRI will be generated. */ + document_id?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The full scan OR sbom report ID */ + id: string; + }; + }; + responses: { + /** @description OpenVEX v0.2.0 document */ + 200: { + content: { + "application/json": components["schemas"]["OpenVEXDocumentSchema"]; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + 500: components["responses"]["SocketServerFault"]; + 503: components["responses"]["SocketServiceUnavailable"]; + 504: components["responses"]["SocketGatewayTimeout"]; + }; + }; + /** + * Export SPDX SBOM (Beta) + * @description Export a Socket SBOM as a SPDX SBOM + * + * Supported ecosystems: + * + * - crates + * - go + * - maven + * - npm + * - nuget + * - pypi + * - rubygems + * - spdx + * - cdx + * + * Unsupported ecosystems are filtered from the export. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - report:read + */ + exportSPDX: { + parameters: { + query?: { + /** + * @description The person(s) who created the BOM. + * Set this value if you're intending the modify the BOM and claim authorship. + */ + author?: string; + /** @description Dependency track project group */ + project_group?: string; + /** @description Dependency track project name. Default use the directory name */ + project_name?: string; + /** @description Dependency track project version */ + project_version?: string; + /** @description Dependency track project id. Either provide the id or the project name and version together */ + project_id?: string; + /** @description Include vulnerability information in the SBOM. Also includes reachability/VEX if available */ + include_vulnerabilities?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The full scan OR sbom report ID */ + id: string; + }; + }; + responses: { + /** @description SPDX SBOM */ + 200: { + content: { + "application/json": components["schemas"]["SPDXManifestSchema"]; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + 500: components["responses"]["SocketServerFault"]; + 503: components["responses"]["SocketServiceUnavailable"]; + 504: components["responses"]["SocketGatewayTimeout"]; + }; + }; + /** + * List diff scans + * @description Returns a paginated list of all diff scans in an organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - diff-scans:list + */ + listOrgDiffScans: { + parameters: { + query?: { + /** @description Specify sort field. */ + sort?: "created_at" | "updated_at"; + /** @description Specify sort direction. */ + direction?: "asc" | "desc"; + /** @description Specify the maximum number of results to return per page. */ + per_page?: number; + /** @description Cursor for pagination. Use the next_cursor or prev_cursor from previous responses. */ + cursor?: string; + /** @description Filter by repository ID. */ + repository_id?: string; + /** @description Filter by before full scan ID. */ + before_full_scan_id?: string; + /** @description Filter by after full scan ID. */ + after_full_scan_id?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Lists diff scans for the specified organization. */ + 200: { + content: { + "application/json": { + results: Array<({ + /** @default */ + id: string; + /** @default */ + organization_id: string; + /** @default */ + repository_id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + before_full_scan_id: string; + /** @default */ + after_full_scan_id: string; + /** @default */ + description: string | null; + /** @default */ + external_href: string | null; + /** @default false */ + merge: boolean; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + })>; + /** @default */ + next_page_href: string | null; + /** @default */ + next_cursor: string | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get diff scan + * @description Get the difference between two full scans from an existing diff scan resource. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - diff-scans:list + */ + getDiffScanById: { + parameters: { + query?: { + /** @description Omit license details in the response. This can reduce the size of the response significantly, but will not include license information for the artifacts. */ + omit_license_details?: boolean; + /** @description Omit unchanged artifacts from the response. When set to true, the unchanged field will be set to null. */ + omit_unchanged?: boolean; + /** @description Enable polling mode for immutable diff scan results. When results are cached, returns the pre-computed scan. When results are not yet cached, returns 202 Accepted and enqueues a background job. Note: When cached=true, the omit_license_details parameter is ignored as cached results always include license details. */ + cached?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the diff scan */ + diff_scan_id: string; + }; + }; + responses: { + /** @description The difference between the two Full Scans in the diff scan. */ + 200: { + content: { + "application/json": { + diff_scan: { /** + * @description The ID of the diff scan. * @default */ - permission: string + id: string; /** + * @description The ID of the organization that owns the diff scan. * @default */ - permissionType: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'chromeHostPermission' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { + organization_id: string; /** + * @description The ID of the repository the diff scan was run against. * @default */ - host: string + repository_id: string; /** + * @description ISO 8601 timestamp of when the diff scan was created. * @default */ - permissionType: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'chromeWildcardHostPermission' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { + created_at: string; /** + * @description ISO 8601 timestamp of when the diff scan was last updated. * @default */ - host: string - /** + updated_at: string; + before_full_scan: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + after_full_scan: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + /** + * @description Human readable description of the diff scan, e.g. the pull request title. + * @default + */ + description: string | null; + /** + * @description Link to the external resource the diff scan was created for, e.g. the pull request URL. + * @default + */ + external_href: string | null; + /** + * @description True when the diff scan was created for a merge event rather than an open pull request. + * @default false + */ + merge: boolean; + /** + * @description Link to the diff scan report in the Socket dashboard. * @default */ - permissionType: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'chromeContentScript' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { + html_url: string | null; + /** + * @description Link to the diff scan resource in the Socket API. + * @default + */ + api_url: string | null; + /** + * @description True when either side of the diff was truncated at the plan's dependency limit. A truncated diff is imbalanced and can report changes for artifacts the change never touched, so treat the artifact lists as unreliable when this is set. + * @default false + */ + incomplete: boolean; + /** @description Artifacts in the diff grouped by how they changed between the before and after scans. */ + artifacts: { + /** @description Artifacts present in the after scan but not the before scan. */ + added: Array; + /** @description Artifacts present in the before scan but not the after scan. */ + removed: Array; + /** @description Artifacts present in both scans with no changes. Null when omitted via the omit_unchanged query parameter. */ + unchanged: Array | null; + /** @description Artifacts replaced between the scans, e.g. the same package supplied by a different source. */ + replaced: Array; + /** @description Artifacts whose version changed between the scans. */ + updated: Array; + }; + }; + }; + }; + }; + /** @description Scan is being processed. Poll again later to retrieve results. */ + 202: { + content: { + "application/json": { + /** @default processing */ + status: string; + /** @default */ + id: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Delete diff scan + * @description Delete an existing diff scan. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - diff-scans:delete + */ + deleteOrgDiffScan: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the diff scan */ + diff_scan_id: string; + }; + }; + responses: { + /** @description Success */ + 200: { + content: { + "application/json": { + /** @default ok */ + status: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * SCM Comment for Diff Scan + * @description Get the dependency overview and dependency alert comments in GitHub flavored markdown for an existing diff scan. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - diff-scans:list + */ + GetDiffScanGfm: { + parameters: { + query?: { + /** @description The ID of the GitHub installation. This will be used to get the GitHub installation settings. If not provided, the default GitHub installation settings will be used. */ + github_installation_id?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the diff scan */ + diff_scan_id: string; + }; + }; + responses: { + /** @description Metadata about the full scans and the dependency overview and dependency alert comment. Can be used in a pull request context. */ + 200: { + content: { + "application/json": { + diff_scan: { /** + * @description The ID of the diff scan. * @default */ - scriptFile: string + id: string; /** + * @description The ID of the organization that owns the diff scan. * @default */ - matches: string + organization_id: string; /** + * @description The ID of the repository the diff scan was run against. * @default */ - runAt: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'criticalCVE' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { + repository_id: string; /** - * Common Vulnerabilities and Exposures identifier (e.g., - * CVE-2021-44228) - * + * @description ISO 8601 timestamp of when the diff scan was created. * @default */ - cveId: string - cwes: Array<{ - /** - * @default - */ - description: string + created_at: string; + /** + * @description ISO 8601 timestamp of when the diff scan was last updated. + * @default + */ + updated_at: string; + before_full_scan: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + after_full_scan: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + /** + * @description Human readable description of the diff scan, e.g. the pull request title. + * @default + */ + description: string | null; + /** + * @description Link to the external resource the diff scan was created for, e.g. the pull request URL. + * @default + */ + external_href: string | null; + /** + * @description True when the diff scan was created for a merge event rather than an open pull request. + * @default false + */ + merge: boolean; + /** + * @description Link to the diff scan report in the Socket dashboard. + * @default + */ + html_url: string | null; + /** + * @description Link to the diff scan resource in the Socket API. + * @default + */ + api_url: string | null; + /** + * @description True when either side of the diff was truncated at the plan's dependency limit. When set, the gfm comments contain a limit-exceeded notice instead of a report rendered from the imbalanced diff. + * @default false + */ + incomplete: boolean; + /** @description Pull request comments rendered in GitHub flavored markdown. */ + gfm: { /** - * Common Weakness Enumeration identifier (e.g., CWE-79) - * + * @description Dependency overview comment in GitHub flavored markdown. Empty when there is nothing to show; consumers should not post a comment in that case. * @default */ - id: string + overview: string; /** + * @description Dependency alert comment in GitHub flavored markdown. Contains a dependency-limit-exceeded notice instead of a report when incomplete is true. * @default */ - name: string - }> + alerts: string; + }; + }; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Create diff scan from repository HEAD full-scan + * @description Create a diff scan between the repository's current HEAD full scan and a new full scan from uploaded manifest files. + * Returns metadata about the diff scan. Once the diff scan is created, fetch the diff scan from + * the [api_url](/reference/getDiffScanById) URL to get the contents of the diff. + * + * The maximum number of files you can upload at a time is 10000 and each file can be no bigger than 268 MB. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo:list + * - diff-scans:create + * - full-scans:create + */ + createOrgRepoDiff: { + parameters: { + query?: { + /** @description A description of the diff scan. This will be used in the diff report and can be used to provide context for the changes made. */ + description?: string; + /** @description An external URL to associate with the diff scan. This can be a link to a pull request, issue, or any other relevant resource. */ + external_href?: string; + /** @description The branch name to associate the new full-scan with. Branch names must follow Git branch name rules: be 1–255 characters long; cannot be exactly @; cannot begin or end with /, ., or .lock; cannot contain "//", "..", or "@{"; and cannot include control characters, spaces, or any of ~^:?*[. */ + branch?: string; + /** @description The commit message to associate the new full-scan with. */ + commit_message?: string; + /** @description The commit hash to associate the full-scan with. */ + commit_hash?: string; + /** @description The pull request number to associate the new full-scan with. */ + pull_request?: number; + /** @description The committers to associate the new full-scan with. Set query more than once to set multiple committers. */ + committers?: string; + /** @description The integration type to associate the new full-scan with. Defaults to "api" if omitted. */ + integration_type?: "api" | "github" | "gitlab" | "bitbucket" | "azure" | "web"; + /** @description The integration org slug to associate the new full-scan with. If omitted, the Socket org name will be used. This is used to generate links and badges. */ + integration_org_slug?: string; + /** @description Set to true when running a diff between a merged commit and its parent commit in the same branch. Set to false when running diffs in an open PR between unmerged commits. */ + merge?: boolean; + /** @description The workspace of the repository. */ + workspace?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The slug of the repository */ + repo_slug: string; + }; + }; + requestBody?: { + content: { + "multipart/form-data": { + [key: string]: never; + }; + }; + }; + responses: { + /** @description The details of the new full scan and diff scan between the two scans. */ + 201: { + content: { + "application/json": { + diff_scan: { /** - * Common Vulnerability Scoring System metrics. + * @description The ID of the diff scan. + * @default */ - cvss: { - /** - * CVSS base score ranging from 0.0 to 10.0. - * - * @default 0 - */ - score: number - /** - * CVSS vector string (e.g., - * CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) - * - * @default - */ - vectorString: string - } + id: string; /** + * @description The ID of the organization that owns the diff scan. * @default */ - description: string + organization_id: string; /** - * The first version that includes a patch for this vulnerability. - * + * @description The ID of the repository the diff scan was run against. * @default */ - firstPatchedVersionIdentifier: string + repository_id: string; /** - * GitHub Security Advisory identifier (e.g., GHSA-1234-5678-9abc) - * + * @description ISO 8601 timestamp of when the diff scan was created. * @default */ - ghsaId: string + created_at: string; /** - * @default critical + * @description ISO 8601 timestamp of when the diff scan was last updated. + * @default + */ + updated_at: string; + before_full_scan: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + after_full_scan: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + /** + * @description Human readable description of the diff scan, e.g. the pull request title. + * @default + */ + description: string | null; + /** + * @description Link to the external resource the diff scan was created for, e.g. the pull request URL. + * @default + */ + external_href: string | null; + /** + * @description True when the diff scan was created for a merge event rather than an open pull request. + * @default false */ - severity: string + merge: boolean; /** + * @description Link to the diff scan report in the Socket dashboard. * @default */ - title: string + html_url: string | null; /** + * @description Link to the diff scan resource in the Socket API. * @default */ - url: string + api_url: string | null; + }; + unmatchedAfterFiles: string[]; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Create diff scan from full scan IDs + * @description Create a diff scan from two existing full scan IDs. The full scans must be in the same repository. + * Returns metadata about the diff scan. Once the diff scan is created, fetch the diff scan from + * the [api_url](/reference/getDiffScanById) URL to get the contents of the diff. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - diff-scans:create + * - full-scans:list + */ + createOrgDiffScanFromIds: { + parameters: { + query: { + /** @description The ID of the before/base full scan (older) */ + before: string; + /** @description The ID of the after/head full scan (newer) */ + after: string; + /** @description A description of the diff scan. This will be used in the diff report and can be used to provide context for the changes made. */ + description?: string; + /** @description An external URL to associate with the diff scan. This can be a link to a pull request, issue, or any other relevant resource. */ + external_href?: string; + /** @description Set to true when running a diff between a merged commit and its parent commit in the same branch. Set to false when running diffs in an open PR between unmerged commits. */ + merge?: boolean; + /** @description Set to "redirect" to receive a 302 redirect to the existing diff scan instead of a 409 error when a duplicate is detected. Set to "update" to apply the supplied external_href to the existing diff scan and receive it in a 200 response; when external_href is omitted, the existing value is left untouched. */ + on_duplicate?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description The existing diff scan when on_duplicate=update is set and a duplicate is detected. If external_href was supplied, it has been applied to the diff scan. */ + 200: { + content: { + "application/json": { + diff_scan: { /** - * Version range affected by this vulnerability (e.g., >= 2.0.0, < - * 2.17.1) - * + * @description The ID of the diff scan. * @default */ - vulnerableVersionRange: string - kevs: Array<{ - /** - * @default - */ - vulnerabilityName: string - /** - * @default - */ - shortDescription: string | null - /** - * @default - */ - requiredAction: string | null - /** - * Date when added to CISA KEV catalog (ISO 8601 format) - * - * @default - */ - dateAdded: string - /** - * Remediation deadline for federal agencies (ISO 8601 format) - * - * @default - */ - dueDate: string | null - /** - * Known, Unknown, or specific ransomware campaign names. - * - * @default - */ - knownRansomwareCampaignUse: string | null - /** - * @default - */ - notes: string | null - /** - * @default - */ - vendorProject: string - /** - * @default - */ - product: string - }> | null + id: string; /** - * Exploit Prediction Scoring System https://www.first.org/epss/ + * @description The ID of the organization that owns the diff scan. + * @default */ - epss: { - /** - * @default 0 - */ - score: number - /** - * @default 0 - */ - percentile: number - } | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'cve' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { + organization_id: string; /** - * Common Vulnerabilities and Exposures identifier (e.g., - * CVE-2021-44228) - * + * @description The ID of the repository the diff scan was run against. * @default */ - cveId: string - cwes: Array<{ - /** - * @default - */ - description: string - /** - * Common Weakness Enumeration identifier (e.g., CWE-79) - * - * @default - */ - id: string - /** - * @default - */ - name: string - }> + repository_id: string; /** - * Common Vulnerability Scoring System metrics. + * @description ISO 8601 timestamp of when the diff scan was created. + * @default */ - cvss: { - /** - * CVSS base score ranging from 0.0 to 10.0. - * - * @default 0 - */ - score: number - /** - * CVSS vector string (e.g., - * CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) - * - * @default - */ - vectorString: string - } + created_at: string; + /** + * @description ISO 8601 timestamp of when the diff scan was last updated. + * @default + */ + updated_at: string; + before_full_scan: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + after_full_scan: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + /** + * @description Human readable description of the diff scan, e.g. the pull request title. + * @default + */ + description: string | null; + /** + * @description Link to the external resource the diff scan was created for, e.g. the pull request URL. + * @default + */ + external_href: string | null; + /** + * @description True when the diff scan was created for a merge event rather than an open pull request. + * @default false + */ + merge: boolean; + /** + * @description Link to the diff scan report in the Socket dashboard. + * @default + */ + html_url: string | null; + /** + * @description Link to the diff scan resource in the Socket API. + * @default + */ + api_url: string | null; + }; + }; + }; + }; + /** @description The details of the created diff scan. */ + 201: { + content: { + "application/json": { + diff_scan: { + /** + * @description The ID of the diff scan. + * @default + */ + id: string; + /** + * @description The ID of the organization that owns the diff scan. + * @default + */ + organization_id: string; + /** + * @description The ID of the repository the diff scan was run against. + * @default + */ + repository_id: string; + /** + * @description ISO 8601 timestamp of when the diff scan was created. + * @default + */ + created_at: string; + /** + * @description ISO 8601 timestamp of when the diff scan was last updated. + * @default + */ + updated_at: string; + before_full_scan: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + after_full_scan: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + /** + * @description Human readable description of the diff scan, e.g. the pull request title. + * @default + */ + description: string | null; + /** + * @description Link to the external resource the diff scan was created for, e.g. the pull request URL. + * @default + */ + external_href: string | null; + /** + * @description True when the diff scan was created for a merge event rather than an open pull request. + * @default false + */ + merge: boolean; + /** + * @description Link to the diff scan report in the Socket dashboard. + * @default + */ + html_url: string | null; + /** + * @description Link to the diff scan resource in the Socket API. + * @default + */ + api_url: string | null; + }; + }; + }; + }; + /** @description Redirects to the existing diff scan when on_duplicate=redirect is set and a duplicate is detected. */ + 302: { + content: { + "application/json": { + diff_scan: { /** + * @description The ID of the diff scan. * @default */ - description: string + id: string; /** - * The first version that includes a patch for this vulnerability. - * + * @description The ID of the organization that owns the diff scan. * @default */ - firstPatchedVersionIdentifier: string + organization_id: string; /** - * GitHub Security Advisory identifier (e.g., GHSA-1234-5678-9abc) - * + * @description The ID of the repository the diff scan was run against. * @default */ - ghsaId: string + repository_id: string; /** - * @default critical + * @description ISO 8601 timestamp of when the diff scan was created. + * @default */ - severity: string + created_at: string; /** + * @description ISO 8601 timestamp of when the diff scan was last updated. * @default */ - title: string + updated_at: string; + before_full_scan: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + after_full_scan: { + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + organization_id: string; + /** @default */ + organization_slug: string; + /** @default */ + repository_id: string; + /** @default */ + repository_slug: string; + /** @default */ + branch: string | null; + /** @default */ + commit_message: string | null; + /** @default */ + commit_hash: string | null; + /** @default 0 */ + pull_request: number | null; + committers: string[]; + /** @default */ + html_url: string | null; + /** @default */ + api_url: string | null; + }; + /** + * @description Human readable description of the diff scan, e.g. the pull request title. + * @default + */ + description: string | null; + /** + * @description Link to the external resource the diff scan was created for, e.g. the pull request URL. + * @default + */ + external_href: string | null; + /** + * @description True when the diff scan was created for a merge event rather than an open pull request. + * @default false + */ + merge: boolean; /** + * @description Link to the diff scan report in the Socket dashboard. * @default */ - url: string + html_url: string | null; /** - * Version range affected by this vulnerability (e.g., >= 2.0.0, < - * 2.17.1) - * + * @description Link to the diff scan resource in the Socket API. * @default */ - vulnerableVersionRange: string - kevs: Array<{ + api_url: string | null; + }; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * List Org Alert Triage + * @description List triage actions for an organization. Results are paginated and can be sorted by created_at or updated_at. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - triage:alerts-list + */ + getOrgTriage: { + parameters: { + query?: { + /** @description Field to sort by. One of: created_at, updated_at. */ + sort?: string; + /** @description Sort direction. One of: asc, desc. */ + direction?: string; + /** @description Number of results per page (1–100, default 30). */ + per_page?: number; + /** @description Page number (1-based). */ + page?: number; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Lists triage actions for the specified organization. */ + 200: { + content: { + "application/json": { + results: Array<({ /** + * @description The uuid of the triage action * @default */ - vulnerabilityName: string + uuid?: string | null; /** + * @description The package type associated with the triage state * @default */ - shortDescription: string | null + package_type?: string | null; /** + * @description The package namespace associated with the triage state * @default */ - requiredAction: string | null + package_namespace?: string | null; /** - * Date when added to CISA KEV catalog (ISO 8601 format) - * + * @description The package name associated with the triage state * @default */ - dateAdded: string + package_name?: string | null; /** - * Remediation deadline for federal agencies (ISO 8601 format) - * + * @description The package version associated with the triage state, it can contain a * suffix for wildcard matching * @default */ - dueDate: string | null + package_version?: string | null; /** - * Known, Unknown, or specific ransomware campaign names. - * + * @description The alert_key associated with the triage state * @default */ - knownRansomwareCampaignUse: string | null + alert_key?: string | null; /** + * @description The alert type (e.g., criticalCVE, highCVE) associated with the triage state * @default */ - notes: string | null + alert_type?: string | null; /** - * @default + * @description Whether a fix must be available, unavailable, or * for any + * @default * + * @enum {string|null} */ - vendorProject: string + fix_available?: "available" | "unavailable" | "*" | null; /** - * @default + * @description Whether a patch must be available, unavailable, or * for any + * @default * + * @enum {string|null} */ - product: string - }> | null - /** - * Exploit Prediction Scoring System https://www.first.org/epss/ - */ - epss: { + patch_available?: "available" | "unavailable" | "*" | null; /** - * @default 0 + * @description CVSS score comparison (e.g., >=7.5, >5.0, ==8.0) + * @default */ - score: number + cvss_score_cmp?: string | null; /** - * @default 0 + * @description The creation date of the triage action + * @default */ - percentile: number - } | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'mediumCVE' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { - /** - * Common Vulnerabilities and Exposures identifier (e.g., - * CVE-2021-44228) - * - * @default - */ - cveId: string - cwes: Array<{ + created_at?: string; /** + * @description The last update date of the triage action * @default */ - description: string + updated_at?: string; /** - * Common Weakness Enumeration identifier (e.g., CWE-79) - * + * @description The note associated with the triage action * @default */ - id: string + note?: string; /** + * @description The organization id associated with the triage action * @default */ - name: string - }> - /** - * Common Vulnerability Scoring System metrics. - */ - cvss: { + organization_id?: string; /** - * CVSS base score ranging from 0.0 to 10.0. - * - * @default 0 + * @description The triage state of the alert + * @default inherit + * @enum {string} */ - score: number + state?: "block" | "ignore" | "inherit" | "monitor" | "warn"; /** - * CVSS vector string (e.g., - * CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) - * + * @description CVE or GHSA ID associated with the triage state * @default */ - vectorString: string - } - /** - * @default - */ - description: string + cve_or_ghsa_id?: string | null; + /** + * @description The reachability of the alert, can be reachable, unreachable, other, or * for any + * @default * + * @enum {string|null} + */ + reachability?: "reachable" | "unreachable" | "other" | "*" | null; + /** + * @description Whether the alert has a CISA KEV (Known Exploited Vulnerability), can be exist, none, or * for any + * @default * + * @enum {string|null} + */ + kevs?: "exist" | "none" | "*" | null; + })>; + /** @default 0 */ + nextPage: number | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Create/Update Org Alert Triage + * @description Create or update triage actions on organization alerts. Accepts a batch of triage entries. Omit `uuid` to create a new entry; provide an existing `uuid` to update it. Use `?force=true` for broad triages that lack a specific `alertKey` or granular package information. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - triage:alerts-update + */ + updateOrgAlertTriage: { + parameters: { + query?: { + /** @description Set to true to force broad triage updates, these are triages lacking a specific alertKey or granular artifact information which may have limited introspection to see what they apply to. */ + force?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody?: { + content: { + "application/json": { + alertTriage: Array<({ /** - * The first version that includes a patch for this vulnerability. - * + * @description The UUID of the triage entry. Omit to create a new entry; provide to update an existing one. * @default */ - firstPatchedVersionIdentifier: string + uuid?: string | null; /** - * GitHub Security Advisory identifier (e.g., GHSA-1234-5678-9abc) - * + * @description The package ecosystem type (e.g., npm, pypi). Use null or "*" for wildcard. * @default */ - ghsaId: string - /** - * @default critical - */ - severity: string + packageType?: string | null; /** + * @description The package namespace or scope. Use null or "*" for wildcard. * @default */ - title: string + packageNamespace?: string | null; /** + * @description The package name. Use null or "*" for wildcard. * @default */ - url: string + packageName?: string | null; /** - * Version range affected by this vulnerability (e.g., >= 2.0.0, < - * 2.17.1) - * + * @description The package version. Supports a "*" suffix for wildcard prefix matching. Use null for any version. * @default */ - vulnerableVersionRange: string - kevs: Array<{ - /** - * @default - */ - vulnerabilityName: string - /** - * @default - */ - shortDescription: string | null - /** - * @default - */ - requiredAction: string | null - /** - * Date when added to CISA KEV catalog (ISO 8601 format) - * - * @default - */ - dateAdded: string - /** - * Remediation deadline for federal agencies (ISO 8601 format) - * - * @default - */ - dueDate: string | null - /** - * Known, Unknown, or specific ransomware campaign names. - * - * @default - */ - knownRansomwareCampaignUse: string | null - /** - * @default - */ - notes: string | null - /** - * @default - */ - vendorProject: string - /** - * @default - */ - product: string - }> | null + packageVersion?: string | null; /** - * Exploit Prediction Scoring System https://www.first.org/epss/ + * @description The specific alert key to target. + * @default */ - epss: { - /** - * @default 0 - */ - score: number - /** - * @default 0 - */ - percentile: number - } | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'mildCVE' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { + alertKey?: string | null; /** - * Common Vulnerabilities and Exposures identifier (e.g., - * CVE-2021-44228) - * + * @description The alert type (e.g., criticalCVE, highCVE). * @default */ - cveId: string - cwes: Array<{ - /** - * @default - */ - description: string - /** - * Common Weakness Enumeration identifier (e.g., CWE-79) - * - * @default - */ - id: string - /** - * @default - */ - name: string - }> + alertType?: string | null; /** - * Common Vulnerability Scoring System metrics. + * @description Whether a fix is available, unavailable, or * for any + * @enum {string} */ - cvss: { - /** - * CVSS base score ranging from 0.0 to 10.0. - * - * @default 0 - */ - score: number - /** - * CVSS vector string (e.g., - * CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) - * - * @default - */ - vectorString: string - } + fixAvailable?: "available" | "unavailable" | "*"; /** - * @default + * @description Whether a patch is available, unavailable, or * for any + * @enum {string} */ - description: string + patchAvailable?: "available" | "unavailable" | "*"; /** - * The first version that includes a patch for this vulnerability. - * - * @default + * @description Whether the alert has a CISA KEV, can be exist, none, or * for any + * @enum {string} */ - firstPatchedVersionIdentifier: string + kevs?: "exist" | "none" | "*"; /** - * GitHub Security Advisory identifier (e.g., GHSA-1234-5678-9abc) - * + * @description CVE or GHSA ID to match against. * @default */ - ghsaId: string + cveOrGhsaId?: string | null; /** - * @default critical + * @description The reachability of the alert, can be reachable, unreachable, other, or * for any + * @enum {string} */ - severity: string + reachability?: "reachable" | "unreachable" | "other" | "*"; /** + * @description CVSS score comparison operator and value (e.g., >=7.5, >5.0, ==8.0). * @default */ - title: string + cvssScoreCmp?: string | null; /** + * @description A note or comment for the triage action. * @default */ - url: string + note?: string; /** - * Version range affected by this vulnerability (e.g., >= 2.0.0, < - * 2.17.1) - * - * @default + * @description The triage state of the alert + * @enum {string} */ - vulnerableVersionRange: string - kevs: Array<{ + state?: "block" | "ignore" | "inherit" | "monitor" | "warn"; + })>; + }; + }; + }; + responses: { + /** @description Updated Alert Triage */ + 200: { + content: { + "application/json": { + /** @default */ + result: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Delete Org Alert Triage + * @description Delete a specific triage rule by UUID. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - triage:alerts-update + */ + deleteOrgAlertTriage: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The UUID of the alert triage entry to delete */ + uuid: string; + }; + }; + responses: { + /** @description Deleted Alert Triage */ + 200: { + content: { + "application/json": { + /** @default */ + result: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * List Org Alert Resolutions + * @description List active alert resolutions for an organization. Results are paginated via an opaque cursor and ordered by created_at. Each row includes the anchor fields (alert_type, repo, repo_label, artifact_*) that describe the resolution scope. Tokens restricted to specific repositories only see org-wide resolutions and resolutions anchored to their granted repositories. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-resolution:list + */ + getOrgAlertResolutions: { + parameters: { + query?: { + /** @description Sort direction by `created_at`. One of: asc, desc. */ + direction?: string; + /** @description Number of results per page (1–100, default 30). */ + per_page?: number; + /** @description Opaque cursor returned by the previous response's `endCursor`. Omit on the first request. */ + startAfterCursor?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Lists alert resolutions for the specified organization. */ + 200: { + content: { + "application/json": { + items: Array<({ + /** + * @description The UUID of the resolution. + * @default + */ + uuid: string; + /** + * @description The reason the alert was resolved. One of: false_positive, remediated, tolerable_risk, other. + * @default other + * @enum {string} + */ + reason: "false_positive" | "remediated" | "tolerable_risk" | "other"; /** + * @description Free-form reason text when `reason` is `other`. * @default */ - vulnerabilityName: string + reason_text: string | null; /** + * @description Operator-provided comment. * @default */ - shortDescription: string | null + comment: string | null; /** + * @description The full selector describing which alerts the resolution applies to. The anchor fields below are a derived summary — compound selectors (e.g. `$or` over several repos) cannot be summarized and read back as null anchors, so this is the source of truth. + * @default null + */ + vigil_selector: Record; + /** + * @description Alert type the resolution scopes to (e.g. criticalCVE). Null if the resolution applies to multiple alert types. * @default */ - requiredAction: string | null + alert_type: string | null; /** - * Date when added to CISA KEV catalog (ISO 8601 format) - * + * @description Repository full name the resolution scopes to. Null if not scoped to a single repo. * @default */ - dateAdded: string + repo: string | null; /** - * Remediation deadline for federal agencies (ISO 8601 format) - * + * @description Repository label the resolution scopes to. Null if not scoped to a label. * @default */ - dueDate: string | null + repo_label: string | null; /** - * Known, Unknown, or specific ransomware campaign names. - * + * @description Package ecosystem the resolution scopes to (e.g. npm, pypi). Null if not scoped to a single ecosystem. * @default */ - knownRansomwareCampaignUse: string | null + artifact_type: string | null; /** + * @description Package namespace/scope the resolution scopes to. Null if not scoped to a namespace. * @default */ - notes: string | null + artifact_namespace: string | null; /** + * @description Package name the resolution scopes to. Null if not scoped to a single package. * @default */ - vendorProject: string + artifact_name: string | null; /** + * @description Package version the resolution scopes to. Extracted from the resolution selector at read time; null if the resolution applies to multiple versions or no single version. * @default */ - product: string - }> | null - /** - * Exploit Prediction Scoring System https://www.first.org/epss/ - */ - epss: { + artifact_version: string | null; /** - * @default 0 + * @description User ID that created the resolution. Null for system-created resolutions. + * @default */ - score: number + resolved_by: string | null; /** - * @default 0 + * @description ISO-8601 creation timestamp. + * @default + */ + created_at: string; + /** + * @description ISO-8601 last-update timestamp. + * @default */ - percentile: number - } | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + updated_at: string; + })>; + /** @default */ + endCursor: string | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Create Org Alert Resolution + * @description Create an alert resolution. The `vigil_selector` describes which alerts the resolution applies to; matching alerts are hidden after the next org snapshot. Returns the same row shape as the list endpoint. Tokens restricted to specific repositories may only create resolutions anchored to a single granted repository via `location.repo`; org-wide or multi-repository selectors require an org-wide token. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-resolution:create + */ + createOrgAlertResolution: { + parameters: { + query?: { + /** @description Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201. */ + dry_run?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody: { + content: { + "application/json": { /** + * @description The reason the alert is resolved. One of: false_positive, remediated, tolerable_risk, other. * @enum {string} */ - type?: 'emptyPackage' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + reason: "false_positive" | "remediated" | "tolerable_risk" | "other"; /** - * @enum {string} + * @description Selector describing which alerts the resolution applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{"finding.alertType": "criticalCVE", "artifact.name": "lodash"}`). + * @default null */ - type?: 'trivialPackage' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { - /** - * @default 0 - */ - linesOfCode: number - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + vigil_selector: Record; /** - * @enum {string} + * @description Free-form reason text, mainly for when `reason` is `other` (1-256 characters). + * @default */ - type?: 'noREADME' - value?: components['schemas']['SocketIssueBasics'] & { + reason_text?: string | null; + /** + * @description Operator-provided comment (1-1024 characters). + * @default + */ + comment?: string | null; + }; + }; + }; + responses: { + /** @description Dry-run: the write was not persisted. */ + 200: { + content: { + "application/json": { /** + * @description The UUID of the resolution. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'missingLockfile' - value?: components['schemas']['SocketIssueBasics'] & { + uuid: string; + /** + * @description The reason the alert was resolved. One of: false_positive, remediated, tolerable_risk, other. + * @default other + * @enum {string} + */ + reason: "false_positive" | "remediated" | "tolerable_risk" | "other"; /** + * @description Free-form reason text when `reason` is `other`. * @default */ - description: string - props: { - /** - * @default - */ - manifestFile: string - /** - * @default - */ - ecosystem: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'oversizedManifest' - value?: components['schemas']['SocketIssueBasics'] & { + reason_text: string | null; /** + * @description Operator-provided comment. * @default */ - description: string - props: { - /** - * @default - */ - manifestFile: string - /** - * @default - */ - ecosystem: string - /** - * @default 0 - */ - size: number - /** - * @default 0 - */ - limit: number - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'shrinkwrap' - value?: components['schemas']['SocketIssueBasics'] & { + comment: string | null; + /** + * @description The full selector describing which alerts the resolution applies to. The anchor fields below are a derived summary — compound selectors (e.g. `$or` over several repos) cannot be summarized and read back as null anchors, so this is the source of truth. + * @default null + */ + vigil_selector: Record; /** + * @description Alert type the resolution scopes to (e.g. criticalCVE). Null if the resolution applies to multiple alert types. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'tooManyFiles' - value?: components['schemas']['SocketIssueBasics'] & { + alert_type: string | null; /** + * @description Repository full name the resolution scopes to. Null if not scoped to a single repo. * @default */ - description: string - props: { - /** - * @default 0 - */ - fileCount: number - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'generic' - value?: components['schemas']['SocketIssueBasics'] & { + repo: string | null; /** + * @description Repository label the resolution scopes to. Null if not scoped to a label. * @default */ - description: string - props: { - /** - * @default - */ - title: string - /** - * @default - */ - description: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'ghaArgToSink' - value?: components['schemas']['SocketIssueBasics'] & { + repo_label: string | null; /** + * @description Package ecosystem the resolution scopes to (e.g. npm, pypi). Null if not scoped to a single ecosystem. * @default */ - description: string - props: { - /** - * @default - */ - message: string - /** - * @default null - */ - sourceLocation: Record - sinkLocations: Array> - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'ghaEnvToSink' - value?: components['schemas']['SocketIssueBasics'] & { + artifact_type: string | null; /** + * @description Package namespace/scope the resolution scopes to. Null if not scoped to a namespace. * @default */ - description: string - props: { - /** - * @default - */ - message: string - /** - * @default null - */ - sourceLocation: Record - sinkLocations: Array> - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'ghaContextToSink' - value?: components['schemas']['SocketIssueBasics'] & { + artifact_namespace: string | null; /** + * @description Package name the resolution scopes to. Null if not scoped to a single package. * @default */ - description: string - props: { - /** - * @default - */ - message: string - /** - * @default null - */ - sourceLocation: Record - sinkLocations: Array> - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'ghaArgToOutput' - value?: components['schemas']['SocketIssueBasics'] & { + artifact_name: string | null; /** + * @description Package version the resolution scopes to. Extracted from the resolution selector at read time; null if the resolution applies to multiple versions or no single version. * @default */ - description: string - props: { - /** - * @default - */ - message: string - /** - * @default null - */ - sourceLocation: Record - sinkLocations: Array> - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'ghaArgToEnv' - value?: components['schemas']['SocketIssueBasics'] & { + artifact_version: string | null; /** + * @description User ID that created the resolution. Null for system-created resolutions. * @default */ - description: string - props: { - /** - * @default - */ - message: string - /** - * @default null - */ - sourceLocation: Record - sinkLocations: Array> - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'ghaContextToOutput' - value?: components['schemas']['SocketIssueBasics'] & { + resolved_by: string | null; /** + * @description ISO-8601 creation timestamp. * @default */ - description: string - props: { - /** - * @default - */ - message: string - /** - * @default null - */ - sourceLocation: Record - sinkLocations: Array> - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'ghaContextToEnv' - value?: components['schemas']['SocketIssueBasics'] & { + created_at: string; /** + * @description ISO-8601 last-update timestamp. * @default */ - description: string - props: { - /** - * @default - */ - message: string - /** - * @default null - */ - sourceLocation: Record - sinkLocations: Array> - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'recentlyPublished' - value?: components['schemas']['SocketIssueBasics'] & { + updated_at: string; /** - * @default + * @description True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted. + * @default false */ - description: string - props: { - /** - * @default - */ - publishedAt: string - /** - * @default - */ - checkedAt: string - /** - * Org-configured recently published threshold in days. - * - * @default 0 - */ - thresholdDays: number - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'licenseSpdxDisj' - value?: components['schemas']['SocketIssueBasics'] & { + dry_run?: boolean; + }; + }; + }; + /** @description The created alert resolution. */ + 201: { + content: { + "application/json": { /** + * @description The UUID of the resolution. * @default */ - description: string - props: { - /** - * @default - */ - spdxDisj: string - /** - * @default - */ - licenseScanResult: string - violationData: Array> - warnData: Array> - monitorData: Array> - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'unsafeCopyright' - value?: components['schemas']['SocketIssueBasics'] & { + uuid: string; /** - * @default + * @description The reason the alert was resolved. One of: false_positive, remediated, tolerable_risk, other. + * @default other + * @enum {string} */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'licenseChange' - value?: components['schemas']['SocketIssueBasics'] & { + reason: "false_positive" | "remediated" | "tolerable_risk" | "other"; /** + * @description Free-form reason text when `reason` is `other`. * @default */ - description: string - props: { - /** - * @default - */ - prevLicenseId: string - /** - * @default - */ - newLicenseId: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'nonOSILicense' - value?: components['schemas']['SocketIssueBasics'] & { + reason_text: string | null; /** + * @description Operator-provided comment. * @default */ - description: string - props: { - /** - * @default - */ - licenseId: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'deprecatedLicense' - value?: components['schemas']['SocketIssueBasics'] & { + comment: string | null; /** - * @default + * @description The full selector describing which alerts the resolution applies to. The anchor fields below are a derived summary — compound selectors (e.g. `$or` over several repos) cannot be summarized and read back as null anchors, so this is the source of truth. + * @default null */ - description: string - props: { - /** - * @default - */ - licenseId: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'missingLicense' - value?: components['schemas']['SocketIssueBasics'] & { + vigil_selector: Record; /** + * @description Alert type the resolution scopes to (e.g. criticalCVE). Null if the resolution applies to multiple alert types. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'nonSPDXLicense' - value?: components['schemas']['SocketIssueBasics'] & { + alert_type: string | null; /** + * @description Repository full name the resolution scopes to. Null if not scoped to a single repo. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'unclearLicense' - value?: components['schemas']['SocketIssueBasics'] & { + repo: string | null; /** + * @description Repository label the resolution scopes to. Null if not scoped to a label. * @default */ - description: string - props: { - /** - * @default - */ - possibleLicenseId: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'mixedLicense' - value?: components['schemas']['SocketIssueBasics'] & { + repo_label: string | null; /** + * @description Package ecosystem the resolution scopes to (e.g. npm, pypi). Null if not scoped to a single ecosystem. * @default */ - description: string - props: { - /** - * @default - */ - licenseId: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'notice' - value?: components['schemas']['SocketIssueBasics'] & { + artifact_type: string | null; /** + * @description Package namespace/scope the resolution scopes to. Null if not scoped to a namespace. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'modifiedLicense' - value?: components['schemas']['SocketIssueBasics'] & { + artifact_namespace: string | null; /** + * @description Package name the resolution scopes to. Null if not scoped to a single package. * @default */ - description: string - props: { - /** - * @default - */ - licenseId: string - /** - * @default 0 - */ - similarity: number - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'modifiedException' - value?: components['schemas']['SocketIssueBasics'] & { + artifact_name: string | null; /** + * @description Package version the resolution scopes to. Extracted from the resolution selector at read time; null if the resolution applies to multiple versions or no single version. * @default */ - description: string - props: { - /** - * @default - */ - exceptionId: string - /** - * @default 0 - */ - similarity: number - /** - * @default - */ - comments: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'licenseException' - value?: components['schemas']['SocketIssueBasics'] & { + artifact_version: string | null; /** + * @description User ID that created the resolution. Null for system-created resolutions. * @default */ - description: string - props: { - /** - * @default - */ - exceptionId: string - /** - * @default - */ - comments: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'deprecatedException' - value?: components['schemas']['SocketIssueBasics'] & { + resolved_by: string | null; /** + * @description ISO-8601 creation timestamp. * @default */ - description: string - props: { - /** - * @default - */ - exceptionId: string - /** - * @default - */ - comments: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'miscLicenseIssues' - value?: components['schemas']['SocketIssueBasics'] & { + created_at: string; /** + * @description ISO-8601 last-update timestamp. * @default */ - description: string - props: { - /** - * @default - */ - description: string - /** - * @default - */ - location: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'unidentifiedLicense' - value?: components['schemas']['SocketIssueBasics'] & { + updated_at: string; /** - * @default + * @description True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted. + * @default false */ - description: string - props: { - /** - * @default - */ - location: string - /** - * @default {} - */ - maybeByteSpan: Record - /** - * @default - */ - maybeTruncatedSource: string - /** - * @default 0 - */ - match_strength: number - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'noLicenseFound' - value?: components['schemas']['SocketIssueBasics'] & { + dry_run?: boolean; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get Org Alert Resolution + * @description Fetch a single active alert resolution by UUID. Returns the same row shape as the list endpoint. Tokens restricted to specific repositories cannot read resolutions anchored to repositories outside their grants. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-resolution:read + */ + getOrgAlertResolution: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The UUID of the alert resolution to fetch */ + uuid: string; + }; + }; + responses: { + /** @description The requested alert resolution. */ + 200: { + content: { + "application/json": { /** + * @description The UUID of the resolution. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'explicitlyUnlicensedItem' - value?: components['schemas']['SocketIssueBasics'] & { + uuid: string; /** - * @default + * @description The reason the alert was resolved. One of: false_positive, remediated, tolerable_risk, other. + * @default other + * @enum {string} */ - description: string - props: { - /** - * @default - */ - location: string - /** - * @default {} - */ - maybeByteSpan: Record - /** - * @default - */ - maybeTruncatedSource: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'copyleftLicense' - value?: components['schemas']['SocketIssueBasics'] & { + reason: "false_positive" | "remediated" | "tolerable_risk" | "other"; /** + * @description Free-form reason text when `reason` is `other`. * @default */ - description: string - props: { - /** - * @default - */ - licenseId: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'nonpermissiveLicense' - value?: components['schemas']['SocketIssueBasics'] & { + reason_text: string | null; /** + * @description Operator-provided comment. * @default */ - description: string - props: { - /** - * @default - */ - licenseId: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'ambiguousClassifier' - value?: components['schemas']['SocketIssueBasics'] & { + comment: string | null; + /** + * @description The full selector describing which alerts the resolution applies to. The anchor fields below are a derived summary — compound selectors (e.g. `$or` over several repos) cannot be summarized and read back as null anchors, so this is the source of truth. + * @default null + */ + vigil_selector: Record; /** + * @description Alert type the resolution scopes to (e.g. criticalCVE). Null if the resolution applies to multiple alert types. * @default */ - description: string - props: { - /** - * @default - */ - classifier: string - /** - * @default - */ - filepathOrProvenance: string - /** - * @default {} - */ - maybeByteSpan: Record - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'invalidPackageJSON' - value?: components['schemas']['SocketIssueBasics'] & { + alert_type: string | null; /** + * @description Repository full name the resolution scopes to. Null if not scoped to a single repo. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'httpDependency' - value?: components['schemas']['SocketIssueBasics'] & { + repo: string | null; /** + * @description Repository label the resolution scopes to. Null if not scoped to a label. * @default */ - description: string - props: { - /** - * @default - */ - packageName: string - /** - * @default - */ - url: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'gitDependency' - value?: components['schemas']['SocketIssueBasics'] & { + repo_label: string | null; /** + * @description Package ecosystem the resolution scopes to (e.g. npm, pypi). Null if not scoped to a single ecosystem. * @default */ - description: string - props: { - /** - * @default - */ - packageName: string - /** - * @default - */ - url: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'gitHubDependency' - value?: components['schemas']['SocketIssueBasics'] & { + artifact_type: string | null; /** + * @description Package namespace/scope the resolution scopes to. Null if not scoped to a namespace. * @default */ - description: string - props: { - /** - * @default - */ - packageName: string - /** - * @default - */ - githubUser: string - /** - * @default - */ - githubRepo: string - /** - * @default - */ - commitsh: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'fileDependency' - value?: components['schemas']['SocketIssueBasics'] & { + artifact_namespace: string | null; /** + * @description Package name the resolution scopes to. Null if not scoped to a single package. * @default */ - description: string - props: { - /** - * @default - */ - packageName: string - /** - * @default - */ - filePath: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'noTests' - value?: components['schemas']['SocketIssueBasics'] & { + artifact_name: string | null; /** + * @description Package version the resolution scopes to. Extracted from the resolution selector at read time; null if the resolution applies to multiple versions or no single version. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'noRepository' - value?: components['schemas']['SocketIssueBasics'] & { + artifact_version: string | null; /** + * @description User ID that created the resolution. Null for system-created resolutions. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'badSemver' - value?: components['schemas']['SocketIssueBasics'] & { + resolved_by: string | null; /** + * @description ISO-8601 creation timestamp. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'badSemverDependency' - value?: components['schemas']['SocketIssueBasics'] & { + created_at: string; /** + * @description ISO-8601 last-update timestamp. * @default */ - description: string - props: { - /** - * @default - */ - packageName: string - /** - * @default - */ - packageVersion: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + updated_at: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Delete Org Alert Resolution + * @description Delete an alert resolution by UUID. Once deleted, alerts previously hidden by this resolution will reappear after the next org snapshot. Tokens restricted to specific repositories may only delete resolutions anchored to a granted repository. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-resolution:delete + */ + deleteOrgAlertResolution: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The UUID of the alert resolution to delete */ + uuid: string; + }; + }; + responses: { + /** @description Deleted Alert Resolution */ + 200: { + content: { + "application/json": { + /** @default */ + result: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * List Org Alert Policies + * @description List the alert policies of an organization. The default policy (which applies to all repositories without a policy label) is always first, followed by custom policies ordered by creation time. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-policy:list + */ + getOrgAlertPolicies: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Lists alert policies for the specified organization. */ + 200: { + content: { + "application/json": { + items: Array<({ + /** + * @description The ID of the policy: a UUID, or `default` for the default policy until it is first customized. + * @default + */ + id: string; + /** + * @description The policy name. Null for the default policy, which applies to all repositories without a policy label. + * @default + */ + name: string | null; + /** + * @description Operator-provided description. + * @default + */ + description: string | null; + /** + * @description How the policy scopes to repositories: `labeled_repos` applies to repositories carrying the policy repo label; `unlabeled_repos` is the default policy for all unlabeled repositories. + * @default labeled_repos + * @enum {string} + */ + apply_method: "labeled_repos" | "unlabeled_repos"; + /** + * @description The repo label that scopes this policy. Null for the default policy. + * @default + */ + repo_label_id: string | null; + /** @description Repositories the policy scopes to. Empty for the default policy and for policies with no repository assignments. */ + repository_ids: string[]; + /** + * @description Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null when the policy has no baseline. + * @default + */ + baseline: string | null; + /** + * @description User ID that created the policy. + * @default + */ + created_by: string | null; + /** + * @description User ID that last updated the policy. + * @default + */ + updated_by: string | null; + /** + * @description ISO-8601 creation timestamp. Null for the default policy until it is first customized. + * @default + */ + created_at: string | null; + /** + * @description ISO-8601 last-update timestamp. Null for the default policy until it is first customized. + * @default + */ + updated_at: string | null; + })>; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Create Org Alert Policy + * @description Create an alert policy. A repo label with the same name is created to scope the policy; repositories carrying that label are governed by the policy. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-policy:create + */ + createOrgAlertPolicy: { + parameters: { + query?: { + /** @description Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201. */ + dry_run?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The policy name (1-120 characters). Also used as the name of the repo label that scopes the policy. */ + name: string; /** - * @enum {string} + * @description Operator-provided description (up to 256 characters). + * @default */ - type?: 'noV1' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + description?: string | null; + /** @description Repositories to scope the policy to. */ + repository_ids?: string[] | null; /** - * @enum {string} + * @description Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null for no baseline. + * @default */ - type?: 'noWebsite' - value?: components['schemas']['SocketIssueBasics'] & { + baseline?: string | null; + }; + }; + }; + responses: { + /** @description Dry-run: the write was not persisted. */ + 200: { + content: { + "application/json": { /** + * @description The ID of the policy: a UUID, or `default` for the default policy until it is first customized. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'noBugTracker' - value?: components['schemas']['SocketIssueBasics'] & { + id: string; /** + * @description The policy name. Null for the default policy, which applies to all repositories without a policy label. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'noAuthorData' - value?: components['schemas']['SocketIssueBasics'] & { + name: string | null; /** + * @description Operator-provided description. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'typeModuleCompatibility' - value?: components['schemas']['SocketIssueBasics'] & { + description: string | null; /** - * @default + * @description How the policy scopes to repositories: `labeled_repos` applies to repositories carrying the policy repo label; `unlabeled_repos` is the default policy for all unlabeled repositories. + * @default labeled_repos + * @enum {string} */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'floatingDependency' - value?: components['schemas']['SocketIssueBasics'] & { + apply_method: "labeled_repos" | "unlabeled_repos"; /** + * @description The repo label that scopes this policy. Null for the default policy. * @default */ - description: string - props: { - /** - * @default - */ - dependency: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'manifestConfusion' - value?: components['schemas']['SocketIssueBasics'] & { + repo_label_id: string | null; + /** @description Repositories the policy scopes to. Empty for the default policy and for policies with no repository assignments. */ + repository_ids: string[]; /** + * @description Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null when the policy has no baseline. * @default */ - description: string - props: { - /** - * @default - */ - key: string - /** - * @default - */ - description: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'malware' - value?: components['schemas']['SocketIssueBasics'] & { + baseline: string | null; /** + * @description User ID that created the policy. * @default */ - description: string - props: { - /** - * @default 0 - */ - id: number - /** - * @default - */ - note: string - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'telemetry' - value?: components['schemas']['SocketIssueBasics'] & { + created_by: string | null; /** + * @description User ID that last updated the policy. * @default */ - description: string - props: { - /** - * @default 0 - */ - id: number - /** - * @default - */ - note: string - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'troll' - value?: components['schemas']['SocketIssueBasics'] & { + updated_by: string | null; /** + * @description ISO-8601 creation timestamp. Null for the default policy until it is first customized. * @default */ - description: string - props: { - /** - * @default 0 - */ - id: number - /** - * @default - */ - note: string - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'pendingScan' - value?: components['schemas']['SocketIssueBasics'] & { + created_at: string | null; /** + * @description ISO-8601 last-update timestamp. Null for the default policy until it is first customized. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'deprecated' - value?: components['schemas']['SocketIssueBasics'] & { + updated_at: string | null; /** - * @default + * @description True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted. + * @default false */ - description: string - props: { - /** - * @default This package is deprecated - */ - reason: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'chronoAnomaly' - value?: components['schemas']['SocketIssueBasics'] & { + dry_run?: boolean; + }; + }; + }; + /** @description The created alert policy. */ + 201: { + content: { + "application/json": { /** + * @description The ID of the policy: a UUID, or `default` for the default policy until it is first customized. * @default */ - description: string - props: { - /** - * @default - */ - prevChronoDate: string - /** - * @default - */ - prevChronoVersion: string - /** - * @default - */ - prevSemverDate: string - /** - * @default - */ - prevSemverVersion: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'compromisedSSHKey' - value?: components['schemas']['SocketIssueBasics'] & { + id: string; /** + * @description The policy name. Null for the default policy, which applies to all repositories without a policy label. * @default */ - description: string - props: { - /** - * @default - */ - fingerprint: string - /** - * @default - */ - sshKey: string - /** - * @default - */ - username: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'semverAnomaly' - value?: components['schemas']['SocketIssueBasics'] & { + name: string | null; /** + * @description Operator-provided description. * @default */ - description: string - props: { - /** - * @default - */ - prevVersion: string - /** - * @default - */ - newVersion: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'newAuthor' - value?: components['schemas']['SocketIssueBasics'] & { + description: string | null; + /** + * @description How the policy scopes to repositories: `labeled_repos` applies to repositories carrying the policy repo label; `unlabeled_repos` is the default policy for all unlabeled repositories. + * @default labeled_repos + * @enum {string} + */ + apply_method: "labeled_repos" | "unlabeled_repos"; /** + * @description The repo label that scopes this policy. Null for the default policy. * @default */ - description: string - props: { - /** - * @default - */ - prevAuthor: string - /** - * @default - */ - newAuthor: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'unstableOwnership' - value?: components['schemas']['SocketIssueBasics'] & { + repo_label_id: string | null; + /** @description Repositories the policy scopes to. Empty for the default policy and for policies with no repository assignments. */ + repository_ids: string[]; /** + * @description Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null when the policy has no baseline. * @default */ - description: string - props: { - /** - * @default - */ - author: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'missingAuthor' - value?: components['schemas']['SocketIssueBasics'] & { + baseline: string | null; /** + * @description User ID that created the policy. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'unmaintained' - value?: components['schemas']['SocketIssueBasics'] & { + created_by: string | null; /** + * @description User ID that last updated the policy. * @default */ - description: string - props: { - /** - * @default - */ - lastPublish: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'unpublished' - value?: components['schemas']['SocketIssueBasics'] & { + updated_by: string | null; /** + * @description ISO-8601 creation timestamp. Null for the default policy until it is first customized. * @default */ - description: string - props: { - /** - * @default - */ - version: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'majorRefactor' - value?: components['schemas']['SocketIssueBasics'] & { + created_at: string | null; /** + * @description ISO-8601 last-update timestamp. Null for the default policy until it is first customized. * @default */ - description: string - props: { - /** - * @default 0 - */ - linesChanged: number - /** - * @default 0 - */ - prevSize: number - /** - * @default 0 - */ - curSize: number - /** - * @default 0 - */ - changedPercent: number - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'missingTarball' - value?: components['schemas']['SocketIssueBasics'] & { + updated_at: string | null; + /** + * @description True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted. + * @default false + */ + dry_run?: boolean; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get Org Alert Policy + * @description Fetch a single alert policy by ID. Use `default` as the ID for the default policy, which applies to all repositories without a policy label. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-policy:read + */ + getOrgAlertPolicy: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the alert policy: a UUID, or `default` for the default policy */ + policy_id: string; + }; + }; + responses: { + /** @description The requested alert policy. */ + 200: { + content: { + "application/json": { /** + * @description The ID of the policy: a UUID, or `default` for the default policy until it is first customized. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'suspiciousStarActivity' - value?: components['schemas']['SocketIssueBasics'] & { + id: string; /** + * @description The policy name. Null for the default policy, which applies to all repositories without a policy label. * @default */ - description: string - props: { - /** - * @default 0 - */ - percentageSuspiciousStars: number - /** - * @default - */ - repository: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'notFound' - value?: components['schemas']['SocketIssueBasics'] & { + name: string | null; /** + * @description Operator-provided description. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'unpopularPackage' - value?: components['schemas']['SocketIssueBasics'] & { + description: string | null; /** - * @default + * @description How the policy scopes to repositories: `labeled_repos` applies to repositories carrying the policy repo label; `unlabeled_repos` is the default policy for all unlabeled repositories. + * @default labeled_repos + * @enum {string} */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'policy' - value?: components['schemas']['SocketIssueBasics'] & { + apply_method: "labeled_repos" | "unlabeled_repos"; /** + * @description The repo label that scopes this policy. Null for the default policy. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'skillAutonomyAbuse' - value?: components['schemas']['SocketIssueBasics'] & { + repo_label_id: string | null; + /** @description Repositories the policy scopes to. Empty for the default policy and for policies with no repository assignments. */ + repository_ids: string[]; /** + * @description Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null when the policy has no baseline. * @default */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'skillCommandInjection' - value?: components['schemas']['SocketIssueBasics'] & { + baseline: string | null; /** + * @description User ID that created the policy. * @default */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'skillDataExfiltration' - value?: components['schemas']['SocketIssueBasics'] & { + created_by: string | null; /** + * @description User ID that last updated the policy. * @default */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'skillDiscoveryAbuse' - value?: components['schemas']['SocketIssueBasics'] & { + updated_by: string | null; /** + * @description ISO-8601 creation timestamp. Null for the default policy until it is first customized. * @default */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'skillHardcodedSecrets' - value?: components['schemas']['SocketIssueBasics'] & { + created_at: string | null; /** + * @description ISO-8601 last-update timestamp. Null for the default policy until it is first customized. * @default */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + updated_at: string | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Update Org Alert Policy + * @description Update an alert policy. Only the provided fields change; `repository_ids` replaces the full set of repositories the policy scopes to. The default policy cannot be renamed and its scope is implicit. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-policy:update + */ + updateOrgAlertPolicy: { + parameters: { + query?: { + /** @description Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201. */ + dry_run?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the alert policy: a UUID, or `default` for the default policy */ + policy_id: string; + }; + }; + requestBody: { + content: { + "application/json": { /** - * @enum {string} + * @description The policy name (1-120 characters). The default policy cannot be renamed. + * @default */ - type?: 'skillObfuscation' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + name?: string; /** - * @enum {string} + * @description Operator-provided description (up to 256 characters). + * @default */ - type?: 'skillPreExecution' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + description?: string | null; + /** @description Full replacement set of repositories the policy scopes to. The default policy scope is implicit and cannot be set. */ + repository_ids?: string[] | null; /** - * @enum {string} + * @description Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null to remove the baseline. + * @default */ - type?: 'skillPromptInjection' - value?: components['schemas']['SocketIssueBasics'] & { + baseline?: string | null; + }; + }; + }; + responses: { + /** @description The updated alert policy. Dry-run responses include `dry_run: true` and were not persisted. */ + 200: { + content: { + "application/json": { /** + * @description The ID of the policy: a UUID, or `default` for the default policy until it is first customized. * @default */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'skillResourceAbuse' - value?: components['schemas']['SocketIssueBasics'] & { + id: string; /** + * @description The policy name. Null for the default policy, which applies to all repositories without a policy label. * @default */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'skillSupplyChain' - value?: components['schemas']['SocketIssueBasics'] & { + name: string | null; /** + * @description Operator-provided description. * @default */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'skillToolAbuse' - value?: components['schemas']['SocketIssueBasics'] & { + description: string | null; /** - * @default + * @description How the policy scopes to repositories: `labeled_repos` applies to repositories carrying the policy repo label; `unlabeled_repos` is the default policy for all unlabeled repositories. + * @default labeled_repos + * @enum {string} */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'skillToolChaining' - value?: components['schemas']['SocketIssueBasics'] & { + apply_method: "labeled_repos" | "unlabeled_repos"; /** + * @description The repo label that scopes this policy. Null for the default policy. * @default */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'skillTransitiveTrust' - value?: components['schemas']['SocketIssueBasics'] & { + repo_label_id: string | null; + /** @description Repositories the policy scopes to. Empty for the default policy and for policies with no repository assignments. */ + repository_ids: string[]; /** + * @description Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null when the policy has no baseline. * @default */ - description: string - props: { - /** - * @default - */ - notes: string - /** - * @default 0 - */ - confidence: number - /** - * @default 0 - */ - severity: number - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'socketUpgradeAvailable' - value?: components['schemas']['SocketIssueBasics'] & { + baseline: string | null; /** + * @description User ID that created the policy. * @default */ - description: string - props: { - categories: string[] - /** - * @default false - */ - deprecated: boolean - interop: string[] - /** - * @default - */ - replacementPURL: string - /** - * @default - */ - version: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'longStrings' - value?: components['schemas']['SocketIssueBasics'] & { + created_by: string | null; /** + * @description User ID that last updated the policy. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'highEntropyStrings' - value?: components['schemas']['SocketIssueBasics'] & { + updated_by: string | null; /** + * @description ISO-8601 creation timestamp. Null for the default policy until it is first customized. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'urlStrings' - value?: components['schemas']['SocketIssueBasics'] & { + created_at: string | null; /** + * @description ISO-8601 last-update timestamp. Null for the default policy until it is first customized. * @default */ - description: string - props: { - urls: string[] - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'usesEval' - value?: components['schemas']['SocketIssueBasics'] & { + updated_at: string | null; /** - * @default + * @description True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted. + * @default false */ - description: string - props: { - /** - * @default eval - */ - evalType: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'dynamicRequire' - value?: components['schemas']['SocketIssueBasics'] & { + dry_run?: boolean; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Delete Org Alert Policy + * @description Delete an alert policy along with its rules and repo label. Repositories previously scoped to the policy fall back to the default policy after the next org snapshot. The default policy cannot be deleted. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-policy:delete + */ + deleteOrgAlertPolicy: { + parameters: { + query?: { + /** @description Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201. */ + dry_run?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The UUID of the alert policy to delete */ + policy_id: string; + }; + }; + responses: { + /** @description Deleted the alert policy, or rehearsed the delete when `dry_run` is true. */ + 200: { + content: { + "application/json": { /** + * @description Present on a persisted delete. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'envVars' - value?: components['schemas']['SocketIssueBasics'] & { + result?: string; /** - * @default + * @description True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted. + * @default false */ - description: string - props: { - /** - * @default - */ - envVars: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + dry_run?: boolean; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * List Org Alert Policy Rules + * @description List the custom rules of an alert policy in evaluation order (ascending rank). Rules are evaluated before the policy baseline; the first matching rule decides the alert action. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-policy:list + */ + getOrgAlertPolicyRules: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the alert policy: a UUID, or `default` for the default policy */ + policy_id: string; + }; + }; + responses: { + /** @description Lists the rules of the specified alert policy. */ + 200: { + content: { + "application/json": { + items: Array<({ + /** + * @description The UUID of the rule. + * @default + */ + id: string; + /** + * @description The UUID of the policy the rule belongs to. + * @default + */ + alert_policy_id: string; + /** + * @description Fractional-index rank; rules are evaluated in ascending rank order. + * @default + */ + rank: string; + /** + * @description The rule name. + * @default + */ + name: string; + /** + * @description Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{"finding.alertType": "criticalCVE", "artifact.name": "lodash"}`). + * @default null + */ + vigil_selector: Record; + /** + * @description The action applied to matching alerts. One of: error, warn, monitor, ignore. + * @default monitor + * @enum {string} + */ + action: "error" | "warn" | "monitor" | "ignore"; + /** + * @description Operator-provided note. + * @default + */ + note: string | null; + /** + * @description User ID that created the rule. + * @default + */ + created_by: string | null; + /** + * @description User ID that last updated the rule. + * @default + */ + updated_by: string | null; + /** + * @description ISO-8601 creation timestamp. + * @default + */ + created_at: string; + /** + * @description ISO-8601 last-update timestamp. + * @default + */ + updated_at: string; + })>; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Create Org Alert Policy Rule + * @description Create a rule on an alert policy. Rules are evaluated in ascending rank order and the first matching rule decides the alert action. Provide at most one of `position`, `rank`, `before_rule_id`, or `after_rule_id`; the rule is placed first when no position is provided. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-policy:create + */ + createOrgAlertPolicyRule: { + parameters: { + query?: { + /** @description Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201. */ + dry_run?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the alert policy: a UUID, or `default` for the default policy */ + policy_id: string; + }; + }; + requestBody: { + content: { + "application/json": { + /** @description The rule name (1-128 characters). */ + name: string; /** - * @enum {string} + * @description Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{"finding.alertType": "criticalCVE", "artifact.name": "lodash"}`). + * @default null */ - type?: 'missingDependency' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { - /** - * @default - */ - name: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + vigil_selector: Record; + /** @description The action applied to matching alerts. One of: error, warn, monitor, ignore. */ + action: string; /** - * @enum {string} + * @description Operator-provided note (up to 256 characters). + * @default */ - type?: 'unusedDependency' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { - /** - * @default - */ - name: string - /** - * @default - */ - version: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + note?: string | null; /** - * @enum {string} + * @description Where to place the rule within the policy: `first` or `last`. Mutually exclusive with `rank`, `before_rule_id`, and `after_rule_id`; when no position is provided a created rule is placed first. + * @default */ - type?: 'peerDependency' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { - /** - * @default - */ - name: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + position?: string; /** - * @enum {string} + * @description Explicit rank, as a `fractional-indexing` base62 order key (e.g. `a0`, `a0V`). Prefer `position`, `before_rule_id`, or `after_rule_id`; a rank that is not a valid order key is rejected. + * @default */ - type?: 'uncaughtOptionalDependency' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: { - /** - * @default - */ - name: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + rank?: string; /** - * @enum {string} + * @description Place the rule immediately before this rule UUID. + * @default */ - type?: 'unresolvedRequire' - value?: components['schemas']['SocketIssueBasics'] & { - /** - * @default - */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { + before_rule_id?: string | null; /** - * @enum {string} + * @description Place the rule immediately after this rule UUID. + * @default */ - type?: 'extraneousDependency' - value?: components['schemas']['SocketIssueBasics'] & { + after_rule_id?: string | null; + }; + }; + }; + responses: { + /** @description Dry-run: the write was not persisted. */ + 200: { + content: { + "application/json": { /** + * @description The UUID of the rule. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'obfuscatedRequire' - value?: components['schemas']['SocketIssueBasics'] & { + id: string; /** + * @description The UUID of the policy the rule belongs to. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'obfuscatedFile' - value?: components['schemas']['SocketIssueBasics'] & { + alert_policy_id: string; /** + * @description Fractional-index rank; rules are evaluated in ascending rank order. * @default */ - description: string - props: { - /** - * @default 0 - */ - confidence: number - /** - * @default - */ - notes: string - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'minifiedFile' - value?: components['schemas']['SocketIssueBasics'] & { + rank: string; /** + * @description The rule name. * @default */ - description: string - props: { - /** - * @default 0 - */ - confidence: number - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'installScripts' - value?: components['schemas']['SocketIssueBasics'] & { + name: string; /** - * @default + * @description Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{"finding.alertType": "criticalCVE", "artifact.name": "lodash"}`). + * @default null */ - description: string - props: { - /** - * @default - */ - script: string - /** - * @default - */ - source: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'hasNativeCode' - value?: components['schemas']['SocketIssueBasics'] & { + vigil_selector: Record; /** - * @default + * @description The action applied to matching alerts. One of: error, warn, monitor, ignore. + * @default monitor + * @enum {string} */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'binScriptConfusion' - value?: components['schemas']['SocketIssueBasics'] & { + action: "error" | "warn" | "monitor" | "ignore"; /** + * @description Operator-provided note. * @default */ - description: string - props: { - /** - * @default - */ - binScript: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'shellScriptOverride' - value?: components['schemas']['SocketIssueBasics'] & { + note: string | null; /** + * @description User ID that created the rule. * @default */ - description: string - props: { - /** - * @default - */ - binScript: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'didYouMean' - value?: components['schemas']['SocketIssueBasics'] & { + created_by: string | null; /** + * @description User ID that last updated the rule. * @default */ - description: string - props: { - /** - * @default - */ - alternatePackage: string - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'gptDidYouMean' - value?: components['schemas']['SocketIssueBasics'] & { + updated_by: string | null; /** + * @description ISO-8601 creation timestamp. * @default */ - description: string - props: { - /** - * @default - */ - alternatePackage: string - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'bidi' - value?: components['schemas']['SocketIssueBasics'] & { + created_at: string; /** + * @description ISO-8601 last-update timestamp. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'zeroWidth' - value?: components['schemas']['SocketIssueBasics'] & { + updated_at: string; /** - * @default + * @description True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted. + * @default false */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'badEncoding' - value?: components['schemas']['SocketIssueBasics'] & { + dry_run?: boolean; + }; + }; + }; + /** @description The created alert policy rule. */ + 201: { + content: { + "application/json": { /** + * @description The UUID of the rule. * @default */ - description: string - props: { - /** - * @default utf8 - */ - encoding: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'homoglyphs' - value?: components['schemas']['SocketIssueBasics'] & { + id: string; /** + * @description The UUID of the policy the rule belongs to. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'invisibleChars' - value?: components['schemas']['SocketIssueBasics'] & { + alert_policy_id: string; /** + * @description Fractional-index rank; rules are evaluated in ascending rank order. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'suspiciousString' - value?: components['schemas']['SocketIssueBasics'] & { + rank: string; /** + * @description The rule name. * @default */ - description: string - props: { - /** - * @default - */ - pattern: string - /** - * @default - */ - explanation: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'potentialVulnerability' - value?: components['schemas']['SocketIssueBasics'] & { + name: string; + /** + * @description Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{"finding.alertType": "criticalCVE", "artifact.name": "lodash"}`). + * @default null + */ + vigil_selector: Record; + /** + * @description The action applied to matching alerts. One of: error, warn, monitor, ignore. + * @default monitor + * @enum {string} + */ + action: "error" | "warn" | "monitor" | "ignore"; /** + * @description Operator-provided note. * @default */ - description: string - props: { - /** - * @default - */ - note: string - /** - * @default medium - * - * @enum {string} - */ - risk: 'low' | 'medium' | 'high' - /** - * @default - */ - detectedAt: string | null - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'vsxProposedApiUsage' - value?: components['schemas']['SocketIssueBasics'] & { + note: string | null; /** + * @description User ID that created the rule. * @default */ - description: string - props: { - /** - * @default - */ - proposals: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'vsxActivationWildcard' - value?: components['schemas']['SocketIssueBasics'] & { + created_by: string | null; /** + * @description User ID that last updated the rule. * @default */ - description: string - props: { - /** - * @default - */ - event: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'vsxWorkspaceContainsActivation' - value?: components['schemas']['SocketIssueBasics'] & { + updated_by: string | null; /** + * @description ISO-8601 creation timestamp. * @default */ - description: string - props: { - /** - * @default - */ - pattern: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'vsxUntrustedWorkspaceSupported' - value?: components['schemas']['SocketIssueBasics'] & { + created_at: string; /** + * @description ISO-8601 last-update timestamp. * @default */ - description: string - props: { - /** - * @default - */ - supported: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'vsxVirtualWorkspaceSupported' - value?: components['schemas']['SocketIssueBasics'] & { + updated_at: string; /** - * @default + * @description True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted. + * @default false */ - description: string - props: { - /** - * @default - */ - supported: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'vsxWebviewContribution' - value?: components['schemas']['SocketIssueBasics'] & { + dry_run?: boolean; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get Org Alert Policy Rule + * @description Fetch a single alert policy rule by UUID. Returns the same row shape as the rules list endpoint. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-policy:read + */ + getOrgAlertPolicyRule: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the alert policy: a UUID, or `default` for the default policy */ + policy_id: string; + /** @description The UUID of the rule to fetch */ + rule_id: string; + }; + }; + responses: { + /** @description The requested alert policy rule. */ + 200: { + content: { + "application/json": { /** + * @description The UUID of the rule. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'vsxDebuggerContribution' - value?: components['schemas']['SocketIssueBasics'] & { + id: string; /** + * @description The UUID of the policy the rule belongs to. * @default */ - description: string - props: Record - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'vsxExtensionDependency' - value?: components['schemas']['SocketIssueBasics'] & { + alert_policy_id: string; /** + * @description Fractional-index rank; rules are evaluated in ascending rank order. * @default */ - description: string - props: { - /** - * @default - */ - extension: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - | { - /** - * @enum {string} - */ - type?: 'vsxExtensionPack' - value?: components['schemas']['SocketIssueBasics'] & { + rank: string; /** + * @description The rule name. * @default */ - description: string - props: { - /** - * @default - */ - count: string - } - usage?: components['schemas']['SocketUsageRef'] - } - } - SocketMetricSchema: { - /** - * @default 0 - */ - score: number - components: { - [key: string]: components['schemas']['SocketMetricComponent'] - } - /** - * @default 0 - */ - limit?: number - /** - * @default - */ - limitingMetric?: string - } - /** - * Package ecosystem type identifier based on the PURL specification. - * - * @default unknown - * - * @enum {string} - */ - SocketPURL_Type: - | 'alpm' - | 'apk' - | 'bitbucket' - | 'cocoapods' - | 'cargo' - | 'chrome' - | 'clawhub' - | 'composer' - | 'conan' - | 'conda' - | 'cran' - | 'deb' - | 'docker' - | 'gem' - | 'generic' - | 'github' - | 'golang' - | 'hackage' - | 'hex' - | 'huggingface' - | 'maven' - | 'mlflow' - | 'npm' - | 'nuget' - | 'qpkg' - | 'oci' - | 'pub' - | 'pypi' - | 'rpm' - | 'socket' - | 'swid' - | 'swift' - | 'vscode' - | 'unknown' - /** - * @default low - * - * @enum {string} - */ - SocketIssueSeverity: 'low' | 'middle' | 'high' | 'critical' - /** - * @default other - * - * @enum {string} - */ - SocketCategory: - | 'supplyChainRisk' - | 'quality' - | 'maintenance' - | 'vulnerability' - | 'license' - | 'other' - SocketPatch: { - /** - * Unique identifier for this patch. - * - * @default - */ - uuid: string - /** - * Access tier required for this patch (free or paid) - * - * @default free - * - * @enum {string} - */ - tier: 'free' | 'paid' - /** - * Indicates if this patch is deprecated and should not be used. - * - * @default false - */ - deprecated?: boolean - } - ReachabilityResult: { - /** - * Type of reachability analysis performed. - * - * @default precomputed - * - * @enum {string} - */ - type: 'precomputed' | 'full-scan' - /** - * Reachability analysis results for each vulnerability. - */ - results: Array - } - OpenVEXVulnerabilitySchema: { - /** - * @default - */ - name: string - /** - * @default - */ - '@id'?: string - /** - * @default - */ - description?: string - aliases?: string[] - } - OpenVEXProductSchema: { - /** - * @default - */ - '@id': string - identifiers?: components['schemas']['OpenVEXIdentifiersSchema'] - hashes?: components['schemas']['OpenVEXHashesSchema'] - subcomponents?: Array - } - SocketIssueBasics: { - severity: components['schemas']['SocketIssueSeverity'] - category: components['schemas']['SocketCategory'] - locations: components['schemas']['SocketRefList'] - /** - * @default - */ - label: string - } - SocketUsageRef: { - file: components['schemas']['SocketRefFile'] - dependencies: components['schemas']['SocketRefList'] - } - SocketMetricComponent: { - /** - * @default 0 - */ - score: number - /** - * @default 0 - */ - maxScore: number - /** - * @default 0 - */ - limit: number - /** - * @default null - */ - value: Record - } - ReachabilityResultItem: { - type: components['schemas']['ReachabilityType'] - /** - * Indicates if the reachability analysis was stopped early due to depth - * or complexity limits. - * - * @default false - */ - truncated?: boolean - /** - * Error message if reachability analysis failed. - * - * @default - */ - error?: string - matches?: - | { + name: string; /** - * @enum {string} + * @description Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{"finding.alertType": "criticalCVE", "artifact.name": "lodash"}`). + * @default null */ - type?: 'function-level' - value?: Array - } - | { + vigil_selector: Record; /** + * @description The action applied to matching alerts. One of: error, warn, monitor, ignore. + * @default monitor * @enum {string} */ - type?: 'class-level' - value?: Array - } - /** - * Path to the workspace root for multi-workspace projects. - * - * @default - */ - workspacePath?: string - /** - * Path to the subproject within the workspace. - * - * @default - */ - subprojectPath?: string - } - OpenVEXIdentifiersSchema: { - /** - * @default - */ - purl?: string - /** - * @default - */ - cpe23?: string - /** - * @default - */ - cpe22?: string - } - OpenVEXHashesSchema: { - /** - * @default - */ - md5?: string - /** - * @default - */ - sha1?: string - /** - * @default - */ - 'sha-256'?: string - /** - * @default - */ - 'sha-384'?: string - /** - * @default - */ - 'sha-512'?: string - /** - * @default - */ - 'sha3-224'?: string - /** - * @default - */ - 'sha3-256'?: string - /** - * @default - */ - 'sha3-384'?: string - /** - * @default - */ - 'sha3-512'?: string - /** - * @default - */ - 'blake2s-256'?: string - /** - * @default - */ - 'blake2b-256'?: string - /** - * @default - */ - 'blake2b-512'?: string - } - OpenVEXComponentSchema: { - /** - * @default - */ - '@id'?: string - identifiers?: components['schemas']['OpenVEXIdentifiersSchema'] - hashes?: components['schemas']['OpenVEXHashesSchema'] - } - SocketRefList: Array - SocketRefFile: { - /** - * @default - */ - path: string - range?: components['schemas']['SocketRefTextRange'] - bytes?: components['schemas']['SocketRefByteRange'] - } - /** - * Status of reachability analysis for vulnerable code paths. - * - * @default unknown - * - * @enum {string} - */ - ReachabilityType: - | 'missing_support' - | 'undeterminable_reachability' - | 'pending' - | 'unreachable' - | 'unknown' - | 'direct_dependency' - | 'error' - | 'maybe_reachable' - | 'reachable' - CallStackItem: { - /** - * Package URL (PURL) of the dependency containing this code. - * - * @default - */ - purl?: string - sourceLocation?: components['schemas']['SourceLocation'] - /** - * Confidence score from 0.0 to 1.0 indicating how certain the - * reachability analysis is about this result. - * - * @default 0 - */ - confidence?: number - } - ClassStackItem: { - /** - * Package URL (PURL) of the dependency containing this class. - * - * @default - */ - purl?: string - /** - * Name of the class in the dependency. - * - * @default - */ - class?: string - /** - * Confidence score from 0.0 to 1.0 indicating how certain the - * reachability analysis is about this result. - * - * @default 0 - */ - confidence?: number - } - SocketRef: - | { + action: "error" | "warn" | "monitor" | "ignore"; + /** + * @description Operator-provided note. + * @default + */ + note: string | null; + /** + * @description User ID that created the rule. + * @default + */ + created_by: string | null; + /** + * @description User ID that last updated the rule. + * @default + */ + updated_by: string | null; + /** + * @description ISO-8601 creation timestamp. + * @default + */ + created_at: string; + /** + * @description ISO-8601 last-update timestamp. + * @default + */ + updated_at: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Update Org Alert Policy Rule + * @description Update an alert policy rule. Only the provided fields change. To move the rule, provide at most one of `position`, `rank`, `before_rule_id`, or `after_rule_id`. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-policy:update + */ + updateOrgAlertPolicyRule: { + parameters: { + query?: { + /** @description Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201. */ + dry_run?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the alert policy: a UUID, or `default` for the default policy */ + policy_id: string; + /** @description The UUID of the rule to update */ + rule_id: string; + }; + }; + requestBody: { + content: { + "application/json": { /** - * @enum {string} + * @description The rule name (1-128 characters). + * @default */ - type?: 'unknown' - value?: Record - } - | { + name?: string; /** - * @enum {string} + * @description Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{"finding.alertType": "criticalCVE", "artifact.name": "lodash"}`). + * @default null */ - type?: 'npm' - value?: components['schemas']['SocketRefNPM'] - } - | { + vigil_selector?: Record; /** - * @enum {string} + * @description The action applied to matching alerts. One of: error, warn, monitor, ignore. + * @default */ - type?: 'git' - value?: components['schemas']['SocketRefGit'] - } - | { + action?: string; /** - * @enum {string} + * @description Operator-provided note (up to 256 characters). + * @default */ - type?: 'web' - value?: components['schemas']['SocketRefWeb'] - } - | { + note?: string | null; /** - * @enum {string} + * @description Where to place the rule within the policy: `first` or `last`. Mutually exclusive with `rank`, `before_rule_id`, and `after_rule_id`; when no position is provided a created rule is placed first. + * @default */ - type?: 'pypi' - value?: components['schemas']['SocketRefPyPI'] - } - | { + position?: string; /** - * @enum {string} + * @description Explicit rank, as a `fractional-indexing` base62 order key (e.g. `a0`, `a0V`). Prefer `position`, `before_rule_id`, or `after_rule_id`; a rank that is not a valid order key is rejected. + * @default */ - type?: 'go' - value?: components['schemas']['SocketRefGo'] - } - SocketRefTextRange: { - /** - * @default 0 - */ - startLine: number - /** - * @default 0 - */ - startColumn: number - /** - * @default 0 - */ - endLine: number - /** - * @default 0 - */ - endColumn: number - } - SocketRefByteRange: { - /** - * @default 0 - */ - start: number - /** - * @default 0 - */ - end: number - } - SourceLocation: { - start: { - /** - * Line number in the source file. - * - * @default 0 - */ - line: number - /** - * Column number in the source file. - * - * @default 0 - */ - column: number - /** - * Absolute byte position from the beginning of the file, used for - * precise location tracking. - * - * @default 0 - */ - byteOffset: number - } - end: { - /** - * Line number in the source file. - * - * @default 0 - */ - line?: number - /** - * Column number in the source file. - * - * @default 0 - */ - column?: number - /** - * Absolute byte position from the beginning of the file, used for - * precise location tracking. - * - * @default 0 - */ - byteOffset?: number - } - /** - * Path to the source file. - * - * @default - */ - filename: string - /** - * Hash of the source file for integrity verification. - * - * @default - */ - fileHash: string - } - SocketRefNPM: { - /** - * @default - */ - package: string - /** - * @default - */ - version?: string - file?: components['schemas']['SocketRefFile'] - } - SocketRefGit: { - /** - * @default - */ - url: string - /** - * @default - */ - commit?: string - /** - * @default - */ - tag?: string - file?: components['schemas']['SocketRefFile'] - } - SocketRefWeb: { - /** - * @default - */ - url: string - file?: components['schemas']['SocketRefFile'] - } - SocketRefPyPI: { - /** - * @default - */ - package: string - /** - * @default - */ - version?: string - /** - * @default - */ - artifact?: string - file?: components['schemas']['SocketRefFile'] - } - SocketRefGo: { - /** - * @default - */ - package: string - /** - * @default - */ - version?: string - file?: components['schemas']['SocketRefFile'] - } - } - responses: { - /** - * Bad request. - */ - SocketBadRequest: { - content: { - 'application/json': { - error: { + rank?: string; + /** + * @description Move the rule immediately before this rule UUID. + * @default + */ + before_rule_id?: string | null; + /** + * @description Move the rule immediately after this rule UUID. + * @default + */ + after_rule_id?: string | null; + }; + }; + }; + responses: { + /** @description The updated alert policy rule. Dry-run responses include `dry_run: true` and were not persisted. */ + 200: { + content: { + "application/json": { /** + * @description The UUID of the rule. * @default */ - message: string + id: string; /** - * @default null + * @description The UUID of the policy the rule belongs to. + * @default */ - details: Record | null - } - } - } - } - /** - * Unauthorized. - */ - SocketUnauthorized: { - content: { - 'application/json': { - error: { + alert_policy_id: string; + /** + * @description Fractional-index rank; rules are evaluated in ascending rank order. + * @default + */ + rank: string; /** + * @description The rule name. * @default */ - message: string + name: string; /** + * @description Selector describing which alerts the rule applies to. Fields must all be under finding.*, location.*, or artifact.* (e.g. `{"finding.alertType": "criticalCVE", "artifact.name": "lodash"}`). * @default null */ - details: Record | null - } - } - } - } - /** - * Insufficient max_quota for API method. - */ - SocketForbidden: { - content: { - 'application/json': { - error: { + vigil_selector: Record; + /** + * @description The action applied to matching alerts. One of: error, warn, monitor, ignore. + * @default monitor + * @enum {string} + */ + action: "error" | "warn" | "monitor" | "ignore"; /** + * @description Operator-provided note. * @default */ - message: string + note: string | null; /** - * @default null + * @description User ID that created the rule. + * @default */ - details: Record | null - } - } - } - } - /** - * Resource not found. - */ - SocketNotFoundResponse: { - content: { - 'application/json': { - error: { + created_by: string | null; /** + * @description User ID that last updated the rule. * @default */ - message: string + updated_by: string | null; /** - * @default null + * @description ISO-8601 creation timestamp. + * @default */ - details: Record | null - } - } - } - } - /** - * Insufficient quota for API route. - */ - SocketTooManyRequestsResponse: { - headers: { - /** - * Retry contacting the endpoint *at least* after seconds. - * See https://tools.ietf.org/html/rfc7231#section-7.1.3. - */ - 'Retry-After'?: number - } - content: { - 'application/json': { - error: { + created_at: string; /** + * @description ISO-8601 last-update timestamp. * @default */ - message: string + updated_at: string; /** - * @default null + * @description True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted. + * @default false */ - details: Record | null - } - } - } - } - /** - * Internal server error. - */ - SocketInternalServerError: { - content: { - 'application/json': { - error: { + dry_run?: boolean; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Delete Org Alert Policy Rule + * @description Delete an alert policy rule. Alerts previously matched by this rule are re-evaluated against the remaining rules and baseline after the next org snapshot. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-policy:delete + */ + deleteOrgAlertPolicyRule: { + parameters: { + query?: { + /** @description Rehearse the write: authorize and validate the request and return the response body a real write would produce, then discard it. Accepts `true`, `1`, or `yes`. Other present values return 400 so a typo cannot persist. Nothing is persisted. A dry-run success is HTTP 200 with `dry_run: true`, not 201. */ + dry_run?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the alert policy: a UUID, or `default` for the default policy */ + policy_id: string; + /** @description The UUID of the rule to delete */ + rule_id: string; + }; + }; + responses: { + /** @description Deleted the alert policy rule, or rehearsed the delete when `dry_run` is true. */ + 200: { + content: { + "application/json": { /** + * @description Present on a persisted delete. * @default */ - message: string + result?: string; /** - * @default null + * @description True when `?dry_run=true` (or `1` / `yes`) rehearsed the write; nothing was persisted. + * @default false */ - details: Record | null - } - } - } - } - /** - * Resource already exists. - */ - SocketConflict: { - content: { - 'application/json': { - error: { + dry_run?: boolean; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get Org Alert Policy Migration Status + * @description Retrieve the alert policy migration status of an organization. This is read-only and does not enroll organizations or start migration windows. Requires a token with org-wide repository access; repo-restricted tokens receive 403. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - alert-policy:list + */ + getOrgAlertPolicyMigrationStatus: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description The alert policy migration status of the organization. */ + 200: { + content: { + "application/json": { + /** + * @description Current migration state. Null when the organization is not enrolled. + * @default pending + * @enum {string|null} + */ + state: "pending" | "previewing" | "accepted" | "auto_finalized" | "rolled_back" | null; /** + * @description ISO-8601 timestamp when migration finalized. * @default */ - message: string + finalized_at: string | null; /** - * @default null + * @description ISO-8601 auto-finalization deadline. + * @default */ - details: Record | null - } - } - } - } - /** - * Gone. - */ - SocketGone: { - content: { - 'application/json': { - error: { + deadline_at: string | null; /** + * @description ISO-8601 end of the organization migration window. * @default */ - message: string + window_end_at: string | null; /** - * @default null + * @description ISO-8601 timestamp when an administrator paused the deadline. + * @default */ - details: Record | null - } - } - } - } - } - parameters: never - requestBodies: {} - headers: never - pathItems: never -} - -export type $defs = Record - -export type external = Record - -export interface operations { + deadline_admin_paused_at: string | null; + /** + * @description Whether the alert policy layer evaluates for this organization. True for migrated organizations and for organizations that started on Rules & Policies. + * @default false + */ + alert_policies_enabled: boolean; + /** + * @description Whether legacy alert triage and the legacy security policy still evaluate for this organization. + * @default true + */ + legacy_evaluation_enabled: boolean; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Get Packages by PURL. - * - * _This endpoint is deprecated._* Deprecated since 2026-01-05. Batch - * retrieval of package metadata and alerts by PURL strings. Compatible with - * CycloneDX reports. Package URLs (PURLs) are an ecosystem agnostic way to - * identify packages. CycloneDX SBOMs use the purl format to identify - * components. This endpoint supports fetching metadata and alerts for - * multiple packages at once by passing an array of purl strings, or by - * passing an entire CycloneDX report. **Note:** This endpoint has a batch - * size limit (default: 1024 PURLs per request). Requests exceeding this limit - * will return a 400 Bad Request error. More information on purl and - * CycloneDX: - * - * - [`purl` Spec](https://github.com/package-url/purl-spec) - * - [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components) - * This endpoint returns the latest available alert data for artifacts in - * the batch (stale while revalidate). Actively running analysis will be - * returned when available on subsequent runs. When `alerts=true`, Socket - * may synthesize two alert types to make partial results actionable: - * - `pendingScan`: the package is known but analysis has not completed yet - * - `notFound`: Socket could not resolve the package/version metadata When - * `purlErrors=true`, unresolved `notFound` inputs keep the legacy - * `purlError` stream shape instead of emitting synthetic `notFound` - * artifacts. Use `poll=false` (default) to fail open and return the current - * known state quickly. Use `poll=true` to fail closed and wait up to - * `timeoutSec` for pending analysis before returning. - * - * ## Examples: - * - * ### Looking up an npm package: - * - * ```json - * { - * "components": [ - * { - * "purl": "pkg:npm/express@4.19.2" - * } - * ] - * } - * ``` - * - * ### Looking up an PyPi package: - * - * ```json - * { - * "components": [ - * { - * "purl": "pkg:pypi/django@5.0.6" - * } - * ] - * } - * ``` - * - * ### Looking up a Maven package: - * - * ```json - * { - * "components": [ - * { - * "purl": "pkg:maven/log4j/log4j@1.2.17" - * } - * ] - * } - * ``` - * - * ### Batch lookup + * Translate Org Alert Triage + * @description Translate a legacy alert triage payload — the same body as `POST /v0/orgs/{org_slug}/triage/alerts` — into the resolution or policy-rule requests that replace it. Nothing is created. Policy-rule translations target the default (Main) policy, which covers repositories without a policy label; labeled policies do not inherit those rules, so POST the same body to `/alert-policies/{id}/rules` if the rule should apply there. Entries that cannot be translated are returned in `untranslatable`; the rest are in `translations`. Requires one of: `triage:alerts-update`, `alert-policy:read`, or `alert-resolution:create`. * - * ```json - * { - * "components": [ - * { - * "purl": "pkg:npm/express@4.19.2" - * }, - * { - * "purl": "pkg:pypi/django@5.0.6" - * }, - * { - * "purl": "pkg:maven/log4j/log4j@1.2.17" - * } - * ] - * } - * ``` + * This endpoint consumes 1 unit of your quota. * - * This endpoint consumes 100 units of your quota. * This endpoint requires the following org token scopes: - * - * - Packages:list - * - * @deprecated + * - No Scopes Required, but authentication is required */ - batchPackageFetch: { + translateOrgAlertPolicyMigrationTriage: { parameters: { - query?: { - /** - * Include alert metadata. - */ - alerts?: boolean - /** - * Include only alerts with comma separated actions defined by security - * policy. - */ - actions?: Array<'error' | 'monitor' | 'warn' | 'ignore'> - /** - * Compact metadata. When enabled, excludes metadata fields like author, - * scores, size, dependencies, and manifest files. Always includes: id, - * type, name, version, release, namespace, subpath, alerts, and - * alertPriorities. - */ - compact?: boolean - /** - * Include only fixable alerts. - */ - fixable?: boolean - /** - * Include license attribution data, including license text and author - * information. Maps attribution/license text to a list of data objects - * to which that attribution info applies. - */ - licenseattrib?: boolean - /** - * Include detailed license information, including location and match - * strength, for each license datum. - */ - licensedetails?: boolean - /** - * Return errors found with handling PURLs as error objects in the - * stream. - */ - purlErrors?: boolean - /** - * When true, wait up to timeoutSec for pending analysis to complete - * before returning. When false (default), return the current known - * state immediately, including synthesized pendingScan and notFound - * alerts when alerts=true unless purlErrors=true keeps legacy not-found - * errors. - */ - poll?: boolean - /** - * Legacy fallback for older clients. Only used when poll is omitted: - * cachedResultsOnly=true behaves like poll=false, while - * cachedResultsOnly=false preserves the older blocking behavior. - */ - cachedResultsOnly?: boolean - /** - * Include a summary object at the end of the stream with counts of - * malformed, resolved, and not found PURLs. - */ - summary?: boolean - /** - * Maximum time in seconds to wait for package resolution and, when - * poll=true, pending analysis. Inputs that have not completed - * processing when the timeout is reached return pendingScan alerts when - * alerts=true, or errors when purlErrors=true. - */ - timeoutSec?: number - } - } - requestBody?: { - content: { - 'application/json': components['schemas']['SocketOrgBatchPURLFetch'] - } - } - responses: { - /** - * Socket issue lists and scores for all packages, and optional metadata - * objects. - */ - 200: { - content: { - 'application/x-ndjson': components['schemas']['BatchPurlStreamSchema'] - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Search dependencies. - * - * Search for any dependency that is being used in your organization. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - No Scopes Required, but authentication is required. - */ - searchDependencies: { - requestBody?: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody: { content: { - 'application/json': { - /** - * @default 50 - */ - limit: number - /** - * @default 0 - */ - offset: number - purls?: string[] - } - } - } - responses: { - /** - * Search dependencies response. - */ - 200: { - content: { - 'application/json': { - /** - * @default false - */ - end: boolean - /** - * @default 1000 - */ - limit: number - /** - * @default 0 - */ - offset: number - purlFilters: { - valid: string[] - invalid: string[] - } - rows: Array<{ + "application/json": { + alertTriage: Array<({ /** + * @description The UUID of the triage entry. Omit to create a new entry; provide to update an existing one. * @default */ - branch: string + uuid?: string | null; /** - * @default false + * @description The package ecosystem type (e.g., npm, pypi). Use null or "*" for wildcard. + * @default */ - direct: boolean + packageType?: string | null; /** + * @description The package namespace or scope. Use null or "*" for wildcard. * @default */ - id: string + packageNamespace?: string | null; /** + * @description The package name. Use null or "*" for wildcard. * @default */ - name: string + packageName?: string | null; /** + * @description The package version. Supports a "*" suffix for wildcard prefix matching. Use null for any version. * @default */ - repository: string + packageVersion?: string | null; /** + * @description The specific alert key to target. * @default */ - type: string + alertKey?: string | null; /** + * @description The alert type (e.g., criticalCVE, highCVE). * @default */ - namespace?: string + alertType?: string | null; + /** + * @description Whether a fix is available, unavailable, or * for any + * @enum {string} + */ + fixAvailable?: "available" | "unavailable" | "*"; + /** + * @description Whether a patch is available, unavailable, or * for any + * @enum {string} + */ + patchAvailable?: "available" | "unavailable" | "*"; /** + * @description Whether the alert has a CISA KEV, can be exist, none, or * for any + * @enum {string} + */ + kevs?: "exist" | "none" | "*"; + /** + * @description CVE or GHSA ID to match against. * @default */ - version?: string + cveOrGhsaId?: string | null; + /** + * @description The reachability of the alert, can be reachable, unreachable, other, or * for any + * @enum {string} + */ + reachability?: "reachable" | "unreachable" | "other" | "*"; /** + * @description CVSS score comparison operator and value (e.g., >=7.5, >5.0, ==8.0). * @default */ - release?: string + cvssScoreCmp?: string | null; /** + * @description A note or comment for the triage action. * @default */ - workspace?: string - }> - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + note?: string; + /** + * @description The triage state of the alert + * @enum {string} + */ + state?: "block" | "ignore" | "inherit" | "monitor" | "warn"; + })>; + }; + }; + }; + responses: { + /** @description Translated requests, plus any entries that have no equivalent. */ + 200: { + content: { + "application/json": { + translations: Array<({ + /** + * @description Zero-based position of the source entry in the submitted `alertTriage` array. + * @default 0 + */ + index: number; + /** + * @description Which API replaces this triage entry. + * @default alert_resolution + * @enum {string} + */ + target: "alert_resolution" | "alert_policy_rule"; + /** + * @description HTTP method of the new request. + * @default POST + * @enum {string} + */ + method: "POST"; + /** + * @description Path of the new request. Policy rules target the default (Main) policy, which covers repositories without a policy label. Labeled policies do not inherit Main — replace `default` with that policy id if the rule should apply there. + * @default + */ + path: string; + /** + * @description Request body to send. Resolutions: `{ reason, comment, vigil_selector }` (`reason` is `other`). Rules: `{ name, action, note, vigil_selector }` (`block` becomes `error`). + * @default null + */ + body: Record; + })>; + untranslatable: Array<({ + /** + * @description Zero-based position of the source entry in the submitted `alertTriage` array. + * @default 0 + */ + index: number; + /** + * @description Why the entry was not translated. + * @default alert_key_not_translatable + * @enum {string} + */ + code: "inherit_not_translatable" | "alert_key_not_translatable" | "matches_all_alerts" | "filter_not_translatable" | "note_too_long"; + /** + * @description What to do instead. Safe to show to API clients. + * @default + */ + reason: string; + })>; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Create a snapshot of all dependencies from manifest information. + * List repositories + * @description Lists repositories for the specified organization. * - * _This endpoint is deprecated._* Upload a set of manifest or lockfiles to - * get your dependency tree analyzed by Socket. You can upload multiple - * lockfiles in the same request, but each filename must be unique. The name - * of the file must be in the supported list. For example, these are valid - * filenames: "requirements.txt", "package.json", "folder/package.json", and - * "deep/nested/folder/package.json". This endpoint consumes 100 units of your - * quota. This endpoint requires the following org token scopes: - * - * - Report:write + * This endpoint consumes 1 unit of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - repo:list */ - createDependenciesSnapshot: { + getOrgRepoList: { parameters: { query?: { - repository?: string - branch?: string - } - } - requestBody?: { - content: { - 'multipart/form-data': { - /** - * @default - */ - repository?: string - /** - * @default - */ - branch?: string - [key: string]: undefined - } - } - } + /** @description Field to sort repositories by. */ + sort?: "name" | "updated_at" | "created_at"; + /** @description Sort direction. */ + direction?: "asc" | "desc"; + per_page?: number; + page?: number; + /** @description Include archived repositories in the results */ + include_archived?: boolean; + /** @description Filter repositories by workspace. When provided (including empty string), only repos in that workspace are returned. */ + workspace?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; responses: { - /** - * ID of the dependencies snapshot. - */ + /** @description Lists repositories for the specified organization. The authenticated user must be a member of the organization. */ 200: { content: { - 'application/json': Record - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - 500: components['responses']['SocketInternalServerError'] - } - } + "application/json": { + results: Array<({ + /** + * @description The ID of the repository + * @default + */ + id?: string; + /** + * @description The creation date of the repository + * @default + */ + created_at?: string; + /** + * @description The last update date of the repository + * @default + */ + updated_at?: string; + /** + * @description The URL to the repository dashboard page + * @default + */ + html_url?: string; + /** + * @description The ID of the head full scan of the repository + * @default + */ + head_full_scan_id?: string | null; + integration_meta?: ({ + /** @enum {string} */ + type?: "github"; + value?: { + /** + * @description The GitHub installation_id of the active associated Socket GitHub App + * @default + */ + installation_id: string; + /** + * @description The GitHub login name that the active Socket GitHub App installation is installed to + * @default + */ + installation_login: string; + /** + * @description The name of the associated GitHub repo. + * @default + */ + repo_name: string | null; + /** + * @description The id of the associated GitHub repo. + * @default + */ + repo_id: string | null; + }; + }) | null; + /** + * @description The slug of the repository. + * @default + */ + slug?: string; + /** + * @description The name of the repository + * @default + */ + name?: string; + /** + * @description The description of the repository + * @default + */ + description?: string | null; + /** + * @description The homepage URL of the repository + * @default + */ + homepage?: string | null; + /** + * @description The visibility of the repository + * @default private + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Whether the repository is archived or not + * @default false + */ + archived?: boolean; + /** + * @description The default branch of the repository + * @default main + */ + default_branch?: string | null; + /** + * @description The workspace of the repository + * @default + */ + workspace?: string; + })>; + /** @default 0 */ + nextPage: number | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * List full scans. + * Create repository + * @description Create a repository. + * + * Repos collect Full scans and Diff scans and are typically associated with a git repo. * - * Returns a paginated list of all full scans in an org, excluding SBOM - * artifacts. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - full-scans:list. + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo:create */ - getOrgFullScanList: { + createOrgRepo: { parameters: { query?: { - /** - * Specify Sort order. - */ - sort?: 'name' | 'created_at' - /** - * Specify sort direction. - */ - direction?: 'asc' | 'desc' - /** - * Specify the maximum number of results to return per page. - */ - per_page?: number - /** - * The page number to return when using offset-style pagination. Ignored - * when cursor pagination is used. - */ - page?: number - /** - * Cursor token for pagination. Pass the returned nextPageCursor from - * previous responses to fetch the next set of results. - */ - startAfterCursor?: string - /** - * Set to true on the first request to opt into cursor-based pagination. - */ - use_cursor?: boolean - /** - * A Unix timestamp in seconds that filters full-scans prior to the - * date. - */ - from?: string - /** - * A repository workspace to filter full-scans by. - */ - workspace?: string - /** - * A repository slug to filter full-scans by. - */ - repo?: string - /** - * A branch name to filter full-scans by. - */ - branch?: string - /** - * A PR number to filter full-scans by. - */ - pull_request?: string - /** - * A commit hash to filter full-scans by. - */ - commit_hash?: string - /** - * A scan type to filter full-scans by (e.g. socket, socket_tier1, - * socket_basics). - */ - scan_type?: string - } + /** @description Set to "redirect" to receive a 302 redirect to the existing repo instead of a 409 error when a duplicate slug is detected. */ + on_duplicate?: string; + }; path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The display name of the repository. When provided without a slug, the slug is automatically derived from the name. When omitted, the slug is used as the name. At least one of name or slug must be provided. + * @default + */ + name?: string; + /** + * @description The description of the repository + * @default + */ + description?: string | null; + /** + * @description The homepage URL of the repository + * @default + */ + homepage?: string | null; + /** + * @description The visibility of the repository + * @default private + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Whether the repository is archived or not + * @default false + */ + archived?: boolean; + /** + * @description The default branch of the repository + * @default main + */ + default_branch?: string | null; + /** + * @description The workspace of the repository + * @default + */ + workspace?: string; + /** + * @description The slug of the repository. If provided, used directly instead of being derived from name. Must only contain ASCII letters, digits, and the characters ., -, and _. + * @default + */ + slug?: string; + }; + }; + }; responses: { - /** - * Lists repositories for the specified organization. The authenticated - * user must be a member of the organization. - */ - 200: { + /** @description Lists repositories for the specified organization. The authenticated user must be a member of the organization. */ + 201: { content: { - 'application/json': { - results: Array<{ - /** - * @default - */ - id?: string - /** - * @default - */ - created_at?: string - /** - * @default - */ - updated_at?: string - /** - * @default - */ - organization_id?: string - /** - * @default - */ - organization_slug?: string - /** - * @default - */ - repository_id?: string - /** - * @default - */ - repository_slug?: string - /** - * @default - */ - branch?: string | null - /** - * @default - */ - commit_message?: string | null - /** - * @default - */ - commit_hash?: string | null - /** - * @default 0 - */ - pull_request?: number | null - committers?: string[] - /** - * @default - */ - html_url?: string | null - /** - * @default - */ - api_url?: string | null - /** - * @default - */ - workspace?: string - /** - * @default - */ - repo?: string - /** - * @default - */ - html_report_url?: string - /** - * @default - */ - integration_type?: string | null - /** - * @default - */ - integration_repo_url?: string | null - /** - * @default - */ - integration_branch_url?: string | null - /** - * @default - */ - integration_commit_url?: string | null - /** - * @default - */ - integration_pull_request_url?: string | null - /** - * @default - */ - scan_type?: string | null - /** - * The current processing status of the SBOM. - * - * @default pending - * - * @enum {string|null} - */ - scan_state?: 'pending' | 'precrawl' | 'resolve' | 'scan' | null - }> + "application/json": { /** + * @description The ID of the repository * @default */ - nextPageCursor: string | null - /** - * @default 0 - */ - nextPage: number | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Create full scan. - * - * Create a full scan from a set of package manifest files. Returns a full - * scan including all SBOM artifacts. To get a list of supported filetypes - * that can be uploaded in a full-scan, see the [Get supported file - * types](/reference/getsupportedfiles) endpoint. The maximum number of files - * you can upload at a time is 10000 and each file can be no bigger than 268 - * MB. **Query Parameters:** - * - * - `scan_type` (optional): The type of scan to perform. Defaults to 'socket'. - * Must be 32 characters or less. Used for categorizing multiple SBOM heads - * per repository branch. This endpoint consumes 1 unit of your quota. This - * endpoint requires the following org token scopes: - * - Full-scans:create - */ - CreateOrgFullScan: { - parameters: { - query: { - /** - * The slug of the repository to associate the full-scan with. - */ - repo: string - /** - * The workspace of the repository to associate the full-scan with. - */ - workspace?: string - /** - * The branch name to associate the full-scan with. Branch names must - * follow Git branch name rules: be 1–255 characters long; cannot be - * exactly @; cannot begin or end with /, ., or .lock; cannot contain - * "//", "..", or "@{"; and cannot include control characters, spaces, - * or any of ~^:?*[. - */ - branch?: string - /** - * The commit message to associate the full-scan with. - */ - commit_message?: string - /** - * The commit hash to associate the full-scan with. - */ - commit_hash?: string - /** - * The pull request number to associate the full-scan with. - */ - pull_request?: number - /** - * The committers to associate with the full-scan. Set query more than - * once to set multiple. - */ - committers?: string - /** - * The integration type to associate the full-scan with. Defaults to - * "Api" if omitted. - */ - integration_type?: - | 'api' - | 'github' - | 'gitlab' - | 'bitbucket' - | 'azure' - | 'web' - /** - * The integration org slug to associate the full-scan with. If omitted, - * the Socket org name will be used. This is used to generate links and - * badges. - */ - integration_org_slug?: string - /** - * Set the default branch of the repository to the branch of this - * full-scan. A branch name is required with this option. - */ - make_default_branch?: boolean - /** - * Designate this full-scan as the latest scan of a given branch. - * Default branch head scans are included in org alerts. This is only - * supported on the default branch. A branch name is required with this - * option. - */ - set_as_pending_head?: boolean - /** - * Create a temporary full-scan that is not listed in the reports - * dashboard. Cannot be used when set_as_pending_head=true. - */ - tmp?: boolean - /** - * The type of scan to perform. Defaults to 'socket'. Must be 32 - * characters or less. Used for categorizing multiple SBOM heads per - * repository branch. - */ - scan_type?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - requestBody?: { - content: { - 'multipart/form-data': { - [key: string]: never - } - } - } - responses: { - /** - * The details of the created full scan. - */ - 201: { - content: { - 'application/json': { + id?: string; /** + * @description The creation date of the repository * @default */ - id?: string + created_at?: string; /** + * @description The last update date of the repository * @default */ - created_at?: string + updated_at?: string; /** + * @description The URL to the repository dashboard page * @default */ - updated_at?: string + html_url?: string; /** + * @description The ID of the head full scan of the repository * @default */ - organization_id?: string + head_full_scan_id?: string | null; + integration_meta?: ({ + /** @enum {string} */ + type?: "github"; + value?: { + /** + * @description The GitHub installation_id of the active associated Socket GitHub App + * @default + */ + installation_id: string; + /** + * @description The GitHub login name that the active Socket GitHub App installation is installed to + * @default + */ + installation_login: string; + /** + * @description The name of the associated GitHub repo. + * @default + */ + repo_name: string | null; + /** + * @description The id of the associated GitHub repo. + * @default + */ + repo_id: string | null; + }; + }) | null; /** + * @description The slug of the repository. * @default */ - organization_slug?: string + slug?: string; /** + * @description The name of the repository * @default */ - repository_id?: string + name?: string; /** + * @description The description of the repository * @default */ - repository_slug?: string + description?: string | null; /** + * @description The homepage URL of the repository * @default */ - branch?: string | null + homepage?: string | null; /** - * @default + * @description The visibility of the repository + * @default private + * @enum {string} */ - commit_message?: string | null + visibility?: "public" | "private"; /** - * @default + * @description Whether the repository is archived or not + * @default false */ - commit_hash?: string | null + archived?: boolean; /** - * @default 0 + * @description The default branch of the repository + * @default main */ - pull_request?: number | null - committers?: string[] + default_branch?: string | null; /** + * @description The workspace of the repository * @default */ - html_url?: string | null + workspace?: string; + }; + }; + }; + /** @description Redirects to the existing repository when on_duplicate=redirect is set and a duplicate slug is detected. */ + 302: { + content: { + "application/json": { /** + * @description The ID of the repository * @default */ - api_url?: string | null + id?: string; /** + * @description The creation date of the repository * @default */ - workspace?: string + created_at?: string; /** + * @description The last update date of the repository * @default */ - repo?: string + updated_at?: string; /** + * @description The URL to the repository dashboard page * @default */ - html_report_url?: string + html_url?: string; /** + * @description The ID of the head full scan of the repository * @default */ - integration_type?: string | null + head_full_scan_id?: string | null; + integration_meta?: ({ + /** @enum {string} */ + type?: "github"; + value?: { + /** + * @description The GitHub installation_id of the active associated Socket GitHub App + * @default + */ + installation_id: string; + /** + * @description The GitHub login name that the active Socket GitHub App installation is installed to + * @default + */ + installation_login: string; + /** + * @description The name of the associated GitHub repo. + * @default + */ + repo_name: string | null; + /** + * @description The id of the associated GitHub repo. + * @default + */ + repo_id: string | null; + }; + }) | null; /** + * @description The slug of the repository. * @default */ - integration_repo_url?: string | null + slug?: string; /** + * @description The name of the repository * @default */ - integration_branch_url?: string | null + name?: string; /** + * @description The description of the repository * @default */ - integration_commit_url?: string | null + description?: string | null; /** + * @description The homepage URL of the repository * @default */ - integration_pull_request_url?: string | null + homepage?: string | null; /** - * @default + * @description The visibility of the repository + * @default private + * @enum {string} */ - scan_type?: string | null + visibility?: "public" | "private"; /** - * The current processing status of the SBOM. - * - * @default pending - * - * @enum {string|null} + * @description Whether the repository is archived or not + * @default false */ - scan_state?: 'pending' | 'precrawl' | 'resolve' | 'scan' | null - unmatchedFiles?: string[] - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Stream full scan. - * - * Stream all SBOM artifacts for a full scan. This endpoint returns the - * latest, available alert data for artifacts in the full scan (stale while - * revalidate). Actively running analysis will be returned when available on - * subsequent runs. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - full-scans:list. - */ - getOrgFullScan: { - parameters: { - query: { - /** - * Control which alert priority fields to include in the response. Set - * to "true" to include all fields, "false" to exclude all fields, or - * specify individual fields like "components,formula" to include only - * those fields. - */ - include_alert_priority_details?: - | boolean - | Array<'component' | 'formula'> - /** - * Include scores event in the response. include_scores_details implies - * this flag. - */ - include_scores: boolean - /** - * Control which score detail fields to include in the scores event. Set - * to "true" to include all fields, "false" to exclude all fields, or - * specify individual fields like "components,formula" to include only - * those fields. - */ - include_scores_details?: boolean | Array<'components' | 'formula'> - /** - * Include license details in the response. This can increase the - * response size significantly. - */ - include_license_details: boolean - /** - * Return cached immutable scan results. When enabled and results are - * cached, returns the pre-computed scan. When results are not yet - * cached, returns 202 Accepted and enqueues a background job. - */ - cached?: boolean - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the full scan. - */ - full_scan_id: string - } - } - responses: { - /** - * Socket issue lists and scores for all packages, followed by a final - * scores event. - */ - 200: { - content: { - 'application/x-ndjson': - | components['schemas']['SocketArtifact'] - | { - /** - * @enum {string} - */ - _type: 'scores' - value: components['schemas']['SocketSBOMScore'] - } - } - } - /** - * Scan is being processed. Poll again later to retrieve results. - */ - 202: { - content: { - 'application/json': { + archived?: boolean; /** - * @default processing + * @description The default branch of the repository + * @default main */ - status: string + default_branch?: string | null; /** + * @description The workspace of the repository * @default */ - id: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + workspace?: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Delete full scan. + * Get repository + * @description Retrieve a repository associated with an organization. * - * Delete an existing full scan. * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - full-scans:delete. - */ - deleteOrgFullScan: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the full scan. - */ - full_scan_id: string - } - } - responses: { - /** - * Success. - */ - 200: { - content: { - 'application/json': { - /** - * @default ok - */ - status: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get full scan metadata. * - * Get metadata for a single full scan - * This endpoint consumes 1 unit of your quota. * This endpoint requires the following org token scopes: - * - full-scans:list. + * - repo:list */ - getOrgFullScanMetadata: { + getOrgRepo: { parameters: { + query?: { + /** @description The workspace of the repository */ + workspace?: string; + }; path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the full scan. - */ - full_scan_id: string - } - } + /** @description The slug of the organization */ + org_slug: string; + /** @description The slug of the repository */ + repo_slug: string; + }; + }; responses: { - /** - * The data from the full scan. - */ + /** @description Lists repositories for the specified organization. The authenticated user must be a member of the organization. */ 200: { content: { - 'application/json': { - /** - * @default - */ - id?: string + "application/json": { /** + * @description The ID of the repository * @default */ - created_at?: string + id: string; /** + * @description The creation date of the repository * @default */ - updated_at?: string + created_at: string; /** + * @description The last update date of the repository * @default */ - organization_id?: string + updated_at: string; /** + * @description The URL to the repository dashboard page * @default */ - organization_slug?: string + html_url: string; /** + * @description The ID of the head full scan of the repository * @default */ - repository_id?: string + head_full_scan_id: string | null; + integration_meta: ({ + /** @enum {string} */ + type?: "github"; + value?: { + /** + * @description The GitHub installation_id of the active associated Socket GitHub App + * @default + */ + installation_id: string; + /** + * @description The GitHub login name that the active Socket GitHub App installation is installed to + * @default + */ + installation_login: string; + /** + * @description The name of the associated GitHub repo. + * @default + */ + repo_name: string | null; + /** + * @description The id of the associated GitHub repo. + * @default + */ + repo_id: string | null; + }; + }) | null; /** + * @description The slug of the repository. * @default */ - repository_slug?: string + slug: string; /** + * @description The name of the repository * @default */ - branch?: string | null + name: string; /** + * @description The description of the repository * @default */ - commit_message?: string | null + description: string | null; /** + * @description The homepage URL of the repository * @default */ - commit_hash?: string | null - /** - * @default 0 - */ - pull_request?: number | null - committers?: string[] + homepage: string | null; /** - * @default + * @description The visibility of the repository + * @default private + * @enum {string} */ - html_url?: string | null + visibility: "public" | "private"; /** - * @default + * @description Whether the repository is archived or not + * @default false */ - api_url?: string | null + archived: boolean; /** - * @default + * @description The default branch of the repository + * @default main */ - workspace?: string + default_branch: string | null; /** + * @description The workspace of the repository * @default */ - repo?: string + workspace: string; /** + * @description The slug of the repository. This typo is intentionally preserved for backwards compatibility reasons. * @default */ - html_report_url?: string + slig: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Update repository + * @description Update details of an existing repository. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo:update + */ + updateOrgRepo: { + parameters: { + query?: { + /** @description The workspace of the repository */ + workspace?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The slug of the repository */ + repo_slug: string; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The name of the repository + * @default + */ + name?: string; + /** + * @description The description of the repository + * @default + */ + description?: string | null; + /** + * @description The homepage URL of the repository + * @default + */ + homepage?: string | null; + /** + * @description The visibility of the repository + * @default private + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Whether the repository is archived or not + * @default false + */ + archived?: boolean; + /** + * @description The default branch of the repository + * @default main + */ + default_branch?: string | null; + /** + * @description The workspace of the repository + * @default + */ + workspace?: string; + }; + }; + }; + responses: { + /** @description Updated repository details */ + 200: { + content: { + "application/json": { /** + * @description The ID of the repository * @default */ - integration_type?: string | null + id?: string; /** + * @description The creation date of the repository * @default */ - integration_repo_url?: string | null + created_at?: string; /** + * @description The last update date of the repository * @default */ - integration_branch_url?: string | null + updated_at?: string; /** + * @description The URL to the repository dashboard page * @default */ - integration_commit_url?: string | null + html_url?: string; /** + * @description The ID of the head full scan of the repository * @default */ - integration_pull_request_url?: string | null + head_full_scan_id?: string | null; + integration_meta?: ({ + /** @enum {string} */ + type?: "github"; + value?: { + /** + * @description The GitHub installation_id of the active associated Socket GitHub App + * @default + */ + installation_id: string; + /** + * @description The GitHub login name that the active Socket GitHub App installation is installed to + * @default + */ + installation_login: string; + /** + * @description The name of the associated GitHub repo. + * @default + */ + repo_name: string | null; + /** + * @description The id of the associated GitHub repo. + * @default + */ + repo_id: string | null; + }; + }) | null; /** + * @description The slug of the repository. * @default */ - scan_type?: string | null + slug?: string; /** - * The current processing status of the SBOM. - * - * @default pending - * - * @enum {string|null} + * @description The name of the repository + * @default + */ + name?: string; + /** + * @description The description of the repository + * @default + */ + description?: string | null; + /** + * @description The homepage URL of the repository + * @default + */ + homepage?: string | null; + /** + * @description The visibility of the repository + * @default private + * @enum {string} + */ + visibility?: "public" | "private"; + /** + * @description Whether the repository is archived or not + * @default false + */ + archived?: boolean; + /** + * @description The default branch of the repository + * @default main */ - scan_state?: 'pending' | 'precrawl' | 'resolve' | 'scan' | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + default_branch?: string | null; + /** + * @description The workspace of the repository + * @default + */ + workspace?: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Diff Full Scans. + * Delete repository + * @description Delete a single repository and all of its associated Full scans and Diff scans. * - * _This endpoint is deprecated._* Get the difference between two existing - * Full Scans. The results are not persisted. This endpoint consumes 1 unit of - * your quota. This endpoint requires the following org token scopes: + * This endpoint consumes 1 unit of your quota. * - * - Full-scans:list + * This endpoint requires the following org token scopes: + * - repo:delete + */ + deleteOrgRepo: { + parameters: { + query?: { + /** @description The workspace of the repository */ + workspace?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The slug of the repository */ + repo_slug: string; + }; + }; + responses: { + /** @description Success */ + 200: { + content: { + "application/json": { + /** @default ok */ + status: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Associate repository label (beta) + * @description Associate a repository label with a repository. * - * @deprecated + * Labels can be used to group and organize repositories and to apply security/license policies. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo-label:update */ - GetOrgDiffScan: { + associateOrgRepoLabel: { parameters: { - query: { - /** - * The full scan ID of the base/target of the diff (older) - */ - after: string - /** - * The full scan ID of the head/changed side of the diff (newer) - */ - before: string - /** - * Include license details in the response. This can increase the - * response size significantly. - */ - include_license_details?: boolean - /** - * Omit unchanged artifacts from the response. When set to true, the - * unchanged field will be set to null. - */ - omit_unchanged?: boolean - } path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the label */ + label_id: string; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The ID of the repository to associate with the label + * @default + */ + repository_id?: string; + }; + }; + }; responses: { - /** - * The difference between the two provided Full Scans. - */ + /** @description Associates a repository label with the specified repository. The authenticated user must be a member of the organization. */ 200: { content: { - 'application/json': { - before: { - /** - * @default - */ - id: string - /** - * @default - */ - created_at: string - /** - * @default - */ - updated_at: string - /** - * @default - */ - organization_id: string - /** - * @default - */ - organization_slug: string - /** - * @default - */ - repository_id: string - /** - * @default - */ - repository_slug: string - /** - * @default - */ - branch: string | null - /** - * @default - */ - commit_message: string | null - /** - * @default - */ - commit_hash: string | null - /** - * @default 0 - */ - pull_request: number | null - committers: string[] - /** - * @default - */ - html_url: string | null - /** - * @default - */ - api_url: string | null - } - after: { - /** - * @default - */ - id: string - /** - * @default - */ - created_at: string - /** - * @default - */ - updated_at: string - /** - * @default - */ - organization_id: string - /** - * @default - */ - organization_slug: string - /** - * @default - */ - repository_id: string - /** - * @default - */ - repository_slug: string - /** - * @default - */ - branch: string | null - /** - * @default - */ - commit_message: string | null - /** - * @default - */ - commit_hash: string | null - /** - * @default 0 - */ - pull_request: number | null - committers: string[] - /** - * @default - */ - html_url: string | null - /** - * @default - */ - api_url: string | null - } + "application/json": { + /** + * @description Status of the operation + * @default + */ + status?: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * List repository labels (beta) + * @description Lists repository labels for the specified organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo-label:list + */ + getOrgRepoLabelList: { + parameters: { + query?: { + per_page?: number; + page?: number; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Lists repository labels for the specified organization. The authenticated user must be a member of the organization. */ + 200: { + content: { + "application/json": { + results: Array<{ + /** + * @description The ID of the label + * @default + */ + id?: string; + /** + * @description The name of the label + * @default + */ + name?: string; + /** @description The IDs of repositories this label is associated with */ + repository_ids?: string[]; + /** + * @description Whether the label has a security policy + * @default false + */ + has_security_policy?: boolean; + /** + * @description Whether the label has a license policy + * @default false + */ + has_license_policy?: boolean; + }>; + /** @default 0 */ + nextPage: number | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Create repository label (beta) + * @description Create a repository label. + * + * Labels can be used to group and organize repositories and to apply security/license policies. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo-label:create + */ + createOrgRepoLabel: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody: { + content: { + "application/json": { + /** + * @description The name of the label + * @default + */ + name: string; + }; + }; + }; + responses: { + /** @description Creates a new repository label for the specified organization. The authenticated user must be a member of the organization. Label names must be non-empty and less than 1000 characters. */ + 201: { + content: { + "application/json": { /** - * Artifacts in the diff grouped by how they changed between the - * before and after scans. + * @description The ID of the label + * @default */ - artifacts: { - /** - * Artifacts present in the after scan but not the before scan. - */ - added: Array - /** - * Artifacts present in the before scan but not the after scan. - */ - removed: Array - /** - * Artifacts present in both scans with no changes. Null when - * omitted via the omit_unchanged query parameter. - */ - unchanged: Array< - components['schemas']['SocketDiffArtifact'] - > | null - /** - * Artifacts replaced between the scans, e.g. the same package - * supplied by a different source. - */ - replaced: Array - /** - * Artifacts whose version changed between the scans. - */ - updated: Array - } + id?: string; + /** + * @description The name of the label + * @default + */ + name?: string; + /** @description The IDs of repositories this label is associated with */ + repository_ids?: string[]; /** + * @description Whether the label has a security policy * @default false */ - directDependenciesChanged: boolean + has_security_policy?: boolean; /** - * @default + * @description Whether the label has a license policy + * @default false */ - diff_report_url: string | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + has_license_policy?: boolean; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + /** @description Conflict */ + 409: { + content: { + "application/json": { + error: { + /** @default */ + message: string; + /** @default null */ + details: Record | null; + }; + }; + }; + }; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * SCM Comment for Scan Diff. - * - * _This endpoint is deprecated._* Get the dependency overview and dependency - * alert comments in GitHub flavored markdown between the diff between two - * existing full scans. This endpoint consumes 1 unit of your quota. This - * endpoint requires the following org token scopes: + * Get repository label (beta) + * @description Retrieve a repository label associated with an organization and label ID. * - * - Full-scans:list + * This endpoint consumes 1 unit of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - repo-label:list */ - GetOrgFullScanDiffGfm: { + getOrgRepoLabel: { parameters: { - query: { - /** - * The head full scan ID (newer) - */ - after: string - /** - * The base full scan ID (older) - */ - before: string - /** - * The ID of the GitHub installation. This will be used to get the - * GitHub installation settings. If not provided, the default GitHub - * installation settings will be used. - */ - github_installation_id?: string - } path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the label */ + label_id: string; + }; + }; responses: { - /** - * Metadata about the full scans and the dependency overview and - * dependency alert comment. Can be used in a pull request context. - */ + /** @description Returns a specific repository label for the specified organization. The authenticated user must be a member of the organization. */ 200: { content: { - 'application/json': { - before: { - /** - * @default - */ - id: string - /** - * @default - */ - created_at: string - /** - * @default - */ - updated_at: string - /** - * @default - */ - organization_id: string - /** - * @default - */ - organization_slug: string - /** - * @default - */ - repository_id: string - /** - * @default - */ - repository_slug: string - /** - * @default - */ - branch: string | null - /** - * @default - */ - commit_message: string | null - /** - * @default - */ - commit_hash: string | null - /** - * @default 0 - */ - pull_request: number | null - committers: string[] - /** - * @default - */ - html_url: string | null - /** - * @default - */ - api_url: string | null - } - after: { - /** - * @default - */ - id: string - /** - * @default - */ - created_at: string - /** - * @default - */ - updated_at: string - /** - * @default - */ - organization_id: string - /** - * @default - */ - organization_slug: string - /** - * @default - */ - repository_id: string - /** - * @default - */ - repository_slug: string - /** - * @default - */ - branch: string | null - /** - * @default - */ - commit_message: string | null - /** - * @default - */ - commit_hash: string | null - /** - * @default 0 - */ - pull_request: number | null - committers: string[] - /** - * @default - */ - html_url: string | null - /** - * @default - */ - api_url: string | null - } - comments: { - /** - * @default - */ - overview: string - /** - * @default - */ - alerts: string - } + "application/json": { /** - * True when either side of the diff was truncated at the plan's - * dependency limit. When set, the comments contain a limit-exceeded - * notice instead of a report rendered from the imbalanced diff. - * - * @default false + * @description The ID of the label + * @default + */ + id?: string; + /** + * @description The name of the label + * @default */ - incomplete: boolean + name?: string; + /** @description The IDs of repositories this label is associated with */ + repository_ids?: string[]; /** + * @description Whether the label has a security policy * @default false */ - directDependenciesChanged: boolean + has_security_policy?: boolean; /** - * @default + * @description Whether the label has a license policy + * @default false */ - diff_report_url: string | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + has_license_policy?: boolean; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Download full scan files as tarball. + * Update repository label (beta) + * @description Update a repository label name. + * + * Labels can be used to group and organize repositories and to apply security/license policies. * - * Download all files associated with a full scan in tar format. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - full-scans:list. - */ - downloadOrgFullScanFilesAsTar: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the full scan. - */ - full_scan_id: string - } - } - responses: { - /** - * Tar archive of full scan files. - */ - 200: { - content: { - 'application/x-tar': unknown - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Create full scan from archive. - * - * Create a full scan by uploading one or more archives. Supported archive - * formats include **.tar**, **.tar.gz/.tgz**, and **.zip**. Each uploaded - * archive is extracted server-side and any supported manifest files (like - * package.json, package-lock.json, pnpm-lock.yaml, etc.) are ingested for the - * scan. If you upload multiple archives in a single request, the manifests - * from every archive are merged into one full scan. The response includes any - * files that were ignored. The maximum combined number of files extracted - * from your upload is 10000 and each extracted file can be no bigger than 268 - * MB. This endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: - * - * - Full-scans:create + * - repo-label:update */ - CreateOrgFullScanArchive: { + updateOrgRepoLabel: { parameters: { - query: { - /** - * The slug of the repository to associate the full-scan with. - */ - repo: string - /** - * The workspace of the repository to associate the full-scan with. - */ - workspace?: string - /** - * The branch name to associate the full-scan with. Branch names must - * follow Git branch name rules: be 1–255 characters long; cannot be - * exactly @; cannot begin or end with /, ., or .lock; cannot contain - * "//", "..", or "@{"; and cannot include control characters, spaces, - * or any of ~^:?*[. - */ - branch?: string - /** - * The commit message to associate the full-scan with. - */ - commit_message?: string - /** - * The commit hash to associate the full-scan with. - */ - commit_hash?: string - /** - * The pull request number to associate the full-scan with. - */ - pull_request?: number - /** - * The committers to associate with the full-scan. Set query more than - * once to set multiple. - */ - committers?: string - /** - * The integration type to associate the full-scan with. Defaults to - * "Api" if omitted. - */ - integration_type?: - | 'api' - | 'github' - | 'gitlab' - | 'bitbucket' - | 'azure' - | 'web' - /** - * The integration org slug to associate the full-scan with. If omitted, - * the Socket org name will be used. This is used to generate links and - * badges. - */ - integration_org_slug?: string - /** - * Set the default branch of the repository to the branch of this - * full-scan. A branch name is required with this option. - */ - make_default_branch?: boolean - /** - * Designate this full-scan as the latest scan of a given branch. - * Default branch head scans are included in org alerts. This is only - * supported on the default branch. A branch name is required with this - * option. - */ - set_as_pending_head?: boolean - /** - * Create a temporary full-scan that is not listed in the reports - * dashboard. Cannot be used when set_as_pending_head=true. - */ - tmp?: boolean - /** - * The type of scan to perform. Defaults to 'socket'. Must be 32 - * characters or less. Used for categorizing multiple SBOM heads per - * repository branch. - */ - scan_type?: string - } path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - requestBody?: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the label */ + label_id: string; + }; + }; + requestBody: { content: { - 'multipart/form-data': { - [key: string]: never - } - } - } + "application/json": { + /** + * @description The name of the label + * @default + */ + name: string; + }; + }; + }; responses: { - /** - * The details of the created full scan. - */ - 201: { + /** @description Updates an existing repository label for the specified organization. The authenticated user must be a member of the organization. Label names must be non-empty and less than 1000 characters. */ + 200: { content: { - 'application/json': { - /** - * @default - */ - id?: string - /** - * @default - */ - created_at?: string - /** - * @default - */ - updated_at?: string - /** - * @default - */ - organization_id?: string - /** - * @default - */ - organization_slug?: string - /** - * @default - */ - repository_id?: string - /** - * @default - */ - repository_slug?: string - /** - * @default - */ - branch?: string | null - /** - * @default - */ - commit_message?: string | null - /** - * @default - */ - commit_hash?: string | null - /** - * @default 0 - */ - pull_request?: number | null - committers?: string[] - /** - * @default - */ - html_url?: string | null - /** - * @default - */ - api_url?: string | null - /** - * @default - */ - workspace?: string - /** - * @default - */ - repo?: string + "application/json": { /** + * @description The ID of the label * @default */ - html_report_url?: string + id?: string; /** + * @description The name of the label * @default */ - integration_type?: string | null + name?: string; + /** @description The IDs of repositories this label is associated with */ + repository_ids?: string[]; /** - * @default - */ - integration_repo_url?: string | null - /** - * @default - */ - integration_branch_url?: string | null - /** - * @default - */ - integration_commit_url?: string | null - /** - * @default - */ - integration_pull_request_url?: string | null - /** - * @default + * @description Whether the label has a security policy + * @default false */ - scan_type?: string | null + has_security_policy?: boolean; /** - * The current processing status of the SBOM. - * - * @default pending - * - * @enum {string|null} + * @description Whether the label has a license policy + * @default false */ - scan_state?: 'pending' | 'precrawl' | 'resolve' | 'scan' | null - unmatchedFiles?: string[] - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + has_license_policy?: boolean; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + /** @description Conflict */ + 409: { + content: { + "application/json": { + error: { + /** @default */ + message: string; + /** @default null */ + details: Record | null; + }; + }; + }; + }; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Rescan full scan. - * - * Create a new full scan by rescanning an existing scan. A "shallow" rescan - * reapplies the latest policies to the previously cached dependency - * resolution results. A "deep" rescan reruns dependency resolution and - * applies the latest policies to the results. This endpoint consumes 1 unit - * of your quota. This endpoint requires the following org token scopes: - - * full-scans:create. + * Delete repository label (beta) + * @description Delete a repository label and all of its associations (repositories, security policy, license policy, etc.). + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo-label:delete */ - rescanOrgFullScan: { + deleteOrgRepoLabel: { parameters: { - query?: { - /** - * The rescan mode: "shallow" (default) re-applies policies to cached - * data, "deep" re-fetches the SBOM stream. - */ - mode?: 'shallow' | 'deep' - } path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the full scan to rescan. - */ - full_scan_id: string - } - } + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the label */ + label_id: string; + }; + }; responses: { - /** - * Rescan initiated successfully. - */ - 201: { + /** @description Success */ + 200: { content: { - 'application/json': { - /** - * @default The ID of the newly created full scan - */ - id: string - /** - * @default The status of the new scan - */ - status: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": { + /** @default ok */ + status: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Export CSV of alerts for full scan. - * - * Export a CSV file containing all alerts from a full scan. The CSV includes - * details about each alert and the affected packages. You can optionally - * filter using the request body "filters" array. Supported filter IDs - * include: - alert.action (error|warn|monitor|ignore) - alert.type - - * alert.category - alert.severity (low|medium|middle|high|critical or 0-3) - - * artifact.type (purl type, e.g. npm, pypi) - dependency.type - * (direct|transitive) - dependency.scope (dev|normal) - dependency.usage - * (used|unused) - manifest.file This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - full-scans:list. + * Get repository label setting (beta) + * @description Retrieve the setting (e.g. security/license policy) for a repository label. + * + * + * Note that repository label settings currently only support `issueRules`, + * `issueRulesPolicyDefault`, `licensePolicy`, and + * `recentlyPublishedThresholdMs`. A policy is considered "active" + * for a given repository label if the `issueRulesPolicyDefault` is + * set, and inactive when not set. `issueRules` can be used to further + * refine the alert triage strategy. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo-label:list */ - getOrgFullScanCsv: { + getOrgRepoLabelSetting: { parameters: { query: { - /** - * Control which alert priority fields to include in the response. Set - * to "true" to include all fields, "false" to exclude all fields, or - * specify individual fields like "components,formula" to include only - * those fields. - */ - include_alert_priority_details?: - | boolean - | Array<'component' | 'formula'> - /** - * Include license details in the response. - */ - include_license_details: boolean - } + /** @description Setting key to query for in the repository label. Valid values include issueRules, issueRulesPolicyDefault, licensePolicy, and recentlyPublishedThresholdMs */ + setting_key: string; + }; path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the full scan. - */ - full_scan_id: string - } - } - requestBody?: { - content: { - 'application/json': { - filters?: Array<{ - /** - * @default - */ - id: string - value: string[] - }> - } - } - } + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the label */ + label_id: string; + }; + }; responses: { - /** - * CSV export of alerts. - */ + /** @description Returns the setting for the specified repository label. The authenticated user must be a member of the organization. */ 200: { content: { - 'text/csv': unknown - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Generate PDF report for full scan. - * - * Generate a PDF report for all alerts in a full scan. This endpoint streams - * a PDF document containing all alerts found in the full scan, with optional - * filtering and grouping options. Supported request body filter IDs include: - * - alert.action (error|warn|monitor|ignore) - alert.type - alert.category - - * alert.severity (low|medium|middle|high|critical or 0-3) - artifact.type - * (purl type, e.g. npm, pypi) - dependency.type (direct|transitive) - - * dependency.scope (dev|normal) - dependency.usage (used|unused) - - * manifest.file This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - full-scans:list. - */ - getOrgFullScanPdf: { - parameters: { - query: { - /** - * Control which alert priority fields to include in the response. Set - * to "true" to include all fields, "false" to exclude all fields, or - * specify individual fields like "components,formula" to include only - * those fields. - */ - include_alert_priority_details?: - | boolean - | Array<'component' | 'formula'> - /** - * Include license details in the response. - */ - include_license_details: boolean - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the full scan. - */ - full_scan_id: string - } - } - requestBody?: { - content: { - 'application/json': { - filters?: Array<{ - /** - * @default - */ - id: string - value: string[] - }> - /** - * @default - */ - groupBy?: string - /** - * @default - */ - additionalInformation?: string - } - } - } - responses: { - /** - * PDF report of alerts. - */ - 200: { - content: { - 'application/pdf': unknown - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Export CycloneDX SBOM (Beta) - * - * Export a Socket SBOM as a CycloneDX SBOM - * Supported ecosystems: - * - crates - * - go - * - maven - * - npm - * - nuget - * - pypi - * - rubygems - * - spdx - * - cdx - * Unsupported ecosystems are filtered from the export. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - report:read. - */ - exportCDX: { - parameters: { - query?: { - /** - * The person(s) who created the BOM. Set this value if you're intending - * the modify the BOM and claim authorship. - */ - author?: string - /** - * Dependency track project group. - */ - project_group?: string - /** - * Dependency track project name. Default use the directory name. - */ - project_name?: string - /** - * Dependency track project version. - */ - project_version?: string - /** - * Dependency track project id. Either provide the id or the project - * name and version together. - */ - project_id?: string - /** - * Include vulnerability information in the SBOM. Also includes - * reachability/VEX if available. - */ - include_vulnerabilities?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The full scan OR sbom report ID. - */ - id: string - } - } - responses: { - /** - * CycloneDX SBOM. - */ - 200: { - content: { - 'application/json': components['schemas']['CDXManifestSchema'] - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Export OpenVEX Document (Beta) - * - * Export vulnerability exploitability data as an OpenVEX v0.2.0 document. - * OpenVEX (Vulnerability Exploitability eXchange) documents communicate the - * exploitability status of vulnerabilities in software products. This export - * includes: - * - * - **Patch data**: Vulnerabilities fixed by applied Socket patches are marked - * as "fixed" - * - **Reachability analysis**: Code reachability determines if vulnerable code - * is exploitable: - * - Unreachable code → "not_affected" with justification - * - Reachable code → "affected" - * - Unknown/pending → "under_investigation" Each statement in the document - * represents a single artifact-vulnerability pair for granular reachability - * information. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - * - Report:read - */ - exportOpenVEX: { - parameters: { - query?: { - /** - * The author of the VEX document. Should be an individual or - * organization. - */ - author?: string - /** - * The role of the document author (e.g., "VEX Generator", "Security - * Team"). - */ - role?: string - /** - * Custom IRI for the VEX document. If not provided, a default IRI will - * be generated. - */ - document_id?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The full scan OR sbom report ID. - */ - id: string - } - } - responses: { - /** - * OpenVEX v0.2.0 document. - */ - 200: { - content: { - 'application/json': components['schemas']['OpenVEXDocumentSchema'] - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Export SPDX SBOM (Beta) - * - * Export a Socket SBOM as a SPDX SBOM - * Supported ecosystems: - * - crates - * - go - * - maven - * - npm - * - nuget - * - pypi - * - rubygems - * - spdx - * - cdx - * Unsupported ecosystems are filtered from the export. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - report:read. - */ - exportSPDX: { - parameters: { - query?: { - /** - * The person(s) who created the BOM. Set this value if you're intending - * the modify the BOM and claim authorship. - */ - author?: string - /** - * Dependency track project group. - */ - project_group?: string - /** - * Dependency track project name. Default use the directory name. - */ - project_name?: string - /** - * Dependency track project version. - */ - project_version?: string - /** - * Dependency track project id. Either provide the id or the project - * name and version together. - */ - project_id?: string - /** - * Include vulnerability information in the SBOM. Also includes - * reachability/VEX if available. - */ - include_vulnerabilities?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The full scan OR sbom report ID. - */ - id: string - } - } - responses: { - /** - * SPDX SBOM. - */ - 200: { - content: { - 'application/json': components['schemas']['SPDXManifestSchema'] - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * List diff scans. - * - * Returns a paginated list of all diff scans in an organization. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - diff-scans:list. - */ - listOrgDiffScans: { - parameters: { - query?: { - /** - * Specify sort field. - */ - sort?: 'created_at' | 'updated_at' - /** - * Specify sort direction. - */ - direction?: 'asc' | 'desc' - /** - * Specify the maximum number of results to return per page. - */ - per_page?: number - /** - * Cursor for pagination. Use the next_cursor or prev_cursor from - * previous responses. - */ - cursor?: string - /** - * Filter by repository ID. - */ - repository_id?: string - /** - * Filter by before full scan ID. - */ - before_full_scan_id?: string - /** - * Filter by after full scan ID. - */ - after_full_scan_id?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * Lists diff scans for the specified organization. - */ - 200: { - content: { - 'application/json': { - results: Array<{ - /** - * @default - */ - id: string - /** - * @default - */ - organization_id: string - /** - * @default - */ - repository_id: string - /** - * @default - */ - created_at: string - /** - * @default - */ - updated_at: string - /** - * @default - */ - before_full_scan_id: string - /** - * @default - */ - after_full_scan_id: string - /** - * @default - */ - description: string | null - /** - * @default - */ - external_href: string | null - /** - * @default false - */ - merge: boolean - /** - * @default - */ - html_url: string | null - /** - * @default - */ - api_url: string | null - }> - /** - * @default - */ - next_page_href: string | null - /** - * @default - */ - next_cursor: string | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get diff scan. - * - * Get the difference between two full scans from an existing diff scan - * resource. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - diff-scans:list. - */ - getDiffScanById: { - parameters: { - query?: { - /** - * Omit license details in the response. This can reduce the size of the - * response significantly, but will not include license information for - * the artifacts. - */ - omit_license_details?: boolean - /** - * Omit unchanged artifacts from the response. When set to true, the - * unchanged field will be set to null. - */ - omit_unchanged?: boolean - /** - * Return cached immutable scan results. When enabled and results are - * cached, returns the pre-computed scan. When results are not yet - * cached, returns 202 Accepted and enqueues a background job. Note: - * When cached=true, the omit_license_details parameter is ignored as - * cached results always includes license details. - */ - cached?: boolean - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the diff scan. - */ - diff_scan_id: string - } - } - responses: { - /** - * The difference between the two Full Scans in the diff scan. - */ - 200: { - content: { - 'application/json': { - diff_scan: { - /** - * The ID of the diff scan. - * - * @default - */ - id: string - /** - * The ID of the organization that owns the diff scan. - * - * @default - */ - organization_id: string - /** - * The ID of the repository the diff scan was run against. - * - * @default - */ - repository_id: string - /** - * ISO 8601 timestamp of when the diff scan was created. - * - * @default - */ - created_at: string - /** - * ISO 8601 timestamp of when the diff scan was last updated. - * - * @default - */ - updated_at: string - before_full_scan: { + "application/json": { + issueRules?: ({ + gptSecurity?: { /** - * @default + * @description The action to take for gptSecurity issues. + * @enum {string} */ - id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptAnomaly?: { /** - * @default + * @description The action to take for gptAnomaly issues. + * @enum {string} */ - created_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptMalware?: { /** - * @default + * @description The action to take for gptMalware issues. + * @enum {string} */ - updated_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionPermission?: { /** - * @default + * @description The action to take for browserExtensionPermission issues. + * @enum {string} */ - organization_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionHostPermission?: { /** - * @default + * @description The action to take for browserExtensionHostPermission issues. + * @enum {string} */ - organization_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionWildcardHostPermission?: { /** - * @default + * @description The action to take for browserExtensionWildcardHostPermission issues. + * @enum {string} */ - repository_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionContentScript?: { /** - * @default + * @description The action to take for browserExtensionContentScript issues. + * @enum {string} */ - repository_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + filesystemAccess?: { /** - * @default + * @description The action to take for filesystemAccess issues. + * @enum {string} */ - branch: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + networkAccess?: { /** - * @default + * @description The action to take for networkAccess issues. + * @enum {string} */ - commit_message: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shellAccess?: { /** - * @default + * @description The action to take for shellAccess issues. + * @enum {string} */ - commit_hash: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + debugAccess?: { /** - * @default 0 + * @description The action to take for debugAccess issues. + * @enum {string} */ - pull_request: number | null - committers: string[] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromePermission?: { /** - * @default + * @description The action to take for chromePermission issues. + * @enum {string} */ - html_url: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeHostPermission?: { /** - * @default + * @description The action to take for chromeHostPermission issues. + * @enum {string} */ - api_url: string | null - } - after_full_scan: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeWildcardHostPermission?: { /** - * @default + * @description The action to take for chromeWildcardHostPermission issues. + * @enum {string} */ - id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeContentScript?: { /** - * @default + * @description The action to take for chromeContentScript issues. + * @enum {string} */ - created_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + criticalCVE?: { /** - * @default + * @description The action to take for criticalCVE issues. + * @enum {string} */ - updated_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + cve?: { /** - * @default + * @description The action to take for cve issues. + * @enum {string} */ - organization_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mediumCVE?: { /** - * @default + * @description The action to take for mediumCVE issues. + * @enum {string} */ - organization_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mildCVE?: { /** - * @default + * @description The action to take for mildCVE issues. + * @enum {string} */ - repository_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + emptyPackage?: { /** - * @default + * @description The action to take for emptyPackage issues. + * @enum {string} */ - repository_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + trivialPackage?: { /** - * @default + * @description The action to take for trivialPackage issues. + * @enum {string} */ - branch: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noREADME?: { /** - * @default + * @description The action to take for noREADME issues. + * @enum {string} */ - commit_message: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingLockfile?: { /** - * @default + * @description The action to take for missingLockfile issues. + * @enum {string} */ - commit_hash: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + oversizedManifest?: { /** - * @default 0 + * @description The action to take for oversizedManifest issues. + * @enum {string} */ - pull_request: number | null - committers: string[] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedYarnDependency?: { /** - * @default + * @description The action to take for unresolvedYarnDependency issues. + * @enum {string} */ - html_url: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedPomReference?: { /** - * @default + * @description The action to take for unresolvedPomReference issues. + * @enum {string} */ - api_url: string | null - } - /** - * Human readable description of the diff scan, e.g. the pull - * request title. - * - * @default - */ - description: string | null - /** - * Link to the external resource the diff scan was created for, - * e.g. the pull request URL. - * - * @default - */ - external_href: string | null - /** - * True when the diff scan was created for a merge event rather - * than an open pull request. - * - * @default false - */ - merge: boolean - /** - * Link to the diff scan report in the Socket dashboard. - * - * @default - */ - html_url: string | null - /** - * Link to the diff scan resource in the Socket API. - * - * @default - */ - api_url: string | null - /** - * True when either side of the diff was truncated at the plan's - * dependency limit. A truncated diff is imbalanced and can report - * changes for artifacts the change never touched, so treat the - * artifact lists as unreliable when this is set. - * - * @default false - */ - incomplete: boolean - /** - * Artifacts in the diff grouped by how they changed between the - * before and after scans. - */ - artifacts: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shrinkwrap?: { /** - * Artifacts present in the after scan but not the before scan. + * @description The action to take for shrinkwrap issues. + * @enum {string} */ - added: Array + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + tooManyFiles?: { /** - * Artifacts present in the before scan but not the after scan. + * @description The action to take for tooManyFiles issues. + * @enum {string} */ - removed: Array + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + generic?: { /** - * Artifacts present in both scans with no changes. Null when - * omitted via the omit_unchanged query parameter. + * @description The action to take for generic issues. + * @enum {string} */ - unchanged: Array< - components['schemas']['SocketDiffArtifact'] - > | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToSink?: { /** - * Artifacts replaced between the scans, e.g. the same package - * supplied by a different source. + * @description The action to take for ghaArgToSink issues. + * @enum {string} */ - replaced: Array + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaEnvToSink?: { /** - * Artifacts whose version changed between the scans. + * @description The action to take for ghaEnvToSink issues. + * @enum {string} */ - updated: Array - } - } - } - } - } - /** - * Scan is being processed. Poll again later to retrieve results. - */ - 202: { - content: { - 'application/json': { - /** - * @default processing - */ - status: string - /** - * @default - */ - id: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Delete diff scan. - * - * Delete an existing diff scan. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - diff-scans:delete. - */ - deleteOrgDiffScan: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the diff scan. - */ - diff_scan_id: string - } - } - responses: { - /** - * Success. - */ - 200: { - content: { - 'application/json': { - /** - * @default ok - */ - status: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * SCM Comment for Diff Scan. - * - * Get the dependency overview and dependency alert comments in GitHub - * flavored markdown for an existing diff scan. This endpoint consumes 1 unit - * of your quota. This endpoint requires the following org token scopes: - - * diff-scans:list. - */ - GetDiffScanGfm: { - parameters: { - query?: { - /** - * The ID of the GitHub installation. This will be used to get the - * GitHub installation settings. If not provided, the default GitHub - * installation settings will be used. - */ - github_installation_id?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the diff scan. - */ - diff_scan_id: string - } - } - responses: { - /** - * Metadata about the full scans and the dependency overview and - * dependency alert comment. Can be used in a pull request context. - */ - 200: { - content: { - 'application/json': { - diff_scan: { - /** - * The ID of the diff scan. - * - * @default - */ - id: string - /** - * The ID of the organization that owns the diff scan. - * - * @default - */ - organization_id: string - /** - * The ID of the repository the diff scan was run against. - * - * @default - */ - repository_id: string - /** - * ISO 8601 timestamp of when the diff scan was created. - * - * @default - */ - created_at: string - /** - * ISO 8601 timestamp of when the diff scan was last updated. - * - * @default - */ - updated_at: string - before_full_scan: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToSink?: { /** - * @default + * @description The action to take for ghaContextToSink issues. + * @enum {string} */ - id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToOutput?: { /** - * @default + * @description The action to take for ghaArgToOutput issues. + * @enum {string} */ - created_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToEnv?: { /** - * @default + * @description The action to take for ghaArgToEnv issues. + * @enum {string} */ - updated_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToOutput?: { /** - * @default + * @description The action to take for ghaContextToOutput issues. + * @enum {string} */ - organization_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToEnv?: { /** - * @default + * @description The action to take for ghaContextToEnv issues. + * @enum {string} */ - organization_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + recentlyPublished?: { /** - * @default + * @description The action to take for recentlyPublished issues. + * @enum {string} */ - repository_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseSpdxDisj?: { /** - * @default + * @description The action to take for licenseSpdxDisj issues. + * @enum {string} */ - repository_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unsafeCopyright?: { /** - * @default + * @description The action to take for unsafeCopyright issues. + * @enum {string} */ - branch: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseChange?: { /** - * @default + * @description The action to take for licenseChange issues. + * @enum {string} */ - commit_message: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonOSILicense?: { /** - * @default + * @description The action to take for nonOSILicense issues. + * @enum {string} */ - commit_hash: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecatedLicense?: { /** - * @default 0 + * @description The action to take for deprecatedLicense issues. + * @enum {string} */ - pull_request: number | null - committers: string[] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingLicense?: { /** - * @default + * @description The action to take for missingLicense issues. + * @enum {string} */ - html_url: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonSPDXLicense?: { /** - * @default + * @description The action to take for nonSPDXLicense issues. + * @enum {string} */ - api_url: string | null - } - after_full_scan: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unclearLicense?: { /** - * @default + * @description The action to take for unclearLicense issues. + * @enum {string} */ - id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mixedLicense?: { /** - * @default + * @description The action to take for mixedLicense issues. + * @enum {string} */ - created_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + notice?: { /** - * @default + * @description The action to take for notice issues. + * @enum {string} */ - updated_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + modifiedLicense?: { /** - * @default + * @description The action to take for modifiedLicense issues. + * @enum {string} */ - organization_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + modifiedException?: { /** - * @default + * @description The action to take for modifiedException issues. + * @enum {string} */ - organization_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseException?: { /** - * @default + * @description The action to take for licenseException issues. + * @enum {string} */ - repository_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecatedException?: { /** - * @default + * @description The action to take for deprecatedException issues. + * @enum {string} */ - repository_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + miscLicenseIssues?: { /** - * @default + * @description The action to take for miscLicenseIssues issues. + * @enum {string} */ - branch: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unidentifiedLicense?: { /** - * @default + * @description The action to take for unidentifiedLicense issues. + * @enum {string} */ - commit_message: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noLicenseFound?: { /** - * @default + * @description The action to take for noLicenseFound issues. + * @enum {string} */ - commit_hash: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + explicitlyUnlicensedItem?: { /** - * @default 0 + * @description The action to take for explicitlyUnlicensedItem issues. + * @enum {string} */ - pull_request: number | null - committers: string[] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + copyleftLicense?: { /** - * @default + * @description The action to take for copyleftLicense issues. + * @enum {string} */ - html_url: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonpermissiveLicense?: { /** - * @default + * @description The action to take for nonpermissiveLicense issues. + * @enum {string} */ - api_url: string | null - } - /** - * Human readable description of the diff scan, e.g. the pull - * request title. - * - * @default - */ - description: string | null - /** - * Link to the external resource the diff scan was created for, - * e.g. the pull request URL. - * - * @default - */ - external_href: string | null - /** - * True when the diff scan was created for a merge event rather - * than an open pull request. - * - * @default false - */ - merge: boolean - /** - * Link to the diff scan report in the Socket dashboard. - * - * @default - */ - html_url: string | null - /** - * Link to the diff scan resource in the Socket API. - * - * @default - */ - api_url: string | null - /** - * True when either side of the diff was truncated at the plan's - * dependency limit. When set, the gfm comments contain a - * limit-exceeded notice instead of a report rendered from the - * imbalanced diff. - * - * @default false - */ - incomplete: boolean - /** - * Pull request comments rendered in GitHub flavored markdown. - */ - gfm: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ambiguousClassifier?: { /** - * Dependency overview comment in GitHub flavored markdown. - * Empty when there is nothing to show; consumers should not - * post a comment in that case. - * - * @default + * @description The action to take for ambiguousClassifier issues. + * @enum {string} */ - overview: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + invalidPackageJSON?: { /** - * Dependency alert comment in GitHub flavored markdown. - * Contains a dependency-limit-exceeded notice instead of a - * report when incomplete is true. - * - * @default + * @description The action to take for invalidPackageJSON issues. + * @enum {string} */ - alerts: string - } - } - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Create diff scan from repository HEAD full-scan. - * - * Create a diff scan between the repository's current HEAD full scan and a - * new full scan from uploaded manifest files. Returns metadata about the diff - * scan. Once the diff scan is created, fetch the diff scan from the - * [api_url](/reference/getDiffScanById) URL to get the contents of the diff. - * The maximum number of files you can upload at a time is 10000 and each file - * can be no bigger than 268 MB. This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - * - Repo:list - * - Diff-scans:create - * - Full-scans:create - */ - createOrgRepoDiff: { - parameters: { - query?: { - /** - * A description of the diff scan. This will be used in the diff report - * and can be used to provide context for the changes made. - */ - description?: string - /** - * An external URL to associate with the diff scan. This can be a link - * to a pull request, issue, or any other relevant resource. - */ - external_href?: string - /** - * The branch name to associate the new full-scan with. Branch names - * must follow Git branch name rules: be 1–255 characters long; cannot - * be exactly @; cannot begin or end with /, ., or .lock; cannot contain - * "//", "..", or "@{"; and cannot include control characters, spaces, - * or any of ~^:?*[. - */ - branch?: string - /** - * The commit message to associate the new full-scan with. - */ - commit_message?: string - /** - * The commit hash to associate the full-scan with. - */ - commit_hash?: string - /** - * The pull request number to associate the new full-scan with. - */ - pull_request?: number - /** - * The committers to associate the new full-scan with. Set query more - * than once to set multiple committers. - */ - committers?: string - /** - * The integration type to associate the new full-scan with. Defaults to - * "api" if omitted. - */ - integration_type?: - | 'api' - | 'github' - | 'gitlab' - | 'bitbucket' - | 'azure' - | 'web' - /** - * The integration org slug to associate the new full-scan with. If - * omitted, the Socket org name will be used. This is used to generate - * links and badges. - */ - integration_org_slug?: string - /** - * Set to true when running a diff between a merged commit and its - * parent commit in the same branch. Set to false when running diffs in - * an open PR between unmerged commits. - */ - merge?: boolean - /** - * The workspace of the repository. - */ - workspace?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The slug of the repository. - */ - repo_slug: string - } - } - requestBody?: { - content: { - 'multipart/form-data': { - [key: string]: never - } - } - } - responses: { - /** - * The details of the new full scan and diff scan between the two scans. - */ - 201: { - content: { - 'application/json': { - diff_scan: { - /** - * The ID of the diff scan. - * - * @default - */ - id: string - /** - * The ID of the organization that owns the diff scan. - * - * @default - */ - organization_id: string - /** - * The ID of the repository the diff scan was run against. - * - * @default - */ - repository_id: string - /** - * ISO 8601 timestamp of when the diff scan was created. - * - * @default - */ - created_at: string - /** - * ISO 8601 timestamp of when the diff scan was last updated. - * - * @default - */ - updated_at: string - before_full_scan: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + httpDependency?: { /** - * @default + * @description The action to take for httpDependency issues. + * @enum {string} */ - id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gitDependency?: { /** - * @default + * @description The action to take for gitDependency issues. + * @enum {string} */ - created_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gitHubDependency?: { /** - * @default + * @description The action to take for gitHubDependency issues. + * @enum {string} */ - updated_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + fileDependency?: { /** - * @default + * @description The action to take for fileDependency issues. + * @enum {string} */ - organization_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noTests?: { /** - * @default + * @description The action to take for noTests issues. + * @enum {string} */ - organization_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noRepository?: { /** - * @default + * @description The action to take for noRepository issues. + * @enum {string} */ - repository_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badSemver?: { /** - * @default + * @description The action to take for badSemver issues. + * @enum {string} */ - repository_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badSemverDependency?: { /** - * @default + * @description The action to take for badSemverDependency issues. + * @enum {string} */ - branch: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noV1?: { /** - * @default + * @description The action to take for noV1 issues. + * @enum {string} */ - commit_message: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noWebsite?: { /** - * @default + * @description The action to take for noWebsite issues. + * @enum {string} */ - commit_hash: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noBugTracker?: { /** - * @default 0 + * @description The action to take for noBugTracker issues. + * @enum {string} */ - pull_request: number | null - committers: string[] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noAuthorData?: { /** - * @default + * @description The action to take for noAuthorData issues. + * @enum {string} */ - html_url: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + typeModuleCompatibility?: { /** - * @default + * @description The action to take for typeModuleCompatibility issues. + * @enum {string} */ - api_url: string | null - } - after_full_scan: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + floatingDependency?: { /** - * @default + * @description The action to take for floatingDependency issues. + * @enum {string} */ - id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + manifestConfusion?: { /** - * @default + * @description The action to take for manifestConfusion issues. + * @enum {string} */ - created_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + malware?: { /** - * @default + * @description The action to take for malware issues. + * @enum {string} */ - updated_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + telemetry?: { /** - * @default + * @description The action to take for telemetry issues. + * @enum {string} */ - organization_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + troll?: { /** - * @default + * @description The action to take for troll issues. + * @enum {string} */ - organization_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + pendingScan?: { /** - * @default + * @description The action to take for pendingScan issues. + * @enum {string} */ - repository_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecated?: { /** - * @default + * @description The action to take for deprecated issues. + * @enum {string} */ - repository_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chronoAnomaly?: { /** - * @default + * @description The action to take for chronoAnomaly issues. + * @enum {string} */ - branch: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + compromisedSSHKey?: { /** - * @default + * @description The action to take for compromisedSSHKey issues. + * @enum {string} */ - commit_message: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + semverAnomaly?: { /** - * @default + * @description The action to take for semverAnomaly issues. + * @enum {string} */ - commit_hash: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + newAuthor?: { /** - * @default 0 + * @description The action to take for newAuthor issues. + * @enum {string} */ - pull_request: number | null - committers: string[] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unstableOwnership?: { /** - * @default + * @description The action to take for unstableOwnership issues. + * @enum {string} */ - html_url: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingAuthor?: { /** - * @default + * @description The action to take for missingAuthor issues. + * @enum {string} */ - api_url: string | null - } - /** - * Human readable description of the diff scan, e.g. the pull - * request title. - * - * @default - */ - description: string | null - /** - * Link to the external resource the diff scan was created for, - * e.g. the pull request URL. - * - * @default - */ - external_href: string | null - /** - * True when the diff scan was created for a merge event rather - * than an open pull request. - * - * @default false - */ - merge: boolean - /** - * Link to the diff scan report in the Socket dashboard. - * - * @default - */ - html_url: string | null - /** - * Link to the diff scan resource in the Socket API. - * - * @default - */ - api_url: string | null - } - unmatchedAfterFiles: string[] - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 409: components['responses']['SocketConflict'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Create diff scan from full scan IDs. - * - * Create a diff scan from two existing full scan IDs. The full scans must be - * in the same repository. Returns metadata about the diff scan. Once the diff - * scan is created, fetch the diff scan from the - * [api_url](/reference/getDiffScanById) URL to get the contents of the diff. - * This endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: - * - * - Diff-scans:create - * - Full-scans:list - */ - createOrgDiffScanFromIds: { - parameters: { - query: { - /** - * The ID of the before/base full scan (older) - */ - before: string - /** - * The ID of the after/head full scan (newer) - */ - after: string - /** - * A description of the diff scan. This will be used in the diff report - * and can be used to provide context for the changes made. - */ - description?: string - /** - * An external URL to associate with the diff scan. This can be a link - * to a pull request, issue, or any other relevant resource. - */ - external_href?: string - /** - * Set to true when running a diff between a merged commit and its - * parent commit in the same branch. Set to false when running diffs in - * an open PR between unmerged commits. - */ - merge?: boolean - /** - * Set to "redirect" to receive a 302 redirect to the existing diff scan - * instead of a 409 error when a duplicate is detected. - */ - on_duplicate?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * The details of the created diff scan. - */ - 201: { - content: { - 'application/json': { - diff_scan: { - /** - * The ID of the diff scan. - * - * @default - */ - id: string - /** - * The ID of the organization that owns the diff scan. - * - * @default - */ - organization_id: string - /** - * The ID of the repository the diff scan was run against. - * - * @default - */ - repository_id: string - /** - * ISO 8601 timestamp of when the diff scan was created. - * - * @default - */ - created_at: string - /** - * ISO 8601 timestamp of when the diff scan was last updated. - * - * @default - */ - updated_at: string - before_full_scan: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unmaintained?: { /** - * @default + * @description The action to take for unmaintained issues. + * @enum {string} */ - id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unpublished?: { /** - * @default + * @description The action to take for unpublished issues. + * @enum {string} */ - created_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + majorRefactor?: { /** - * @default + * @description The action to take for majorRefactor issues. + * @enum {string} */ - updated_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingTarball?: { /** - * @default + * @description The action to take for missingTarball issues. + * @enum {string} */ - organization_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + suspiciousStarActivity?: { /** - * @default + * @description The action to take for suspiciousStarActivity issues. + * @enum {string} */ - organization_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + notFound?: { /** - * @default + * @description The action to take for notFound issues. + * @enum {string} */ - repository_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unpopularPackage?: { /** - * @default + * @description The action to take for unpopularPackage issues. + * @enum {string} */ - repository_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + policy?: { /** - * @default + * @description The action to take for policy issues. + * @enum {string} */ - branch: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillAutonomyAbuse?: { /** - * @default + * @description The action to take for skillAutonomyAbuse issues. + * @enum {string} */ - commit_message: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillCommandInjection?: { /** - * @default + * @description The action to take for skillCommandInjection issues. + * @enum {string} */ - commit_hash: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillDataExfiltration?: { /** - * @default 0 + * @description The action to take for skillDataExfiltration issues. + * @enum {string} */ - pull_request: number | null - committers: string[] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillDiscoveryAbuse?: { /** - * @default + * @description The action to take for skillDiscoveryAbuse issues. + * @enum {string} */ - html_url: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillHardcodedSecrets?: { /** - * @default + * @description The action to take for skillHardcodedSecrets issues. + * @enum {string} */ - api_url: string | null - } - after_full_scan: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillObfuscation?: { /** - * @default + * @description The action to take for skillObfuscation issues. + * @enum {string} */ - id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillPreExecution?: { /** - * @default + * @description The action to take for skillPreExecution issues. + * @enum {string} */ - created_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillPromptInjection?: { /** - * @default + * @description The action to take for skillPromptInjection issues. + * @enum {string} */ - updated_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillResourceAbuse?: { /** - * @default + * @description The action to take for skillResourceAbuse issues. + * @enum {string} */ - organization_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillSupplyChain?: { /** - * @default + * @description The action to take for skillSupplyChain issues. + * @enum {string} */ - organization_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillToolAbuse?: { /** - * @default + * @description The action to take for skillToolAbuse issues. + * @enum {string} */ - repository_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillToolChaining?: { /** - * @default + * @description The action to take for skillToolChaining issues. + * @enum {string} */ - repository_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillTransitiveTrust?: { /** - * @default + * @description The action to take for skillTransitiveTrust issues. + * @enum {string} */ - branch: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + socketUpgradeAvailable?: { /** - * @default + * @description The action to take for socketUpgradeAvailable issues. + * @enum {string} */ - commit_message: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + longStrings?: { /** - * @default + * @description The action to take for longStrings issues. + * @enum {string} */ - commit_hash: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + highEntropyStrings?: { /** - * @default 0 + * @description The action to take for highEntropyStrings issues. + * @enum {string} */ - pull_request: number | null - committers: string[] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + urlStrings?: { /** - * @default + * @description The action to take for urlStrings issues. + * @enum {string} */ - html_url: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + usesEval?: { /** - * @default + * @description The action to take for usesEval issues. + * @enum {string} */ - api_url: string | null - } - /** - * Human readable description of the diff scan, e.g. the pull - * request title. - * - * @default - */ - description: string | null - /** - * Link to the external resource the diff scan was created for, - * e.g. the pull request URL. - * - * @default - */ - external_href: string | null - /** - * True when the diff scan was created for a merge event rather - * than an open pull request. - * - * @default false - */ - merge: boolean - /** - * Link to the diff scan report in the Socket dashboard. - * - * @default - */ - html_url: string | null - /** - * Link to the diff scan resource in the Socket API. - * - * @default - */ - api_url: string | null - } - } - } - } - /** - * Redirects to the existing diff scan when on_duplicate=redirect is set - * and a duplicate is detected. - */ - 302: { - content: { - 'application/json': { - diff_scan: { - /** - * The ID of the diff scan. - * - * @default - */ - id: string - /** - * The ID of the organization that owns the diff scan. - * - * @default - */ - organization_id: string - /** - * The ID of the repository the diff scan was run against. - * - * @default - */ - repository_id: string - /** - * ISO 8601 timestamp of when the diff scan was created. - * - * @default - */ - created_at: string - /** - * ISO 8601 timestamp of when the diff scan was last updated. - * - * @default - */ - updated_at: string - before_full_scan: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + dynamicRequire?: { /** - * @default + * @description The action to take for dynamicRequire issues. + * @enum {string} */ - id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + envVars?: { /** - * @default + * @description The action to take for envVars issues. + * @enum {string} */ - created_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingDependency?: { /** - * @default + * @description The action to take for missingDependency issues. + * @enum {string} */ - updated_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unusedDependency?: { /** - * @default + * @description The action to take for unusedDependency issues. + * @enum {string} */ - organization_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + peerDependency?: { /** - * @default + * @description The action to take for peerDependency issues. + * @enum {string} */ - organization_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + uncaughtOptionalDependency?: { /** - * @default + * @description The action to take for uncaughtOptionalDependency issues. + * @enum {string} */ - repository_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedRequire?: { /** - * @default + * @description The action to take for unresolvedRequire issues. + * @enum {string} */ - repository_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + extraneousDependency?: { /** - * @default + * @description The action to take for extraneousDependency issues. + * @enum {string} */ - branch: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + obfuscatedRequire?: { /** - * @default + * @description The action to take for obfuscatedRequire issues. + * @enum {string} */ - commit_message: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + obfuscatedFile?: { /** - * @default + * @description The action to take for obfuscatedFile issues. + * @enum {string} */ - commit_hash: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + minifiedFile?: { /** - * @default 0 + * @description The action to take for minifiedFile issues. + * @enum {string} */ - pull_request: number | null - committers: string[] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + installScripts?: { /** - * @default + * @description The action to take for installScripts issues. + * @enum {string} */ - html_url: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + hasNativeCode?: { /** - * @default + * @description The action to take for hasNativeCode issues. + * @enum {string} */ - api_url: string | null - } - after_full_scan: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + binScriptConfusion?: { /** - * @default + * @description The action to take for binScriptConfusion issues. + * @enum {string} */ - id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shellScriptOverride?: { /** - * @default + * @description The action to take for shellScriptOverride issues. + * @enum {string} */ - created_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + didYouMean?: { /** - * @default + * @description The action to take for didYouMean issues. + * @enum {string} */ - updated_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptDidYouMean?: { /** - * @default + * @description The action to take for gptDidYouMean issues. + * @enum {string} */ - organization_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + bidi?: { /** - * @default + * @description The action to take for bidi issues. + * @enum {string} */ - organization_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + zeroWidth?: { /** - * @default + * @description The action to take for zeroWidth issues. + * @enum {string} */ - repository_id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badEncoding?: { /** - * @default + * @description The action to take for badEncoding issues. + * @enum {string} */ - repository_slug: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + homoglyphs?: { /** - * @default + * @description The action to take for homoglyphs issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + invisibleChars?: { + /** + * @description The action to take for invisibleChars issues. + * @enum {string} */ - branch: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + suspiciousString?: { /** - * @default + * @description The action to take for suspiciousString issues. + * @enum {string} */ - commit_message: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + potentialVulnerability?: { /** - * @default + * @description The action to take for potentialVulnerability issues. + * @enum {string} */ - commit_hash: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxProposedApiUsage?: { /** - * @default 0 + * @description The action to take for vsxProposedApiUsage issues. + * @enum {string} */ - pull_request: number | null - committers: string[] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxActivationWildcard?: { /** - * @default + * @description The action to take for vsxActivationWildcard issues. + * @enum {string} */ - html_url: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxWorkspaceContainsActivation?: { /** - * @default + * @description The action to take for vsxWorkspaceContainsActivation issues. + * @enum {string} */ - api_url: string | null - } - /** - * Human readable description of the diff scan, e.g. the pull - * request title. - * - * @default - */ - description: string | null - /** - * Link to the external resource the diff scan was created for, - * e.g. the pull request URL. - * - * @default - */ - external_href: string | null - /** - * True when the diff scan was created for a merge event rather - * than an open pull request. - * - * @default false - */ - merge: boolean - /** - * Link to the diff scan report in the Socket dashboard. - * - * @default - */ - html_url: string | null - /** - * Link to the diff scan resource in the Socket API. - * - * @default - */ - api_url: string | null - } - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 409: components['responses']['SocketConflict'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxUntrustedWorkspaceSupported?: { + /** + * @description The action to take for vsxUntrustedWorkspaceSupported issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxVirtualWorkspaceSupported?: { + /** + * @description The action to take for vsxVirtualWorkspaceSupported issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxWebviewContribution?: { + /** + * @description The action to take for vsxWebviewContribution issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxDebuggerContribution?: { + /** + * @description The action to take for vsxDebuggerContribution issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxExtensionDependency?: { + /** + * @description The action to take for vsxExtensionDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxExtensionPack?: { + /** + * @description The action to take for vsxExtensionPack issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + }) | null; + /** + * @description The default security policy for the repository label + * @default medium + * @enum {string|null} + */ + issueRulesPolicyDefault?: "default" | "low" | "medium" | "high" | null; + /** @default null */ + licensePolicy?: Record | null; + /** + * @description The recently published package alert threshold for the repository label, in milliseconds + * @default 0 + */ + recentlyPublishedThresholdMs?: number | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * List Org Alert Triage. + * Update repository label setting (beta) + * @description Update the setting (e.g. security/license policy) for a repository label. + * + * + * Note that repository label settings currently only support `issueRules`, + * `issueRulesPolicyDefault`, `licensePolicy`, and + * `recentlyPublishedThresholdMs`. A policy is considered "active" + * for a given repository label if the `issueRulesPolicyDefault` is + * set, and inactive when not set. `issueRules` can be used to further + * refine the alert triage strategy. * - * List triage actions for an organization. Results are paginated and can be - * sorted by created_at or updated_at. This endpoint consumes 1 unit of your - * quota. This endpoint requires the following org token scopes: + * This endpoint consumes 1 unit of your quota. * - * - Triage:alerts-list + * This endpoint requires the following org token scopes: + * - repo-label:update */ - getOrgTriage: { + updateOrgRepoLabelSetting: { parameters: { - query?: { - /** - * Field to sort by. One of: created_at, updated_at. - */ - sort?: string - /** - * Sort direction. One of: asc, desc. - */ - direction?: string - /** - * Number of results per page (1–100, default 30). - */ - per_page?: number - /** - * Page number (1-based). - */ - page?: number - } path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * Lists triage actions for the specified organization. - */ - 200: { - content: { - 'application/json': { - results: Array<{ + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the label */ + label_id: string; + }; + }; + requestBody?: { + content: { + "application/json": { + issueRules?: { + gptSecurity?: { /** - * The uuid of the triage action. - * - * @default + * @description The action to take for gptSecurity issues. + * @enum {string} */ - uuid?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptAnomaly?: { /** - * The package type associated with the triage state. - * - * @default + * @description The action to take for gptAnomaly issues. + * @enum {string} */ - package_type?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptMalware?: { /** - * The package namespace associated with the triage state. - * - * @default + * @description The action to take for gptMalware issues. + * @enum {string} */ - package_namespace?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionPermission?: { /** - * The package name associated with the triage state. - * - * @default + * @description The action to take for browserExtensionPermission issues. + * @enum {string} */ - package_name?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionHostPermission?: { /** - * The package version associated with the triage state, it can - * contain a * suffix for wildcard matching. - * - * @default + * @description The action to take for browserExtensionHostPermission issues. + * @enum {string} */ - package_version?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionWildcardHostPermission?: { /** - * The alert_key associated with the triage state. - * - * @default + * @description The action to take for browserExtensionWildcardHostPermission issues. + * @enum {string} */ - alert_key?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionContentScript?: { /** - * The alert type (e.g., criticalCVE, highCVE) associated with - * the triage state. - * - * @default + * @description The action to take for browserExtensionContentScript issues. + * @enum {string} */ - alert_type?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + filesystemAccess?: { /** - * Whether a fix must be available, unavailable, or * for any. - * - * @default - * - * @enum {string|null} + * @description The action to take for filesystemAccess issues. + * @enum {string} */ - fix_available?: 'available' | 'unavailable' | '*' | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + networkAccess?: { /** - * Whether a patch must be available, unavailable, or * for any. - * - * @default - * - * @enum {string|null} + * @description The action to take for networkAccess issues. + * @enum {string} */ - patch_available?: 'available' | 'unavailable' | '*' | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shellAccess?: { /** - * CVSS score comparison (e.g., >=7.5, >5.0, ==8.0) - * - * @default + * @description The action to take for shellAccess issues. + * @enum {string} */ - cvss_score_cmp?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + debugAccess?: { /** - * The creation date of the triage action. - * - * @default + * @description The action to take for debugAccess issues. + * @enum {string} */ - created_at?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromePermission?: { /** - * The last update date of the triage action. - * - * @default + * @description The action to take for chromePermission issues. + * @enum {string} */ - updated_at?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeHostPermission?: { /** - * The note associated with the triage action. - * - * @default + * @description The action to take for chromeHostPermission issues. + * @enum {string} */ - note?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeWildcardHostPermission?: { /** - * The organization id associated with the triage action. - * - * @default + * @description The action to take for chromeWildcardHostPermission issues. + * @enum {string} */ - organization_id?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeContentScript?: { /** - * The triage state of the alert. - * - * @default inherit - * + * @description The action to take for chromeContentScript issues. * @enum {string} */ - state?: 'block' | 'ignore' | 'inherit' | 'monitor' | 'warn' + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + criticalCVE?: { /** - * CVE or GHSA ID associated with the triage state. - * - * @default + * @description The action to take for criticalCVE issues. + * @enum {string} */ - cve_or_ghsa_id?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + cve?: { /** - * The reachability of the alert, can be reachable, unreachable, - * other, or * for any. - * - * @default - * - * @enum {string|null} + * @description The action to take for cve issues. + * @enum {string} */ - reachability?: 'reachable' | 'unreachable' | 'other' | '*' | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mediumCVE?: { /** - * Whether the alert has a CISA KEV (Known Exploited - * Vulnerability), can be exist, none, or * for any. - * - * @default - * - * @enum {string|null} + * @description The action to take for mediumCVE issues. + * @enum {string} */ - kevs?: 'exist' | 'none' | '*' | null - }> - /** - * @default 0 - */ - nextPage: number | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Create/Update Org Alert Triage. - * - * Create or update triage actions on organization alerts. Accepts a batch of - * triage entries. Omit `uuid` to create a new entry; provide an existing - * `uuid` to update it. Use `?force=true` for broad triages that lack a - * specific `alertKey` or granular package information. This endpoint consumes - * 1 unit of your quota. This endpoint requires the following org token - * scopes: - triage:alerts-update. - */ - updateOrgAlertTriage: { - parameters: { - query?: { - /** - * Set to true to force broad triage updates, these are triages lacking - * a specific alertKey or granular artifact information which may have - * limited introspection to see what they apply to. - */ - force?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - requestBody?: { - content: { - 'application/json': { - alertTriage: Array<{ - /** - * The UUID of the triage entry. Omit to create a new entry; - * provide to update an existing one. - * - * @default - */ - uuid?: string | null - /** - * The package ecosystem type (e.g., npm, pypi). Use null or "*" - * for wildcard. - * - * @default - */ - packageType?: string | null - /** - * The package namespace or scope. Use null or "*" for wildcard. - * - * @default - */ - packageNamespace?: string | null - /** - * The package name. Use null or "*" for wildcard. - * - * @default - */ - packageName?: string | null - /** - * The package version. Supports a "*" suffix for wildcard prefix - * matching. Use null for any version. - * - * @default - */ - packageVersion?: string | null - /** - * The specific alert key to target. - * - * @default - */ - alertKey?: string | null - /** - * The alert type (e.g., criticalCVE, highCVE). - * - * @default - */ - alertType?: string | null - /** - * Whether a fix is available, unavailable, or * for any. - * - * @enum {string} - */ - fixAvailable?: 'available' | 'unavailable' | '*' - /** - * Whether a patch is available, unavailable, or * for any. - * - * @enum {string} - */ - patchAvailable?: 'available' | 'unavailable' | '*' - /** - * Whether the alert has a CISA KEV, can be exist, none, or * for - * any. - * - * @enum {string} - */ - kevs?: 'exist' | 'none' | '*' - /** - * CVE or GHSA ID to match against. - * - * @default - */ - cveOrGhsaId?: string | null - /** - * The reachability of the alert, can be reachable, unreachable, - * other, or * for any. - * - * @enum {string} - */ - reachability?: 'reachable' | 'unreachable' | 'other' | '*' - /** - * CVSS score comparison operator and value (e.g., >=7.5, >5.0, - * ==8.0). - * - * @default - */ - cvssScoreCmp?: string | null - /** - * A note or comment for the triage action. - * - * @default - */ - note?: string - /** - * The triage state of the alert. - * - * @enum {string} - */ - state?: 'block' | 'ignore' | 'inherit' | 'monitor' | 'warn' - }> - } - } - } - responses: { - /** - * Updated Alert Triage. - */ - 200: { - content: { - 'application/json': { - /** - * @default - */ - result: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 409: components['responses']['SocketConflict'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Delete Org Alert Triage. - * - * Delete a specific triage rule by UUID. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - triage:alerts-update. - */ - deleteOrgAlertTriage: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The UUID of the alert triage entry to delete. - */ - uuid: string - } - } - responses: { - /** - * Deleted Alert Triage. - */ - 200: { - content: { - 'application/json': { - /** - * @default - */ - result: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 409: components['responses']['SocketConflict'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * List Org Alert Resolutions. - * - * List active alert resolutions for an organization. Results are paginated - * via an opaque cursor and ordered by created_at. Each row includes the - * anchor fields (alert_type, repo, repo_label, artifact_*) that describe the - * resolution scope. This endpoint consumes 1 unit of your quota. This - * endpoint requires the following org token scopes: - * - * - Alert-resolution:list - */ - getOrgAlertResolutions: { - parameters: { - query?: { - /** - * Sort direction by `created_at`. One of: asc, desc. - */ - direction?: string - /** - * Number of results per page (1–100, default 30). - */ - per_page?: number - /** - * Opaque cursor returned by the previous response's `endCursor`. Omit - * on the first request. - */ - startAfterCursor?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * Lists alert resolutions for the specified organization. - */ - 200: { - content: { - 'application/json': { - items: Array<{ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mildCVE?: { /** - * The UUID of the resolution. - * - * @default + * @description The action to take for mildCVE issues. + * @enum {string} */ - uuid: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + emptyPackage?: { /** - * The reason the alert was resolved. One of: false_positive, - * remediated, tolerable_risk, other. - * - * @default other - * + * @description The action to take for emptyPackage issues. * @enum {string} */ - reason: - | 'false_positive' - | 'remediated' - | 'tolerable_risk' - | 'other' + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + trivialPackage?: { /** - * Free-form reason text when `reason` is `other`. - * - * @default + * @description The action to take for trivialPackage issues. + * @enum {string} */ - reason_text: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noREADME?: { /** - * Operator-provided comment. - * - * @default + * @description The action to take for noREADME issues. + * @enum {string} */ - comment: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingLockfile?: { /** - * Alert type the resolution scopes to (e.g. criticalCVE). Null - * if the resolution applies to multiple alert types. - * - * @default + * @description The action to take for missingLockfile issues. + * @enum {string} */ - alert_type: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + oversizedManifest?: { /** - * Repository full name the resolution scopes to. Null if not - * scoped to a single repo. - * - * @default + * @description The action to take for oversizedManifest issues. + * @enum {string} */ - repo: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedYarnDependency?: { /** - * Repository label the resolution scopes to. Null if not scoped - * to a label. - * - * @default + * @description The action to take for unresolvedYarnDependency issues. + * @enum {string} */ - repo_label: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedPomReference?: { /** - * Package ecosystem the resolution scopes to (e.g. npm, pypi). - * Null if not scoped to a single ecosystem. - * - * @default + * @description The action to take for unresolvedPomReference issues. + * @enum {string} */ - artifact_type: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shrinkwrap?: { /** - * Package namespace/scope the resolution scopes to. Null if not - * scoped to a namespace. - * - * @default + * @description The action to take for shrinkwrap issues. + * @enum {string} */ - artifact_namespace: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + tooManyFiles?: { /** - * Package name the resolution scopes to. Null if not scoped to - * a single package. - * - * @default + * @description The action to take for tooManyFiles issues. + * @enum {string} */ - artifact_name: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + generic?: { /** - * Package version the resolution scopes to. Extracted from the - * resolution selector at read time; null if the resolution - * applies to multiple versions or no single version. - * - * @default + * @description The action to take for generic issues. + * @enum {string} */ - artifact_version: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToSink?: { /** - * User ID that created the resolution. Null for system-created - * resolutions. - * - * @default + * @description The action to take for ghaArgToSink issues. + * @enum {string} */ - resolved_by: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaEnvToSink?: { /** - * ISO-8601 creation timestamp. - * - * @default + * @description The action to take for ghaEnvToSink issues. + * @enum {string} */ - created_at: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToSink?: { /** - * ISO-8601 last-update timestamp. - * - * @default + * @description The action to take for ghaContextToSink issues. + * @enum {string} */ - updated_at: string - }> - /** - * @default - */ - endCursor: string | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get Org Alert Resolution. - * - * Fetch a single active alert resolution by UUID. Returns the same row shape - * as the list endpoint. This endpoint consumes 1 unit of your quota. This - * endpoint requires the following org token scopes: - alert-resolution:read. - */ - getOrgAlertResolution: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The UUID of the alert resolution to fetch. - */ - uuid: string - } - } - responses: { - /** - * The requested alert resolution. - */ - 200: { - content: { - 'application/json': { - /** - * The UUID of the resolution. - * - * @default - */ - uuid: string - /** - * The reason the alert was resolved. One of: false_positive, - * remediated, tolerable_risk, other. - * - * @default other - * - * @enum {string} - */ - reason: 'false_positive' | 'remediated' | 'tolerable_risk' | 'other' - /** - * Free-form reason text when `reason` is `other`. - * - * @default - */ - reason_text: string | null - /** - * Operator-provided comment. - * - * @default - */ - comment: string | null - /** - * Alert type the resolution scopes to (e.g. criticalCVE). Null if - * the resolution applies to multiple alert types. - * - * @default - */ - alert_type: string | null - /** - * Repository full name the resolution scopes to. Null if not scoped - * to a single repo. - * - * @default - */ - repo: string | null - /** - * Repository label the resolution scopes to. Null if not scoped to - * a label. - * - * @default - */ - repo_label: string | null - /** - * Package ecosystem the resolution scopes to (e.g. npm, pypi). Null - * if not scoped to a single ecosystem. - * - * @default - */ - artifact_type: string | null - /** - * Package namespace/scope the resolution scopes to. Null if not - * scoped to a namespace. - * - * @default - */ - artifact_namespace: string | null - /** - * Package name the resolution scopes to. Null if not scoped to a - * single package. - * - * @default - */ - artifact_name: string | null - /** - * Package version the resolution scopes to. Extracted from the - * resolution selector at read time; null if the resolution applies - * to multiple versions or no single version. - * - * @default - */ - artifact_version: string | null - /** - * User ID that created the resolution. Null for system-created - * resolutions. - * - * @default - */ - resolved_by: string | null - /** - * ISO-8601 creation timestamp. - * - * @default - */ - created_at: string - /** - * ISO-8601 last-update timestamp. - * - * @default - */ - updated_at: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Delete Org Alert Resolution. - * - * Delete an alert resolution by UUID. Once deleted, alerts previously hidden - * by this resolution will reappear after the next org snapshot. This endpoint - * consumes 1 unit of your quota. This endpoint requires the following org - * token scopes: - alert-resolution:delete. - */ - deleteOrgAlertResolution: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The UUID of the alert resolution to delete. - */ - uuid: string - } - } - responses: { - /** - * Deleted Alert Resolution. - */ - 200: { - content: { - 'application/json': { - /** - * @default - */ - result: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * List repositories. - * - * Lists repositories for the specified organization. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - repo:list. - */ - getOrgRepoList: { - parameters: { - query?: { - /** - * Field to sort repositories by. - */ - sort?: 'name' | 'updated_at' | 'created_at' - /** - * Sort direction. - */ - direction?: 'asc' | 'desc' - per_page?: number - page?: number - /** - * Include archived repositories in the results. - */ - include_archived?: boolean - /** - * Filter repositories by workspace. When provided (including empty - * string), only repos in that workspace are returned. - */ - workspace?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * Lists repositories for the specified organization. The authenticated - * user must be a member of the organization. - */ - 200: { - content: { - 'application/json': { - results: Array<{ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToOutput?: { /** - * The ID of the repository. - * - * @default + * @description The action to take for ghaArgToOutput issues. + * @enum {string} */ - id?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToEnv?: { /** - * The creation date of the repository. - * - * @default + * @description The action to take for ghaArgToEnv issues. + * @enum {string} */ - created_at?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToOutput?: { /** - * The last update date of the repository. - * - * @default + * @description The action to take for ghaContextToOutput issues. + * @enum {string} */ - updated_at?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToEnv?: { /** - * The URL to the repository dashboard page. - * - * @default + * @description The action to take for ghaContextToEnv issues. + * @enum {string} */ - html_url?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + recentlyPublished?: { /** - * The ID of the head full scan of the repository. - * - * @default + * @description The action to take for recentlyPublished issues. + * @enum {string} */ - head_full_scan_id?: string | null - integration_meta?: { - /** - * @enum {string} - */ - type?: 'github' - value?: { - /** - * The GitHub installation_id of the active associated - * Socket GitHub App. - * - * @default - */ - installation_id: string - /** - * The GitHub login name that the active Socket GitHub App - * installation is installed to. - * - * @default - */ - installation_login: string - /** - * The name of the associated GitHub repo. - * - * @default - */ - repo_name: string | null - /** - * The id of the associated GitHub repo. - * - * @default - */ - repo_id: string | null - } - } | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseSpdxDisj?: { /** - * The slug of the repository. - * - * @default + * @description The action to take for licenseSpdxDisj issues. + * @enum {string} */ - slug?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unsafeCopyright?: { /** - * The name of the repository. - * - * @default + * @description The action to take for unsafeCopyright issues. + * @enum {string} */ - name?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseChange?: { /** - * The description of the repository. - * - * @default + * @description The action to take for licenseChange issues. + * @enum {string} */ - description?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonOSILicense?: { /** - * The homepage URL of the repository. - * - * @default + * @description The action to take for nonOSILicense issues. + * @enum {string} */ - homepage?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecatedLicense?: { /** - * The visibility of the repository. - * - * @default private - * + * @description The action to take for deprecatedLicense issues. * @enum {string} */ - visibility?: 'public' | 'private' + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingLicense?: { /** - * Whether the repository is archived or not. - * - * @default false + * @description The action to take for missingLicense issues. + * @enum {string} */ - archived?: boolean + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonSPDXLicense?: { /** - * The default branch of the repository. - * - * @default main + * @description The action to take for nonSPDXLicense issues. + * @enum {string} */ - default_branch?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unclearLicense?: { /** - * The workspace of the repository. - * - * @default + * @description The action to take for unclearLicense issues. + * @enum {string} */ - workspace?: string - }> - /** - * @default 0 - */ - nextPage: number | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Create repository. - * - * Create a repository. Repos collect Full scans and Diff scans and are - * typically associated with a git repo. This endpoint consumes 1 unit of your - * quota. This endpoint requires the following org token scopes: - - * repo:create. - */ - createOrgRepo: { - parameters: { - query?: { - /** - * Set to "redirect" to receive a 302 redirect to the existing repo - * instead of a 409 error when a duplicate slug is detected. - */ - on_duplicate?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - requestBody?: { - content: { - 'application/json': { - /** - * The display name of the repository. When provided without a slug, - * the slug is automatically derived from the name. When omitted, the - * slug is used as the name. At least one of name or slug must be - * provided. - * - * @default - */ - name?: string - /** - * The description of the repository. - * - * @default - */ - description?: string | null - /** - * The homepage URL of the repository. - * - * @default - */ - homepage?: string | null - /** - * The visibility of the repository. - * - * @default private - * - * @enum {string} - */ - visibility?: 'public' | 'private' - /** - * Whether the repository is archived or not. - * - * @default false - */ - archived?: boolean - /** - * The default branch of the repository. - * - * @default main - */ - default_branch?: string | null - /** - * The workspace of the repository. - * - * @default - */ - workspace?: string - /** - * The slug of the repository. If provided, used directly instead of - * being derived from name. Must only contain ASCII letters, digits, - * and the characters ., -, and _. - * - * @default - */ - slug?: string - } - } - } - responses: { - /** - * Lists repositories for the specified organization. The authenticated - * user must be a member of the organization. - */ - 201: { - content: { - 'application/json': { - /** - * The ID of the repository. - * - * @default - */ - id?: string - /** - * The creation date of the repository. - * - * @default - */ - created_at?: string - /** - * The last update date of the repository. - * - * @default - */ - updated_at?: string - /** - * The URL to the repository dashboard page. - * - * @default - */ - html_url?: string - /** - * The ID of the head full scan of the repository. - * - * @default - */ - head_full_scan_id?: string | null - integration_meta?: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mixedLicense?: { /** + * @description The action to take for mixedLicense issues. * @enum {string} */ - type?: 'github' - value?: { - /** - * The GitHub installation_id of the active associated Socket - * GitHub App. - * - * @default - */ - installation_id: string - /** - * The GitHub login name that the active Socket GitHub App - * installation is installed to. - * - * @default - */ - installation_login: string - /** - * The name of the associated GitHub repo. - * - * @default - */ - repo_name: string | null - /** - * The id of the associated GitHub repo. - * - * @default - */ - repo_id: string | null - } - } | null - /** - * The slug of the repository. - * - * @default - */ - slug?: string - /** - * The name of the repository. - * - * @default - */ - name?: string - /** - * The description of the repository. - * - * @default - */ - description?: string | null - /** - * The homepage URL of the repository. - * - * @default - */ - homepage?: string | null - /** - * The visibility of the repository. - * - * @default private - * - * @enum {string} - */ - visibility?: 'public' | 'private' - /** - * Whether the repository is archived or not. - * - * @default false - */ - archived?: boolean - /** - * The default branch of the repository. - * - * @default main - */ - default_branch?: string | null - /** - * The workspace of the repository. - * - * @default - */ - workspace?: string - } - } - } - /** - * Redirects to the existing repository when on_duplicate=redirect is set - * and a duplicate slug is detected. - */ - 302: { - content: { - 'application/json': { - /** - * The ID of the repository. - * - * @default - */ - id?: string - /** - * The creation date of the repository. - * - * @default - */ - created_at?: string - /** - * The last update date of the repository. - * - * @default - */ - updated_at?: string - /** - * The URL to the repository dashboard page. - * - * @default - */ - html_url?: string - /** - * The ID of the head full scan of the repository. - * - * @default - */ - head_full_scan_id?: string | null - integration_meta?: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + notice?: { /** + * @description The action to take for notice issues. * @enum {string} */ - type?: 'github' - value?: { - /** - * The GitHub installation_id of the active associated Socket - * GitHub App. - * - * @default - */ - installation_id: string - /** - * The GitHub login name that the active Socket GitHub App - * installation is installed to. - * - * @default - */ - installation_login: string - /** - * The name of the associated GitHub repo. - * - * @default - */ - repo_name: string | null - /** - * The id of the associated GitHub repo. - * - * @default - */ - repo_id: string | null - } - } | null - /** - * The slug of the repository. - * - * @default - */ - slug?: string - /** - * The name of the repository. - * - * @default - */ - name?: string - /** - * The description of the repository. - * - * @default - */ - description?: string | null - /** - * The homepage URL of the repository. - * - * @default - */ - homepage?: string | null - /** - * The visibility of the repository. - * - * @default private - * - * @enum {string} - */ - visibility?: 'public' | 'private' - /** - * Whether the repository is archived or not. - * - * @default false - */ - archived?: boolean - /** - * The default branch of the repository. - * - * @default main - */ - default_branch?: string | null - /** - * The workspace of the repository. - * - * @default - */ - workspace?: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 409: components['responses']['SocketConflict'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get repository. - * - * Retrieve a repository associated with an organization. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - repo:list. - */ - getOrgRepo: { - parameters: { - query?: { - /** - * The workspace of the repository. - */ - workspace?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The slug of the repository. - */ - repo_slug: string - } - } - responses: { - /** - * Lists repositories for the specified organization. The authenticated - * user must be a member of the organization. - */ - 200: { - content: { - 'application/json': { - /** - * The ID of the repository. - * - * @default - */ - id: string - /** - * The creation date of the repository. - * - * @default - */ - created_at: string - /** - * The last update date of the repository. - * - * @default - */ - updated_at: string - /** - * The URL to the repository dashboard page. - * - * @default - */ - html_url: string - /** - * The ID of the head full scan of the repository. - * - * @default - */ - head_full_scan_id: string | null - integration_meta: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + modifiedLicense?: { /** + * @description The action to take for modifiedLicense issues. * @enum {string} */ - type?: 'github' - value?: { - /** - * The GitHub installation_id of the active associated Socket - * GitHub App. - * - * @default - */ - installation_id: string - /** - * The GitHub login name that the active Socket GitHub App - * installation is installed to. - * - * @default - */ - installation_login: string - /** - * The name of the associated GitHub repo. - * - * @default - */ - repo_name: string | null - /** - * The id of the associated GitHub repo. - * - * @default - */ - repo_id: string | null - } - } | null - /** - * The slug of the repository. - * - * @default - */ - slug: string - /** - * The name of the repository. - * - * @default - */ - name: string - /** - * The description of the repository. - * - * @default - */ - description: string | null - /** - * The homepage URL of the repository. - * - * @default - */ - homepage: string | null - /** - * The visibility of the repository. - * - * @default private - * - * @enum {string} - */ - visibility: 'public' | 'private' - /** - * Whether the repository is archived or not. - * - * @default false - */ - archived: boolean - /** - * The default branch of the repository. - * - * @default main - */ - default_branch: string | null - /** - * The workspace of the repository. - * - * @default - */ - workspace: string - /** - * The slug of the repository. This typo is intentionally preserved - * for backwards compatibility reasons. - * - * @default - */ - slig: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Update repository. - * - * Update details of an existing repository. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - repo:update. - */ - updateOrgRepo: { - parameters: { - query?: { - /** - * The workspace of the repository. - */ - workspace?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The slug of the repository. - */ - repo_slug: string - } - } - requestBody?: { - content: { - 'application/json': { - /** - * The name of the repository. - * - * @default - */ - name?: string - /** - * The description of the repository. - * - * @default - */ - description?: string | null - /** - * The homepage URL of the repository. - * - * @default - */ - homepage?: string | null - /** - * The visibility of the repository. - * - * @default private - * - * @enum {string} - */ - visibility?: 'public' | 'private' - /** - * Whether the repository is archived or not. - * - * @default false - */ - archived?: boolean - /** - * The default branch of the repository. - * - * @default main - */ - default_branch?: string | null - /** - * The workspace of the repository. - * - * @default - */ - workspace?: string - } - } - } - responses: { - /** - * Updated repository details. - */ - 200: { - content: { - 'application/json': { - /** - * The ID of the repository. - * - * @default - */ - id?: string - /** - * The creation date of the repository. - * - * @default - */ - created_at?: string - /** - * The last update date of the repository. - * - * @default - */ - updated_at?: string - /** - * The URL to the repository dashboard page. - * - * @default - */ - html_url?: string - /** - * The ID of the head full scan of the repository. - * - * @default - */ - head_full_scan_id?: string | null - integration_meta?: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + modifiedException?: { /** + * @description The action to take for modifiedException issues. * @enum {string} */ - type?: 'github' - value?: { - /** - * The GitHub installation_id of the active associated Socket - * GitHub App. - * - * @default - */ - installation_id: string - /** - * The GitHub login name that the active Socket GitHub App - * installation is installed to. - * - * @default - */ - installation_login: string - /** - * The name of the associated GitHub repo. - * - * @default - */ - repo_name: string | null - /** - * The id of the associated GitHub repo. - * - * @default - */ - repo_id: string | null - } - } | null - /** - * The slug of the repository. - * - * @default - */ - slug?: string - /** - * The name of the repository. - * - * @default - */ - name?: string - /** - * The description of the repository. - * - * @default - */ - description?: string | null - /** - * The homepage URL of the repository. - * - * @default - */ - homepage?: string | null - /** - * The visibility of the repository. - * - * @default private - * - * @enum {string} - */ - visibility?: 'public' | 'private' - /** - * Whether the repository is archived or not. - * - * @default false - */ - archived?: boolean - /** - * The default branch of the repository. - * - * @default main - */ - default_branch?: string | null - /** - * The workspace of the repository. - * - * @default - */ - workspace?: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Delete repository. - * - * Delete a single repository and all of its associated Full scans and Diff - * scans. This endpoint consumes 1 unit of your quota. This endpoint requires - * the following org token scopes: - repo:delete. - */ - deleteOrgRepo: { - parameters: { - query?: { - /** - * The workspace of the repository. - */ - workspace?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The slug of the repository. - */ - repo_slug: string - } - } - responses: { - /** - * Success. - */ - 200: { - content: { - 'application/json': { - /** - * @default ok - */ - status: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Associate repository label (beta) - * - * Associate a repository label with a repository. Labels can be used to group - * and organize repositories and to apply security/license policies. This - * endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: - repo-label:update. - */ - associateOrgRepoLabel: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the label. - */ - label_id: string - } - } - requestBody?: { - content: { - 'application/json': { - /** - * The ID of the repository to associate with the label. - * - * @default - */ - repository_id?: string - } - } - } - responses: { - /** - * Associates a repository label with the specified repository. The - * authenticated user must be a member of the organization. - */ - 200: { - content: { - 'application/json': { - /** - * Status of the operation. - * - * @default - */ - status?: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * List repository labels (beta) - * - * Lists repository labels for the specified organization. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - repo-label:list. - */ - getOrgRepoLabelList: { - parameters: { - query?: { - per_page?: number - page?: number - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * Lists repository labels for the specified organization. The - * authenticated user must be a member of the organization. - */ - 200: { - content: { - 'application/json': { - results: Array<{ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseException?: { /** - * The ID of the label. - * - * @default + * @description The action to take for licenseException issues. + * @enum {string} */ - id?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecatedException?: { /** - * The name of the label. - * - * @default + * @description The action to take for deprecatedException issues. + * @enum {string} */ - name?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + miscLicenseIssues?: { /** - * The IDs of repositories this label is associated with. + * @description The action to take for miscLicenseIssues issues. + * @enum {string} */ - repository_ids?: string[] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unidentifiedLicense?: { /** - * Whether the label has a security policy. - * - * @default false + * @description The action to take for unidentifiedLicense issues. + * @enum {string} */ - has_security_policy?: boolean + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noLicenseFound?: { /** - * Whether the label has a license policy. - * - * @default false + * @description The action to take for noLicenseFound issues. + * @enum {string} */ - has_license_policy?: boolean - }> - /** - * @default 0 - */ - nextPage: number | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Create repository label (beta) - * - * Create a repository label. Labels can be used to group and organize - * repositories and to apply security/license policies. This endpoint consumes - * 1 unit of your quota. This endpoint requires the following org token - * scopes: - repo-label:create. - */ - createOrgRepoLabel: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - requestBody: { - content: { - 'application/json': { - /** - * The name of the label. - * - * @default - */ - name: string - } - } - } - responses: { - /** - * Creates a new repository label for the specified organization. The - * authenticated user must be a member of the organization. Label names - * must be non-empty and less than 1000 characters. - */ - 201: { - content: { - 'application/json': { - /** - * The ID of the label. - * - * @default - */ - id?: string - /** - * The name of the label. - * - * @default - */ - name?: string - /** - * The IDs of repositories this label is associated with. - */ - repository_ids?: string[] - /** - * Whether the label has a security policy. - * - * @default false - */ - has_security_policy?: boolean - /** - * Whether the label has a license policy. - * - * @default false - */ - has_license_policy?: boolean - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - /** - * Conflict. - */ - 409: { - content: { - 'application/json': { - error: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + explicitlyUnlicensedItem?: { /** - * @default + * @description The action to take for explicitlyUnlicensedItem issues. + * @enum {string} */ - message: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + copyleftLicense?: { /** - * @default null + * @description The action to take for copyleftLicense issues. + * @enum {string} */ - details: Record | null - } - } - } - } - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get repository label (beta) - * - * Retrieve a repository label associated with an organization and label ID. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - repo-label:list. - */ - getOrgRepoLabel: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the label. - */ - label_id: string - } - } - responses: { - /** - * Returns a specific repository label for the specified organization. The - * authenticated user must be a member of the organization. - */ - 200: { - content: { - 'application/json': { - /** - * The ID of the label. - * - * @default - */ - id?: string - /** - * The name of the label. - * - * @default - */ - name?: string - /** - * The IDs of repositories this label is associated with. - */ - repository_ids?: string[] - /** - * Whether the label has a security policy. - * - * @default false - */ - has_security_policy?: boolean - /** - * Whether the label has a license policy. - * - * @default false - */ - has_license_policy?: boolean - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Update repository label (beta) - * - * Update a repository label name. Labels can be used to group and organize - * repositories and to apply security/license policies. This endpoint consumes - * 1 unit of your quota. This endpoint requires the following org token - * scopes: - repo-label:update. - */ - updateOrgRepoLabel: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the label. - */ - label_id: string - } - } - requestBody: { - content: { - 'application/json': { - /** - * The name of the label. - * - * @default - */ - name: string - } - } - } - responses: { - /** - * Updates an existing repository label for the specified organization. - * The authenticated user must be a member of the organization. Label - * names must be non-empty and less than 1000 characters. - */ - 200: { - content: { - 'application/json': { - /** - * The ID of the label. - * - * @default - */ - id?: string - /** - * The name of the label. - * - * @default - */ - name?: string - /** - * The IDs of repositories this label is associated with. - */ - repository_ids?: string[] - /** - * Whether the label has a security policy. - * - * @default false - */ - has_security_policy?: boolean - /** - * Whether the label has a license policy. - * - * @default false - */ - has_license_policy?: boolean - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - /** - * Conflict. - */ - 409: { - content: { - 'application/json': { - error: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonpermissiveLicense?: { /** - * @default + * @description The action to take for nonpermissiveLicense issues. + * @enum {string} */ - message: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ambiguousClassifier?: { /** - * @default null + * @description The action to take for ambiguousClassifier issues. + * @enum {string} */ - details: Record | null - } - } - } - } - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Delete repository label (beta) - * - * Delete a repository label and all of its associations (repositories, - * security policy, license policy, etc.). This endpoint consumes 1 unit of - * your quota. This endpoint requires the following org token scopes: - - * repo-label:delete. - */ - deleteOrgRepoLabel: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the label. - */ - label_id: string - } - } - responses: { - /** - * Success. - */ - 200: { - content: { - 'application/json': { - /** - * @default ok - */ - status: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get repository label setting (beta) - * - * Retrieve the setting (e.g. security/license policy) for a repository label. - * Note that repository label settings currently only support `issueRules`, - * `issueRulesPolicyDefault`, `licensePolicy`, and - * `recentlyPublishedThresholdMs`. A policy is considered "active" - * for a given repository label if the `issueRulesPolicyDefault` is - * set, and inactive when not set. `issueRules` can be used to further - * refine the alert triage strategy. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - repo-label:list. - */ - getOrgRepoLabelSetting: { - parameters: { - query: { - /** - * Setting key to query for in the repository label. Valid values - * include issueRules, issueRulesPolicyDefault, licensePolicy, and - * recentlyPublishedThresholdMs. - */ - setting_key: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the label. - */ - label_id: string - } - } - responses: { - /** - * Returns the setting for the specified repository label. The - * authenticated user must be a member of the organization. - */ - 200: { - content: { - 'application/json': { - issueRules?: { - gptSecurity?: { - /** - * The action to take for gptSecurity issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptAnomaly?: { - /** - * The action to take for gptAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptMalware?: { - /** - * The action to take for gptMalware issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - filesystemAccess?: { - /** - * The action to take for filesystemAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - networkAccess?: { - /** - * The action to take for networkAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shellAccess?: { - /** - * The action to take for shellAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - debugAccess?: { - /** - * The action to take for debugAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromePermission?: { - /** - * The action to take for chromePermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeHostPermission?: { - /** - * The action to take for chromeHostPermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeWildcardHostPermission?: { - /** - * The action to take for chromeWildcardHostPermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeContentScript?: { - /** - * The action to take for chromeContentScript issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - criticalCVE?: { - /** - * The action to take for criticalCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - cve?: { - /** - * The action to take for cve issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mediumCVE?: { - /** - * The action to take for mediumCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mildCVE?: { - /** - * The action to take for mildCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - emptyPackage?: { - /** - * The action to take for emptyPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - trivialPackage?: { - /** - * The action to take for trivialPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noREADME?: { - /** - * The action to take for noREADME issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingLockfile?: { - /** - * The action to take for missingLockfile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - oversizedManifest?: { - /** - * The action to take for oversizedManifest issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shrinkwrap?: { - /** - * The action to take for shrinkwrap issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - tooManyFiles?: { - /** - * The action to take for tooManyFiles issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - generic?: { - /** - * The action to take for generic issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToSink?: { - /** - * The action to take for ghaArgToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaEnvToSink?: { - /** - * The action to take for ghaEnvToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToSink?: { - /** - * The action to take for ghaContextToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToOutput?: { - /** - * The action to take for ghaArgToOutput issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToEnv?: { - /** - * The action to take for ghaArgToEnv issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToOutput?: { - /** - * The action to take for ghaContextToOutput issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToEnv?: { - /** - * The action to take for ghaContextToEnv issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - recentlyPublished?: { - /** - * The action to take for recentlyPublished issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseSpdxDisj?: { - /** - * The action to take for licenseSpdxDisj issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unsafeCopyright?: { - /** - * The action to take for unsafeCopyright issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseChange?: { - /** - * The action to take for licenseChange issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonOSILicense?: { - /** - * The action to take for nonOSILicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecatedLicense?: { - /** - * The action to take for deprecatedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingLicense?: { - /** - * The action to take for missingLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonSPDXLicense?: { - /** - * The action to take for nonSPDXLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unclearLicense?: { - /** - * The action to take for unclearLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mixedLicense?: { - /** - * The action to take for mixedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - notice?: { - /** - * The action to take for notice issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - modifiedLicense?: { - /** - * The action to take for modifiedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - modifiedException?: { - /** - * The action to take for modifiedException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseException?: { - /** - * The action to take for licenseException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecatedException?: { - /** - * The action to take for deprecatedException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - miscLicenseIssues?: { - /** - * The action to take for miscLicenseIssues issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unidentifiedLicense?: { - /** - * The action to take for unidentifiedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noLicenseFound?: { - /** - * The action to take for noLicenseFound issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - explicitlyUnlicensedItem?: { - /** - * The action to take for explicitlyUnlicensedItem issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - copyleftLicense?: { - /** - * The action to take for copyleftLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonpermissiveLicense?: { - /** - * The action to take for nonpermissiveLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ambiguousClassifier?: { - /** - * The action to take for ambiguousClassifier issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - invalidPackageJSON?: { - /** - * The action to take for invalidPackageJSON issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - httpDependency?: { - /** - * The action to take for httpDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gitDependency?: { - /** - * The action to take for gitDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gitHubDependency?: { - /** - * The action to take for gitHubDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - fileDependency?: { - /** - * The action to take for fileDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noTests?: { - /** - * The action to take for noTests issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noRepository?: { - /** - * The action to take for noRepository issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badSemver?: { - /** - * The action to take for badSemver issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badSemverDependency?: { - /** - * The action to take for badSemverDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noV1?: { - /** - * The action to take for noV1 issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noWebsite?: { - /** - * The action to take for noWebsite issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noBugTracker?: { - /** - * The action to take for noBugTracker issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noAuthorData?: { - /** - * The action to take for noAuthorData issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - typeModuleCompatibility?: { - /** - * The action to take for typeModuleCompatibility issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - floatingDependency?: { - /** - * The action to take for floatingDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - manifestConfusion?: { - /** - * The action to take for manifestConfusion issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - malware?: { - /** - * The action to take for malware issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - telemetry?: { - /** - * The action to take for telemetry issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - troll?: { - /** - * The action to take for troll issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - pendingScan?: { - /** - * The action to take for pendingScan issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecated?: { - /** - * The action to take for deprecated issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chronoAnomaly?: { - /** - * The action to take for chronoAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - compromisedSSHKey?: { - /** - * The action to take for compromisedSSHKey issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - semverAnomaly?: { - /** - * The action to take for semverAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - newAuthor?: { - /** - * The action to take for newAuthor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unstableOwnership?: { - /** - * The action to take for unstableOwnership issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingAuthor?: { - /** - * The action to take for missingAuthor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unmaintained?: { - /** - * The action to take for unmaintained issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unpublished?: { - /** - * The action to take for unpublished issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - majorRefactor?: { - /** - * The action to take for majorRefactor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingTarball?: { - /** - * The action to take for missingTarball issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - suspiciousStarActivity?: { - /** - * The action to take for suspiciousStarActivity issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - notFound?: { - /** - * The action to take for notFound issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unpopularPackage?: { - /** - * The action to take for unpopularPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - policy?: { - /** - * The action to take for policy issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillAutonomyAbuse?: { - /** - * The action to take for skillAutonomyAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillCommandInjection?: { - /** - * The action to take for skillCommandInjection issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillDataExfiltration?: { - /** - * The action to take for skillDataExfiltration issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillDiscoveryAbuse?: { - /** - * The action to take for skillDiscoveryAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillHardcodedSecrets?: { - /** - * The action to take for skillHardcodedSecrets issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillObfuscation?: { - /** - * The action to take for skillObfuscation issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillPreExecution?: { - /** - * The action to take for skillPreExecution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillPromptInjection?: { - /** - * The action to take for skillPromptInjection issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillResourceAbuse?: { - /** - * The action to take for skillResourceAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillSupplyChain?: { - /** - * The action to take for skillSupplyChain issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillToolAbuse?: { - /** - * The action to take for skillToolAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillToolChaining?: { - /** - * The action to take for skillToolChaining issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillTransitiveTrust?: { - /** - * The action to take for skillTransitiveTrust issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - socketUpgradeAvailable?: { - /** - * The action to take for socketUpgradeAvailable issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - longStrings?: { - /** - * The action to take for longStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - highEntropyStrings?: { - /** - * The action to take for highEntropyStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - urlStrings?: { - /** - * The action to take for urlStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - usesEval?: { - /** - * The action to take for usesEval issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - dynamicRequire?: { - /** - * The action to take for dynamicRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - envVars?: { - /** - * The action to take for envVars issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingDependency?: { - /** - * The action to take for missingDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unusedDependency?: { - /** - * The action to take for unusedDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - peerDependency?: { - /** - * The action to take for peerDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - uncaughtOptionalDependency?: { - /** - * The action to take for uncaughtOptionalDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unresolvedRequire?: { - /** - * The action to take for unresolvedRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - extraneousDependency?: { - /** - * The action to take for extraneousDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - obfuscatedRequire?: { - /** - * The action to take for obfuscatedRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - obfuscatedFile?: { - /** - * The action to take for obfuscatedFile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - minifiedFile?: { - /** - * The action to take for minifiedFile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - installScripts?: { - /** - * The action to take for installScripts issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - hasNativeCode?: { - /** - * The action to take for hasNativeCode issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - binScriptConfusion?: { - /** - * The action to take for binScriptConfusion issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shellScriptOverride?: { - /** - * The action to take for shellScriptOverride issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - didYouMean?: { - /** - * The action to take for didYouMean issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptDidYouMean?: { - /** - * The action to take for gptDidYouMean issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - bidi?: { - /** - * The action to take for bidi issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - zeroWidth?: { - /** - * The action to take for zeroWidth issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badEncoding?: { - /** - * The action to take for badEncoding issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - homoglyphs?: { - /** - * The action to take for homoglyphs issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - invisibleChars?: { - /** - * The action to take for invisibleChars issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - suspiciousString?: { - /** - * The action to take for suspiciousString issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - potentialVulnerability?: { - /** - * The action to take for potentialVulnerability issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxProposedApiUsage?: { - /** - * The action to take for vsxProposedApiUsage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxActivationWildcard?: { - /** - * The action to take for vsxActivationWildcard issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxWorkspaceContainsActivation?: { - /** - * The action to take for vsxWorkspaceContainsActivation issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxUntrustedWorkspaceSupported?: { - /** - * The action to take for vsxUntrustedWorkspaceSupported issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxVirtualWorkspaceSupported?: { - /** - * The action to take for vsxVirtualWorkspaceSupported issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxWebviewContribution?: { - /** - * The action to take for vsxWebviewContribution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxDebuggerContribution?: { - /** - * The action to take for vsxDebuggerContribution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxExtensionDependency?: { - /** - * The action to take for vsxExtensionDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxExtensionPack?: { - /** - * The action to take for vsxExtensionPack issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - } | null - /** - * The default security policy for the repository label. - * - * @default medium - * - * @enum {string|null} - */ - issueRulesPolicyDefault?: - | 'default' - | 'low' - | 'medium' - | 'high' - | null - /** - * @default null - */ - licensePolicy?: Record | null - /** - * The recently published package alert threshold for the repository - * label, in milliseconds. - * - * @default 0 - */ - recentlyPublishedThresholdMs?: number | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Update repository label setting (beta) - * - * Update the setting (e.g. security/license policy) for a repository label. - * Note that repository label settings currently only support `issueRules`, - * `issueRulesPolicyDefault`, `licensePolicy`, and - * `recentlyPublishedThresholdMs`. A policy is considered "active" - * for a given repository label if the `issueRulesPolicyDefault` is - * set, and inactive when not set. `issueRules` can be used to further - * refine the alert triage strategy. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - repo-label:update. - */ - updateOrgRepoLabelSetting: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the label. - */ - label_id: string - } - } - requestBody?: { - content: { - 'application/json': { - issueRules?: { - gptSecurity?: { - /** - * The action to take for gptSecurity issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptAnomaly?: { - /** - * The action to take for gptAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptMalware?: { - /** - * The action to take for gptMalware issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - filesystemAccess?: { - /** - * The action to take for filesystemAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - networkAccess?: { - /** - * The action to take for networkAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shellAccess?: { - /** - * The action to take for shellAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - debugAccess?: { - /** - * The action to take for debugAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromePermission?: { - /** - * The action to take for chromePermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeHostPermission?: { - /** - * The action to take for chromeHostPermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeWildcardHostPermission?: { - /** - * The action to take for chromeWildcardHostPermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeContentScript?: { - /** - * The action to take for chromeContentScript issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - criticalCVE?: { - /** - * The action to take for criticalCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - cve?: { - /** - * The action to take for cve issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mediumCVE?: { - /** - * The action to take for mediumCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mildCVE?: { - /** - * The action to take for mildCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - emptyPackage?: { - /** - * The action to take for emptyPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - trivialPackage?: { - /** - * The action to take for trivialPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noREADME?: { - /** - * The action to take for noREADME issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingLockfile?: { - /** - * The action to take for missingLockfile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - oversizedManifest?: { - /** - * The action to take for oversizedManifest issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shrinkwrap?: { - /** - * The action to take for shrinkwrap issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - tooManyFiles?: { - /** - * The action to take for tooManyFiles issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - generic?: { - /** - * The action to take for generic issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToSink?: { - /** - * The action to take for ghaArgToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaEnvToSink?: { - /** - * The action to take for ghaEnvToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToSink?: { - /** - * The action to take for ghaContextToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToOutput?: { - /** - * The action to take for ghaArgToOutput issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToEnv?: { - /** - * The action to take for ghaArgToEnv issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToOutput?: { - /** - * The action to take for ghaContextToOutput issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToEnv?: { - /** - * The action to take for ghaContextToEnv issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - recentlyPublished?: { - /** - * The action to take for recentlyPublished issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseSpdxDisj?: { - /** - * The action to take for licenseSpdxDisj issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unsafeCopyright?: { - /** - * The action to take for unsafeCopyright issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseChange?: { - /** - * The action to take for licenseChange issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonOSILicense?: { - /** - * The action to take for nonOSILicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecatedLicense?: { - /** - * The action to take for deprecatedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingLicense?: { - /** - * The action to take for missingLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonSPDXLicense?: { - /** - * The action to take for nonSPDXLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unclearLicense?: { - /** - * The action to take for unclearLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mixedLicense?: { - /** - * The action to take for mixedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - notice?: { - /** - * The action to take for notice issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - modifiedLicense?: { - /** - * The action to take for modifiedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - modifiedException?: { - /** - * The action to take for modifiedException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseException?: { - /** - * The action to take for licenseException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecatedException?: { - /** - * The action to take for deprecatedException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - miscLicenseIssues?: { - /** - * The action to take for miscLicenseIssues issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unidentifiedLicense?: { - /** - * The action to take for unidentifiedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noLicenseFound?: { - /** - * The action to take for noLicenseFound issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - explicitlyUnlicensedItem?: { - /** - * The action to take for explicitlyUnlicensedItem issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - copyleftLicense?: { - /** - * The action to take for copyleftLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonpermissiveLicense?: { - /** - * The action to take for nonpermissiveLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ambiguousClassifier?: { - /** - * The action to take for ambiguousClassifier issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - invalidPackageJSON?: { - /** - * The action to take for invalidPackageJSON issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - httpDependency?: { - /** - * The action to take for httpDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gitDependency?: { - /** - * The action to take for gitDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gitHubDependency?: { - /** - * The action to take for gitHubDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - fileDependency?: { - /** - * The action to take for fileDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noTests?: { - /** - * The action to take for noTests issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noRepository?: { - /** - * The action to take for noRepository issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badSemver?: { - /** - * The action to take for badSemver issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badSemverDependency?: { - /** - * The action to take for badSemverDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noV1?: { - /** - * The action to take for noV1 issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noWebsite?: { - /** - * The action to take for noWebsite issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noBugTracker?: { - /** - * The action to take for noBugTracker issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noAuthorData?: { - /** - * The action to take for noAuthorData issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - typeModuleCompatibility?: { - /** - * The action to take for typeModuleCompatibility issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - floatingDependency?: { - /** - * The action to take for floatingDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - manifestConfusion?: { - /** - * The action to take for manifestConfusion issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - malware?: { - /** - * The action to take for malware issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - telemetry?: { - /** - * The action to take for telemetry issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - troll?: { - /** - * The action to take for troll issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - pendingScan?: { - /** - * The action to take for pendingScan issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecated?: { - /** - * The action to take for deprecated issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chronoAnomaly?: { - /** - * The action to take for chronoAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - compromisedSSHKey?: { - /** - * The action to take for compromisedSSHKey issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - semverAnomaly?: { - /** - * The action to take for semverAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - newAuthor?: { - /** - * The action to take for newAuthor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unstableOwnership?: { - /** - * The action to take for unstableOwnership issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingAuthor?: { - /** - * The action to take for missingAuthor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unmaintained?: { - /** - * The action to take for unmaintained issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unpublished?: { - /** - * The action to take for unpublished issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - majorRefactor?: { - /** - * The action to take for majorRefactor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingTarball?: { - /** - * The action to take for missingTarball issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - suspiciousStarActivity?: { - /** - * The action to take for suspiciousStarActivity issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - notFound?: { - /** - * The action to take for notFound issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unpopularPackage?: { - /** - * The action to take for unpopularPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - policy?: { - /** - * The action to take for policy issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillAutonomyAbuse?: { - /** - * The action to take for skillAutonomyAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillCommandInjection?: { - /** - * The action to take for skillCommandInjection issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillDataExfiltration?: { - /** - * The action to take for skillDataExfiltration issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillDiscoveryAbuse?: { - /** - * The action to take for skillDiscoveryAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillHardcodedSecrets?: { - /** - * The action to take for skillHardcodedSecrets issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillObfuscation?: { - /** - * The action to take for skillObfuscation issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillPreExecution?: { - /** - * The action to take for skillPreExecution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillPromptInjection?: { - /** - * The action to take for skillPromptInjection issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillResourceAbuse?: { - /** - * The action to take for skillResourceAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillSupplyChain?: { - /** - * The action to take for skillSupplyChain issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillToolAbuse?: { - /** - * The action to take for skillToolAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillToolChaining?: { - /** - * The action to take for skillToolChaining issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillTransitiveTrust?: { - /** - * The action to take for skillTransitiveTrust issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - socketUpgradeAvailable?: { - /** - * The action to take for socketUpgradeAvailable issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - longStrings?: { - /** - * The action to take for longStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - highEntropyStrings?: { - /** - * The action to take for highEntropyStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - urlStrings?: { - /** - * The action to take for urlStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - usesEval?: { - /** - * The action to take for usesEval issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - dynamicRequire?: { - /** - * The action to take for dynamicRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - envVars?: { - /** - * The action to take for envVars issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingDependency?: { - /** - * The action to take for missingDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unusedDependency?: { - /** - * The action to take for unusedDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - peerDependency?: { - /** - * The action to take for peerDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - uncaughtOptionalDependency?: { - /** - * The action to take for uncaughtOptionalDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unresolvedRequire?: { - /** - * The action to take for unresolvedRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - extraneousDependency?: { - /** - * The action to take for extraneousDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - obfuscatedRequire?: { - /** - * The action to take for obfuscatedRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - obfuscatedFile?: { - /** - * The action to take for obfuscatedFile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - minifiedFile?: { - /** - * The action to take for minifiedFile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - installScripts?: { - /** - * The action to take for installScripts issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - hasNativeCode?: { - /** - * The action to take for hasNativeCode issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - binScriptConfusion?: { - /** - * The action to take for binScriptConfusion issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shellScriptOverride?: { - /** - * The action to take for shellScriptOverride issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - didYouMean?: { - /** - * The action to take for didYouMean issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptDidYouMean?: { - /** - * The action to take for gptDidYouMean issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - bidi?: { - /** - * The action to take for bidi issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - zeroWidth?: { - /** - * The action to take for zeroWidth issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badEncoding?: { - /** - * The action to take for badEncoding issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - homoglyphs?: { - /** - * The action to take for homoglyphs issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - invisibleChars?: { - /** - * The action to take for invisibleChars issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - suspiciousString?: { - /** - * The action to take for suspiciousString issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - potentialVulnerability?: { - /** - * The action to take for potentialVulnerability issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxProposedApiUsage?: { - /** - * The action to take for vsxProposedApiUsage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxActivationWildcard?: { - /** - * The action to take for vsxActivationWildcard issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxWorkspaceContainsActivation?: { - /** - * The action to take for vsxWorkspaceContainsActivation issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxUntrustedWorkspaceSupported?: { - /** - * The action to take for vsxUntrustedWorkspaceSupported issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxVirtualWorkspaceSupported?: { - /** - * The action to take for vsxVirtualWorkspaceSupported issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxWebviewContribution?: { - /** - * The action to take for vsxWebviewContribution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxDebuggerContribution?: { - /** - * The action to take for vsxDebuggerContribution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxExtensionDependency?: { - /** - * The action to take for vsxExtensionDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxExtensionPack?: { - /** - * The action to take for vsxExtensionPack issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - } - /** - * The default security policy for the repository label. - * - * @default medium - * - * @enum {string} - */ - issueRulesPolicyDefault?: 'default' | 'low' | 'medium' | 'high' - licensePolicy?: components['schemas']['LicenseAllowListRequest'] - /** - * The recently published package alert threshold for the repository - * label, in milliseconds. - * - * @default 0 - */ - recentlyPublishedThresholdMs?: number | null - } - } - } - responses: { - /** - * Success. - */ - 200: { - content: { - 'application/json': { - /** - * @default ok - */ - status: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 409: components['responses']['SocketConflict'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Delete repository label setting (beta) - * - * Delete the setting (e.g. security/license policy) for a repository label. - * Note that repository label settings currently only support `issueRules`, - * `issueRulesPolicyDefault`, `licensePolicy`, and - * `recentlyPublishedThresholdMs`. A policy is considered "active" - * for a given repository label if the `issueRulesPolicyDefault` is - * set, and inactive when not set. `issueRules` can be used to further - * refine the alert triage strategy. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - repo-label:update. - */ - deleteOrgRepoLabelSetting: { - parameters: { - query: { - /** - * Setting key to delete from the repository label. Valid values include - * issueRules, issueRulesPolicyDefault, licensePolicy, and - * recentlyPublishedThresholdMs. - */ - setting_key: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the label. - */ - label_id: string - } - } - responses: { - /** - * Success. - */ - 200: { - content: { - 'application/json': { - /** - * @default ok - */ - status: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 409: components['responses']['SocketConflict'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Disassociate repository label (beta) - * - * Disassociate a repository label from a repository. Labels can be used to - * group and organize repositories and to apply security/license policies. - * This endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: - repo-label:update. - */ - disassociateOrgRepoLabel: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the label. - */ - label_id: string - } - } - requestBody?: { - content: { - 'application/json': { - /** - * The ID of the repository to disassociate from the label. - * - * @default - */ - repository_id?: string - } - } - } - responses: { - /** - * Disassociates a repository label from the specified repository. The - * authenticated user must be a member of the organization. - */ - 200: { - content: { - 'application/json': { - /** - * Status of the operation. - * - * @default - */ - status?: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get integration events. - * - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - integration:list. - */ - getIntegrationEvents: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The id of the integration. - */ - integration_id: string - } - } - responses: { - /** - * Lists events for the specified integration. The authenticated user must - * be a member of the organization. - */ - 200: { - content: { - 'application/json': Array<{ - /** - * @default - */ - id: string - /** - * @default - */ - integration_id: string - /** - * @default - */ - type: string - payload: Record - /** - * @default 0 - */ - status_code: number - /** - * @default - */ - error: string - /** - * @default - */ - sent_at: string - retry_info: { - /** - * @default 0 - */ - status_code: number - /** - * @default - */ - error: string - /** - * @default - */ - sent_at: string - }[] - /** - * @default - */ - created_at: string - /** - * @default - */ - updated_at: string - }> - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get Organization Security Policy. - * - * Retrieve the security policy of an organization. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - security-policy:read. - */ - getOrgSecurityPolicy: { - parameters: { - query?: { - /** - * Return only customized security policy rules. - */ - custom_rules_only?: boolean - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * Retrieved security policy details. - */ - 200: { - content: { - 'application/json': { - securityPolicyRules?: { - gptSecurity?: { - /** - * The action to take for gptSecurity issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptAnomaly?: { - /** - * The action to take for gptAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptMalware?: { - /** - * The action to take for gptMalware issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - filesystemAccess?: { - /** - * The action to take for filesystemAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - networkAccess?: { - /** - * The action to take for networkAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shellAccess?: { - /** - * The action to take for shellAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - debugAccess?: { - /** - * The action to take for debugAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromePermission?: { - /** - * The action to take for chromePermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeHostPermission?: { - /** - * The action to take for chromeHostPermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeWildcardHostPermission?: { - /** - * The action to take for chromeWildcardHostPermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeContentScript?: { - /** - * The action to take for chromeContentScript issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - criticalCVE?: { - /** - * The action to take for criticalCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - cve?: { - /** - * The action to take for cve issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mediumCVE?: { - /** - * The action to take for mediumCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mildCVE?: { - /** - * The action to take for mildCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - emptyPackage?: { - /** - * The action to take for emptyPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - trivialPackage?: { - /** - * The action to take for trivialPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noREADME?: { - /** - * The action to take for noREADME issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingLockfile?: { - /** - * The action to take for missingLockfile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - oversizedManifest?: { - /** - * The action to take for oversizedManifest issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shrinkwrap?: { - /** - * The action to take for shrinkwrap issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - tooManyFiles?: { - /** - * The action to take for tooManyFiles issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - generic?: { - /** - * The action to take for generic issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToSink?: { - /** - * The action to take for ghaArgToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaEnvToSink?: { - /** - * The action to take for ghaEnvToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToSink?: { - /** - * The action to take for ghaContextToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToOutput?: { - /** - * The action to take for ghaArgToOutput issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToEnv?: { - /** - * The action to take for ghaArgToEnv issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToOutput?: { - /** - * The action to take for ghaContextToOutput issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToEnv?: { - /** - * The action to take for ghaContextToEnv issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - recentlyPublished?: { - /** - * The action to take for recentlyPublished issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseSpdxDisj?: { - /** - * The action to take for licenseSpdxDisj issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unsafeCopyright?: { - /** - * The action to take for unsafeCopyright issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseChange?: { - /** - * The action to take for licenseChange issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonOSILicense?: { - /** - * The action to take for nonOSILicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecatedLicense?: { - /** - * The action to take for deprecatedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingLicense?: { - /** - * The action to take for missingLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonSPDXLicense?: { - /** - * The action to take for nonSPDXLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unclearLicense?: { - /** - * The action to take for unclearLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mixedLicense?: { - /** - * The action to take for mixedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - notice?: { - /** - * The action to take for notice issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - modifiedLicense?: { - /** - * The action to take for modifiedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - modifiedException?: { - /** - * The action to take for modifiedException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseException?: { - /** - * The action to take for licenseException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecatedException?: { - /** - * The action to take for deprecatedException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - miscLicenseIssues?: { - /** - * The action to take for miscLicenseIssues issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unidentifiedLicense?: { - /** - * The action to take for unidentifiedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noLicenseFound?: { - /** - * The action to take for noLicenseFound issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - explicitlyUnlicensedItem?: { - /** - * The action to take for explicitlyUnlicensedItem issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - copyleftLicense?: { - /** - * The action to take for copyleftLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonpermissiveLicense?: { - /** - * The action to take for nonpermissiveLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ambiguousClassifier?: { - /** - * The action to take for ambiguousClassifier issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - invalidPackageJSON?: { - /** - * The action to take for invalidPackageJSON issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - httpDependency?: { - /** - * The action to take for httpDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gitDependency?: { - /** - * The action to take for gitDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gitHubDependency?: { - /** - * The action to take for gitHubDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - fileDependency?: { - /** - * The action to take for fileDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noTests?: { - /** - * The action to take for noTests issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noRepository?: { - /** - * The action to take for noRepository issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badSemver?: { - /** - * The action to take for badSemver issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badSemverDependency?: { - /** - * The action to take for badSemverDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noV1?: { - /** - * The action to take for noV1 issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noWebsite?: { - /** - * The action to take for noWebsite issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noBugTracker?: { - /** - * The action to take for noBugTracker issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noAuthorData?: { - /** - * The action to take for noAuthorData issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - typeModuleCompatibility?: { - /** - * The action to take for typeModuleCompatibility issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - floatingDependency?: { - /** - * The action to take for floatingDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - manifestConfusion?: { - /** - * The action to take for manifestConfusion issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - malware?: { - /** - * The action to take for malware issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - telemetry?: { - /** - * The action to take for telemetry issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - troll?: { - /** - * The action to take for troll issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - pendingScan?: { - /** - * The action to take for pendingScan issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecated?: { - /** - * The action to take for deprecated issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chronoAnomaly?: { - /** - * The action to take for chronoAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - compromisedSSHKey?: { - /** - * The action to take for compromisedSSHKey issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - semverAnomaly?: { - /** - * The action to take for semverAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - newAuthor?: { - /** - * The action to take for newAuthor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unstableOwnership?: { - /** - * The action to take for unstableOwnership issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingAuthor?: { - /** - * The action to take for missingAuthor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unmaintained?: { - /** - * The action to take for unmaintained issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unpublished?: { - /** - * The action to take for unpublished issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - majorRefactor?: { - /** - * The action to take for majorRefactor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingTarball?: { - /** - * The action to take for missingTarball issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - suspiciousStarActivity?: { - /** - * The action to take for suspiciousStarActivity issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - notFound?: { - /** - * The action to take for notFound issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unpopularPackage?: { - /** - * The action to take for unpopularPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - policy?: { - /** - * The action to take for policy issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillAutonomyAbuse?: { - /** - * The action to take for skillAutonomyAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillCommandInjection?: { - /** - * The action to take for skillCommandInjection issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillDataExfiltration?: { - /** - * The action to take for skillDataExfiltration issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillDiscoveryAbuse?: { - /** - * The action to take for skillDiscoveryAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillHardcodedSecrets?: { - /** - * The action to take for skillHardcodedSecrets issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillObfuscation?: { - /** - * The action to take for skillObfuscation issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillPreExecution?: { - /** - * The action to take for skillPreExecution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillPromptInjection?: { - /** - * The action to take for skillPromptInjection issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillResourceAbuse?: { - /** - * The action to take for skillResourceAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillSupplyChain?: { - /** - * The action to take for skillSupplyChain issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillToolAbuse?: { - /** - * The action to take for skillToolAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillToolChaining?: { - /** - * The action to take for skillToolChaining issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillTransitiveTrust?: { - /** - * The action to take for skillTransitiveTrust issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - socketUpgradeAvailable?: { - /** - * The action to take for socketUpgradeAvailable issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - longStrings?: { - /** - * The action to take for longStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - highEntropyStrings?: { - /** - * The action to take for highEntropyStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - urlStrings?: { - /** - * The action to take for urlStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - usesEval?: { - /** - * The action to take for usesEval issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - dynamicRequire?: { - /** - * The action to take for dynamicRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - envVars?: { - /** - * The action to take for envVars issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingDependency?: { - /** - * The action to take for missingDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unusedDependency?: { - /** - * The action to take for unusedDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - peerDependency?: { - /** - * The action to take for peerDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - uncaughtOptionalDependency?: { - /** - * The action to take for uncaughtOptionalDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unresolvedRequire?: { - /** - * The action to take for unresolvedRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - extraneousDependency?: { - /** - * The action to take for extraneousDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - obfuscatedRequire?: { - /** - * The action to take for obfuscatedRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - obfuscatedFile?: { - /** - * The action to take for obfuscatedFile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - minifiedFile?: { - /** - * The action to take for minifiedFile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - installScripts?: { - /** - * The action to take for installScripts issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - hasNativeCode?: { - /** - * The action to take for hasNativeCode issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - binScriptConfusion?: { - /** - * The action to take for binScriptConfusion issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shellScriptOverride?: { - /** - * The action to take for shellScriptOverride issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - didYouMean?: { - /** - * The action to take for didYouMean issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptDidYouMean?: { - /** - * The action to take for gptDidYouMean issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - bidi?: { - /** - * The action to take for bidi issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - zeroWidth?: { - /** - * The action to take for zeroWidth issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badEncoding?: { - /** - * The action to take for badEncoding issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - homoglyphs?: { - /** - * The action to take for homoglyphs issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - invisibleChars?: { - /** - * The action to take for invisibleChars issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - suspiciousString?: { - /** - * The action to take for suspiciousString issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - potentialVulnerability?: { - /** - * The action to take for potentialVulnerability issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxProposedApiUsage?: { - /** - * The action to take for vsxProposedApiUsage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxActivationWildcard?: { - /** - * The action to take for vsxActivationWildcard issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxWorkspaceContainsActivation?: { - /** - * The action to take for vsxWorkspaceContainsActivation issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxUntrustedWorkspaceSupported?: { - /** - * The action to take for vsxUntrustedWorkspaceSupported issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxVirtualWorkspaceSupported?: { - /** - * The action to take for vsxVirtualWorkspaceSupported issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxWebviewContribution?: { - /** - * The action to take for vsxWebviewContribution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxDebuggerContribution?: { - /** - * The action to take for vsxDebuggerContribution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxExtensionDependency?: { - /** - * The action to take for vsxExtensionDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxExtensionPack?: { - /** - * The action to take for vsxExtensionPack issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - } - /** - * The default security policy for the organization. - * - * @default default - * - * @enum {string} - */ - securityPolicyDefault?: 'default' | 'low' | 'medium' | 'high' - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Update Security Policy. - * - * Update the security policy of an organization. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - security-policy:update. - */ - updateOrgSecurityPolicy: { - parameters: { - query?: { - /** - * Return only customized security policy rules in the response. - */ - custom_rules_only?: boolean - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - requestBody?: { - content: { - 'application/json': { - /** - * The default security policy for the organization. - * - * @enum {string} - */ - policyDefault?: 'default' | 'low' | 'medium' | 'high' - policyRules?: { - gptSecurity?: { - /** - * The action to take for gptSecurity issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptAnomaly?: { - /** - * The action to take for gptAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptMalware?: { - /** - * The action to take for gptMalware issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - filesystemAccess?: { - /** - * The action to take for filesystemAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - networkAccess?: { - /** - * The action to take for networkAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shellAccess?: { - /** - * The action to take for shellAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - debugAccess?: { - /** - * The action to take for debugAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromePermission?: { - /** - * The action to take for chromePermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeHostPermission?: { - /** - * The action to take for chromeHostPermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeWildcardHostPermission?: { - /** - * The action to take for chromeWildcardHostPermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeContentScript?: { - /** - * The action to take for chromeContentScript issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - criticalCVE?: { - /** - * The action to take for criticalCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - cve?: { - /** - * The action to take for cve issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mediumCVE?: { - /** - * The action to take for mediumCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mildCVE?: { - /** - * The action to take for mildCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - emptyPackage?: { - /** - * The action to take for emptyPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - trivialPackage?: { - /** - * The action to take for trivialPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noREADME?: { - /** - * The action to take for noREADME issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingLockfile?: { - /** - * The action to take for missingLockfile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - oversizedManifest?: { - /** - * The action to take for oversizedManifest issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shrinkwrap?: { - /** - * The action to take for shrinkwrap issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - tooManyFiles?: { - /** - * The action to take for tooManyFiles issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - generic?: { - /** - * The action to take for generic issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToSink?: { - /** - * The action to take for ghaArgToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaEnvToSink?: { - /** - * The action to take for ghaEnvToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToSink?: { - /** - * The action to take for ghaContextToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToOutput?: { - /** - * The action to take for ghaArgToOutput issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToEnv?: { - /** - * The action to take for ghaArgToEnv issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToOutput?: { - /** - * The action to take for ghaContextToOutput issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToEnv?: { - /** - * The action to take for ghaContextToEnv issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - recentlyPublished?: { - /** - * The action to take for recentlyPublished issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseSpdxDisj?: { - /** - * The action to take for licenseSpdxDisj issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unsafeCopyright?: { - /** - * The action to take for unsafeCopyright issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseChange?: { - /** - * The action to take for licenseChange issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonOSILicense?: { - /** - * The action to take for nonOSILicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecatedLicense?: { - /** - * The action to take for deprecatedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingLicense?: { - /** - * The action to take for missingLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonSPDXLicense?: { - /** - * The action to take for nonSPDXLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unclearLicense?: { - /** - * The action to take for unclearLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mixedLicense?: { - /** - * The action to take for mixedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - notice?: { - /** - * The action to take for notice issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - modifiedLicense?: { - /** - * The action to take for modifiedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - modifiedException?: { - /** - * The action to take for modifiedException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseException?: { - /** - * The action to take for licenseException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecatedException?: { - /** - * The action to take for deprecatedException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - miscLicenseIssues?: { - /** - * The action to take for miscLicenseIssues issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unidentifiedLicense?: { - /** - * The action to take for unidentifiedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noLicenseFound?: { - /** - * The action to take for noLicenseFound issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - explicitlyUnlicensedItem?: { - /** - * The action to take for explicitlyUnlicensedItem issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - copyleftLicense?: { - /** - * The action to take for copyleftLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonpermissiveLicense?: { - /** - * The action to take for nonpermissiveLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ambiguousClassifier?: { - /** - * The action to take for ambiguousClassifier issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - invalidPackageJSON?: { - /** - * The action to take for invalidPackageJSON issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - httpDependency?: { - /** - * The action to take for httpDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gitDependency?: { - /** - * The action to take for gitDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gitHubDependency?: { - /** - * The action to take for gitHubDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - fileDependency?: { - /** - * The action to take for fileDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noTests?: { - /** - * The action to take for noTests issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noRepository?: { - /** - * The action to take for noRepository issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badSemver?: { - /** - * The action to take for badSemver issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badSemverDependency?: { - /** - * The action to take for badSemverDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noV1?: { - /** - * The action to take for noV1 issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noWebsite?: { - /** - * The action to take for noWebsite issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noBugTracker?: { - /** - * The action to take for noBugTracker issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noAuthorData?: { - /** - * The action to take for noAuthorData issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - typeModuleCompatibility?: { - /** - * The action to take for typeModuleCompatibility issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - floatingDependency?: { - /** - * The action to take for floatingDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - manifestConfusion?: { - /** - * The action to take for manifestConfusion issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - malware?: { - /** - * The action to take for malware issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - telemetry?: { - /** - * The action to take for telemetry issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - troll?: { - /** - * The action to take for troll issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - pendingScan?: { - /** - * The action to take for pendingScan issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecated?: { - /** - * The action to take for deprecated issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chronoAnomaly?: { - /** - * The action to take for chronoAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - compromisedSSHKey?: { - /** - * The action to take for compromisedSSHKey issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - semverAnomaly?: { - /** - * The action to take for semverAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - newAuthor?: { - /** - * The action to take for newAuthor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unstableOwnership?: { - /** - * The action to take for unstableOwnership issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingAuthor?: { - /** - * The action to take for missingAuthor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unmaintained?: { - /** - * The action to take for unmaintained issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unpublished?: { - /** - * The action to take for unpublished issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - majorRefactor?: { - /** - * The action to take for majorRefactor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingTarball?: { - /** - * The action to take for missingTarball issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - suspiciousStarActivity?: { - /** - * The action to take for suspiciousStarActivity issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - notFound?: { - /** - * The action to take for notFound issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unpopularPackage?: { - /** - * The action to take for unpopularPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - policy?: { - /** - * The action to take for policy issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillAutonomyAbuse?: { - /** - * The action to take for skillAutonomyAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillCommandInjection?: { - /** - * The action to take for skillCommandInjection issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillDataExfiltration?: { - /** - * The action to take for skillDataExfiltration issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillDiscoveryAbuse?: { - /** - * The action to take for skillDiscoveryAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillHardcodedSecrets?: { - /** - * The action to take for skillHardcodedSecrets issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillObfuscation?: { - /** - * The action to take for skillObfuscation issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillPreExecution?: { - /** - * The action to take for skillPreExecution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillPromptInjection?: { - /** - * The action to take for skillPromptInjection issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillResourceAbuse?: { - /** - * The action to take for skillResourceAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillSupplyChain?: { - /** - * The action to take for skillSupplyChain issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillToolAbuse?: { - /** - * The action to take for skillToolAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillToolChaining?: { - /** - * The action to take for skillToolChaining issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillTransitiveTrust?: { - /** - * The action to take for skillTransitiveTrust issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - socketUpgradeAvailable?: { - /** - * The action to take for socketUpgradeAvailable issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - longStrings?: { - /** - * The action to take for longStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - highEntropyStrings?: { - /** - * The action to take for highEntropyStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - urlStrings?: { - /** - * The action to take for urlStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - usesEval?: { - /** - * The action to take for usesEval issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - dynamicRequire?: { - /** - * The action to take for dynamicRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - envVars?: { - /** - * The action to take for envVars issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingDependency?: { - /** - * The action to take for missingDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unusedDependency?: { - /** - * The action to take for unusedDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - peerDependency?: { - /** - * The action to take for peerDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - uncaughtOptionalDependency?: { - /** - * The action to take for uncaughtOptionalDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unresolvedRequire?: { - /** - * The action to take for unresolvedRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - extraneousDependency?: { - /** - * The action to take for extraneousDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - obfuscatedRequire?: { - /** - * The action to take for obfuscatedRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - obfuscatedFile?: { - /** - * The action to take for obfuscatedFile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - minifiedFile?: { - /** - * The action to take for minifiedFile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - installScripts?: { - /** - * The action to take for installScripts issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - hasNativeCode?: { - /** - * The action to take for hasNativeCode issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - binScriptConfusion?: { - /** - * The action to take for binScriptConfusion issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shellScriptOverride?: { - /** - * The action to take for shellScriptOverride issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - didYouMean?: { - /** - * The action to take for didYouMean issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptDidYouMean?: { - /** - * The action to take for gptDidYouMean issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - bidi?: { - /** - * The action to take for bidi issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - zeroWidth?: { - /** - * The action to take for zeroWidth issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badEncoding?: { - /** - * The action to take for badEncoding issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - homoglyphs?: { - /** - * The action to take for homoglyphs issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - invisibleChars?: { - /** - * The action to take for invisibleChars issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - suspiciousString?: { - /** - * The action to take for suspiciousString issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - potentialVulnerability?: { - /** - * The action to take for potentialVulnerability issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxProposedApiUsage?: { - /** - * The action to take for vsxProposedApiUsage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxActivationWildcard?: { - /** - * The action to take for vsxActivationWildcard issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxWorkspaceContainsActivation?: { - /** - * The action to take for vsxWorkspaceContainsActivation issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxUntrustedWorkspaceSupported?: { - /** - * The action to take for vsxUntrustedWorkspaceSupported issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxVirtualWorkspaceSupported?: { - /** - * The action to take for vsxVirtualWorkspaceSupported issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxWebviewContribution?: { - /** - * The action to take for vsxWebviewContribution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxDebuggerContribution?: { - /** - * The action to take for vsxDebuggerContribution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxExtensionDependency?: { - /** - * The action to take for vsxExtensionDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxExtensionPack?: { - /** - * The action to take for vsxExtensionPack issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - } - /** - * Reset the policy rules to the default. When set to true, do not - * include any policyRules updates. - * - * @default false - */ - resetPolicyRules?: boolean - } - } - } - responses: { - /** - * Updated repository details. - */ - 200: { - content: { - 'application/json': { - securityPolicyRules?: { - gptSecurity?: { - /** - * The action to take for gptSecurity issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptAnomaly?: { - /** - * The action to take for gptAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptMalware?: { - /** - * The action to take for gptMalware issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - filesystemAccess?: { - /** - * The action to take for filesystemAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - networkAccess?: { - /** - * The action to take for networkAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shellAccess?: { - /** - * The action to take for shellAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - debugAccess?: { - /** - * The action to take for debugAccess issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromePermission?: { - /** - * The action to take for chromePermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeHostPermission?: { - /** - * The action to take for chromeHostPermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeWildcardHostPermission?: { - /** - * The action to take for chromeWildcardHostPermission issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chromeContentScript?: { - /** - * The action to take for chromeContentScript issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - criticalCVE?: { - /** - * The action to take for criticalCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - cve?: { - /** - * The action to take for cve issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mediumCVE?: { - /** - * The action to take for mediumCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mildCVE?: { - /** - * The action to take for mildCVE issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - emptyPackage?: { - /** - * The action to take for emptyPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - trivialPackage?: { - /** - * The action to take for trivialPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noREADME?: { - /** - * The action to take for noREADME issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingLockfile?: { - /** - * The action to take for missingLockfile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - oversizedManifest?: { - /** - * The action to take for oversizedManifest issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shrinkwrap?: { - /** - * The action to take for shrinkwrap issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - tooManyFiles?: { - /** - * The action to take for tooManyFiles issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - generic?: { - /** - * The action to take for generic issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToSink?: { - /** - * The action to take for ghaArgToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaEnvToSink?: { - /** - * The action to take for ghaEnvToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToSink?: { - /** - * The action to take for ghaContextToSink issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToOutput?: { - /** - * The action to take for ghaArgToOutput issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaArgToEnv?: { - /** - * The action to take for ghaArgToEnv issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToOutput?: { - /** - * The action to take for ghaContextToOutput issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ghaContextToEnv?: { - /** - * The action to take for ghaContextToEnv issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - recentlyPublished?: { - /** - * The action to take for recentlyPublished issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseSpdxDisj?: { - /** - * The action to take for licenseSpdxDisj issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unsafeCopyright?: { - /** - * The action to take for unsafeCopyright issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseChange?: { - /** - * The action to take for licenseChange issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonOSILicense?: { - /** - * The action to take for nonOSILicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecatedLicense?: { - /** - * The action to take for deprecatedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingLicense?: { - /** - * The action to take for missingLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonSPDXLicense?: { - /** - * The action to take for nonSPDXLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unclearLicense?: { - /** - * The action to take for unclearLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - mixedLicense?: { - /** - * The action to take for mixedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - notice?: { - /** - * The action to take for notice issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - modifiedLicense?: { - /** - * The action to take for modifiedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - modifiedException?: { - /** - * The action to take for modifiedException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - licenseException?: { - /** - * The action to take for licenseException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecatedException?: { - /** - * The action to take for deprecatedException issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - miscLicenseIssues?: { - /** - * The action to take for miscLicenseIssues issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unidentifiedLicense?: { - /** - * The action to take for unidentifiedLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noLicenseFound?: { - /** - * The action to take for noLicenseFound issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - explicitlyUnlicensedItem?: { - /** - * The action to take for explicitlyUnlicensedItem issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - copyleftLicense?: { - /** - * The action to take for copyleftLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - nonpermissiveLicense?: { - /** - * The action to take for nonpermissiveLicense issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - ambiguousClassifier?: { - /** - * The action to take for ambiguousClassifier issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - invalidPackageJSON?: { - /** - * The action to take for invalidPackageJSON issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - httpDependency?: { - /** - * The action to take for httpDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gitDependency?: { - /** - * The action to take for gitDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gitHubDependency?: { - /** - * The action to take for gitHubDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - fileDependency?: { - /** - * The action to take for fileDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noTests?: { - /** - * The action to take for noTests issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noRepository?: { - /** - * The action to take for noRepository issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badSemver?: { - /** - * The action to take for badSemver issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badSemverDependency?: { - /** - * The action to take for badSemverDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noV1?: { - /** - * The action to take for noV1 issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noWebsite?: { - /** - * The action to take for noWebsite issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noBugTracker?: { - /** - * The action to take for noBugTracker issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - noAuthorData?: { - /** - * The action to take for noAuthorData issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - typeModuleCompatibility?: { - /** - * The action to take for typeModuleCompatibility issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - floatingDependency?: { - /** - * The action to take for floatingDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - manifestConfusion?: { - /** - * The action to take for manifestConfusion issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - malware?: { - /** - * The action to take for malware issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - telemetry?: { - /** - * The action to take for telemetry issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - troll?: { - /** - * The action to take for troll issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - pendingScan?: { - /** - * The action to take for pendingScan issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - deprecated?: { - /** - * The action to take for deprecated issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - chronoAnomaly?: { - /** - * The action to take for chronoAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - compromisedSSHKey?: { - /** - * The action to take for compromisedSSHKey issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - semverAnomaly?: { - /** - * The action to take for semverAnomaly issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - newAuthor?: { - /** - * The action to take for newAuthor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unstableOwnership?: { - /** - * The action to take for unstableOwnership issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingAuthor?: { - /** - * The action to take for missingAuthor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unmaintained?: { - /** - * The action to take for unmaintained issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unpublished?: { - /** - * The action to take for unpublished issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - majorRefactor?: { - /** - * The action to take for majorRefactor issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingTarball?: { - /** - * The action to take for missingTarball issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - suspiciousStarActivity?: { - /** - * The action to take for suspiciousStarActivity issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - notFound?: { - /** - * The action to take for notFound issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unpopularPackage?: { - /** - * The action to take for unpopularPackage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - policy?: { - /** - * The action to take for policy issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillAutonomyAbuse?: { - /** - * The action to take for skillAutonomyAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillCommandInjection?: { - /** - * The action to take for skillCommandInjection issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillDataExfiltration?: { - /** - * The action to take for skillDataExfiltration issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillDiscoveryAbuse?: { - /** - * The action to take for skillDiscoveryAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillHardcodedSecrets?: { - /** - * The action to take for skillHardcodedSecrets issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillObfuscation?: { - /** - * The action to take for skillObfuscation issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillPreExecution?: { - /** - * The action to take for skillPreExecution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillPromptInjection?: { - /** - * The action to take for skillPromptInjection issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillResourceAbuse?: { - /** - * The action to take for skillResourceAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillSupplyChain?: { - /** - * The action to take for skillSupplyChain issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillToolAbuse?: { - /** - * The action to take for skillToolAbuse issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillToolChaining?: { - /** - * The action to take for skillToolChaining issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - skillTransitiveTrust?: { - /** - * The action to take for skillTransitiveTrust issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - socketUpgradeAvailable?: { - /** - * The action to take for socketUpgradeAvailable issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - longStrings?: { - /** - * The action to take for longStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - highEntropyStrings?: { - /** - * The action to take for highEntropyStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - urlStrings?: { - /** - * The action to take for urlStrings issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - usesEval?: { - /** - * The action to take for usesEval issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - dynamicRequire?: { - /** - * The action to take for dynamicRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - envVars?: { - /** - * The action to take for envVars issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - missingDependency?: { - /** - * The action to take for missingDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unusedDependency?: { - /** - * The action to take for unusedDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - peerDependency?: { - /** - * The action to take for peerDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - uncaughtOptionalDependency?: { - /** - * The action to take for uncaughtOptionalDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - unresolvedRequire?: { - /** - * The action to take for unresolvedRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - extraneousDependency?: { - /** - * The action to take for extraneousDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - obfuscatedRequire?: { - /** - * The action to take for obfuscatedRequire issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - obfuscatedFile?: { - /** - * The action to take for obfuscatedFile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - minifiedFile?: { - /** - * The action to take for minifiedFile issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - installScripts?: { - /** - * The action to take for installScripts issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - hasNativeCode?: { - /** - * The action to take for hasNativeCode issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - binScriptConfusion?: { - /** - * The action to take for binScriptConfusion issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - shellScriptOverride?: { - /** - * The action to take for shellScriptOverride issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - didYouMean?: { - /** - * The action to take for didYouMean issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - gptDidYouMean?: { - /** - * The action to take for gptDidYouMean issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - bidi?: { - /** - * The action to take for bidi issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - zeroWidth?: { - /** - * The action to take for zeroWidth issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - badEncoding?: { - /** - * The action to take for badEncoding issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - homoglyphs?: { - /** - * The action to take for homoglyphs issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - invisibleChars?: { - /** - * The action to take for invisibleChars issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - suspiciousString?: { - /** - * The action to take for suspiciousString issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - potentialVulnerability?: { - /** - * The action to take for potentialVulnerability issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxProposedApiUsage?: { - /** - * The action to take for vsxProposedApiUsage issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxActivationWildcard?: { - /** - * The action to take for vsxActivationWildcard issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxWorkspaceContainsActivation?: { - /** - * The action to take for vsxWorkspaceContainsActivation issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxUntrustedWorkspaceSupported?: { - /** - * The action to take for vsxUntrustedWorkspaceSupported issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxVirtualWorkspaceSupported?: { - /** - * The action to take for vsxVirtualWorkspaceSupported issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxWebviewContribution?: { - /** - * The action to take for vsxWebviewContribution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxDebuggerContribution?: { - /** - * The action to take for vsxDebuggerContribution issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxExtensionDependency?: { - /** - * The action to take for vsxExtensionDependency issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - vsxExtensionPack?: { - /** - * The action to take for vsxExtensionPack issues. - * - * @enum {string} - */ - action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore' - } - } - /** - * The default security policy for the organization. - * - * @default default - * - * @enum {string} - */ - securityPolicyDefault?: 'default' | 'low' | 'medium' | 'high' - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 409: components['responses']['SocketConflict'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get Organization License Policy. - * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/viewlicensepolicy) instead. - * Retrieve the license policy of an organization. This endpoint consumes 1 - * unit of your quota. This endpoint requires the following org token scopes: - * - * - License-policy:read - * - * @deprecated - */ - getOrgLicensePolicy: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * Retrieved license policy details. - */ - 200: { - content: { - 'application/json': Record - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Update License Policy. - * - * Set the organization's license policy. - * - * ## License policy schema - * - * ```json - * { - * allow?: Array - * warn?: Array - * options?: Array - * } - * ``` - * - * Elements of the `allow` and `warn` arrays strings representing items which - * should be allowed, or which should trigger a warning; license data found in - * package which not present in either array will produce a license violation - * (effectively a "hard" error). For example, to allow Apache-2.0 and MIT to - * the allow list, simply add the strings "Apache-2.0" and "MIT" to the - * `allow` array. Strings appearing in these arrays are generally "what you - * see is what you get", with two important exceptions: strings which are - * recognized as license classes and strings which are recognized as PURLs are - * handled differently to allow for more flexible license policy creation. - * - * ## License Classes - * - * Strings which are license classes will expand to a list of licenses known - * to be in that particular license class. Recognized license classes are: - * 'permissive', 'permissive (model)', 'permissive (gold)', 'permissive - * (silver)', 'permissive (bronze)', 'permissive (lead)', 'copyleft', 'maximal - * copyleft', 'network copyleft', 'strong copyleft', 'weak copyleft', - * 'contributor license agreement', 'public domain', 'proprietary free', - * 'source available', 'proprietary', 'commercial', 'patent' Users can learn - * more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and - * [permissive tiers](https://blueoakcouncil.org/list) by reading the linked - * resources. - * - * ## PURLs - * - * Users may also modify their license policy's allow and warn lists by using - * [package URLs](https://github.com/package-url/purl-spec) (aka PURLs), which - * support glob patterns to allow a range of versions, files and directories, - * etc. purl qualifiers which support globs are `filename`, `version_glob`, - * `artifact_id` and `license_provenance` (primarily used for allowing data - * from registry metadata). - * - * ### Examples: - * - * Allow all license data found in a specific version of a package 4.14.1: - * `pkg:npm/lodash@4.14.1` Allow all license data found in a version range of - * a package: `pkg:npm/lodash?version_glob=15.*` Allow all license data in the - * test directory of a given package for certain version ranges: - * `pkg:npm/lodash@15.*.*?file_name=lodash/test/*` Allow all license data - * taken from the package registry for a package and version range: - * `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata` - * - * ## Available options - * - * `toplevelOnly`: only apply the license policy to "top level" license data - * in a package, which includes registry metadata, LICENSE files, and manifest - * files which are closest to the root of the package. `applyToUnidentified`: - * Apply license policy to found but unidentified license data. If enabled, - * the license policy will be applied to license data which could not be - * affirmatively identified as a known license (this will effectively merge - * the license policy violation and unidentified license alerts). If disabled, - * license policy alerts will only be shown for license data which is - * positively identified as something not allowed or set to warn by the - * license policy. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - * - * - License-policy:update - */ - updateOrgLicensePolicy: { - parameters: { - query: { - /** - * Merge the policy update with the existing policy. Default is true. If - * false, the existing policy will be replaced with the new policy. - */ - merge_update: boolean - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - requestBody?: { - content: { - 'application/json': Record - } - } - responses: { - /** - * Updated repository details. - */ - 200: { - content: { - 'application/json': Record - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get License Policy (Beta) - * - * Returns an organization's license policy including allow, warn, monitor, - * and deny categories. The deny category contains all licenses that are not - * explicitly categorized as allow, warn, or monitor. This endpoint consumes 1 - * unit of your quota. This endpoint requires the following org token scopes: - * - license-policy:read. - */ - viewLicensePolicy: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * Saturated License Allow List. - */ - 200: { - content: { - 'application/json': components['schemas']['SStoredLicensePolicy'] - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - 500: components['responses']['SocketInternalServerError'] - } - } - /** - * Get Socket Basics configuration, including toggles for the various tools it - * supports. - * - * Socket Basics is a CI/CD security scanning suite that runs on your source - * code, designed to complement Socket SCA and provide full coverage. - * - * - **SAST** - Find issues and risks with your code via static analysis using - * best in class Open Source tools - * - **Secret Scanning** - Detected potentially leaked secrets and credentials - * within your code - * - **Container Security** - Docker image and Dockerfile vulnerability scanning - * This endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: - * - Socket-basics:read - */ - getSocketBasicsConfig: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * Socket Basics settings. - */ - 200: { - content: { - 'application/json': { - /** - * Enable tabular console output. - * - * @default false - */ - consoleTabularEnabled?: boolean - /** - * Enable JSON console output. - * - * @default false - */ - consoleJsonEnabled?: boolean - /** - * Enable verbose logging. - * - * @default false - */ - verbose?: boolean - /** - * Enable all language SAST scanning. - * - * @default false - */ - allLanguagesEnabled?: boolean - /** - * Run Python SAST scanning. - * - * @default false - */ - pythonSastEnabled?: boolean - /** - * Run JavaScript SAST scanning. - * - * @default false - */ - javascriptSastEnabled?: boolean - /** - * Run Go SAST scanning. - * - * @default false - */ - goSastEnabled?: boolean - /** - * Run Golang SAST scanning. - * - * @default false - */ - golangSastEnabled?: boolean - /** - * Run Java SAST scanning. - * - * @default false - */ - javaSastEnabled?: boolean - /** - * Run PHP SAST scanning. - * - * @default false - */ - phpSastEnabled?: boolean - /** - * Run Ruby SAST scanning. - * - * @default false - */ - rubySastEnabled?: boolean - /** - * Run C# SAST scanning. - * - * @default false - */ - csharpSastEnabled?: boolean - /** - * Run .NET SAST scanning. - * - * @default false - */ - dotnetSastEnabled?: boolean - /** - * Run C SAST scanning. - * - * @default false - */ - cSastEnabled?: boolean - /** - * Run C++ SAST scanning. - * - * @default false - */ - cppSastEnabled?: boolean - /** - * Run Kotlin SAST scanning. - * - * @default false - */ - kotlinSastEnabled?: boolean - /** - * Run Scala SAST scanning. - * - * @default false - */ - scalaSastEnabled?: boolean - /** - * Run Swift SAST scanning. - * - * @default false - */ - swiftSastEnabled?: boolean - /** - * Run Rust SAST scanning. - * - * @default false - */ - rustSastEnabled?: boolean - /** - * Run Elixir SAST scanning. - * - * @default false - */ - elixirSastEnabled?: boolean - /** - * Enable all SAST rules. - * - * @default false - */ - allRulesEnabled?: boolean - /** - * Comma-separated list of enabled Python SAST rules. - * - * @default - */ - pythonEnabledRules?: string - /** - * Comma-separated list of disabled Python SAST rules. - * - * @default - */ - pythonDisabledRules?: string - /** - * Comma-separated list of enabled JavaScript SAST rules. - * - * @default - */ - javascriptEnabledRules?: string - /** - * Comma-separated list of disabled JavaScript SAST rules. - * - * @default - */ - javascriptDisabledRules?: string - /** - * Comma-separated list of enabled Go SAST rules. - * - * @default - */ - goEnabledRules?: string - /** - * Comma-separated list of disabled Go SAST rules. - * - * @default - */ - goDisabledRules?: string - /** - * Comma-separated list of enabled Java SAST rules. - * - * @default - */ - javaEnabledRules?: string - /** - * Comma-separated list of disabled Java SAST rules. - * - * @default - */ - javaDisabledRules?: string - /** - * Comma-separated list of enabled Kotlin SAST rules. - * - * @default - */ - kotlinEnabledRules?: string - /** - * Comma-separated list of disabled Kotlin SAST rules. - * - * @default - */ - kotlinDisabledRules?: string - /** - * Comma-separated list of enabled Scala SAST rules. - * - * @default - */ - scalaEnabledRules?: string - /** - * Comma-separated list of disabled Scala SAST rules. - * - * @default - */ - scalaDisabledRules?: string - /** - * Comma-separated list of enabled PHP SAST rules. - * - * @default - */ - phpEnabledRules?: string - /** - * Comma-separated list of disabled PHP SAST rules. - * - * @default - */ - phpDisabledRules?: string - /** - * Comma-separated list of enabled Ruby SAST rules. - * - * @default - */ - rubyEnabledRules?: string - /** - * Comma-separated list of disabled Ruby SAST rules. - * - * @default - */ - rubyDisabledRules?: string - /** - * Comma-separated list of enabled C# SAST rules. - * - * @default - */ - csharpEnabledRules?: string - /** - * Comma-separated list of disabled C# SAST rules. - * - * @default - */ - csharpDisabledRules?: string - /** - * Comma-separated list of enabled .NET SAST rules. - * - * @default - */ - dotnetEnabledRules?: string - /** - * Comma-separated list of disabled .NET SAST rules. - * - * @default - */ - dotnetDisabledRules?: string - /** - * Comma-separated list of enabled C SAST rules. - * - * @default - */ - cEnabledRules?: string - /** - * Comma-separated list of disabled C SAST rules. - * - * @default - */ - cDisabledRules?: string - /** - * Comma-separated list of enabled C++ SAST rules. - * - * @default - */ - cppEnabledRules?: string - /** - * Comma-separated list of disabled C++ SAST rules. - * - * @default - */ - cppDisabledRules?: string - /** - * Comma-separated list of enabled Swift SAST rules. - * - * @default - */ - swiftEnabledRules?: string - /** - * Comma-separated list of disabled Swift SAST rules. - * - * @default - */ - swiftDisabledRules?: string - /** - * Comma-separated list of enabled Rust SAST rules. - * - * @default - */ - rustEnabledRules?: string - /** - * Comma-separated list of disabled Rust SAST rules. - * - * @default - */ - rustDisabledRules?: string - /** - * Comma-separated list of enabled Elixir SAST rules. - * - * @default - */ - elixirEnabledRules?: string - /** - * Comma-separated list of disabled Elixir SAST rules. - * - * @default - */ - elixirDisabledRules?: string - /** - * Notification method for OpenGrep. - * - * @default - */ - openGrepNotificationMethod?: string - /** - * Enable Socket full application reachability analysis. - * - * @default false - */ - socketTier1Enabled?: boolean - /** - * Additional parameters for Socket SCA. - * - * @default - */ - socketAdditionalParams?: string - /** - * Enable secret scanning. - * - * @default false - */ - secretScanningEnabled?: boolean - /** - * Directories to exclude from Trufflehog scanning. - * - * @default - */ - trufflehogExcludeDir?: string - /** - * Show unverified secrets in Trufflehog results. - * - * @default false - */ - trufflehogShowUnverified?: boolean - /** - * Notification method for Trufflehog. - * - * @default - */ - trufflehogNotificationMethod?: string - /** - * Comma-separated list of container images to scan. - * - * @default - */ - containerImagesToScan?: string - /** - * Comma-separated list of Dockerfiles to scan. - * - * @default - */ - dockerfiles?: string - /** - * Enable Trivy image scanning. - * - * @default false - */ - trivyImageEnabled?: boolean - /** - * Enable Trivy Dockerfile scanning. - * - * @default false - */ - trivyDockerfileEnabled?: boolean - /** - * Notification method for Trivy. - * - * @default - */ - trivyNotificationMethod?: string - /** - * Comma-separated list of disabled Trivy rules. - * - * @default - */ - trivyDisabledRules?: string - /** - * Disable Trivy image scanning. - * - * @default false - */ - trivyImageScanningDisabled?: boolean - /** - * Slack webhook URL for notifications. - * - * @default - */ - slackWebhookUrl?: string - /** - * Generic webhook URL for notifications. - * - * @default - */ - webhookUrl?: string - /** - * Microsoft Sentinel workspace ID. - * - * @default - */ - msSentinelWorkspaceId?: string - /** - * Microsoft Sentinel key. - * - * @default - */ - msSentinelKey?: string - /** - * Sumo Logic endpoint URL. - * - * @default - */ - sumologicEndpoint?: string - /** - * Jira server URL. - * - * @default - */ - jiraUrl?: string - /** - * Jira project key. - * - * @default - */ - jiraProject?: string - /** - * Jira user email. - * - * @default - */ - jiraEmail?: string - /** - * Jira API token. - * - * @default - */ - jiraApiToken?: string - /** - * GitHub API token. - * - * @default - */ - githubToken?: string - /** - * GitHub API URL. - * - * @default - */ - githubApiUrl?: string - /** - * Microsoft Teams webhook URL. - * - * @default - */ - msteamsWebhookUrl?: string - /** - * Enable S3 upload for scan results. - * - * @default false - */ - s3Enabled?: boolean - /** - * S3 bucket name. - * - * @default - */ - s3Bucket?: string - /** - * S3 access key. - * - * @default - */ - s3AccessKey?: string - /** - * S3 secret key. - * - * @default - */ - s3SecretKey?: string - /** - * S3 endpoint URL. - * - * @default - */ - s3Endpoint?: string - /** - * S3 region. - * - * @default - */ - s3Region?: string - /** - * Enable external CVE scanning. - * - * @default false - */ - externalCveScanningEnabled?: boolean - /** - * Enable Socket dependency scanning (legacy) - * - * @default false - */ - socketScanningEnabled?: boolean - /** - * Enable Socket SCA scanning (legacy) - * - * @default false - */ - socketScaEnabled?: boolean - /** - * Additional configuration parameters (legacy) - * - * @default - */ - additionalParameters?: string - } - } - } - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * List historical alerts (Beta) - * - * List historical alerts. Pagination: keep requesting pages (passing the - * previous response's `endCursor` as `startAfterCursor`) until `endCursor` is - * `null`. Do not stop when `items` is empty — an empty page can be returned - * while more results still remain on later pages, so `endCursor` being `null` - * is the only reliable end-of-results signal. This endpoint consumes 10 units - * of your quota. This endpoint requires the following org token scopes: - - * historical:alerts-list. - */ - historicalAlertsList: { - parameters: { - query?: { - /** - * The UTC date in YYYY-MM-DD format for which to fetch alerts. - */ - date?: string - /** - * The number of days of data to fetch as an offset from input date - * (e.g. "-7d" or "7d") or use "latest" to query for latest alerts for - * each repo. - */ - range?: string - /** - * Specify the maximum number of results to return per page - * (intermediate pages may have fewer than this limit and callers should - * always check "endCursor" in response body to know if there are more - * pages) - */ - per_page?: number - /** - * The pagination cursor that was returned as the "endCursor" property - * in previous request. - */ - startAfterCursor?: string - /** - * Comma-separated list of alert actions ("error", "warn", "monitor", or - * "ignore) that should be included. - */ - 'filters.alertAction'?: string - /** - * Comma-separated list of alert actions ("error", "warn", "monitor", or - * "ignore) that should be excluded. - */ - 'filters.alertAction.notIn'?: string - /** - * Comma-separated list of alert action source types ("resolution", - * "alert-policy", "fallback", "injected-alert", "org-policy", - * "reachability", "repo-label-policy", "socket-yml", or "triage") that - * should be included. - */ - 'filters.alertActionSourceType'?: string - /** - * Comma-separated list of alert action source types ("resolution", - * "alert-policy", "fallback", "injected-alert", "org-policy", - * "reachability", "repo-label-policy", "socket-yml", or "triage") that - * should be excluded. - */ - 'filters.alertActionSourceType.notIn'?: string - /** - * Comma-separated list of alert categories ("supplyChainRisk", - * "maintenance", "quality", "license", or "vulnerability") that should - * be included. - */ - 'filters.alertCategory'?: string - /** - * Comma-separated list of alert categories ("supplyChainRisk", - * "maintenance", "quality", "license", or "vulnerability") that should - * be excluded. - */ - 'filters.alertCategory.notIn'?: string - /** - * CVE ID. - */ - 'filters.alertCveId'?: string - /** - * CVE ID. - */ - 'filters.alertCveId.notIn'?: string - /** - * CVE title. - */ - 'filters.alertCveTitle'?: string - /** - * CVE title. - */ - 'filters.alertCveTitle.notIn'?: string - /** - * CWE ID. - */ - 'filters.alertCweId'?: string - /** - * CWE ID. - */ - 'filters.alertCweId.notIn'?: string - /** - * CWE name. - */ - 'filters.alertCweName'?: string - /** - * CWE name. - */ - 'filters.alertCweName.notIn'?: string - /** - * Alert EPSS ("low", "medium", "high", "critical") - */ - 'filters.alertEPSS'?: string - /** - * Alert EPSS ("low", "medium", "high", "critical") - */ - 'filters.alertEPSS.notIn'?: string - /** - * Comma-separated list of alert fix types ("upgrade", "cve", or - * "remove") that should be included. - */ - 'filters.alertFixType'?: string - /** - * Comma-separated list of alert fix types ("upgrade", "cve", or - * "remove") that should be excluded. - */ - 'filters.alertFixType.notIn'?: string - /** - * Alert KEV (Known Exploited Vulnerability) filter flag. - */ - 'filters.alertKEV'?: boolean - /** - * Alert KEV (Known Exploited Vulnerability) filter flag. - */ - 'filters.alertKEV.notIn'?: boolean - /** - * Alert priority ("low", "medium", "high", or "critical") - */ - 'filters.alertPriority'?: string - /** - * Alert priority ("low", "medium", "high", or "critical") - */ - 'filters.alertPriority.notIn'?: string - /** - * Comma-separated list of alert CVE reachability analysis types - * ("full-scan" or "precomputed") that should be included. - */ - 'filters.alertReachabilityAnalysisType'?: string - /** - * Comma-separated list of alert CVE reachability analysis types - * ("full-scan" or "precomputed") that should be excluded. - */ - 'filters.alertReachabilityAnalysisType.notIn'?: string - /** - * Comma-separated list of alert CVE reachability types - * ("direct_dependency", "error", "maybe_reachable", "missing_support", - * "pending", "reachable", "undeterminable_reachability", "unknown", or - * "unreachable") that should be included. - */ - 'filters.alertReachabilityType'?: string - /** - * Comma-separated list of alert CVE reachability types - * ("direct_dependency", "error", "maybe_reachable", "missing_support", - * "pending", "reachable", "undeterminable_reachability", "unknown", or - * "unreachable") that should be excluded. - */ - 'filters.alertReachabilityType.notIn'?: string - /** - * Comma-separated list of alert severities ("low", "medium", "high", or - * "critical") that should be included. - */ - 'filters.alertSeverity'?: string - /** - * Comma-separated list of alert severities ("low", "medium", "high", or - * "critical") that should be excluded. - */ - 'filters.alertSeverity.notIn'?: string - /** - * Comma-separated list of alert types (e.g. "usesEval", "unmaintained", - * etc.) that should be included. - */ - 'filters.alertType'?: string - /** - * Comma-separated list of alert types (e.g. "usesEval", "unmaintained", - * etc.) that should be excluded. - */ - 'filters.alertType.notIn'?: string - /** - * Name of artifact. - */ - 'filters.artifactName'?: string - /** - * Name of artifact. - */ - 'filters.artifactName.notIn'?: string - /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", - * "maven", "golang", etc.) that should be included. - */ - 'filters.artifactType'?: string - /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", - * "maven", "golang", etc.) that should be excluded. - */ - 'filters.artifactType.notIn'?: string - /** - * Comma-separated list of branch names that should be included. - */ - 'filters.branch'?: string - /** - * Comma-separated list of branch names that should be excluded. - */ - 'filters.branch.notIn'?: string - /** - * Comma-separated list of patch statuses ("patch_unavailable", - * "patch_available", or "patch_applied") that should be included. - */ - 'filters.cvePatchStatus'?: string - /** - * Comma-separated list of patch statuses ("patch_unavailable", - * "patch_available", or "patch_applied") that should be excluded. - */ - 'filters.cvePatchStatus.notIn'?: string - /** - * Dead/reachable dependency filter flag. - */ - 'filters.dependencyDead'?: boolean - /** - * Dead/reachable dependency filter flag. - */ - 'filters.dependencyDead.notIn'?: boolean - /** - * Development/production dependency filter flag. - */ - 'filters.dependencyDev'?: boolean - /** - * Development/production dependency filter flag. - */ - 'filters.dependencyDev.notIn'?: boolean - /** - * Direct/transitive dependency filter flag. - */ - 'filters.dependencyDirect'?: boolean - /** - * Direct/transitive dependency filter flag. - */ - 'filters.dependencyDirect.notIn'?: boolean - /** - * Comma-separated list of repo full names that should be included. - */ - 'filters.repoFullName'?: string - /** - * Comma-separated list of repo full names that should be excluded. - */ - 'filters.repoFullName.notIn'?: string - /** - * Comma-separated list of repo labels that should be included. Use "" - * to filter for repositories with no labels. - */ - 'filters.repoLabels'?: string - /** - * Comma-separated list of repo labels that should be excluded. Use "" - * to filter for repositories with no labels. - */ - 'filters.repoLabels.notIn'?: string - /** - * Comma-separated list of repo slugs that should be included. - */ - 'filters.repoSlug'?: string - /** - * Comma-separated list of repo slugs that should be excluded. - */ - 'filters.repoSlug.notIn'?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * The paginated array of API tokens for the organization, and related - * metadata. - */ - 200: { - content: { - 'application/json': { - /** - * @default - */ - endCursor: string | null - items: Array<{ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + invalidPackageJSON?: { + /** + * @description The action to take for invalidPackageJSON issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + httpDependency?: { + /** + * @description The action to take for httpDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gitDependency?: { + /** + * @description The action to take for gitDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gitHubDependency?: { + /** + * @description The action to take for gitHubDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + fileDependency?: { + /** + * @description The action to take for fileDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noTests?: { + /** + * @description The action to take for noTests issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noRepository?: { + /** + * @description The action to take for noRepository issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badSemver?: { + /** + * @description The action to take for badSemver issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badSemverDependency?: { + /** + * @description The action to take for badSemverDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noV1?: { + /** + * @description The action to take for noV1 issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noWebsite?: { + /** + * @description The action to take for noWebsite issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noBugTracker?: { + /** + * @description The action to take for noBugTracker issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noAuthorData?: { + /** + * @description The action to take for noAuthorData issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + typeModuleCompatibility?: { + /** + * @description The action to take for typeModuleCompatibility issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + floatingDependency?: { + /** + * @description The action to take for floatingDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + manifestConfusion?: { + /** + * @description The action to take for manifestConfusion issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + malware?: { + /** + * @description The action to take for malware issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + telemetry?: { + /** + * @description The action to take for telemetry issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + troll?: { + /** + * @description The action to take for troll issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + pendingScan?: { + /** + * @description The action to take for pendingScan issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecated?: { + /** + * @description The action to take for deprecated issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chronoAnomaly?: { + /** + * @description The action to take for chronoAnomaly issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + compromisedSSHKey?: { + /** + * @description The action to take for compromisedSSHKey issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + semverAnomaly?: { + /** + * @description The action to take for semverAnomaly issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + newAuthor?: { + /** + * @description The action to take for newAuthor issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unstableOwnership?: { + /** + * @description The action to take for unstableOwnership issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingAuthor?: { + /** + * @description The action to take for missingAuthor issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unmaintained?: { + /** + * @description The action to take for unmaintained issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unpublished?: { + /** + * @description The action to take for unpublished issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + majorRefactor?: { + /** + * @description The action to take for majorRefactor issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingTarball?: { + /** + * @description The action to take for missingTarball issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + suspiciousStarActivity?: { + /** + * @description The action to take for suspiciousStarActivity issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + notFound?: { + /** + * @description The action to take for notFound issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unpopularPackage?: { + /** + * @description The action to take for unpopularPackage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + policy?: { + /** + * @description The action to take for policy issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillAutonomyAbuse?: { + /** + * @description The action to take for skillAutonomyAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillCommandInjection?: { + /** + * @description The action to take for skillCommandInjection issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillDataExfiltration?: { + /** + * @description The action to take for skillDataExfiltration issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillDiscoveryAbuse?: { + /** + * @description The action to take for skillDiscoveryAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillHardcodedSecrets?: { + /** + * @description The action to take for skillHardcodedSecrets issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillObfuscation?: { + /** + * @description The action to take for skillObfuscation issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillPreExecution?: { + /** + * @description The action to take for skillPreExecution issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillPromptInjection?: { + /** + * @description The action to take for skillPromptInjection issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillResourceAbuse?: { + /** + * @description The action to take for skillResourceAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillSupplyChain?: { + /** + * @description The action to take for skillSupplyChain issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillToolAbuse?: { + /** + * @description The action to take for skillToolAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillToolChaining?: { + /** + * @description The action to take for skillToolChaining issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillTransitiveTrust?: { + /** + * @description The action to take for skillTransitiveTrust issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + socketUpgradeAvailable?: { + /** + * @description The action to take for socketUpgradeAvailable issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + longStrings?: { + /** + * @description The action to take for longStrings issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + highEntropyStrings?: { + /** + * @description The action to take for highEntropyStrings issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + urlStrings?: { + /** + * @description The action to take for urlStrings issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + usesEval?: { + /** + * @description The action to take for usesEval issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + dynamicRequire?: { + /** + * @description The action to take for dynamicRequire issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + envVars?: { + /** + * @description The action to take for envVars issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingDependency?: { + /** + * @description The action to take for missingDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unusedDependency?: { + /** + * @description The action to take for unusedDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + peerDependency?: { + /** + * @description The action to take for peerDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + uncaughtOptionalDependency?: { + /** + * @description The action to take for uncaughtOptionalDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedRequire?: { + /** + * @description The action to take for unresolvedRequire issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + extraneousDependency?: { + /** + * @description The action to take for extraneousDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + obfuscatedRequire?: { + /** + * @description The action to take for obfuscatedRequire issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + obfuscatedFile?: { + /** + * @description The action to take for obfuscatedFile issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + minifiedFile?: { + /** + * @description The action to take for minifiedFile issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + installScripts?: { + /** + * @description The action to take for installScripts issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + hasNativeCode?: { + /** + * @description The action to take for hasNativeCode issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + binScriptConfusion?: { + /** + * @description The action to take for binScriptConfusion issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shellScriptOverride?: { + /** + * @description The action to take for shellScriptOverride issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + didYouMean?: { + /** + * @description The action to take for didYouMean issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptDidYouMean?: { + /** + * @description The action to take for gptDidYouMean issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + bidi?: { + /** + * @description The action to take for bidi issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + zeroWidth?: { + /** + * @description The action to take for zeroWidth issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badEncoding?: { + /** + * @description The action to take for badEncoding issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + homoglyphs?: { + /** + * @description The action to take for homoglyphs issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + invisibleChars?: { + /** + * @description The action to take for invisibleChars issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + suspiciousString?: { + /** + * @description The action to take for suspiciousString issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + potentialVulnerability?: { + /** + * @description The action to take for potentialVulnerability issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxProposedApiUsage?: { + /** + * @description The action to take for vsxProposedApiUsage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxActivationWildcard?: { + /** + * @description The action to take for vsxActivationWildcard issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxWorkspaceContainsActivation?: { /** - * @default + * @description The action to take for vsxWorkspaceContainsActivation issues. + * @enum {string} */ - repoFullName: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxUntrustedWorkspaceSupported?: { /** - * @default + * @description The action to take for vsxUntrustedWorkspaceSupported issues. + * @enum {string} */ - repoId: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxVirtualWorkspaceSupported?: { /** - * @default + * @description The action to take for vsxVirtualWorkspaceSupported issues. + * @enum {string} */ - repoSlug: string - repoLabels: string[] - repoLabelIds: string[] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxWebviewContribution?: { /** - * @default + * @description The action to take for vsxWebviewContribution issues. + * @enum {string} */ - branch: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxDebuggerContribution?: { /** - * @default false + * @description The action to take for vsxDebuggerContribution issues. + * @enum {string} */ - defaultBranch: boolean + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxExtensionDependency?: { /** - * @default + * @description The action to take for vsxExtensionDependency issues. + * @enum {string} */ - fullScanId: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxExtensionPack?: { /** - * @default + * @description The action to take for vsxExtensionPack issues. + * @enum {string} */ - scannedAt: string - artifact: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + }; + /** + * @description The default security policy for the repository label + * @default medium + * @enum {string} + */ + issueRulesPolicyDefault?: "default" | "low" | "medium" | "high"; + licensePolicy?: components["schemas"]["LicenseAllowListRequest"]; + /** + * @description The recently published package alert threshold for the repository label, in milliseconds + * @default 0 + */ + recentlyPublishedThresholdMs?: number | null; + }; + }; + }; + responses: { + /** @description Success */ + 200: { + content: { + "application/json": { + /** @default ok */ + status: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Delete repository label setting (beta) + * @description Delete the setting (e.g. security/license policy) for a repository label. + * + * + * Note that repository label settings currently only support `issueRules`, + * `issueRulesPolicyDefault`, `licensePolicy`, and + * `recentlyPublishedThresholdMs`. A policy is considered "active" + * for a given repository label if the `issueRulesPolicyDefault` is + * set, and inactive when not set. `issueRules` can be used to further + * refine the alert triage strategy. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo-label:update + */ + deleteOrgRepoLabelSetting: { + parameters: { + query: { + /** @description Setting key to delete from the repository label. Valid values include issueRules, issueRulesPolicyDefault, licensePolicy, and recentlyPublishedThresholdMs */ + setting_key: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the label */ + label_id: string; + }; + }; + responses: { + /** @description Success */ + 200: { + content: { + "application/json": { + /** @default ok */ + status: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Disassociate repository label (beta) + * @description Disassociate a repository label from a repository. + * + * Labels can be used to group and organize repositories and to apply security/license policies. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - repo-label:update + */ + disassociateOrgRepoLabel: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the label */ + label_id: string; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The ID of the repository to disassociate from the label + * @default + */ + repository_id?: string; + }; + }; + }; + responses: { + /** @description Disassociates a repository label from the specified repository. The authenticated user must be a member of the organization. */ + 200: { + content: { + "application/json": { + /** + * @description Status of the operation + * @default + */ + status?: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get integration events + * @description This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - integration:list + */ + getIntegrationEvents: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The id of the integration */ + integration_id: string; + }; + }; + responses: { + /** @description Lists events for the specified integration. The authenticated user must be a member of the organization. */ + 200: { + content: { + "application/json": Array<{ + /** @default */ + id: string; + /** @default */ + integration_id: string; + /** @default */ + type: string; + payload: Record; + /** @default 0 */ + status_code: number; + /** @default */ + error: string; + /** @default */ + sent_at: string; + retry_info: { + /** @default 0 */ + status_code: number; + /** @default */ + error: string; + /** @default */ + sent_at: string; + }[]; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + }>; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get Organization Security Policy + * @description Retrieve the security policy of an organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - security-policy:read + */ + getOrgSecurityPolicy: { + parameters: { + query?: { + /** @description Return only customized security policy rules. */ + custom_rules_only?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Retrieved security policy details */ + 200: { + content: { + "application/json": { + securityPolicyRules?: { + gptSecurity?: { + /** + * @description The action to take for gptSecurity issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptAnomaly?: { + /** + * @description The action to take for gptAnomaly issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptMalware?: { + /** + * @description The action to take for gptMalware issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionPermission?: { + /** + * @description The action to take for browserExtensionPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionHostPermission?: { + /** + * @description The action to take for browserExtensionHostPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionWildcardHostPermission?: { + /** + * @description The action to take for browserExtensionWildcardHostPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionContentScript?: { + /** + * @description The action to take for browserExtensionContentScript issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + filesystemAccess?: { + /** + * @description The action to take for filesystemAccess issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + networkAccess?: { + /** + * @description The action to take for networkAccess issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shellAccess?: { + /** + * @description The action to take for shellAccess issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + debugAccess?: { + /** + * @description The action to take for debugAccess issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromePermission?: { + /** + * @description The action to take for chromePermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeHostPermission?: { + /** + * @description The action to take for chromeHostPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeWildcardHostPermission?: { + /** + * @description The action to take for chromeWildcardHostPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeContentScript?: { + /** + * @description The action to take for chromeContentScript issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + criticalCVE?: { + /** + * @description The action to take for criticalCVE issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + cve?: { + /** + * @description The action to take for cve issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mediumCVE?: { + /** + * @description The action to take for mediumCVE issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mildCVE?: { + /** + * @description The action to take for mildCVE issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + emptyPackage?: { + /** + * @description The action to take for emptyPackage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + trivialPackage?: { + /** + * @description The action to take for trivialPackage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noREADME?: { + /** + * @description The action to take for noREADME issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingLockfile?: { + /** + * @description The action to take for missingLockfile issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + oversizedManifest?: { + /** + * @description The action to take for oversizedManifest issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedYarnDependency?: { + /** + * @description The action to take for unresolvedYarnDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedPomReference?: { + /** + * @description The action to take for unresolvedPomReference issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shrinkwrap?: { + /** + * @description The action to take for shrinkwrap issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + tooManyFiles?: { + /** + * @description The action to take for tooManyFiles issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + generic?: { + /** + * @description The action to take for generic issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToSink?: { + /** + * @description The action to take for ghaArgToSink issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaEnvToSink?: { + /** + * @description The action to take for ghaEnvToSink issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToSink?: { + /** + * @description The action to take for ghaContextToSink issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToOutput?: { + /** + * @description The action to take for ghaArgToOutput issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToEnv?: { + /** + * @description The action to take for ghaArgToEnv issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToOutput?: { + /** + * @description The action to take for ghaContextToOutput issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToEnv?: { + /** + * @description The action to take for ghaContextToEnv issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + recentlyPublished?: { + /** + * @description The action to take for recentlyPublished issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseSpdxDisj?: { + /** + * @description The action to take for licenseSpdxDisj issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unsafeCopyright?: { + /** + * @description The action to take for unsafeCopyright issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseChange?: { + /** + * @description The action to take for licenseChange issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonOSILicense?: { + /** + * @description The action to take for nonOSILicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecatedLicense?: { + /** + * @description The action to take for deprecatedLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingLicense?: { + /** + * @description The action to take for missingLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonSPDXLicense?: { + /** + * @description The action to take for nonSPDXLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unclearLicense?: { + /** + * @description The action to take for unclearLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mixedLicense?: { + /** + * @description The action to take for mixedLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + notice?: { + /** + * @description The action to take for notice issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + modifiedLicense?: { + /** + * @description The action to take for modifiedLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + modifiedException?: { + /** + * @description The action to take for modifiedException issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseException?: { + /** + * @description The action to take for licenseException issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecatedException?: { + /** + * @description The action to take for deprecatedException issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + miscLicenseIssues?: { + /** + * @description The action to take for miscLicenseIssues issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unidentifiedLicense?: { + /** + * @description The action to take for unidentifiedLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noLicenseFound?: { + /** + * @description The action to take for noLicenseFound issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + explicitlyUnlicensedItem?: { + /** + * @description The action to take for explicitlyUnlicensedItem issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + copyleftLicense?: { + /** + * @description The action to take for copyleftLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonpermissiveLicense?: { + /** + * @description The action to take for nonpermissiveLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ambiguousClassifier?: { + /** + * @description The action to take for ambiguousClassifier issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + invalidPackageJSON?: { + /** + * @description The action to take for invalidPackageJSON issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + httpDependency?: { + /** + * @description The action to take for httpDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gitDependency?: { + /** + * @description The action to take for gitDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gitHubDependency?: { + /** + * @description The action to take for gitHubDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + fileDependency?: { + /** + * @description The action to take for fileDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noTests?: { + /** + * @description The action to take for noTests issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noRepository?: { + /** + * @description The action to take for noRepository issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badSemver?: { + /** + * @description The action to take for badSemver issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badSemverDependency?: { + /** + * @description The action to take for badSemverDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noV1?: { + /** + * @description The action to take for noV1 issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noWebsite?: { + /** + * @description The action to take for noWebsite issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noBugTracker?: { + /** + * @description The action to take for noBugTracker issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noAuthorData?: { + /** + * @description The action to take for noAuthorData issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + typeModuleCompatibility?: { + /** + * @description The action to take for typeModuleCompatibility issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + floatingDependency?: { + /** + * @description The action to take for floatingDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + manifestConfusion?: { + /** + * @description The action to take for manifestConfusion issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + malware?: { + /** + * @description The action to take for malware issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + telemetry?: { + /** + * @description The action to take for telemetry issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + troll?: { + /** + * @description The action to take for troll issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + pendingScan?: { + /** + * @description The action to take for pendingScan issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecated?: { + /** + * @description The action to take for deprecated issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chronoAnomaly?: { + /** + * @description The action to take for chronoAnomaly issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + compromisedSSHKey?: { + /** + * @description The action to take for compromisedSSHKey issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + semverAnomaly?: { + /** + * @description The action to take for semverAnomaly issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + newAuthor?: { + /** + * @description The action to take for newAuthor issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unstableOwnership?: { + /** + * @description The action to take for unstableOwnership issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingAuthor?: { + /** + * @description The action to take for missingAuthor issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unmaintained?: { + /** + * @description The action to take for unmaintained issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unpublished?: { + /** + * @description The action to take for unpublished issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + majorRefactor?: { + /** + * @description The action to take for majorRefactor issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingTarball?: { + /** + * @description The action to take for missingTarball issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + suspiciousStarActivity?: { + /** + * @description The action to take for suspiciousStarActivity issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + notFound?: { + /** + * @description The action to take for notFound issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unpopularPackage?: { + /** + * @description The action to take for unpopularPackage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + policy?: { + /** + * @description The action to take for policy issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillAutonomyAbuse?: { + /** + * @description The action to take for skillAutonomyAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillCommandInjection?: { + /** + * @description The action to take for skillCommandInjection issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillDataExfiltration?: { + /** + * @description The action to take for skillDataExfiltration issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillDiscoveryAbuse?: { + /** + * @description The action to take for skillDiscoveryAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillHardcodedSecrets?: { + /** + * @description The action to take for skillHardcodedSecrets issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillObfuscation?: { + /** + * @description The action to take for skillObfuscation issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillPreExecution?: { + /** + * @description The action to take for skillPreExecution issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillPromptInjection?: { + /** + * @description The action to take for skillPromptInjection issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillResourceAbuse?: { + /** + * @description The action to take for skillResourceAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillSupplyChain?: { + /** + * @description The action to take for skillSupplyChain issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillToolAbuse?: { + /** + * @description The action to take for skillToolAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillToolChaining?: { + /** + * @description The action to take for skillToolChaining issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillTransitiveTrust?: { + /** + * @description The action to take for skillTransitiveTrust issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + socketUpgradeAvailable?: { /** - * @default + * @description The action to take for socketUpgradeAvailable issues. + * @enum {string} */ - id: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + longStrings?: { /** - * @default + * @description The action to take for longStrings issues. + * @enum {string} */ - license: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + highEntropyStrings?: { /** - * @default + * @description The action to take for highEntropyStrings issues. + * @enum {string} */ - name: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + urlStrings?: { /** - * @default + * @description The action to take for urlStrings issues. + * @enum {string} */ - namespace: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + usesEval?: { /** - * @default + * @description The action to take for usesEval issues. + * @enum {string} */ - type: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + dynamicRequire?: { /** - * @default + * @description The action to take for dynamicRequire issues. + * @enum {string} */ - version: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + envVars?: { /** - * @default + * @description The action to take for envVars issues. + * @enum {string} */ - artifact_id?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingDependency?: { /** - * @default + * @description The action to take for missingDependency issues. + * @enum {string} */ - artifactId?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unusedDependency?: { /** - * @default + * @description The action to take for unusedDependency issues. + * @enum {string} */ - author?: string - capabilities?: components['schemas']['Capabilities'] - qualifiers?: components['schemas']['Qualifiers'] - scores?: components['schemas']['SocketScore'] + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + peerDependency?: { /** - * @default 0 + * @description The action to take for peerDependency issues. + * @enum {string} */ - size?: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + uncaughtOptionalDependency?: { /** - * @default + * @description The action to take for uncaughtOptionalDependency issues. + * @enum {string} */ - subpath?: string - } - alert: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedRequire?: { /** - * @default + * @description The action to take for unresolvedRequire issues. + * @enum {string} */ - key: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + extraneousDependency?: { /** - * @default + * @description The action to take for extraneousDependency issues. + * @enum {string} */ - type: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + obfuscatedRequire?: { /** - * @default 0 + * @description The action to take for obfuscatedRequire issues. + * @enum {string} */ - severity: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + obfuscatedFile?: { /** - * @default + * @description The action to take for obfuscatedFile issues. + * @enum {string} */ - severityName: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + minifiedFile?: { /** - * @default + * @description The action to take for minifiedFile issues. + * @enum {string} */ - action: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + installScripts?: { /** - * @default + * @description The action to take for installScripts issues. + * @enum {string} */ - category: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + hasNativeCode?: { /** - * @default + * @description The action to take for hasNativeCode issues. + * @enum {string} */ - file?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + binScriptConfusion?: { /** - * Additional alert-specific properties and metadata that vary - * by alert type. For vulnerability alerts this includes the - * `cveId` and `ghsaId` identifiers, either of which may be an - * empty string when GitHub has not assigned that identifier - * to the advisory. - * - * @default null + * @description The action to take for binScriptConfusion issues. + * @enum {string} */ - props?: Record | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shellScriptOverride?: { /** - * @default 0 + * @description The action to take for shellScriptOverride issues. + * @enum {string} */ - start?: number | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + didYouMean?: { /** - * @default 0 + * @description The action to take for didYouMean issues. + * @enum {string} */ - end?: number | null - fix?: { - /** - * @default - */ - type: string - /** - * @default - */ - description: string - } | null - } - dependency: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptDidYouMean?: { /** - * @default false + * @description The action to take for gptDidYouMean issues. + * @enum {string} */ - direct: boolean + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + bidi?: { /** - * @default false + * @description The action to take for bidi issues. + * @enum {string} */ - dev: boolean + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + zeroWidth?: { /** - * @default false + * @description The action to take for zeroWidth issues. + * @enum {string} */ - dead: boolean - manifestFiles?: components['schemas']['SocketManifestReference'][] - topLevelAncestors?: components['schemas']['SocketId'][] - dependencies?: components['schemas']['SocketId'][] - } - }> - meta: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badEncoding?: { + /** + * @description The action to take for badEncoding issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + homoglyphs?: { + /** + * @description The action to take for homoglyphs issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + invisibleChars?: { + /** + * @description The action to take for invisibleChars issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + suspiciousString?: { + /** + * @description The action to take for suspiciousString issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + potentialVulnerability?: { + /** + * @description The action to take for potentialVulnerability issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxProposedApiUsage?: { + /** + * @description The action to take for vsxProposedApiUsage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxActivationWildcard?: { + /** + * @description The action to take for vsxActivationWildcard issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxWorkspaceContainsActivation?: { + /** + * @description The action to take for vsxWorkspaceContainsActivation issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxUntrustedWorkspaceSupported?: { + /** + * @description The action to take for vsxUntrustedWorkspaceSupported issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxVirtualWorkspaceSupported?: { + /** + * @description The action to take for vsxVirtualWorkspaceSupported issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxWebviewContribution?: { + /** + * @description The action to take for vsxWebviewContribution issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxDebuggerContribution?: { + /** + * @description The action to take for vsxDebuggerContribution issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxExtensionDependency?: { + /** + * @description The action to take for vsxExtensionDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxExtensionPack?: { + /** + * @description The action to take for vsxExtensionPack issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + }; + /** + * @description The default security policy for the organization + * @default default + * @enum {string} + */ + securityPolicyDefault?: "default" | "low" | "medium" | "high"; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Update Security Policy + * @description Update the security policy of an organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - security-policy:update + */ + updateOrgSecurityPolicy: { + parameters: { + query?: { + /** @description Return only customized security policy rules in the response. */ + custom_rules_only?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The default security policy for the organization + * @enum {string} + */ + policyDefault?: "default" | "low" | "medium" | "high"; + policyRules?: { + gptSecurity?: { + /** + * @description The action to take for gptSecurity issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptAnomaly?: { + /** + * @description The action to take for gptAnomaly issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptMalware?: { + /** + * @description The action to take for gptMalware issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionPermission?: { + /** + * @description The action to take for browserExtensionPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionHostPermission?: { + /** + * @description The action to take for browserExtensionHostPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionWildcardHostPermission?: { + /** + * @description The action to take for browserExtensionWildcardHostPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionContentScript?: { + /** + * @description The action to take for browserExtensionContentScript issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + filesystemAccess?: { + /** + * @description The action to take for filesystemAccess issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + networkAccess?: { + /** + * @description The action to take for networkAccess issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shellAccess?: { + /** + * @description The action to take for shellAccess issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + debugAccess?: { + /** + * @description The action to take for debugAccess issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromePermission?: { + /** + * @description The action to take for chromePermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeHostPermission?: { + /** + * @description The action to take for chromeHostPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeWildcardHostPermission?: { + /** + * @description The action to take for chromeWildcardHostPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeContentScript?: { + /** + * @description The action to take for chromeContentScript issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + criticalCVE?: { + /** + * @description The action to take for criticalCVE issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + cve?: { + /** + * @description The action to take for cve issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mediumCVE?: { + /** + * @description The action to take for mediumCVE issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mildCVE?: { + /** + * @description The action to take for mildCVE issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + emptyPackage?: { + /** + * @description The action to take for emptyPackage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + trivialPackage?: { + /** + * @description The action to take for trivialPackage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noREADME?: { + /** + * @description The action to take for noREADME issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingLockfile?: { + /** + * @description The action to take for missingLockfile issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + oversizedManifest?: { + /** + * @description The action to take for oversizedManifest issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedYarnDependency?: { + /** + * @description The action to take for unresolvedYarnDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedPomReference?: { + /** + * @description The action to take for unresolvedPomReference issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shrinkwrap?: { + /** + * @description The action to take for shrinkwrap issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + tooManyFiles?: { /** - * @default + * @description The action to take for tooManyFiles issues. + * @enum {string} */ - organizationId: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + generic?: { /** - * @default 0 + * @description The action to take for generic issues. + * @enum {string} */ - queryStartTimestamp: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToSink?: { /** - * @default + * @description The action to take for ghaArgToSink issues. + * @enum {string} */ - startDateInclusive: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaEnvToSink?: { /** - * @default + * @description The action to take for ghaEnvToSink issues. + * @enum {string} */ - endDateInclusive: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToSink?: { /** - * @default false + * @description The action to take for ghaContextToSink issues. + * @enum {string} */ - includeLatestAlertsOnly: boolean - filters: { - /** - * Comma-separated list of alert actions ("error", "warn", - * "monitor", or "ignore) that should be included. - */ - alertAction?: string[] - /** - * Comma-separated list of alert actions ("error", "warn", - * "monitor", or "ignore) that should be excluded. - */ - 'alertAction.notIn'?: string[] - /** - * Comma-separated list of alert action source types - * ("resolution", "alert-policy", "fallback", "injected-alert", - * "org-policy", "reachability", "repo-label-policy", - * "socket-yml", or "triage") that should be included. - */ - alertActionSourceType?: string[] - /** - * Comma-separated list of alert action source types - * ("resolution", "alert-policy", "fallback", "injected-alert", - * "org-policy", "reachability", "repo-label-policy", - * "socket-yml", or "triage") that should be excluded. - */ - 'alertActionSourceType.notIn'?: string[] - /** - * Comma-separated list of alert categories ("supplyChainRisk", - * "maintenance", "quality", "license", or "vulnerability") that - * should be included. - */ - alertCategory?: string[] - /** - * Comma-separated list of alert categories ("supplyChainRisk", - * "maintenance", "quality", "license", or "vulnerability") that - * should be excluded. - */ - 'alertCategory.notIn'?: string[] - /** - * CVE ID. - */ - alertCveId?: string[] - /** - * CVE ID. - */ - 'alertCveId.notIn'?: string[] - /** - * CVE title. - */ - alertCveTitle?: string[] - /** - * CVE title. - */ - 'alertCveTitle.notIn'?: string[] - /** - * CWE ID. - */ - alertCweId?: string[] - /** - * CWE ID. - */ - 'alertCweId.notIn'?: string[] - /** - * CWE name. - */ - alertCweName?: string[] - /** - * CWE name. - */ - 'alertCweName.notIn'?: string[] - /** - * Alert EPSS ("low", "medium", "high", "critical") - */ - alertEPSS?: string[] - /** - * Alert EPSS ("low", "medium", "high", "critical") - */ - 'alertEPSS.notIn'?: string[] - /** - * Comma-separated list of alert fix types ("upgrade", "cve", or - * "remove") that should be included. - */ - alertFixType?: string[] - /** - * Comma-separated list of alert fix types ("upgrade", "cve", or - * "remove") that should be excluded. - */ - 'alertFixType.notIn'?: string[] - /** - * Alert KEV (Known Exploited Vulnerability) filter flag. - */ - alertKEV?: boolean[] - /** - * Alert priority ("low", "medium", "high", or "critical") - */ - alertPriority?: string[] - /** - * Alert priority ("low", "medium", "high", or "critical") - */ - 'alertPriority.notIn'?: string[] - /** - * Comma-separated list of alert CVE reachability analysis types - * ("full-scan" or "precomputed") that should be included. - */ - alertReachabilityAnalysisType?: string[] - /** - * Comma-separated list of alert CVE reachability analysis types - * ("full-scan" or "precomputed") that should be excluded. - */ - 'alertReachabilityAnalysisType.notIn'?: string[] - /** - * Comma-separated list of alert CVE reachability types - * ("direct_dependency", "error", "maybe_reachable", - * "missing_support", "pending", "reachable", - * "undeterminable_reachability", "unknown", or "unreachable") - * that should be included. - */ - alertReachabilityType?: string[] - /** - * Comma-separated list of alert CVE reachability types - * ("direct_dependency", "error", "maybe_reachable", - * "missing_support", "pending", "reachable", - * "undeterminable_reachability", "unknown", or "unreachable") - * that should be excluded. - */ - 'alertReachabilityType.notIn'?: string[] - /** - * Comma-separated list of alert severities ("low", "medium", - * "high", or "critical") that should be included. - */ - alertSeverity?: string[] - /** - * Comma-separated list of alert severities ("low", "medium", - * "high", or "critical") that should be excluded. - */ - 'alertSeverity.notIn'?: string[] - /** - * Comma-separated list of alert types (e.g. "usesEval", - * "unmaintained", etc.) that should be included. - */ - alertType?: string[] - /** - * Comma-separated list of alert types (e.g. "usesEval", - * "unmaintained", etc.) that should be excluded. - */ - 'alertType.notIn'?: string[] - /** - * Name of artifact. - */ - artifactName?: string[] - /** - * Name of artifact. - */ - 'artifactName.notIn'?: string[] - /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", - * "gem", "maven", "golang", etc.) that should be included. - */ - artifactType?: string[] - /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", - * "gem", "maven", "golang", etc.) that should be excluded. - */ - 'artifactType.notIn'?: string[] - /** - * Comma-separated list of branch names that should be included. - */ - branch?: string[] - /** - * Comma-separated list of branch names that should be excluded. - */ - 'branch.notIn'?: string[] - /** - * Comma-separated list of patch statuses ("patch_unavailable", - * "patch_available", or "patch_applied") that should be - * included. - */ - cvePatchStatus?: string[] - /** - * Comma-separated list of patch statuses ("patch_unavailable", - * "patch_available", or "patch_applied") that should be - * excluded. - */ - 'cvePatchStatus.notIn'?: string[] - /** - * Dead/reachable dependency filter flag. - */ - dependencyDead?: boolean[] - /** - * Development/production dependency filter flag. - */ - dependencyDev?: boolean[] - /** - * Direct/transitive dependency filter flag. - */ - dependencyDirect?: boolean[] - /** - * Comma-separated list of repo full names that should be - * included. - */ - repoFullName?: string[] - /** - * Comma-separated list of repo full names that should be - * excluded. - */ - 'repoFullName.notIn'?: string[] - /** - * Comma-separated list of repo labels that should be included. - * Use "" to filter for repositories with no labels. - */ - repoLabels?: string[] - /** - * Comma-separated list of repo labels that should be excluded. - * Use "" to filter for repositories with no labels. - */ - 'repoLabels.notIn'?: string[] - /** - * Comma-separated list of repo slugs that should be included. - */ - repoSlug?: string[] - /** - * Comma-separated list of repo slugs that should be excluded. - */ - 'repoSlug.notIn'?: string[] - } - } - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Trend of historical alerts (Beta) - * - * Trend analytics of historical alerts. - * This endpoint consumes 10 units of your quota. - * This endpoint requires the following org token scopes: - * - historical:alerts-trend. - */ - historicalAlertsTrend: { - parameters: { - query?: { - /** - * The UTC date in YYYY-MM-DD format for which to fetch alerts. - */ - date?: string - /** - * The number of days of data to fetch as an offset from input date. - */ - range?: string - /** - * Comma-separated list of fields that should be used for count - * aggregation (allowed: - * alertSeverity,repoSlug,repoFullName,branch,repoLabels,alertType,artifactType,alertAction,alertActionSourceType,alertFixType,alertCategory,alertCveId,alertCveTitle,alertCweId,alertCweName,alertReachabilityType,cvePatchStatus,alertReachabilityAnalysisType,alertPriority,alertKEV,alertEPSS,dependencyDirect,dependencyDev,dependencyDead) - */ - 'aggregation.fields'?: string - /** - * Comma-separated list of alert actions ("error", "warn", "monitor", or - * "ignore) that should be included. - */ - 'filters.alertAction'?: string - /** - * Comma-separated list of alert actions ("error", "warn", "monitor", or - * "ignore) that should be excluded. - */ - 'filters.alertAction.notIn'?: string - /** - * Comma-separated list of alert action source types ("resolution", - * "alert-policy", "fallback", "injected-alert", "org-policy", - * "reachability", "repo-label-policy", "socket-yml", or "triage") that - * should be included. - */ - 'filters.alertActionSourceType'?: string - /** - * Comma-separated list of alert action source types ("resolution", - * "alert-policy", "fallback", "injected-alert", "org-policy", - * "reachability", "repo-label-policy", "socket-yml", or "triage") that - * should be excluded. - */ - 'filters.alertActionSourceType.notIn'?: string - /** - * Comma-separated list of alert categories ("supplyChainRisk", - * "maintenance", "quality", "license", or "vulnerability") that should - * be included. - */ - 'filters.alertCategory'?: string - /** - * Comma-separated list of alert categories ("supplyChainRisk", - * "maintenance", "quality", "license", or "vulnerability") that should - * be excluded. - */ - 'filters.alertCategory.notIn'?: string - /** - * CVE ID. - */ - 'filters.alertCveId'?: string - /** - * CVE ID. - */ - 'filters.alertCveId.notIn'?: string - /** - * CVE title. - */ - 'filters.alertCveTitle'?: string - /** - * CVE title. - */ - 'filters.alertCveTitle.notIn'?: string - /** - * CWE ID. - */ - 'filters.alertCweId'?: string - /** - * CWE ID. - */ - 'filters.alertCweId.notIn'?: string - /** - * CWE name. - */ - 'filters.alertCweName'?: string - /** - * CWE name. - */ - 'filters.alertCweName.notIn'?: string - /** - * Alert EPSS ("low", "medium", "high", "critical") - */ - 'filters.alertEPSS'?: string - /** - * Alert EPSS ("low", "medium", "high", "critical") - */ - 'filters.alertEPSS.notIn'?: string - /** - * Comma-separated list of alert fix types ("upgrade", "cve", or - * "remove") that should be included. - */ - 'filters.alertFixType'?: string - /** - * Comma-separated list of alert fix types ("upgrade", "cve", or - * "remove") that should be excluded. - */ - 'filters.alertFixType.notIn'?: string - /** - * Alert KEV (Known Exploited Vulnerability) filter flag. - */ - 'filters.alertKEV'?: boolean - /** - * Alert KEV (Known Exploited Vulnerability) filter flag. - */ - 'filters.alertKEV.notIn'?: boolean - /** - * Alert priority ("low", "medium", "high", or "critical") - */ - 'filters.alertPriority'?: string - /** - * Alert priority ("low", "medium", "high", or "critical") - */ - 'filters.alertPriority.notIn'?: string - /** - * Comma-separated list of alert CVE reachability analysis types - * ("full-scan" or "precomputed") that should be included. - */ - 'filters.alertReachabilityAnalysisType'?: string - /** - * Comma-separated list of alert CVE reachability analysis types - * ("full-scan" or "precomputed") that should be excluded. - */ - 'filters.alertReachabilityAnalysisType.notIn'?: string - /** - * Comma-separated list of alert CVE reachability types - * ("direct_dependency", "error", "maybe_reachable", "missing_support", - * "pending", "reachable", "undeterminable_reachability", "unknown", or - * "unreachable") that should be included. - */ - 'filters.alertReachabilityType'?: string - /** - * Comma-separated list of alert CVE reachability types - * ("direct_dependency", "error", "maybe_reachable", "missing_support", - * "pending", "reachable", "undeterminable_reachability", "unknown", or - * "unreachable") that should be excluded. - */ - 'filters.alertReachabilityType.notIn'?: string - /** - * Comma-separated list of alert severities ("low", "medium", "high", or - * "critical") that should be included. - */ - 'filters.alertSeverity'?: string - /** - * Comma-separated list of alert severities ("low", "medium", "high", or - * "critical") that should be excluded. - */ - 'filters.alertSeverity.notIn'?: string - /** - * Comma-separated list of alert types (e.g. "usesEval", "unmaintained", - * etc.) that should be included. - */ - 'filters.alertType'?: string - /** - * Comma-separated list of alert types (e.g. "usesEval", "unmaintained", - * etc.) that should be excluded. - */ - 'filters.alertType.notIn'?: string - /** - * Name of artifact. - */ - 'filters.artifactName'?: string - /** - * Name of artifact. - */ - 'filters.artifactName.notIn'?: string - /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", - * "maven", "golang", etc.) that should be included. - */ - 'filters.artifactType'?: string - /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", - * "maven", "golang", etc.) that should be excluded. - */ - 'filters.artifactType.notIn'?: string - /** - * Comma-separated list of branch names that should be included. - */ - 'filters.branch'?: string - /** - * Comma-separated list of branch names that should be excluded. - */ - 'filters.branch.notIn'?: string - /** - * Comma-separated list of patch statuses ("patch_unavailable", - * "patch_available", or "patch_applied") that should be included. - */ - 'filters.cvePatchStatus'?: string - /** - * Comma-separated list of patch statuses ("patch_unavailable", - * "patch_available", or "patch_applied") that should be excluded. - */ - 'filters.cvePatchStatus.notIn'?: string - /** - * Dead/reachable dependency filter flag. - */ - 'filters.dependencyDead'?: boolean - /** - * Dead/reachable dependency filter flag. - */ - 'filters.dependencyDead.notIn'?: boolean - /** - * Development/production dependency filter flag. - */ - 'filters.dependencyDev'?: boolean - /** - * Development/production dependency filter flag. - */ - 'filters.dependencyDev.notIn'?: boolean - /** - * Direct/transitive dependency filter flag. - */ - 'filters.dependencyDirect'?: boolean - /** - * Direct/transitive dependency filter flag. - */ - 'filters.dependencyDirect.notIn'?: boolean - /** - * Comma-separated list of repo full names that should be included. - */ - 'filters.repoFullName'?: string - /** - * Comma-separated list of repo full names that should be excluded. - */ - 'filters.repoFullName.notIn'?: string - /** - * Comma-separated list of repo labels that should be included. Use "" - * to filter for repositories with no labels. - */ - 'filters.repoLabels'?: string - /** - * Comma-separated list of repo labels that should be excluded. Use "" - * to filter for repositories with no labels. - */ - 'filters.repoLabels.notIn'?: string - /** - * Comma-separated list of repo slugs that should be included. - */ - 'filters.repoSlug'?: string - /** - * Comma-separated list of repo slugs that should be excluded. - */ - 'filters.repoSlug.notIn'?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * The trend data. - */ - 200: { - content: { - 'application/json': { - meta: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToOutput?: { + /** + * @description The action to take for ghaArgToOutput issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToEnv?: { + /** + * @description The action to take for ghaArgToEnv issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToOutput?: { + /** + * @description The action to take for ghaContextToOutput issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToEnv?: { + /** + * @description The action to take for ghaContextToEnv issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + recentlyPublished?: { + /** + * @description The action to take for recentlyPublished issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseSpdxDisj?: { + /** + * @description The action to take for licenseSpdxDisj issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unsafeCopyright?: { /** - * @default + * @description The action to take for unsafeCopyright issues. + * @enum {string} */ - organizationId: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseChange?: { /** - * @default + * @description The action to take for licenseChange issues. + * @enum {string} */ - startDateInclusive: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonOSILicense?: { /** - * @default + * @description The action to take for nonOSILicense issues. + * @enum {string} */ - endDateInclusive: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecatedLicense?: { /** - * @default + * @description The action to take for deprecatedLicense issues. + * @enum {string} */ - interval: string - aggregation: { - fields: string[] - groups: string[][] - } - filters: { - /** - * Comma-separated list of alert actions ("error", "warn", - * "monitor", or "ignore) that should be included. - */ - alertAction?: string[] - /** - * Comma-separated list of alert actions ("error", "warn", - * "monitor", or "ignore) that should be excluded. - */ - 'alertAction.notIn'?: string[] - /** - * Comma-separated list of alert action source types - * ("resolution", "alert-policy", "fallback", "injected-alert", - * "org-policy", "reachability", "repo-label-policy", - * "socket-yml", or "triage") that should be included. - */ - alertActionSourceType?: string[] - /** - * Comma-separated list of alert action source types - * ("resolution", "alert-policy", "fallback", "injected-alert", - * "org-policy", "reachability", "repo-label-policy", - * "socket-yml", or "triage") that should be excluded. - */ - 'alertActionSourceType.notIn'?: string[] - /** - * Comma-separated list of alert categories ("supplyChainRisk", - * "maintenance", "quality", "license", or "vulnerability") that - * should be included. - */ - alertCategory?: string[] - /** - * Comma-separated list of alert categories ("supplyChainRisk", - * "maintenance", "quality", "license", or "vulnerability") that - * should be excluded. - */ - 'alertCategory.notIn'?: string[] - /** - * CVE ID. - */ - alertCveId?: string[] - /** - * CVE ID. - */ - 'alertCveId.notIn'?: string[] - /** - * CVE title. - */ - alertCveTitle?: string[] - /** - * CVE title. - */ - 'alertCveTitle.notIn'?: string[] - /** - * CWE ID. - */ - alertCweId?: string[] - /** - * CWE ID. - */ - 'alertCweId.notIn'?: string[] - /** - * CWE name. - */ - alertCweName?: string[] - /** - * CWE name. - */ - 'alertCweName.notIn'?: string[] - /** - * Alert EPSS ("low", "medium", "high", "critical") - */ - alertEPSS?: string[] - /** - * Alert EPSS ("low", "medium", "high", "critical") - */ - 'alertEPSS.notIn'?: string[] - /** - * Comma-separated list of alert fix types ("upgrade", "cve", or - * "remove") that should be included. - */ - alertFixType?: string[] - /** - * Comma-separated list of alert fix types ("upgrade", "cve", or - * "remove") that should be excluded. - */ - 'alertFixType.notIn'?: string[] - /** - * Alert KEV (Known Exploited Vulnerability) filter flag. - */ - alertKEV?: boolean[] - /** - * Alert priority ("low", "medium", "high", or "critical") - */ - alertPriority?: string[] - /** - * Alert priority ("low", "medium", "high", or "critical") - */ - 'alertPriority.notIn'?: string[] - /** - * Comma-separated list of alert CVE reachability analysis types - * ("full-scan" or "precomputed") that should be included. - */ - alertReachabilityAnalysisType?: string[] - /** - * Comma-separated list of alert CVE reachability analysis types - * ("full-scan" or "precomputed") that should be excluded. - */ - 'alertReachabilityAnalysisType.notIn'?: string[] - /** - * Comma-separated list of alert CVE reachability types - * ("direct_dependency", "error", "maybe_reachable", - * "missing_support", "pending", "reachable", - * "undeterminable_reachability", "unknown", or "unreachable") - * that should be included. - */ - alertReachabilityType?: string[] - /** - * Comma-separated list of alert CVE reachability types - * ("direct_dependency", "error", "maybe_reachable", - * "missing_support", "pending", "reachable", - * "undeterminable_reachability", "unknown", or "unreachable") - * that should be excluded. - */ - 'alertReachabilityType.notIn'?: string[] - /** - * Comma-separated list of alert severities ("low", "medium", - * "high", or "critical") that should be included. - */ - alertSeverity?: string[] - /** - * Comma-separated list of alert severities ("low", "medium", - * "high", or "critical") that should be excluded. - */ - 'alertSeverity.notIn'?: string[] - /** - * Comma-separated list of alert types (e.g. "usesEval", - * "unmaintained", etc.) that should be included. - */ - alertType?: string[] - /** - * Comma-separated list of alert types (e.g. "usesEval", - * "unmaintained", etc.) that should be excluded. - */ - 'alertType.notIn'?: string[] - /** - * Name of artifact. - */ - artifactName?: string[] - /** - * Name of artifact. - */ - 'artifactName.notIn'?: string[] - /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", - * "gem", "maven", "golang", etc.) that should be included. - */ - artifactType?: string[] - /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", - * "gem", "maven", "golang", etc.) that should be excluded. - */ - 'artifactType.notIn'?: string[] - /** - * Comma-separated list of branch names that should be included. - */ - branch?: string[] - /** - * Comma-separated list of branch names that should be excluded. - */ - 'branch.notIn'?: string[] - /** - * Comma-separated list of patch statuses ("patch_unavailable", - * "patch_available", or "patch_applied") that should be - * included. - */ - cvePatchStatus?: string[] - /** - * Comma-separated list of patch statuses ("patch_unavailable", - * "patch_available", or "patch_applied") that should be - * excluded. - */ - 'cvePatchStatus.notIn'?: string[] - /** - * Dead/reachable dependency filter flag. - */ - dependencyDead?: boolean[] - /** - * Development/production dependency filter flag. - */ - dependencyDev?: boolean[] - /** - * Direct/transitive dependency filter flag. - */ - dependencyDirect?: boolean[] - /** - * Comma-separated list of repo full names that should be - * included. - */ - repoFullName?: string[] - /** - * Comma-separated list of repo full names that should be - * excluded. - */ - 'repoFullName.notIn'?: string[] - /** - * Comma-separated list of repo labels that should be included. - * Use "" to filter for repositories with no labels. - */ - repoLabels?: string[] - /** - * Comma-separated list of repo labels that should be excluded. - * Use "" to filter for repositories with no labels. - */ - 'repoLabels.notIn'?: string[] - /** - * Comma-separated list of repo slugs that should be included. - */ - repoSlug?: string[] - /** - * Comma-separated list of repo slugs that should be excluded. - */ - 'repoSlug.notIn'?: string[] - } - } - items: Array<{ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingLicense?: { + /** + * @description The action to take for missingLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonSPDXLicense?: { + /** + * @description The action to take for nonSPDXLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unclearLicense?: { + /** + * @description The action to take for unclearLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mixedLicense?: { + /** + * @description The action to take for mixedLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + notice?: { + /** + * @description The action to take for notice issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + modifiedLicense?: { + /** + * @description The action to take for modifiedLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + modifiedException?: { + /** + * @description The action to take for modifiedException issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseException?: { + /** + * @description The action to take for licenseException issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecatedException?: { + /** + * @description The action to take for deprecatedException issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + miscLicenseIssues?: { + /** + * @description The action to take for miscLicenseIssues issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unidentifiedLicense?: { + /** + * @description The action to take for unidentifiedLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noLicenseFound?: { + /** + * @description The action to take for noLicenseFound issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + explicitlyUnlicensedItem?: { + /** + * @description The action to take for explicitlyUnlicensedItem issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + copyleftLicense?: { + /** + * @description The action to take for copyleftLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonpermissiveLicense?: { + /** + * @description The action to take for nonpermissiveLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ambiguousClassifier?: { + /** + * @description The action to take for ambiguousClassifier issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + invalidPackageJSON?: { + /** + * @description The action to take for invalidPackageJSON issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + httpDependency?: { + /** + * @description The action to take for httpDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gitDependency?: { + /** + * @description The action to take for gitDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gitHubDependency?: { + /** + * @description The action to take for gitHubDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + fileDependency?: { + /** + * @description The action to take for fileDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noTests?: { + /** + * @description The action to take for noTests issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noRepository?: { + /** + * @description The action to take for noRepository issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badSemver?: { + /** + * @description The action to take for badSemver issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badSemverDependency?: { + /** + * @description The action to take for badSemverDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noV1?: { + /** + * @description The action to take for noV1 issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noWebsite?: { + /** + * @description The action to take for noWebsite issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noBugTracker?: { + /** + * @description The action to take for noBugTracker issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noAuthorData?: { + /** + * @description The action to take for noAuthorData issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + typeModuleCompatibility?: { + /** + * @description The action to take for typeModuleCompatibility issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + floatingDependency?: { + /** + * @description The action to take for floatingDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + manifestConfusion?: { + /** + * @description The action to take for manifestConfusion issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + malware?: { + /** + * @description The action to take for malware issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + telemetry?: { + /** + * @description The action to take for telemetry issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + troll?: { + /** + * @description The action to take for troll issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + pendingScan?: { + /** + * @description The action to take for pendingScan issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecated?: { + /** + * @description The action to take for deprecated issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chronoAnomaly?: { /** - * @default + * @description The action to take for chronoAnomaly issues. + * @enum {string} */ - date: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + compromisedSSHKey?: { /** - * @default 0 + * @description The action to take for compromisedSSHKey issues. + * @enum {string} */ - startOfDayTimestamp: number - dataPoints: { - aggregationGroup: string[] - /** - * @default 0 - */ - count: number - /** - * @default 0 - */ - countDelta: number - }[] - }> - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Trend of historical dependencies (Beta) - * - * Trend analytics of historical dependencies. - * This endpoint consumes 10 units of your quota. - * This endpoint requires the following org token scopes: - * - historical:dependencies-trend. - */ - historicalDependenciesTrend: { - parameters: { - query?: { - /** - * The UTC date in YYYY-MM-DD format for which to fetch dependencies. - */ - date?: string - /** - * The number of days of data to fetch as an offset from input date. - */ - range?: string - /** - * Comma-separated list of repo full names that should be included. - */ - repoFullName?: string - /** - * Comma-separated list of repo slugs that should be included. - */ - repoSlug?: string - /** - * Comma-separated list of repo labels that should be included. - */ - repoLabels?: string - /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", - * "maven", "golang", etc.) that should be included. - */ - artifactType?: string - /** - * Direct/transitive dependency filter flag. - */ - dependencyDirect?: boolean - /** - * Development/production dependency filter flag. - */ - dependencyDev?: boolean - /** - * Dead/reachable dependency filter flag. - */ - dependencyDead?: boolean - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * The trend data. - */ - 200: { - content: { - 'application/json': { - meta: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + semverAnomaly?: { /** - * @default + * @description The action to take for semverAnomaly issues. + * @enum {string} */ - organizationId: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + newAuthor?: { /** - * @default + * @description The action to take for newAuthor issues. + * @enum {string} */ - startDateInclusive: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unstableOwnership?: { /** - * @default + * @description The action to take for unstableOwnership issues. + * @enum {string} */ - endDateInclusive: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingAuthor?: { /** - * @default + * @description The action to take for missingAuthor issues. + * @enum {string} */ - interval: string - aggregation: { - fields: string[] - groups: string[][] - } - filters: { - /** - * Comma-separated list of repo full names that should be - * included. - */ - repoFullName?: string[] - /** - * Comma-separated list of repo slugs that should be included. - */ - repoSlug?: string[] - /** - * Comma-separated list of repo labels that should be included. - */ - repoLabels?: string[] - /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", - * "gem", "maven", "golang", etc.) that should be included. - */ - artifactType?: string[] - /** - * Direct/transitive dependency filter flag. - */ - dependencyDirect?: boolean[] - /** - * Development/production dependency filter flag. - */ - dependencyDev?: boolean[] - /** - * Dead/reachable dependency filter flag. - */ - dependencyDead?: boolean[] - } - } - items: Array<{ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unmaintained?: { /** - * @default + * @description The action to take for unmaintained issues. + * @enum {string} */ - date: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unpublished?: { /** - * @default 0 + * @description The action to take for unpublished issues. + * @enum {string} */ - startOfDayTimestamp: number - dataPoints: { - aggregationGroup: string[] - /** - * @default 0 - */ - count: number - /** - * @default 0 - */ - countDelta: number - /** - * @default 0 - */ - countDirect: number - /** - * @default 0 - */ - countDirectDelta: number - /** - * @default 0 - */ - countIndirect: number - /** - * @default 0 - */ - countIndirectDelta: number - countsBySeverity: { - low: { - /** - * @default 0 - */ - count: number - /** - * @default 0 - */ - countDelta: number - /** - * @default 0 - */ - countDirect: number - /** - * @default 0 - */ - countDirectDelta: number - /** - * @default 0 - */ - countIndirect: number - /** - * @default 0 - */ - countIndirectDelta: number - } - medium: { - /** - * @default 0 - */ - count: number - /** - * @default 0 - */ - countDelta: number - /** - * @default 0 - */ - countDirect: number - /** - * @default 0 - */ - countDirectDelta: number - /** - * @default 0 - */ - countIndirect: number - /** - * @default 0 - */ - countIndirectDelta: number - } - high: { - /** - * @default 0 - */ - count: number - /** - * @default 0 - */ - countDelta: number - /** - * @default 0 - */ - countDirect: number - /** - * @default 0 - */ - countDirectDelta: number - /** - * @default 0 - */ - countIndirect: number - /** - * @default 0 - */ - countIndirectDelta: number - } - critical: { - /** - * @default 0 - */ - count: number - /** - * @default 0 - */ - countDelta: number - /** - * @default 0 - */ - countDirect: number - /** - * @default 0 - */ - countDirectDelta: number - /** - * @default 0 - */ - countIndirect: number - /** - * @default 0 - */ - countIndirectDelta: number - } - } - }[] - }> - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * List details of periodic historical data snapshots (Beta) - * - * This API endpoint is used to list the details of historical snapshots. - * Snapshots of organization data are taken periodically, and each historical - * snapshot record contains high-level overview metrics about the data that - * was collected. Other [Historical Data - * Endpoints](/reference/historical-data-endpoints) can be used to fetch the - * raw data associated with each snapshot. Historical snapshots contain - * details and raw data for the following resources: - * - * - Repositories - * - Alerts - * - Dependencies - * - Artifacts - * - Users - * - Settings Daily snapshot data is bucketed to the nearest day which is - * described in more detail at: [Historical Data - * Endpoints](/reference/historical-data-endpoints) This endpoint consumes - * 10 units of your quota. This endpoint requires the following org token - * scopes: - * - Historical:snapshots-list - */ - historicalSnapshotsList: { - parameters: { - query?: { - /** - * The UTC date in YYYY-MM-DD format for which to fetch snapshots. - */ - date?: string - /** - * The number of days of data to fetch as an offset from input date - * (e.g. "-7d" or "7d") or use "latest" to query for latest snapshots - * for each repo. - */ - range?: string - /** - * Specify the maximum number of results to return per page - * (intermediate pages may have fewer than this limit and callers should - * always check "endCursor" in response body to know if there are more - * pages) - */ - per_page?: number - /** - * The pagination cursor that was returned as the "endCursor" property - * in previous request. - */ - startAfterCursor?: string - /** - * Comma-separated list of historical snapshot statuses that should be - * included (allowed: "in-progress", "success", "failure", "timeout", - * "skipped") - */ - 'filters.status'?: string - /** - * Comma-separated list of requestId values that were used to start the - * historical snapshot job. - */ - 'filters.requestId'?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * The historical snapshots. - */ - 200: { - content: { - 'application/json': { - meta: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + majorRefactor?: { + /** + * @description The action to take for majorRefactor issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingTarball?: { + /** + * @description The action to take for missingTarball issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + suspiciousStarActivity?: { + /** + * @description The action to take for suspiciousStarActivity issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + notFound?: { + /** + * @description The action to take for notFound issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unpopularPackage?: { + /** + * @description The action to take for unpopularPackage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + policy?: { + /** + * @description The action to take for policy issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillAutonomyAbuse?: { + /** + * @description The action to take for skillAutonomyAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillCommandInjection?: { + /** + * @description The action to take for skillCommandInjection issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillDataExfiltration?: { + /** + * @description The action to take for skillDataExfiltration issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillDiscoveryAbuse?: { + /** + * @description The action to take for skillDiscoveryAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillHardcodedSecrets?: { + /** + * @description The action to take for skillHardcodedSecrets issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillObfuscation?: { + /** + * @description The action to take for skillObfuscation issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillPreExecution?: { + /** + * @description The action to take for skillPreExecution issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillPromptInjection?: { + /** + * @description The action to take for skillPromptInjection issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillResourceAbuse?: { + /** + * @description The action to take for skillResourceAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillSupplyChain?: { + /** + * @description The action to take for skillSupplyChain issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillToolAbuse?: { + /** + * @description The action to take for skillToolAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillToolChaining?: { + /** + * @description The action to take for skillToolChaining issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillTransitiveTrust?: { /** - * @default + * @description The action to take for skillTransitiveTrust issues. + * @enum {string} */ - organizationId: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + socketUpgradeAvailable?: { /** - * @default 0 + * @description The action to take for socketUpgradeAvailable issues. + * @enum {string} */ - queryStartTimestamp: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + longStrings?: { /** - * @default + * @description The action to take for longStrings issues. + * @enum {string} */ - startDateInclusive: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + highEntropyStrings?: { /** - * @default + * @description The action to take for highEntropyStrings issues. + * @enum {string} */ - endDateInclusive: string - filters: { - status?: string[] - requestId?: string[] - } - } - items: Array<{ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + urlStrings?: { /** - * @default + * @description The action to take for urlStrings issues. + * @enum {string} */ - id: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + usesEval?: { /** - * @default + * @description The action to take for usesEval issues. + * @enum {string} */ - requestId: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + dynamicRequire?: { /** - * @default + * @description The action to take for dynamicRequire issues. + * @enum {string} */ - requestedBy: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + envVars?: { /** - * @default + * @description The action to take for envVars issues. + * @enum {string} */ - requestedAt: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingDependency?: { /** - * @default + * @description The action to take for missingDependency issues. + * @enum {string} */ - startedAt: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unusedDependency?: { /** - * @default + * @description The action to take for unusedDependency issues. + * @enum {string} */ - finishedAt: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + peerDependency?: { /** - * @default 0 + * @description The action to take for peerDependency issues. + * @enum {string} */ - durationMs: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + uncaughtOptionalDependency?: { /** - * @default + * @description The action to take for uncaughtOptionalDependency issues. + * @enum {string} */ - status: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedRequire?: { /** - * @default 0 + * @description The action to take for unresolvedRequire issues. + * @enum {string} */ - numReposScanned: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + extraneousDependency?: { /** - * @default 0 + * @description The action to take for extraneousDependency issues. + * @enum {string} */ - numSbomsScanned: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + obfuscatedRequire?: { /** - * @default 0 + * @description The action to take for obfuscatedRequire issues. + * @enum {string} */ - numLowAlerts: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + obfuscatedFile?: { /** - * @default 0 + * @description The action to take for obfuscatedFile issues. + * @enum {string} */ - numHighAlerts: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + minifiedFile?: { /** - * @default 0 + * @description The action to take for minifiedFile issues. + * @enum {string} */ - numMediumAlerts: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + installScripts?: { /** - * @default 0 + * @description The action to take for installScripts issues. + * @enum {string} */ - numCriticalAlerts: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + hasNativeCode?: { /** - * @default 0 + * @description The action to take for hasNativeCode issues. + * @enum {string} */ - numIgnoredLowAlerts: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + binScriptConfusion?: { /** - * @default 0 + * @description The action to take for binScriptConfusion issues. + * @enum {string} */ - numIgnoredHighAlerts: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shellScriptOverride?: { /** - * @default 0 + * @description The action to take for shellScriptOverride issues. + * @enum {string} */ - numIgnoredMediumAlerts: number + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + didYouMean?: { /** - * @default 0 + * @description The action to take for didYouMean issues. + * @enum {string} */ - numIgnoredCriticalAlerts: number - }> - /** - * @default - */ - endCursor: string | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Start historical data snapshot job (Beta) - * - * This API endpoint is used to start a historical snapshot job. While - * snapshots are typically taken multiple times a day for paid plans and once - * a day for free plans, this endpoint can be used to start an "on demand" - * snapshot job to ensure the latest data is collected and stored for - * historical purposes. An historical snapshot will contain details and raw - * data for the following resources: - * - * - Repositories - * - Alerts - * - Dependencies - * - Artifacts - * - Users - * - Settings Historical snapshot data is bucketed to the nearest day which is - * described in more detail at: [Historical Data - * Endpoints](/reference/historical-data-endpoints) This endpoint consumes - * 10 units of your quota. This endpoint requires the following org token - * scopes: - * - Historical:snapshots-start - */ - historicalSnapshotsStart: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * The details of the snapshot job request. - */ - 200: { - content: { - 'application/json': { - /** - * @default - */ - requestId: string - /** - * @default - */ - requestedBy: string - /** - * @default - */ - requestedAt: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get Audit Log Events. - * - * Paginated list of audit log events. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - audit-log:list. - */ - getAuditLogEvents: { - parameters: { - query?: { - /** - * Filter audit log events by type. Omit for all types. - */ - type?: - | 'AddLicenseOverlayNote' - | 'AssociateLabel' - | 'CancelInvitation' - | 'ChangeMemberRole' - | 'ChangePlanSubscriptionSeats' - | 'CreateApiToken' - | 'CreateArtifact' - | 'CreateAlertPolicy' - | 'CreateFirewallCustomRegistry' - | 'CreateFirewallDeploymentConfig' - | 'CreateLabel' - | 'CreateOauthRefreshToken' - | 'CreateRepoAccessRule' - | 'CreateUserWithPassword' - | 'CreateWebhook' - | 'CreateTicket' - | 'CreateTicketingConfiguration' - | 'CoanaCliLegacyModeCutoffUpdated' - | 'CoanaCliLegacyModeDemoteOrg' - | 'CoanaCliLegacyModePromoteOrg' - | 'CreateAlertResolution' - | 'DeleteAlertPolicy' - | 'DeleteAlertResolution' - | 'DeleteAlertTriage' - | 'DeleteApiToken' - | 'DeleteFirewallCustomRegistry' - | 'DeleteFirewallDeploymentConfig' - | 'DeleteFullScan' - | 'DeleteLabel' - | 'DeleteLabelSetting' - | 'DeleteRepoAccessRule' - | 'DeleteReport' - | 'DeleteRepository' - | 'DeleteTicketingConfiguration' - | 'DeleteWebhook' - | 'DisablePythonCliRunStreamingOverride' - | 'DisassociateLabel' - | 'DisconnectAsanaIntegration' - | 'DisconnectJiraIntegration' - | 'DisconnectLinearIntegration' - | 'DowngradeOrganizationPlan' - | 'EnablePythonCliRunStreamingOverride' - | 'EnqueueAutopatchMergeRun' - | 'EnqueueAutopatchPrepareJob' - | 'FinalizeAlertPolicyMigration' - | 'JoinOrganization' - | 'AsanaIntegrationConnected' - | 'JiraIntegrationConnected' - | 'LinearIntegrationConnected' - | 'MemberAdded' - | 'MemberRemoved' - | 'MemberRoleChanged' - | 'RemoveLicenseOverlay' - | 'RemoveMember' - | 'RollbackAlertPolicyMigration' - | 'ResetInvitationLink' - | 'ResetOrganizationSettingToDefault' - | 'RevokeOauthToken' - | 'RotateOauthRefreshToken' - | 'RevokeApiToken' - | 'RotateApiToken' - | 'SendInvitation' - | 'SessionRevokedByUser' - | 'SetLabelSettingToDefault' - | 'SetSsoBypassMemberships' - | 'SetSsoBypassRbacRoles' - | 'SSOEmailVerificationCompleted' - | 'SSOLoginCompleted' - | 'SvdBackfillLegacyOverlay' - | 'SvdReprocessClusters' - | 'SyncOrganization' - | 'TransferOwnership' - | 'UpdateAlertTriage' - | 'UpdateApiTokenCommitter' - | 'UpdateApiTokenMaxQuota' - | 'UpdateApiTokenName' - | 'UpdateApiTokenScopes' - | 'UpdateApiTokenVisibility' - | 'UpdateAutopatchCurated' - | 'UpdateAutopatchPrepareConfig' - | 'UpdateFirewallCustomRegistry' - | 'UpdateFirewallDeploymentConfig' - | 'UpdateLabel' - | 'UpdateLabelSetting' - | 'UpdateLicenseOverlay' - | 'UpdateOrganizationSetting' - | 'UpdateRepoAccessRule' - | 'UpdateTicketingConfiguration' - | 'UpdateWebhook' - | 'UpgradeOrganizationPlan' - | 'UserMagicLinkSent' - | 'UserSignedIn' - | 'UserSignedOut' - /** - * Number of events per page. - */ - per_page?: number - /** - * Page token. - */ - page?: string - /** - * A Unix timestamp in seconds to filter results prior to this date. - */ - from?: string - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * The paginated list of events in an organizations audit log and the next - * page querystring token. - */ - 200: { - content: { - 'application/json': { - results: Array<{ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptDidYouMean?: { /** - * @default + * @description The action to take for gptDidYouMean issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + bidi?: { + /** + * @description The action to take for bidi issues. + * @enum {string} */ - event_id?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + zeroWidth?: { /** - * @default + * @description The action to take for zeroWidth issues. + * @enum {string} */ - created_at?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badEncoding?: { /** - * @default + * @description The action to take for badEncoding issues. + * @enum {string} */ - updated_at?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + homoglyphs?: { /** - * @default + * @description The action to take for homoglyphs issues. + * @enum {string} */ - country_code?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + invisibleChars?: { /** - * @default + * @description The action to take for invisibleChars issues. + * @enum {string} */ - organization_id?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + suspiciousString?: { /** - * @default + * @description The action to take for suspiciousString issues. + * @enum {string} */ - ip_address?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + potentialVulnerability?: { /** - * @default null + * @description The action to take for potentialVulnerability issues. + * @enum {string} */ - payload?: Record | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxProposedApiUsage?: { /** - * @default 0 + * @description The action to take for vsxProposedApiUsage issues. + * @enum {string} */ - status_code?: number | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxActivationWildcard?: { /** - * @default + * @description The action to take for vsxActivationWildcard issues. + * @enum {string} */ - type?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxWorkspaceContainsActivation?: { /** - * @default + * @description The action to take for vsxWorkspaceContainsActivation issues. + * @enum {string} */ - user_agent?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxUntrustedWorkspaceSupported?: { /** - * @default + * @description The action to take for vsxUntrustedWorkspaceSupported issues. + * @enum {string} */ - user_id?: string | null + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxVirtualWorkspaceSupported?: { /** - * @default + * @description The action to take for vsxVirtualWorkspaceSupported issues. + * @enum {string} */ - user_email?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxWebviewContribution?: { /** - * @default + * @description The action to take for vsxWebviewContribution issues. + * @enum {string} */ - user_image?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxDebuggerContribution?: { /** - * @default + * @description The action to take for vsxDebuggerContribution issues. + * @enum {string} */ - organization_name?: string - }> - /** - * @default - */ - nextPage: string | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * List API Tokens. - * - * List all API Tokens. - * This endpoint consumes 10 units of your quota. - * This endpoint requires the following org token scopes: - * - api-tokens:list. - */ - getAPITokens: { - parameters: { - query?: { - /** - * Specify Sort order. - */ - sort?: 'created_at' - /** - * Specify sort direction. - */ - direction?: 'asc' | 'desc' - /** - * Specify the maximum number of results to return per page. - */ - per_page?: number - /** - * The token specifying which page to return. - */ - page?: number - /** - * Whether to include token values in response. Use "omit" to exclude - * tokens entirely. - */ - token_values?: 'include' | 'omit' - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxExtensionDependency?: { + /** + * @description The action to take for vsxExtensionDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxExtensionPack?: { + /** + * @description The action to take for vsxExtensionPack issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + }; + /** + * @description Reset the policy rules to the default. When set to true, do not include any policyRules updates. + * @default false + */ + resetPolicyRules?: boolean; + }; + }; + }; responses: { - /** - * The paginated array of API tokens for the organization, and related - * metadata. - */ + /** @description Updated repository details */ 200: { content: { - 'application/json': { - tokens: Array<{ - /** - * List of committers associated with this API Token. - */ - committers: { + "application/json": { + securityPolicyRules?: { + gptSecurity?: { + /** + * @description The action to take for gptSecurity issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptAnomaly?: { + /** + * @description The action to take for gptAnomaly issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptMalware?: { + /** + * @description The action to take for gptMalware issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionPermission?: { + /** + * @description The action to take for browserExtensionPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionHostPermission?: { + /** + * @description The action to take for browserExtensionHostPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionWildcardHostPermission?: { + /** + * @description The action to take for browserExtensionWildcardHostPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + browserExtensionContentScript?: { + /** + * @description The action to take for browserExtensionContentScript issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + filesystemAccess?: { + /** + * @description The action to take for filesystemAccess issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + networkAccess?: { + /** + * @description The action to take for networkAccess issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shellAccess?: { + /** + * @description The action to take for shellAccess issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + debugAccess?: { + /** + * @description The action to take for debugAccess issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromePermission?: { + /** + * @description The action to take for chromePermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeHostPermission?: { + /** + * @description The action to take for chromeHostPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeWildcardHostPermission?: { + /** + * @description The action to take for chromeWildcardHostPermission issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chromeContentScript?: { + /** + * @description The action to take for chromeContentScript issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + criticalCVE?: { + /** + * @description The action to take for criticalCVE issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + cve?: { + /** + * @description The action to take for cve issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mediumCVE?: { + /** + * @description The action to take for mediumCVE issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mildCVE?: { + /** + * @description The action to take for mildCVE issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + emptyPackage?: { + /** + * @description The action to take for emptyPackage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + trivialPackage?: { + /** + * @description The action to take for trivialPackage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noREADME?: { + /** + * @description The action to take for noREADME issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingLockfile?: { + /** + * @description The action to take for missingLockfile issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + oversizedManifest?: { + /** + * @description The action to take for oversizedManifest issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedYarnDependency?: { + /** + * @description The action to take for unresolvedYarnDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedPomReference?: { + /** + * @description The action to take for unresolvedPomReference issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shrinkwrap?: { + /** + * @description The action to take for shrinkwrap issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + tooManyFiles?: { + /** + * @description The action to take for tooManyFiles issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + generic?: { + /** + * @description The action to take for generic issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToSink?: { + /** + * @description The action to take for ghaArgToSink issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaEnvToSink?: { + /** + * @description The action to take for ghaEnvToSink issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToSink?: { + /** + * @description The action to take for ghaContextToSink issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToOutput?: { + /** + * @description The action to take for ghaArgToOutput issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaArgToEnv?: { + /** + * @description The action to take for ghaArgToEnv issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToOutput?: { + /** + * @description The action to take for ghaContextToOutput issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ghaContextToEnv?: { + /** + * @description The action to take for ghaContextToEnv issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + recentlyPublished?: { + /** + * @description The action to take for recentlyPublished issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseSpdxDisj?: { + /** + * @description The action to take for licenseSpdxDisj issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unsafeCopyright?: { + /** + * @description The action to take for unsafeCopyright issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseChange?: { + /** + * @description The action to take for licenseChange issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonOSILicense?: { + /** + * @description The action to take for nonOSILicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecatedLicense?: { + /** + * @description The action to take for deprecatedLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingLicense?: { + /** + * @description The action to take for missingLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonSPDXLicense?: { + /** + * @description The action to take for nonSPDXLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unclearLicense?: { + /** + * @description The action to take for unclearLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + mixedLicense?: { + /** + * @description The action to take for mixedLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + notice?: { + /** + * @description The action to take for notice issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + modifiedLicense?: { + /** + * @description The action to take for modifiedLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + modifiedException?: { + /** + * @description The action to take for modifiedException issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + licenseException?: { + /** + * @description The action to take for licenseException issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecatedException?: { + /** + * @description The action to take for deprecatedException issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + miscLicenseIssues?: { + /** + * @description The action to take for miscLicenseIssues issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unidentifiedLicense?: { + /** + * @description The action to take for unidentifiedLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noLicenseFound?: { + /** + * @description The action to take for noLicenseFound issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + explicitlyUnlicensedItem?: { + /** + * @description The action to take for explicitlyUnlicensedItem issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + copyleftLicense?: { + /** + * @description The action to take for copyleftLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + nonpermissiveLicense?: { + /** + * @description The action to take for nonpermissiveLicense issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + ambiguousClassifier?: { + /** + * @description The action to take for ambiguousClassifier issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + invalidPackageJSON?: { + /** + * @description The action to take for invalidPackageJSON issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + httpDependency?: { + /** + * @description The action to take for httpDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gitDependency?: { + /** + * @description The action to take for gitDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gitHubDependency?: { + /** + * @description The action to take for gitHubDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + fileDependency?: { + /** + * @description The action to take for fileDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noTests?: { + /** + * @description The action to take for noTests issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noRepository?: { + /** + * @description The action to take for noRepository issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badSemver?: { + /** + * @description The action to take for badSemver issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badSemverDependency?: { + /** + * @description The action to take for badSemverDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noV1?: { + /** + * @description The action to take for noV1 issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noWebsite?: { + /** + * @description The action to take for noWebsite issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noBugTracker?: { + /** + * @description The action to take for noBugTracker issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + noAuthorData?: { + /** + * @description The action to take for noAuthorData issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + typeModuleCompatibility?: { + /** + * @description The action to take for typeModuleCompatibility issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + floatingDependency?: { + /** + * @description The action to take for floatingDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + manifestConfusion?: { + /** + * @description The action to take for manifestConfusion issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + malware?: { + /** + * @description The action to take for malware issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + telemetry?: { + /** + * @description The action to take for telemetry issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + troll?: { + /** + * @description The action to take for troll issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + pendingScan?: { /** - * Email address of the committer. - * - * @default + * @description The action to take for pendingScan issues. + * @enum {string} */ - email?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + deprecated?: { /** - * The source control provider for the committer. - * - * @default api - * + * @description The action to take for deprecated issues. * @enum {string} */ - provider?: 'api' | 'azure' | 'bitbucket' | 'github' | 'gitlab' + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + chronoAnomaly?: { /** - * Login name on the provider platform. - * - * @default + * @description The action to take for chronoAnomaly issues. + * @enum {string} */ - providerLoginName?: string + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + compromisedSSHKey?: { /** - * User ID on the provider platform. - * - * @default + * @description The action to take for compromisedSSHKey issues. + * @enum {string} */ - providerUserId?: string - }[] - /** - * Format: uuid. - * - * ID of the Socket user who created the API Token. - * - * @default - */ - created_by: string | null - /** - * Format: date. - * - * Timestamp when the API Token was created. - * - * @default - */ - created_at: string - /** - * Format: uuid. - * - * The stable group UUID that remains constant across token - * rotations. - * - * @default - */ - group_uuid: string - /** - * SRI-format hash of the token (e.g., sha512-base64hash). Null - * for tokens created before hash column was added. - * - * @default - */ - hash: string | null - /** - * The ID of the API Token. - * - * @default - */ - id: string - /** - * Format: date. - * - * Timestamp when the API Token was last used. - * - * @default - */ - last_used_at: string - /** - * Maximum number of API calls allowed per month. - * - * @default 1000 - */ - max_quota: number - /** - * Name for the API Token. - * - * @default api token - */ - name: string | null - /** - * List of scopes granted to the API Token. - */ - scopes: ( - | 'alerts' - | 'alerts:list' - | 'alerts:trend' - | 'alert-resolution' - | 'alert-resolution:list' - | 'alert-resolution:create' - | 'alert-resolution:read' - | 'alert-resolution:delete' - | 'threat-campaigns' - | 'threat-campaigns:list' - | 'api-tokens' - | 'api-tokens:create' - | 'api-tokens:update' - | 'api-tokens:revoke' - | 'api-tokens:rotate' - | 'api-tokens:list' - | 'audit-log' - | 'audit-log:list' - | 'dependencies' - | 'dependencies:list' - | 'dependencies:trend' - | 'fixes' - | 'fixes:list' - | 'full-scans' - | 'full-scans:list' - | 'full-scans:create' - | 'full-scans:delete' - | 'diff-scans' - | 'diff-scans:list' - | 'diff-scans:create' - | 'diff-scans:delete' - | 'entitlements' - | 'entitlements:list' - | 'historical' - | 'historical:snapshots-list' - | 'historical:snapshots-start' - | 'historical:alerts-list' - | 'historical:alerts-trend' - | 'historical:dependencies-list' - | 'historical:dependencies-trend' - | 'integration' - | 'integration:list' - | 'integration:create' - | 'integration:update' - | 'integration:delete' - | 'access-policy' - | 'access-policy:read' - | 'access-policy:attach' - | 'access-policy:update' - | 'license-policy' - | 'license-policy:update' - | 'license-policy:read' - | 'packages' - | 'packages:list' - | 'access-policy-definition' - | 'access-policy-definition:attach' - | 'access-policy-definition:read' - | 'access-policy-definition:update' - | 'report' - | 'report:list' - | 'report:read' - | 'report:write' - | 'repo' - | 'repo:list' - | 'repo:create' - | 'repo:update' - | 'repo:delete' - | 'repo-label' - | 'repo-label:list' - | 'repo-label:create' - | 'repo-label:update' - | 'repo-label:delete' - | 'security-policy' - | 'security-policy:update' - | 'security-policy:read' - | 'socket-basics' - | 'socket-basics:read' - | 'telemetry-policy' - | 'telemetry-policy:update' - | 'telemetry-events' - | 'telemetry-events:list' - | 'threat-feed' - | 'threat-feed:list' - | 'triage' - | 'triage:alerts-list' - | 'triage:alerts-update' - | 'uploaded-artifacts' - | 'uploaded-artifacts:create' - | 'uploaded-artifacts:list' - | 'webhooks' - | 'webhooks:create' - | 'webhooks:list' - | 'webhooks:update' - | 'webhooks:delete' - | 'openid' - | 'profile' - | 'email' - | '*' - )[] - /** - * The token of the API Token (redacted or omitted) - * - * @default - */ - token: string | null - /** - * The visibility of the API Token. Warning: this field is - * deprecated and will be removed in the future. - * - * @default organization - * - * @enum {string} - */ - visibility: 'admin' | 'organization' - }> - /** - * @default 0 - */ - nextPage: number | null - } - } - } - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Create API Token. - * - * Create an API Token. The API Token created must use a subset of permissions - * the API token creating them. This endpoint consumes 10 units of your quota. - * This endpoint requires the following org token scopes: - api-tokens:create. - */ - postAPIToken: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - /** - * The settings to create the api token with. - */ - requestBody?: { - content: { - 'application/json': { - /** - * Maximum number of API calls allowed per month. - * - * @default 1000 - */ - max_quota: number - /** - * List of scopes granted to the API Token. - */ - scopes: Array< - | 'alerts' - | 'alerts:list' - | 'alerts:trend' - | 'alert-resolution' - | 'alert-resolution:list' - | 'alert-resolution:create' - | 'alert-resolution:read' - | 'alert-resolution:delete' - | 'threat-campaigns' - | 'threat-campaigns:list' - | 'api-tokens' - | 'api-tokens:create' - | 'api-tokens:update' - | 'api-tokens:revoke' - | 'api-tokens:rotate' - | 'api-tokens:list' - | 'audit-log' - | 'audit-log:list' - | 'dependencies' - | 'dependencies:list' - | 'dependencies:trend' - | 'fixes' - | 'fixes:list' - | 'full-scans' - | 'full-scans:list' - | 'full-scans:create' - | 'full-scans:delete' - | 'diff-scans' - | 'diff-scans:list' - | 'diff-scans:create' - | 'diff-scans:delete' - | 'entitlements' - | 'entitlements:list' - | 'historical' - | 'historical:snapshots-list' - | 'historical:snapshots-start' - | 'historical:alerts-list' - | 'historical:alerts-trend' - | 'historical:dependencies-list' - | 'historical:dependencies-trend' - | 'integration' - | 'integration:list' - | 'integration:create' - | 'integration:update' - | 'integration:delete' - | 'access-policy' - | 'access-policy:read' - | 'access-policy:attach' - | 'access-policy:update' - | 'license-policy' - | 'license-policy:update' - | 'license-policy:read' - | 'packages' - | 'packages:list' - | 'access-policy-definition' - | 'access-policy-definition:attach' - | 'access-policy-definition:read' - | 'access-policy-definition:update' - | 'report' - | 'report:list' - | 'report:read' - | 'report:write' - | 'repo' - | 'repo:list' - | 'repo:create' - | 'repo:update' - | 'repo:delete' - | 'repo-label' - | 'repo-label:list' - | 'repo-label:create' - | 'repo-label:update' - | 'repo-label:delete' - | 'security-policy' - | 'security-policy:update' - | 'security-policy:read' - | 'socket-basics' - | 'socket-basics:read' - | 'telemetry-policy' - | 'telemetry-policy:update' - | 'telemetry-events' - | 'telemetry-events:list' - | 'threat-feed' - | 'threat-feed:list' - | 'triage' - | 'triage:alerts-list' - | 'triage:alerts-update' - | 'uploaded-artifacts' - | 'uploaded-artifacts:create' - | 'uploaded-artifacts:list' - | 'webhooks' - | 'webhooks:create' - | 'webhooks:list' - | 'webhooks:update' - | 'webhooks:delete' - | 'openid' - | 'profile' - | 'email' - | '*' - > - /** - * The visibility of the API Token. Warning: this field is deprecated - * and will be removed in the future. - * - * @default organization - * - * @enum {string} - */ - visibility: 'admin' | 'organization' - /** - * Committer information to associate with the API Token. - */ - committer: { - /** - * Email address of the committer. - * - * @default - */ - email?: string - /** - * The source control provider for the committer. - * - * @default api - * - * @enum {string} - */ - provider?: 'api' | 'azure' | 'bitbucket' | 'github' | 'gitlab' - /** - * Login name on the provider platform. - * - * @default - */ - providerLoginName?: string - /** - * User ID on the provider platform. - * - * @default - */ - providerUserId?: string - } - /** - * Name for the API Token. - * - * @default api token - */ - name?: string - /** - * List of resources this API Token can access. Tokens with resource - * grants can only access a subset of routes that support this - * feature. - */ - resources?: Array<{ - /** - * Slug of the organization to grant access to. - * - * @default - */ - organizationSlug: string - /** - * Slug of the repository to grant access to. - * - * @default - */ - repositorySlug: string - /** - * Workspace slug containing the specified repo. - * - * @default - */ - workspace?: string - }> - } - } - } - responses: { - /** - * The newly created api token with its stable UUID and hash. - */ - 200: { - content: { - 'application/json': { - /** - * Format: uuid. - * - * ID of the Socket user who created the API Token. - * - * @default - */ - created_by: string | null - /** - * Format: uuid. - * - * The stable group UUID that remains constant across token - * rotations. - * - * @default - */ - group_uuid: string - /** - * @default - */ - token: string - /** - * @default - */ - hash: string - } - } - } - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Update API Token. - * - * Update an API Token. The API Token created must use a subset of permissions - * the API token creating them. This endpoint consumes 10 units of your quota. - * This endpoint requires the following org token scopes: - api-tokens:create. - */ - postAPITokenUpdate: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - /** - * The token and properties to update on the token. - */ - requestBody?: { - content: { - 'application/json': { - /** - * Maximum number of API calls allowed per hour. - * - * @default 1000 - */ - max_quota: number - /** - * List of scopes granted to the API Token. - */ - scopes: Array< - | 'alerts' - | 'alerts:list' - | 'alerts:trend' - | 'alert-resolution' - | 'alert-resolution:list' - | 'alert-resolution:create' - | 'alert-resolution:read' - | 'alert-resolution:delete' - | 'threat-campaigns' - | 'threat-campaigns:list' - | 'api-tokens' - | 'api-tokens:create' - | 'api-tokens:update' - | 'api-tokens:revoke' - | 'api-tokens:rotate' - | 'api-tokens:list' - | 'audit-log' - | 'audit-log:list' - | 'dependencies' - | 'dependencies:list' - | 'dependencies:trend' - | 'fixes' - | 'fixes:list' - | 'full-scans' - | 'full-scans:list' - | 'full-scans:create' - | 'full-scans:delete' - | 'diff-scans' - | 'diff-scans:list' - | 'diff-scans:create' - | 'diff-scans:delete' - | 'entitlements' - | 'entitlements:list' - | 'historical' - | 'historical:snapshots-list' - | 'historical:snapshots-start' - | 'historical:alerts-list' - | 'historical:alerts-trend' - | 'historical:dependencies-list' - | 'historical:dependencies-trend' - | 'integration' - | 'integration:list' - | 'integration:create' - | 'integration:update' - | 'integration:delete' - | 'access-policy' - | 'access-policy:read' - | 'access-policy:attach' - | 'access-policy:update' - | 'license-policy' - | 'license-policy:update' - | 'license-policy:read' - | 'packages' - | 'packages:list' - | 'access-policy-definition' - | 'access-policy-definition:attach' - | 'access-policy-definition:read' - | 'access-policy-definition:update' - | 'report' - | 'report:list' - | 'report:read' - | 'report:write' - | 'repo' - | 'repo:list' - | 'repo:create' - | 'repo:update' - | 'repo:delete' - | 'repo-label' - | 'repo-label:list' - | 'repo-label:create' - | 'repo-label:update' - | 'repo-label:delete' - | 'security-policy' - | 'security-policy:update' - | 'security-policy:read' - | 'socket-basics' - | 'socket-basics:read' - | 'telemetry-policy' - | 'telemetry-policy:update' - | 'telemetry-events' - | 'telemetry-events:list' - | 'threat-feed' - | 'threat-feed:list' - | 'triage' - | 'triage:alerts-list' - | 'triage:alerts-update' - | 'uploaded-artifacts' - | 'uploaded-artifacts:create' - | 'uploaded-artifacts:list' - | 'webhooks' - | 'webhooks:create' - | 'webhooks:list' - | 'webhooks:update' - | 'webhooks:delete' - | 'openid' - | 'profile' - | 'email' - | '*' - > - /** - * The visibility of the API Token. Warning: this field is deprecated - * and will be removed in the future. - * - * @default organization - * - * @enum {string} - */ - visibility: 'admin' | 'organization' - /** - * Committer information to associate with the API Token. - */ - committer: { - /** - * Email address of the committer. - * - * @default - */ - email?: string - /** - * The source control provider for the committer. - * - * @default api - * - * @enum {string} - */ - provider?: 'api' | 'azure' | 'bitbucket' | 'github' | 'gitlab' - /** - * Login name on the provider platform. - * - * @default - */ - providerLoginName?: string - /** - * User ID on the provider platform. - * - * @default - */ - providerUserId?: string - } - /** - * Name for the API Token. - * - * @default api token - */ - name?: string - /** - * Format: uuid. - * - * The stable group UUID to update (provide uuid, id, token, or hash. - * May provide uuid+hash together for validation) - * - * @default - */ - uuid?: string - /** - * The API token ID to update (provide uuid, id, token, or hash) - * - * @default - */ - id?: string - /** - * The API token to update (provide uuid, id, token, or hash) - * - * @default - */ - token?: string - /** - * The API token hash to update (provide uuid, id, token, or hash) - * - * @default - */ - hash?: string - } - } - } - responses: { - /** - * The updated token. - */ - 200: { - content: { - 'application/json': { - /** - * SRI-format hash of the API token (e.g., sha512-base64hash) - * - * @default - */ - hash: string - } - } - } - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Rotate API Token. - * - * Rotate an API Token - * This endpoint consumes 10 units of your quota. - * This endpoint requires the following org token scopes: - * - api-tokens:rotate. - */ - postAPITokensRotate: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - /** - * The API Token identifier to rotate. Provide uuid (recommended), id, - * token, or hash. May provide uuid+hash together for validation. - */ - requestBody?: { - content: { - 'application/json': { - /** - * Format: uuid. - * - * The stable group UUID of the API token to rotate. - * - * @default - */ - uuid?: string - /** - * The API token ID to rotate. - * - * @default - */ - id?: string - /** - * @default - */ - token?: string - /** - * @default - */ - hash?: string - } - } - } - responses: { - /** - * The replacement API Token with its stable UUID, new token value, and - * hash. - */ - 200: { - content: { - 'application/json': { - /** - * The database ID of the new API token. - * - * @default - */ - id: string - /** - * Format: uuid. - * - * The stable group UUID (unchanged after rotation) - * - * @default - */ - group_uuid: string - /** - * Format: uuid. - * - * ID of the Socket user who created the API Token. - * - * @default - */ - created_by: string | null - /** - * @default - */ - token: string - /** - * @default - */ - hash: string - } - } - } - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Revoke API Token. - * - * Revoke an API Token - * This endpoint consumes 10 units of your quota. - * This endpoint requires the following org token scopes: - * - api-tokens:revoke. - */ - postAPITokensRevoke: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - /** - * The API token identifier to revoke. Provide uuid (recommended), id, - * token, or hash. May provide uuid+hash together for validation. - */ - requestBody?: { - content: { - 'application/json': { - /** - * Format: uuid. - * - * The stable group UUID of the API token to revoke. - * - * @default - */ - uuid?: string - /** - * The API token ID to revoke. - * - * @default - */ - id?: string - /** - * @default - */ - token?: string - /** - * @default - */ - hash?: string - } - } - } - responses: { - /** - * Response body. - */ - 200: { - content: { - 'application/json': { - /** - * The status of the token. - * - * @default revoked - */ - status: string - } - } - } - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get supported file types. - * - * Get a list of supported files for full scan generation. Files are - * categorized first by environment (e.g. NPM or PyPI), then by name. Files - * whose names match the patterns returned by this endpoint can be uploaded - * for report generation. Examples of supported filenames include - * `package.json`, `package-lock.json`, and `yarn.lock`. This endpoint - * consumes 1 unit of your quota. This endpoint requires the following org - * token scopes: - No Scopes Required, but authentication is required. - */ - getSupportedFiles: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * Glob patterns used to match supported files. - */ - 200: { - content: { - 'application/json': { - [key: string]: { - [key: string]: { + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + semverAnomaly?: { /** - * @default + * @description The action to take for semverAnomaly issues. + * @enum {string} */ - pattern: string - } - } - } - } - } - 400: components['responses']['SocketBadRequest'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get Threat Feed Items (Deprecated) - * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/getorgthreatfeeditems) instead. - * Paginated list of threat feed items. This endpoint requires an Enterprise - * Plan with Threat Feed add-on. - * [Contact](https://socket.dev/demo?utm_source=api-docs&utm_medium=referral&utm_campaign=tracking) - * our sales team for more details. This endpoint consumes 1 unit of your - * quota. This endpoint requires the following org token scopes: - * - * - Threat-feed:list - * - * @deprecated - */ - getThreatFeedItems: { - parameters: { - query?: { - /** - * Number of threats per page. - */ - per_page?: number - /** - * Page token. - */ - page?: string - /** - * Sort sort the threat feed by ID or createdAt attribute. - */ - sort?: 'id' | 'created_at' - /** - * Filter results by discovery period. - */ - discovery_period?: '1h' | '6h' | '1d' | '7d' | '30d' | '90d' | '365d' - /** - * Ordering direction of the sort attribute. - */ - direction?: 'desc' | 'asc' - /** - * Filter by threat classification. Supported values: `mal` (malware, - * including possible malware), `vuln` (vulnerability), `typo` - * (typosquat, including possible typosquat), `anom` (anomaly), `spy` - * (telemetry), `obf` (obfuscated code), `dual` (dual-use tool), `joke` - * (protestware or joke package), `tp` (all confirmed true positives), - * `fp` (false positive), `u` (unreviewed), `c` (classified, i.e. - * anything except unreviewed). - */ - filter?: - | 'u' - | 'c' - | 'fp' - | 'tp' - | 'mal' - | 'vuln' - | 'anom' - | 'joke' - | 'spy' - | 'typo' - | 'obf' - | 'dual' - /** - * Filter threats by package name. - */ - name?: string - /** - * Filter threats by package version. - */ - version?: string - /** - * Only return threats which have been human-reviewed. - */ - is_human_reviewed?: boolean - /** - * Filter threats by package ecosystem. - */ - ecosystem?: - | 'github' - | 'cargo' - | 'clawhub' - | 'composer' - | 'chrome' - | 'golang' - | 'huggingface' - | 'maven' - | 'npm' - | 'nuget' - | 'vscode' - | 'pypi' - | 'gem' - | 'swift' - } - } - responses: { - /** - * The paginated list of threats in the feed and the next page querystring - * token. - */ - 200: { - content: { - 'application/json': { - results: Array<{ - /** - * Format: date-time. - * - * ISO 8601 timestamp of when the threat in the package artifact - * was first discovered. - * - * @default - */ - createdAt?: string - /** - * Format: date-time. - * - * ISO 8601 timestamp of when the threat record for the package - * artifact was last updated (e.g., classification changed, - * package removed from registry, etc.) - * - * @default - */ - updatedAt?: string - /** - * Format: date-time. - * - * ISO 8601 timestamp of when the package artifact was published - * to the respective registry. - * - * @default - */ - publishedAt?: string | null - /** - * Detailed description of the underlying threat. - * - * @default - */ - description?: string - /** - * Hex-encoded SHA-256 hash of the malicious file content, - * usable as an indicator of compromise (IOC). Null when no file - * content hash is available for the threat. - * - * @default - */ - fileSha256?: string | null - /** - * Unique identifier of the threat feed entry. - * - * @default 0 - */ - id?: number - /** - * Format: uri. - * - * URL to the threat details page on Socket. - * - * @default - */ - locationHtmlUrl?: string - /** - * Format: uri. - * - * URL to the affected package page on Socket. - * - * @default - */ - packageHtmlUrl?: string - /** - * Package URL (PURL) of the affected package artifact. - * - * @default - */ - purl?: string - /** - * Format: date-time. - * - * ISO 8601 timestamp of when the package artifact was removed - * from the respective registry, or null if the package is still - * available on the registry. - * - * @default - */ - removedAt?: string | null - /** - * Threat classification. Possible values: `malware` (known - * malware), `possible_malware` (AI-detected potential malware), - * `vulnerability` (potential vulnerability), `typosquat` - * (human-reviewed typosquat), `possible_typosquat` (AI-detected - * potential typosquat), `anomaly` (anomalous behavior), - * `telemetry` (telemetry), `obfuscated` (obfuscated code), - * `dual_use` (dual-use tool), `troll` (protestware or joke - * package), `unreviewed` (not yet reviewed), `false_positive` - * (confirmed false positive). - * - * @default - */ - threatType?: string - /** - * Whether the threat still is in need of human review by the - * threat research team. - * - * @default false - */ - needsHumanReview?: boolean - /** - * Unique threat instance identifier across artifacts. - * - * @default 0 - */ - threatInstanceId?: number - }> - /** - * @default - */ - nextPage: string | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get Threat Feed Items (Beta) - * - * Paginated list of threats, sorted by updated_at by default. Set - * updated_after to the unix timestamp of your last sync while sorting by - * updated_at to synchronize all new or updated threats in the feed. This - * endpoint requires an Enterprise Plan with Threat Feed add-on. - * [Contact](https://socket.dev/demo?utm_source=api-docs&utm_medium=referral&utm_campaign=tracking) - * our sales team for more details. This endpoint consumes 1 unit of your - * quota. This endpoint requires the following org token scopes: - * - * - Threat-feed:list - */ - getOrgThreatFeedItems: { - parameters: { - query?: { - /** - * Number of threats per page. - */ - per_page?: number - /** - * Page cursor token. Pass the returned nextPageCursor to this query - * string to fetch the next page of the threat feed. - */ - page_cursor?: string - /** - * Set the sort order for the threat feed items. Default is descending - * order by updated_at, which includes all new and updated threat feed - * items. - */ - sort?: 'id' | 'created_at' | 'updated_at' - /** - * A Unix timestamp in seconds that filters results to items only - * updated after the timestamp. - */ - updated_after?: string - /** - * A Unix timestamp in seconds that filters results to items only - * created after the date. - */ - created_after?: string - /** - * Order direction of the provided sort field. - */ - direction?: 'desc' | 'asc' - /** - * Filter by threat classification. Supported values: `mal` (malware, - * including possible malware), `vuln` (vulnerability), `typo` - * (typosquat, including possible typosquat), `anom` (anomaly), `spy` - * (telemetry), `obf` (obfuscated code), `dual` (dual-use tool), `joke` - * (protestware or joke package), `tp` (all confirmed true positives), - * `fp` (false positive), `u` (unreviewed), `c` (classified, i.e. - * anything except unreviewed). - */ - filter?: - | 'u' - | 'c' - | 'fp' - | 'tp' - | 'mal' - | 'vuln' - | 'anom' - | 'joke' - | 'spy' - | 'typo' - | 'obf' - | 'dual' - /** - * Filter threats by package name. - */ - name?: string - /** - * Filter threats by package version. - */ - version?: string - /** - * Only return threats which have been human-reviewed. - */ - is_human_reviewed?: boolean - /** - * Filter threats by package ecosystem. - */ - ecosystem?: - | 'github' - | 'cargo' - | 'clawhub' - | 'composer' - | 'chrome' - | 'golang' - | 'huggingface' - | 'maven' - | 'npm' - | 'nuget' - | 'vscode' - | 'pypi' - | 'gem' - | 'swift' - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * The paginated list of items in the threat feed and the next page - * cursor. - */ - 200: { - content: { - 'application/json': { - results: Array<{ - /** - * Format: date-time. - * - * ISO 8601 timestamp of when the threat in the package artifact - * was first discovered. - * - * @default - */ - createdAt?: string - /** - * Format: date-time. - * - * ISO 8601 timestamp of when the threat record for the package - * artifact was last updated (e.g., classification changed, - * package removed from registry, etc.) - * - * @default - */ - updatedAt?: string - /** - * Format: date-time. - * - * ISO 8601 timestamp of when the package artifact was published - * to the respective registry. - * - * @default - */ - publishedAt?: string | null - /** - * Detailed description of the underlying threat. - * - * @default - */ - description?: string - /** - * Hex-encoded SHA-256 hash of the malicious file content, - * usable as an indicator of compromise (IOC). Null when no file - * content hash is available for the threat. - * - * @default - */ - fileSha256?: string | null - /** - * Unique identifier of the threat feed entry. - * - * @default 0 - */ - id?: number - /** - * Format: uri. - * - * URL to the threat details page on Socket. - * - * @default - */ - locationHtmlUrl?: string - /** - * Format: uri. - * - * URL to the affected package page on Socket. - * - * @default - */ - packageHtmlUrl?: string - /** - * Package URL (PURL) of the affected package artifact. - * - * @default - */ - purl?: string - /** - * Format: date-time. - * - * ISO 8601 timestamp of when the package artifact was removed - * from the respective registry, or null if the package is still - * available on the registry. - * - * @default - */ - removedAt?: string | null - /** - * Threat classification. Possible values: `malware` (known - * malware), `possible_malware` (AI-detected potential malware), - * `vulnerability` (potential vulnerability), `typosquat` - * (human-reviewed typosquat), `possible_typosquat` (AI-detected - * potential typosquat), `anomaly` (anomalous behavior), - * `telemetry` (telemetry), `obfuscated` (obfuscated code), - * `dual_use` (dual-use tool), `troll` (protestware or joke - * package), `unreviewed` (not yet reviewed), `false_positive` - * (confirmed false positive). - * - * @default - */ - threatType?: string - /** - * Whether the threat still is in need of human review by the - * threat research team. - * - * @default false - */ - needsHumanReview?: boolean - /** - * Unique threat instance identifier across artifacts. - * - * @default 0 - */ - threatInstanceId?: number - }> + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + newAuthor?: { + /** + * @description The action to take for newAuthor issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unstableOwnership?: { + /** + * @description The action to take for unstableOwnership issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingAuthor?: { + /** + * @description The action to take for missingAuthor issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unmaintained?: { + /** + * @description The action to take for unmaintained issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unpublished?: { + /** + * @description The action to take for unpublished issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + majorRefactor?: { + /** + * @description The action to take for majorRefactor issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingTarball?: { + /** + * @description The action to take for missingTarball issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + suspiciousStarActivity?: { + /** + * @description The action to take for suspiciousStarActivity issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + notFound?: { + /** + * @description The action to take for notFound issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unpopularPackage?: { + /** + * @description The action to take for unpopularPackage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + policy?: { + /** + * @description The action to take for policy issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillAutonomyAbuse?: { + /** + * @description The action to take for skillAutonomyAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillCommandInjection?: { + /** + * @description The action to take for skillCommandInjection issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillDataExfiltration?: { + /** + * @description The action to take for skillDataExfiltration issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillDiscoveryAbuse?: { + /** + * @description The action to take for skillDiscoveryAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillHardcodedSecrets?: { + /** + * @description The action to take for skillHardcodedSecrets issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillObfuscation?: { + /** + * @description The action to take for skillObfuscation issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillPreExecution?: { + /** + * @description The action to take for skillPreExecution issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillPromptInjection?: { + /** + * @description The action to take for skillPromptInjection issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillResourceAbuse?: { + /** + * @description The action to take for skillResourceAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillSupplyChain?: { + /** + * @description The action to take for skillSupplyChain issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillToolAbuse?: { + /** + * @description The action to take for skillToolAbuse issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillToolChaining?: { + /** + * @description The action to take for skillToolChaining issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + skillTransitiveTrust?: { + /** + * @description The action to take for skillTransitiveTrust issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + socketUpgradeAvailable?: { + /** + * @description The action to take for socketUpgradeAvailable issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + longStrings?: { + /** + * @description The action to take for longStrings issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + highEntropyStrings?: { + /** + * @description The action to take for highEntropyStrings issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + urlStrings?: { + /** + * @description The action to take for urlStrings issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + usesEval?: { + /** + * @description The action to take for usesEval issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + dynamicRequire?: { + /** + * @description The action to take for dynamicRequire issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + envVars?: { + /** + * @description The action to take for envVars issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + missingDependency?: { + /** + * @description The action to take for missingDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unusedDependency?: { + /** + * @description The action to take for unusedDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + peerDependency?: { + /** + * @description The action to take for peerDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + uncaughtOptionalDependency?: { + /** + * @description The action to take for uncaughtOptionalDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + unresolvedRequire?: { + /** + * @description The action to take for unresolvedRequire issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + extraneousDependency?: { + /** + * @description The action to take for extraneousDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + obfuscatedRequire?: { + /** + * @description The action to take for obfuscatedRequire issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + obfuscatedFile?: { + /** + * @description The action to take for obfuscatedFile issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + minifiedFile?: { + /** + * @description The action to take for minifiedFile issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + installScripts?: { + /** + * @description The action to take for installScripts issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + hasNativeCode?: { + /** + * @description The action to take for hasNativeCode issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + binScriptConfusion?: { + /** + * @description The action to take for binScriptConfusion issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + shellScriptOverride?: { + /** + * @description The action to take for shellScriptOverride issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + didYouMean?: { + /** + * @description The action to take for didYouMean issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + gptDidYouMean?: { + /** + * @description The action to take for gptDidYouMean issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + bidi?: { + /** + * @description The action to take for bidi issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + zeroWidth?: { + /** + * @description The action to take for zeroWidth issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + badEncoding?: { + /** + * @description The action to take for badEncoding issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + homoglyphs?: { + /** + * @description The action to take for homoglyphs issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + invisibleChars?: { + /** + * @description The action to take for invisibleChars issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + suspiciousString?: { + /** + * @description The action to take for suspiciousString issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + potentialVulnerability?: { + /** + * @description The action to take for potentialVulnerability issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxProposedApiUsage?: { + /** + * @description The action to take for vsxProposedApiUsage issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxActivationWildcard?: { + /** + * @description The action to take for vsxActivationWildcard issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxWorkspaceContainsActivation?: { + /** + * @description The action to take for vsxWorkspaceContainsActivation issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxUntrustedWorkspaceSupported?: { + /** + * @description The action to take for vsxUntrustedWorkspaceSupported issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxVirtualWorkspaceSupported?: { + /** + * @description The action to take for vsxVirtualWorkspaceSupported issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxWebviewContribution?: { + /** + * @description The action to take for vsxWebviewContribution issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxDebuggerContribution?: { + /** + * @description The action to take for vsxDebuggerContribution issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxExtensionDependency?: { + /** + * @description The action to take for vsxExtensionDependency issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + vsxExtensionPack?: { + /** + * @description The action to take for vsxExtensionPack issues. + * @enum {string} + */ + action: "defer" | "error" | "warn" | "monitor" | "ignore"; + }; + }; /** - * @default + * @description The default security policy for the organization + * @default default + * @enum {string} */ - nextPageCursor: string | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + securityPolicyDefault?: "default" | "low" | "medium" | "high"; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 409: components["responses"]["SocketConflict"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Get Packages by PURL (Org Scoped) - * - * Batch retrieval of package metadata and alerts by PURL strings for a - * specific organization. Compatible with CycloneDX reports. Package URLs - * (PURLs) are an ecosystem agnostic way to identify packages. CycloneDX SBOMs - * use the purl format to identify components. This endpoint supports fetching - * metadata and alerts for multiple packages at once by passing an array of - * purl strings, or by passing an entire CycloneDX report. **Note:** This - * endpoint has a batch size limit (default: 1024 PURLs per request). Requests - * exceeding this limit will return a 400 Bad Request error. More information - * on purl and CycloneDX: - * - * - [`purl` Spec](https://github.com/package-url/purl-spec) - * - [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components) - * This endpoint returns the latest available alert data for artifacts in - * the batch (stale while revalidate). Actively running analysis will be - * returned when available on subsequent runs. When `alerts=true`, Socket - * may synthesize two alert types to make partial results actionable: - * - `pendingScan`: the package is known but analysis has not completed yet - * - `notFound`: Socket could not resolve the package/version metadata When - * `purlErrors=true`, unresolved `notFound` inputs keep the legacy - * `purlError` stream shape instead of emitting synthetic `notFound` - * artifacts. Use `poll=false` (default) to fail open and return the current - * known state quickly. Use `poll=true` to fail closed and wait up to - * `timeoutSec` for pending analysis before returning. - * - * ## Query Parameters - * - * This endpoint supports all query parameters from `POST /v0/purl` including: - * `alerts`, `actions`, `compact`, `fixable`, `licenseattrib`, - * `licensedetails`, `purlErrors`, `poll`, `cachedResultsOnly`, and `summary`. - * Additionally, you may provide a `labels` query parameter to apply a - * repository label's security policies. Pass the label slug as the value - * (e.g., `?labels=production`). Only one label is currently supported. - * - * ## Examples: - * - * ### Looking up an npm package: - * - * ```json - * { - * "components": [ - * { - * "purl": "pkg:npm/express@4.19.2" - * } - * ] - * } - * ``` - * - * ### Looking up a PyPi package: - * - * ```json - * { - * "components": [ - * { - * "purl": "pkg:pypi/django@5.0.6" - * } - * ] - * } - * ``` - * - * ### Looking up a Maven package: - * - * ```json - * { - * "components": [ - * { - * "purl": "pkg:maven/log4j/log4j@1.2.17" - * } - * ] - * } - * ``` - * - * ### Batch lookup - * - * ```json - * { - * "components": [ - * { - * "purl": "pkg:npm/express@4.19.2" - * }, - * { - * "purl": "pkg:pypi/django@5.0.6" - * }, - * { - * "purl": "pkg:maven/log4j/log4j@1.2.17" - * } - * ] - * } - * ``` - * - * ### With label and options (query parameters): - * - * POST /v0/orgs/{org_slug}/purl?labels=production&alerts=true&compact=true - * { - * "components": [ - * { - * "purl": "pkg:npm/express@4.19.2" - * } - * ] - * } - * - * This endpoint consumes 100 units of your quota. - * This endpoint requires the following org token scopes: + * Get Organization License Policy + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/viewlicensepolicy) instead. * - * - Packages:list - */ - batchPackageFetchByOrg: { - parameters: { - query?: { - /** - * Repository label slugs to apply policies. Only one label is supported - * currently; the parameter is an array to allow future support for - * multiple labels. - */ - labels?: string[] - /** - * Include alert metadata. - */ - alerts?: boolean - /** - * Include only alerts with comma separated actions defined by security - * policy. - */ - actions?: Array<'error' | 'monitor' | 'warn' | 'ignore'> - /** - * Compact metadata. When enabled, excludes metadata fields like author, - * scores, size, dependencies, and manifest files. Always includes: id, - * type, name, version, release, namespace, subpath, alerts, and - * alertPriorities. - */ - compact?: boolean - /** - * Include only fixable alerts. - */ - fixable?: boolean - /** - * Include license attribution data, including license text and author - * information. Maps attribution/license text to a list of data objects - * to which that attribution info applies. - */ - licenseattrib?: boolean - /** - * Include detailed license information, including location and match - * strength, for each license datum. - */ - licensedetails?: boolean - /** - * Return errors found with handling PURLs as error objects in the - * stream. - */ - purlErrors?: boolean - /** - * When true, wait up to timeoutSec for pending analysis to complete - * before returning. When false (default), return the current known - * state immediately, including synthesized pendingScan and notFound - * alerts when alerts=true unless purlErrors=true keeps legacy not-found - * errors. - */ - poll?: boolean - /** - * Legacy fallback for older clients. Only used when poll is omitted: - * cachedResultsOnly=true behaves like poll=false, while - * cachedResultsOnly=false preserves the older blocking behavior. - */ - cachedResultsOnly?: boolean - /** - * Include a summary object at the end of the stream with counts of - * malformed, resolved, and not found PURLs. - */ - summary?: boolean - /** - * Maximum time in seconds to wait for package resolution and, when - * poll=true, pending analysis. Inputs that have not completed - * processing when the timeout is reached return pendingScan alerts when - * alerts=true, or errors when purlErrors=true. - */ - timeoutSec?: number - } + * Retrieve the license policy of an organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - license-policy:read + */ + getOrgLicensePolicy: { + parameters: { path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - requestBody?: { - content: { - 'application/json': components['schemas']['SocketOrgBatchPURLFetch'] - } - } + /** @description The slug of the organization */ + org_slug: string; + }; + }; responses: { - /** - * Socket issue lists and scores for all packages, and optional metadata - * objects. - */ + /** @description Retrieved license policy details */ 200: { content: { - 'application/x-ndjson': components['schemas']['BatchPurlStreamSchema'] - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": Record; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Fetch fixes for vulnerabilities in a repository, scan, or uploaded - * manifest. + * Update License Policy + * @description Set the organization's license policy * - * Fetches available fixes for vulnerabilities in a repository, scan, or - * uploaded manifest. Requires exactly one of repo_slug, full_scan_id, or - * tar_hash, as well as vulnerability_ids to be provided. vulnerability_ids - * can be a comma-separated list of GHSA or CVE IDs, or "*" for all - * vulnerabilities. + * ## License policy schema * - * ## Response Structure + * ```json + * { + * allow?: Array + * warn?: Array + * options?: Array + * } + * ``` * - * The response contains a `fixDetails` object where each key is a - * vulnerability ID (GHSA or CVE) and the value is a discriminated union based - * on the `type` field. + * Elements of the `allow` and `warn` arrays strings representing items which should be allowed, or which should trigger a warning; license data found in package which not present in either array will produce a license violation (effectively a "hard" error). For example, to allow Apache-2.0 and MIT to the allow list, simply add the strings "Apache-2.0" and "MIT" to the `allow` array. Strings appearing in these arrays are generally "what you see is what you get", with two important exceptions: strings which are recognized as license classes and strings which are recognized as PURLs are handled differently to allow for more flexible license policy creation. * - * ### Common Fields + * ## License Classes * - * All response variants include: + * Strings which are license classes will expand to a list of licenses known to be in that particular license class. Recognized license classes are: + * 'permissive', + * 'permissive (model)', + * 'permissive (gold)', + * 'permissive (silver)', + * 'permissive (bronze)', + * 'permissive (lead)', + * 'copyleft', + * 'maximal copyleft', + * 'network copyleft', + * 'strong copyleft', + * 'weak copyleft', + * 'contributor license agreement', + * 'public domain', + * 'proprietary free', + * 'source available', + * 'proprietary', + * 'commercial', + * 'patent' * - * - `type`: Discriminator field (one of: "fixFound", "partialFixFound", - * "noFixAvailable", "fixNotApplicable", "errorComputingFix") - * - `value`: Object containing the variant-specific data The `value` object - * always contains: - * - `ghsa`: string | null - The GHSA ID - * - `cve`: string | null - The CVE ID (if available) - * - `advisoryDetails`: object | null - Advisory details (only if - * include_details=true) + * Users can learn more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and [permissive tiers](https://blueoakcouncil.org/list) by reading the linked resources. * - * ### Response Variants * - * **fixFound**: A complete fix is available for all vulnerable packages. + * ## PURLs * - * - `value.fixDetails.fixes`: Array of fix objects, each containing: - * - `purl`: Package URL to upgrade - * - `fixedVersion`: Version to upgrade to - * - `manifestFiles`: Array of manifest files containing the package - * - `updateType`: "patch" | "minor" | "major" | "unknown" - * - `value.fixDetails.responsibleDirectDependencies`: (optional) Map of direct - * dependencies responsible for the vulnerability **partialFixFound**: Fixes - * available for some but not all vulnerable packages - * - Same as fixFound, plus: - * - `value.fixDetails.unfixablePurls`: Array of packages that cannot be fixed, - * each containing: - * - `purl`: Package URL - * - `manifestFiles`: Array of manifest files - * - `reasons`: Human-readable explanations of why the package cannot be - * upgraded. May contain multiple distinct entries when different dependency - * chains are blocked for different causes (e.g. one chain has no compatible - * upstream version; another would require a major version bump skipped by - * `--no-major-updates`). **noFixAvailable**: No fix exists for this - * vulnerability (no patched version published) - * - `value.vulnerableArtifacts`: Array of vulnerable packages with their - * manifest files; each carries a static `reasons` entry stating that no - * patched version has been published **fixNotApplicable**: A patched - * version of the vulnerable package exists but cannot be applied. The most - * common cause is that there is no upgrade path through the dependency tree - * — for example, given a chain `App → A@1.0.0 → B@1.0.0` where `B < 2.0.0` - * is vulnerable, if no version of `A` accepts `B@2.0.0` the fix cannot be - * applied without a manual override (e.g. `pnpm overrides`). Other causes - * include callers passing `--no-major-updates` when the only patched - * version is a major bump. - * - `value.vulnerableArtifacts`: Array of vulnerable packages with their - * manifest files, each with per-artifact `reasons` explaining why the fix - * could not be applied (omitted when no explanation is available) - * **errorComputingFix**: An error occurred while computing fixes - * - `value.message`: Error description + * Users may also modify their license policy's allow and warn lists by using [package URLs](https://github.com/package-url/purl-spec) (aka PURLs), which support glob patterns to allow a range of versions, files and directories, etc. * - * ### Fix version alignment + * purl qualifiers which support globs are `filename`, `version_glob`, `artifact_id` and `license_provenance` (primarily used for allowing data from registry metadata). * - * When several requested vulnerabilities are fixed by upgrading the same - * package, their fix entries carry the SAME `fixedVersion` — the server - * computes a version that clears all of them together and verifies it against - * each advisory's affected ranges. Clients can apply the fixes per package - * without reconciling versions. Only when no single in-policy version fixes - * all advisories on a package (non-monotonic affected ranges) can entries - * differ; each is then the minimal upgrade for its own advisory. + * ### Examples: + * Allow all license data found in a specific version of a package 4.14.1: `pkg:npm/lodash@4.14.1` + * Allow all license data found in a version range of a package: `pkg:npm/lodash?version_glob=15.*` + * Allow all license data in the test directory of a given package for certain version ranges: `pkg:npm/lodash@15.*.*?file_name=lodash/test/*` + * Allow all license data taken from the package registry for a package and version range: `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata` * - * ### Advisory Details (when include_details=true) + * ## Available options * - * - `title`: string | null - * - `description`: string | null - * - `cwes`: string[] - CWE identifiers - * - `severity`: "LOW" | "MODERATE" | "HIGH" | "CRITICAL" - * - `cvssVector`: string | null - * - `publishedAt`: string (ISO date) - * - `kev`: boolean - Whether it's a Known Exploited Vulnerability - * - `epss`: number | null - Exploit Prediction Scoring System score - * - `affectedPurls`: Array of affected packages with version ranges + * `toplevelOnly`: only apply the license policy to "top level" license data in a package, which includes registry metadata, LICENSE files, and manifest files which are closest to the root of the package. * - * ### Stateful Alert IDs (when include_stateful_alert_ids=true) + * `applyToUnidentified`: Apply license policy to found but unidentified license data. If enabled, the license policy will be applied to license data which could not be affirmatively identified as a known license (this will effectively merge the license policy violation and unidentified license alerts). If disabled, license policy alerts will only be shown for license data which is positively identified as something not allowed or set to warn by the license policy. + * + * This endpoint consumes 1 unit of your quota. * - * Top-level `statefulAlertIds` field — a map of GHSA ID → array of open - * stateful alert IDs (the human-readable `SOCKET-XXX-N` identifiers also - * returned by `/v0/orgs/{org_slug}/alerts`). The lookup is org-scoped, so the - * same GHSA may map to multiple alert IDs when it appears in alerts across - * different repos or branches. Callers that need a repo/branch filter should - * intersect this map with results from the alerts API. The lookup honors the - * same scan-type visibility as `/v0/orgs/{org_slug}/alerts` — when the - * `enableTier1OrgAlertApiRead` feature flag is off for the org, only `socket` - * scans are visible (no `socket_tier1`). Note on scopes: this field surfaces - * identifiers that are otherwise reachable via `/v0/orgs/{org_slug}/alerts` - * (which requires `alerts:list`). The fixes route is gated on `fixes:list` - * alone; the GHSAs the alert IDs are keyed to are already part of every - * `/fixes` response, and exposing the matching alert IDs through this opt-in - * flag is intentional — it lets a caller with only `fixes:list` complete the - * correlation back to /alerts on a token that already has that scope. If you - * require strict scope separation, do not enable this flag. This endpoint - * consumes 10 units of your quota. This endpoint requires the following org - * token scopes: - * - * - Fixes:list + * This endpoint requires the following org token scopes: + * - license-policy:update */ - 'fetch-fixes': { + updateOrgLicensePolicy: { parameters: { query: { - /** - * The slug of the repository to fetch fixes for (e.g. "my-repo" or - * "my-org/my-repo"). Use the full org/repo path to disambiguate when - * multiple GitHub orgs share the same repo name. Computes fixes based - * on the latest scan on the default branch. - */ - repo_slug?: string - /** - * The ID of the scan to fetch fixes for. - */ - full_scan_id?: string - /** - * A tarball hash from the upload-manifest-files endpoint. Mutually - * exclusive with repo_slug and full_scan_id. - */ - tar_hash?: string - /** - * Comma-separated list of GHSA or CVE IDs, or "*" for all - * vulnerabilities. - */ - vulnerability_ids: string - /** - * Whether to allow major version updates in fixes. - */ - allow_major_updates: boolean - /** - * Minimum release age for fixes packages (e.g., "1h", "2d", "1w"). - * Higher values reduces risk of installing recently released untested - * package versions. - */ - minimum_release_age?: string - /** - * Whether to include advisory details in the response. - */ - include_details?: boolean - /** - * Set to include the direct dependencies responsible for introducing - * the dependency or dependencies with the vulnerability in the - * response. - */ - include_responsible_direct_dependencies?: boolean - /** - * Set to include an allDetectedGhsas field listing every GHSA detected - * in the project, regardless of the vulnerability_ids filter. Useful - * for CLI clients that request a specific GHSA and want to show the - * user which GHSAs actually exist when the request has no overlap. - */ - include_all_detected_ghsas?: boolean - /** - * Set to include a statefulAlertIds map (GHSA ID → array of open - * stateful alert IDs detected in this organization) in the response. - * Lets callers correlate /fixes results back to the alert IDs surfaced - * by /v0/orgs/{org_slug}/alerts. Org-scoped only — multiple alerts - * across repos/branches may share a GHSA. Off by default to avoid an - * extra ClickHouse round-trip. - */ - include_stateful_alert_ids?: boolean - /** - * The id of an autofix-or-upgrade-cli-run record (created via - * /fixes/register-autofix-or-upgrade-cli-run) to associate this - * computation with. When set, the server records per-GHSA - * fix-computation telemetry into autofix_compute_vulnerability and - * updates the run's autofix_run row, mirroring the legacy - * /v0/fixes/compute-fixes endpoint. The caller must own the run's - * organization; foreign-org or unknown ids return 404. - */ - autofix_run_id?: string - } + /** @description Merge the policy update with the existing policy. Default is true. If false, the existing policy will be replaced with the new policy. */ + merge_update: boolean; + }; path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody?: { + content: { + "application/json": Record; + }; + }; responses: { - /** - * Fix details for requested vulnerabilities. - */ + /** @description Updated repository details */ 200: { content: { - 'application/json': { - fixDetails: { - [key: string]: Record - } + "application/json": Record; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get License Policy (Beta) + * @description Returns an organization's license policy including allow, warn, monitor, and deny categories. + * The deny category contains all licenses that are not explicitly categorized as allow, warn, or monitor. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - license-policy:read + */ + viewLicensePolicy: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Saturated License Allow List */ + 200: { + content: { + "application/json": components["schemas"]["SStoredLicensePolicy"]; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + 500: components["responses"]["SocketInternalServerError"]; + }; + }; + /** + * Get Socket Basics configuration, including toggles for the various tools it supports. + * @description Socket Basics is a CI/CD security scanning suite that runs on your source code, designed to complement Socket SCA and provide full coverage. + * + * - **SAST** - Find issues and risks with your code via static analysis using best in class Open Source tools + * - **Secret Scanning** - Detected potentially leaked secrets and credentials within your code + * - **Container Security** - Docker image and Dockerfile vulnerability scanning + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - socket-basics:read + */ + getSocketBasicsConfig: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Socket Basics settings */ + 200: { + content: { + "application/json": { + /** + * @description Enable tabular console output + * @default false + */ + consoleTabularEnabled?: boolean; + /** + * @description Enable JSON console output + * @default false + */ + consoleJsonEnabled?: boolean; + /** + * @description Enable verbose logging + * @default false + */ + verbose?: boolean; + /** + * @description Enable all language SAST scanning + * @default false + */ + allLanguagesEnabled?: boolean; + /** + * @description Run Python SAST scanning + * @default false + */ + pythonSastEnabled?: boolean; + /** + * @description Run JavaScript SAST scanning + * @default false + */ + javascriptSastEnabled?: boolean; + /** + * @description Run Go SAST scanning + * @default false + */ + goSastEnabled?: boolean; + /** + * @description Run Golang SAST scanning + * @default false + */ + golangSastEnabled?: boolean; + /** + * @description Run Java SAST scanning + * @default false + */ + javaSastEnabled?: boolean; + /** + * @description Run PHP SAST scanning + * @default false + */ + phpSastEnabled?: boolean; + /** + * @description Run Ruby SAST scanning + * @default false + */ + rubySastEnabled?: boolean; + /** + * @description Run C# SAST scanning + * @default false + */ + csharpSastEnabled?: boolean; + /** + * @description Run .NET SAST scanning + * @default false + */ + dotnetSastEnabled?: boolean; + /** + * @description Run C SAST scanning + * @default false + */ + cSastEnabled?: boolean; + /** + * @description Run C++ SAST scanning + * @default false + */ + cppSastEnabled?: boolean; + /** + * @description Run Kotlin SAST scanning + * @default false + */ + kotlinSastEnabled?: boolean; + /** + * @description Run Scala SAST scanning + * @default false + */ + scalaSastEnabled?: boolean; + /** + * @description Run Swift SAST scanning + * @default false + */ + swiftSastEnabled?: boolean; + /** + * @description Run Rust SAST scanning + * @default false + */ + rustSastEnabled?: boolean; + /** + * @description Run Elixir SAST scanning + * @default false + */ + elixirSastEnabled?: boolean; + /** + * @description Enable all SAST rules + * @default false + */ + allRulesEnabled?: boolean; + /** + * @description Comma-separated list of enabled Python SAST rules + * @default + */ + pythonEnabledRules?: string; + /** + * @description Comma-separated list of disabled Python SAST rules + * @default + */ + pythonDisabledRules?: string; + /** + * @description Comma-separated list of enabled JavaScript SAST rules + * @default + */ + javascriptEnabledRules?: string; + /** + * @description Comma-separated list of disabled JavaScript SAST rules + * @default + */ + javascriptDisabledRules?: string; + /** + * @description Comma-separated list of enabled Go SAST rules + * @default + */ + goEnabledRules?: string; + /** + * @description Comma-separated list of disabled Go SAST rules + * @default + */ + goDisabledRules?: string; + /** + * @description Comma-separated list of enabled Java SAST rules + * @default + */ + javaEnabledRules?: string; + /** + * @description Comma-separated list of disabled Java SAST rules + * @default + */ + javaDisabledRules?: string; + /** + * @description Comma-separated list of enabled Kotlin SAST rules + * @default + */ + kotlinEnabledRules?: string; + /** + * @description Comma-separated list of disabled Kotlin SAST rules + * @default + */ + kotlinDisabledRules?: string; + /** + * @description Comma-separated list of enabled Scala SAST rules + * @default + */ + scalaEnabledRules?: string; + /** + * @description Comma-separated list of disabled Scala SAST rules + * @default + */ + scalaDisabledRules?: string; + /** + * @description Comma-separated list of enabled PHP SAST rules + * @default + */ + phpEnabledRules?: string; + /** + * @description Comma-separated list of disabled PHP SAST rules + * @default + */ + phpDisabledRules?: string; + /** + * @description Comma-separated list of enabled Ruby SAST rules + * @default + */ + rubyEnabledRules?: string; + /** + * @description Comma-separated list of disabled Ruby SAST rules + * @default + */ + rubyDisabledRules?: string; + /** + * @description Comma-separated list of enabled C# SAST rules + * @default + */ + csharpEnabledRules?: string; + /** + * @description Comma-separated list of disabled C# SAST rules + * @default + */ + csharpDisabledRules?: string; + /** + * @description Comma-separated list of enabled .NET SAST rules + * @default + */ + dotnetEnabledRules?: string; + /** + * @description Comma-separated list of disabled .NET SAST rules + * @default + */ + dotnetDisabledRules?: string; + /** + * @description Comma-separated list of enabled C SAST rules + * @default + */ + cEnabledRules?: string; + /** + * @description Comma-separated list of disabled C SAST rules + * @default + */ + cDisabledRules?: string; + /** + * @description Comma-separated list of enabled C++ SAST rules + * @default + */ + cppEnabledRules?: string; + /** + * @description Comma-separated list of disabled C++ SAST rules + * @default + */ + cppDisabledRules?: string; + /** + * @description Comma-separated list of enabled Swift SAST rules + * @default + */ + swiftEnabledRules?: string; + /** + * @description Comma-separated list of disabled Swift SAST rules + * @default + */ + swiftDisabledRules?: string; + /** + * @description Comma-separated list of enabled Rust SAST rules + * @default + */ + rustEnabledRules?: string; + /** + * @description Comma-separated list of disabled Rust SAST rules + * @default + */ + rustDisabledRules?: string; + /** + * @description Comma-separated list of enabled Elixir SAST rules + * @default + */ + elixirEnabledRules?: string; + /** + * @description Comma-separated list of disabled Elixir SAST rules + * @default + */ + elixirDisabledRules?: string; + /** + * @description Notification method for OpenGrep + * @default + */ + openGrepNotificationMethod?: string; /** - * All vulnerability GHSA IDs detected in the project, regardless of - * the vulnerability_ids filter. Only present when - * include_all_detected_ghsas=true is set. + * @description Enable Socket full application reachability analysis + * @default false */ - allDetectedGhsas?: string[] + socketTier1Enabled?: boolean; /** - * Map of GHSA ID → open stateful alert IDs detected in this - * organization. Lets callers correlate /fixes results back to the - * alert IDs they see in /v0/orgs/{org_slug}/alerts. Org-scoped, not - * repo/branch-scoped — the same GHSA may surface in multiple alerts - * across repos. Only present when include_stateful_alert_ids=true - * is set. + * @description Additional parameters for Socket SCA + * @default */ - statefulAlertIds?: { - [key: string]: string[] - } - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get Organization Telemetry Config. - * - * Retrieve the telemetry config of an organization. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - */ - getOrgTelemetryConfig: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * Retrieved telemetry config details. - */ - 200: { - content: { - 'application/json': { + socketAdditionalParams?: string; /** - * Telemetry configuration. + * @description Enable secret scanning + * @default false */ - telemetry: { - /** - * Telemetry enabled. - * - * @default false - */ - enabled: boolean - } - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Update Telemetry Config. - * - * Update the telemetry config of an organization. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - telemetry-policy:update. - */ - updateOrgTelemetryConfig: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - requestBody?: { - content: { - 'application/json': { - /** - * Telemetry enabled. - * - * @default false - */ - enabled?: boolean - } - } - } - responses: { - /** - * Updated telemetry config details. - */ - 200: { - content: { - 'application/json': { + secretScanningEnabled?: boolean; /** - * Telemetry configuration. + * @description Directories to exclude from Trufflehog scanning + * @default */ - telemetry: { - /** - * Telemetry enabled. - * - * @default false - */ - enabled: boolean - } - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * List all webhooks. - * - * List all webhooks in the specified organization. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - webhooks:list. - */ - getOrgWebhooksList: { - parameters: { - query?: { - sort?: string - direction?: string - per_page?: number - page?: number - } - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - responses: { - /** - * List of webhooks. - */ - 200: { - content: { - 'application/json': { - results: Array<{ - /** - * The ID of the webhook. - * - * @default - */ - id: string - /** - * The creation date of the webhook. - * - * @default - */ - created_at: string - /** - * The last update date of the webhook. - * - * @default - */ - updated_at: string - /** - * The name of the webhook. - * - * @default - */ - name: string - /** - * The description of the webhook. - * - * @default - */ - description: string | null - /** - * The URL where webhook events will be sent. - * - * @default - */ - url: string - /** - * The signing key used to sign webhook payloads. - * - * @default - */ - secret: string | null - /** - * Array of event names. - */ - events: string[] - /** - * Custom headers to include in webhook requests. - * - * @default null - */ - headers: Record | null - filters: { - /** - * Array of repository IDs. - */ - repositoryIds: string[] | null - } | null - }> + trufflehogExcludeDir?: string; /** - * @default 0 + * @description Show unverified secrets in Trufflehog results + * @default false */ - nextPage: number | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Create a webhook. - * - * Create a new webhook. Returns the created webhook details. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - webhooks:create. - */ - createOrgWebhook: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } - requestBody?: { - content: { - 'application/json': { - /** - * The name of the webhook. - * - * @default - */ - name: string - /** - * The URL where webhook events will be sent. - * - * @default - */ - url: string - /** - * The signing key used to sign webhook payloads. - * - * @default - */ - secret: string - /** - * Array of event names. - */ - events: string[] - /** - * The description of the webhook. - * - * @default - */ - description?: string | null - /** - * Custom headers to include in webhook requests. - * - * @default null - */ - headers?: Record | null - filters?: { + trufflehogShowUnverified?: boolean; /** - * Array of repository IDs. + * @description Notification method for Trufflehog + * @default */ - repositoryIds: string[] | null - } | null - } - } - } - responses: { - /** - * The created webhook. - */ - 201: { - content: { - 'application/json': { + trufflehogNotificationMethod?: string; /** - * The ID of the webhook. - * + * @description Comma-separated list of container images to scan * @default */ - id: string + containerImagesToScan?: string; /** - * The creation date of the webhook. - * + * @description Comma-separated list of Dockerfiles to scan * @default */ - created_at: string + dockerfiles?: string; + /** + * @description Enable Trivy image scanning + * @default false + */ + trivyImageEnabled?: boolean; + /** + * @description Enable Trivy Dockerfile scanning + * @default false + */ + trivyDockerfileEnabled?: boolean; /** - * The last update date of the webhook. - * + * @description Notification method for Trivy * @default */ - updated_at: string + trivyNotificationMethod?: string; /** - * The name of the webhook. - * + * @description Comma-separated list of disabled Trivy rules * @default */ - name: string + trivyDisabledRules?: string; + /** + * @description Disable Trivy image scanning + * @default false + */ + trivyImageScanningDisabled?: boolean; /** - * The description of the webhook. - * + * @description Slack webhook URL for notifications * @default */ - description: string | null + slackWebhookUrl?: string; /** - * The URL where webhook events will be sent. - * + * @description Generic webhook URL for notifications * @default */ - url: string + webhookUrl?: string; /** - * The signing key used to sign webhook payloads. - * + * @description Microsoft Sentinel workspace ID * @default */ - secret: string | null + msSentinelWorkspaceId?: string; /** - * Array of event names. + * @description Microsoft Sentinel key + * @default */ - events: string[] + msSentinelKey?: string; /** - * Custom headers to include in webhook requests. - * - * @default null + * @description Sumo Logic endpoint URL + * @default */ - headers: Record | null - filters: { - /** - * Array of repository IDs. - */ - repositoryIds: string[] | null - } | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } - /** - * Get webhook. - * - * Get a webhook for the specified organization. - * This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: - * - webhooks:list. - */ - getOrgWebhook: { - parameters: { - path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the webhook. - */ - webhook_id: string - } - } - responses: { - /** - * Webhook details. - */ - 200: { - content: { - 'application/json': { + sumologicEndpoint?: string; /** - * The ID of the webhook. - * + * @description Jira server URL * @default */ - id: string + jiraUrl?: string; /** - * The creation date of the webhook. - * + * @description Jira project key * @default */ - created_at: string + jiraProject?: string; /** - * The last update date of the webhook. - * + * @description Jira user email * @default */ - updated_at: string + jiraEmail?: string; /** - * The name of the webhook. - * + * @description Jira API token * @default */ - name: string + jiraApiToken?: string; /** - * The description of the webhook. - * + * @description GitHub API token * @default */ - description: string | null + githubToken?: string; /** - * The URL where webhook events will be sent. - * + * @description GitHub API URL * @default */ - url: string + githubApiUrl?: string; /** - * The signing key used to sign webhook payloads. - * + * @description Microsoft Teams webhook URL * @default */ - secret: string | null + msteamsWebhookUrl?: string; /** - * Array of event names. + * @description Enable S3 upload for scan results + * @default false */ - events: string[] + s3Enabled?: boolean; /** - * Custom headers to include in webhook requests. - * - * @default null + * @description S3 bucket name + * @default + */ + s3Bucket?: string; + /** + * @description S3 access key + * @default + */ + s3AccessKey?: string; + /** + * @description S3 secret key + * @default + */ + s3SecretKey?: string; + /** + * @description S3 endpoint URL + * @default + */ + s3Endpoint?: string; + /** + * @description S3 region + * @default */ - headers: Record | null - filters: { - /** - * Array of repository IDs. - */ - repositoryIds: string[] | null - } | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + s3Region?: string; + /** + * @description Enable external CVE scanning + * @default false + */ + externalCveScanningEnabled?: boolean; + /** + * @description Enable Socket dependency scanning (legacy) + * @default false + */ + socketScanningEnabled?: boolean; + /** + * @description Enable Socket SCA scanning (legacy) + * @default false + */ + socketScaEnabled?: boolean; + /** + * @description Additional configuration parameters (legacy) + * @default + */ + additionalParameters?: string; + }; + }; + }; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * List historical alerts (Beta) + * @description List historical alerts. + * + * Pagination: keep requesting pages (passing the previous response's `endCursor` as `startAfterCursor`) until `endCursor` is `null`. Do not stop when `items` is empty — an empty page can be returned while more results still remain on later pages, so `endCursor` being `null` is the only reliable end-of-results signal. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - historical:alerts-list + */ + historicalAlertsList: { + parameters: { + query?: { + /** @description The UTC date in YYYY-MM-DD format for which to fetch alerts */ + date?: string; + /** @description The number of days of data to fetch as an offset from input date (e.g. "-7d" or "7d") or use "latest" to query for latest alerts for each repo */ + range?: string; + /** @description Specify the maximum number of results to return per page (intermediate pages may have fewer than this limit and callers should always check "endCursor" in response body to know if there are more pages) */ + per_page?: number; + /** @description The pagination cursor that was returned as the "endCursor" property in previous request */ + startAfterCursor?: string; + /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be included */ + "filters.alertAction"?: string; + /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be excluded */ + "filters.alertAction.notIn"?: string; + /** @description Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be included */ + "filters.alertActionSourceType"?: string; + /** @description Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded */ + "filters.alertActionSourceType.notIn"?: string; + /** @description Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be included */ + "filters.alertCategory"?: string; + /** @description Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be excluded */ + "filters.alertCategory.notIn"?: string; + /** @description CVE ID */ + "filters.alertCveId"?: string; + /** @description CVE ID */ + "filters.alertCveId.notIn"?: string; + /** @description CVE title */ + "filters.alertCveTitle"?: string; + /** @description CVE title */ + "filters.alertCveTitle.notIn"?: string; + /** @description CWE ID */ + "filters.alertCweId"?: string; + /** @description CWE ID */ + "filters.alertCweId.notIn"?: string; + /** @description CWE name */ + "filters.alertCweName"?: string; + /** @description CWE name */ + "filters.alertCweName.notIn"?: string; + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + "filters.alertEPSS"?: string; + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + "filters.alertEPSS.notIn"?: string; + /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be included */ + "filters.alertFixType"?: string; + /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be excluded */ + "filters.alertFixType.notIn"?: string; + /** @description Alert KEV (Known Exploited Vulnerability) filter flag */ + "filters.alertKEV"?: boolean; + /** @description Alert KEV (Known Exploited Vulnerability) filter flag */ + "filters.alertKEV.notIn"?: boolean; + /** @description Alert priority ("low", "medium", "high", or "critical") */ + "filters.alertPriority"?: string; + /** @description Alert priority ("low", "medium", "high", or "critical") */ + "filters.alertPriority.notIn"?: string; + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be included */ + "filters.alertReachabilityAnalysisType"?: string; + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be excluded */ + "filters.alertReachabilityAnalysisType.notIn"?: string; + /** @description Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be included */ + "filters.alertReachabilityType"?: string; + /** @description Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be excluded */ + "filters.alertReachabilityType.notIn"?: string; + /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be included */ + "filters.alertSeverity"?: string; + /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be excluded */ + "filters.alertSeverity.notIn"?: string; + /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be included */ + "filters.alertType"?: string; + /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be excluded */ + "filters.alertType.notIn"?: string; + /** @description Name of artifact */ + "filters.artifactName"?: string; + /** @description Name of artifact */ + "filters.artifactName.notIn"?: string; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be included */ + "filters.artifactType"?: string; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be excluded */ + "filters.artifactType.notIn"?: string; + /** @description Comma-separated list of branch names that should be included */ + "filters.branch"?: string; + /** @description Comma-separated list of branch names that should be excluded */ + "filters.branch.notIn"?: string; + /** @description Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be included */ + "filters.cvePatchStatus"?: string; + /** @description Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be excluded */ + "filters.cvePatchStatus.notIn"?: string; + /** @description Dead/reachable dependency filter flag */ + "filters.dependencyDead"?: boolean; + /** @description Dead/reachable dependency filter flag */ + "filters.dependencyDead.notIn"?: boolean; + /** @description Development/production dependency filter flag */ + "filters.dependencyDev"?: boolean; + /** @description Development/production dependency filter flag */ + "filters.dependencyDev.notIn"?: boolean; + /** @description Direct/transitive dependency filter flag */ + "filters.dependencyDirect"?: boolean; + /** @description Direct/transitive dependency filter flag */ + "filters.dependencyDirect.notIn"?: boolean; + /** @description Comma-separated list of repo full names that should be included */ + "filters.repoFullName"?: string; + /** @description Comma-separated list of repo full names that should be excluded */ + "filters.repoFullName.notIn"?: string; + /** @description Comma-separated list of repo labels that should be included. Use "" to filter for repositories with no labels. */ + "filters.repoLabels"?: string; + /** @description Comma-separated list of repo labels that should be excluded. Use "" to filter for repositories with no labels. */ + "filters.repoLabels.notIn"?: string; + /** @description Comma-separated list of repo slugs that should be included */ + "filters.repoSlug"?: string; + /** @description Comma-separated list of repo slugs that should be excluded */ + "filters.repoSlug.notIn"?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description The paginated array of API tokens for the organization, and related metadata. */ + 200: { + content: { + "application/json": { + /** @default */ + endCursor: string | null; + items: Array<({ + /** @default */ + repoFullName: string; + /** @default */ + repoId: string | null; + /** @default */ + repoSlug: string; + repoLabels: string[]; + repoLabelIds: string[]; + /** @default */ + branch: string; + /** @default false */ + defaultBranch: boolean; + /** @default */ + fullScanId: string; + /** @default */ + scannedAt: string; + artifact: { + /** @default */ + id: string | null; + /** @default */ + license: string | null; + /** @default */ + name: string; + /** @default */ + namespace: string | null; + /** @default */ + type: string; + /** @default */ + version: string; + /** @default */ + artifact_id?: string; + /** @default */ + artifactId?: string; + /** @default */ + author?: string; + capabilities?: components["schemas"]["Capabilities"]; + qualifiers?: components["schemas"]["Qualifiers"]; + scores?: components["schemas"]["SocketScore"]; + /** @default 0 */ + size?: number; + /** @default */ + subpath?: string; + }; + alert: { + /** @default */ + key: string; + /** @default */ + type: string; + /** @default 0 */ + severity: number; + /** @default */ + severityName: string; + /** @default */ + action: string; + /** @default */ + category: string; + /** @default */ + file?: string | null; + /** + * @description Additional alert-specific properties and metadata that vary by alert type. For vulnerability alerts this includes the `cveId` and `ghsaId` identifiers, either of which may be an empty string when GitHub has not assigned that identifier to the advisory. + * @default null + */ + props?: Record | null; + /** @default 0 */ + start?: number | null; + /** @default 0 */ + end?: number | null; + fix?: { + /** @default */ + type: string; + /** @default */ + description: string; + } | null; + }; + dependency: { + /** @default false */ + direct: boolean; + /** @default false */ + dev: boolean; + /** @default false */ + dead: boolean; + manifestFiles?: components["schemas"]["SocketManifestReference"][]; + topLevelAncestors?: components["schemas"]["SocketId"][]; + dependencies?: components["schemas"]["SocketId"][]; + }; + })>; + meta: { + /** @default */ + organizationId: string; + /** @default 0 */ + queryStartTimestamp: number; + /** @default */ + startDateInclusive: string; + /** @default */ + endDateInclusive: string; + /** @default false */ + includeLatestAlertsOnly: boolean; + filters: { + /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be included */ + alertAction?: string[]; + /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be excluded */ + "alertAction.notIn"?: string[]; + /** @description Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be included */ + alertActionSourceType?: string[]; + /** @description Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded */ + "alertActionSourceType.notIn"?: string[]; + /** @description Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be included */ + alertCategory?: string[]; + /** @description Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be excluded */ + "alertCategory.notIn"?: string[]; + /** @description CVE ID */ + alertCveId?: string[]; + /** @description CVE ID */ + "alertCveId.notIn"?: string[]; + /** @description CVE title */ + alertCveTitle?: string[]; + /** @description CVE title */ + "alertCveTitle.notIn"?: string[]; + /** @description CWE ID */ + alertCweId?: string[]; + /** @description CWE ID */ + "alertCweId.notIn"?: string[]; + /** @description CWE name */ + alertCweName?: string[]; + /** @description CWE name */ + "alertCweName.notIn"?: string[]; + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + alertEPSS?: string[]; + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + "alertEPSS.notIn"?: string[]; + /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be included */ + alertFixType?: string[]; + /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be excluded */ + "alertFixType.notIn"?: string[]; + /** @description Alert KEV (Known Exploited Vulnerability) filter flag */ + alertKEV?: boolean[]; + /** @description Alert priority ("low", "medium", "high", or "critical") */ + alertPriority?: string[]; + /** @description Alert priority ("low", "medium", "high", or "critical") */ + "alertPriority.notIn"?: string[]; + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be included */ + alertReachabilityAnalysisType?: string[]; + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be excluded */ + "alertReachabilityAnalysisType.notIn"?: string[]; + /** @description Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be included */ + alertReachabilityType?: string[]; + /** @description Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be excluded */ + "alertReachabilityType.notIn"?: string[]; + /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be included */ + alertSeverity?: string[]; + /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be excluded */ + "alertSeverity.notIn"?: string[]; + /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be included */ + alertType?: string[]; + /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be excluded */ + "alertType.notIn"?: string[]; + /** @description Name of artifact */ + artifactName?: string[]; + /** @description Name of artifact */ + "artifactName.notIn"?: string[]; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be included */ + artifactType?: string[]; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be excluded */ + "artifactType.notIn"?: string[]; + /** @description Comma-separated list of branch names that should be included */ + branch?: string[]; + /** @description Comma-separated list of branch names that should be excluded */ + "branch.notIn"?: string[]; + /** @description Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be included */ + cvePatchStatus?: string[]; + /** @description Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be excluded */ + "cvePatchStatus.notIn"?: string[]; + /** @description Dead/reachable dependency filter flag */ + dependencyDead?: boolean[]; + /** @description Development/production dependency filter flag */ + dependencyDev?: boolean[]; + /** @description Direct/transitive dependency filter flag */ + dependencyDirect?: boolean[]; + /** @description Comma-separated list of repo full names that should be included */ + repoFullName?: string[]; + /** @description Comma-separated list of repo full names that should be excluded */ + "repoFullName.notIn"?: string[]; + /** @description Comma-separated list of repo labels that should be included. Use "" to filter for repositories with no labels. */ + repoLabels?: string[]; + /** @description Comma-separated list of repo labels that should be excluded. Use "" to filter for repositories with no labels. */ + "repoLabels.notIn"?: string[]; + /** @description Comma-separated list of repo slugs that should be included */ + repoSlug?: string[]; + /** @description Comma-separated list of repo slugs that should be excluded */ + "repoSlug.notIn"?: string[]; + }; + }; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Trend of historical alerts (Beta) + * @description Trend analytics of historical alerts. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - historical:alerts-trend + */ + historicalAlertsTrend: { + parameters: { + query?: { + /** @description The UTC date in YYYY-MM-DD format for which to fetch alerts */ + date?: string; + /** @description The number of days of data to fetch as an offset from input date */ + range?: string; + /** @description Comma-separated list of fields that should be used for count aggregation (allowed: alertSeverity,repoSlug,repoFullName,branch,repoLabels,alertType,artifactType,alertAction,alertActionSourceType,alertFixType,alertCategory,alertCveId,alertCveTitle,alertCweId,alertCweName,alertReachabilityType,cvePatchStatus,alertReachabilityAnalysisType,alertPriority,alertKEV,alertEPSS,dependencyDirect,dependencyDev,dependencyDead) */ + "aggregation.fields"?: string; + /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be included */ + "filters.alertAction"?: string; + /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be excluded */ + "filters.alertAction.notIn"?: string; + /** @description Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be included */ + "filters.alertActionSourceType"?: string; + /** @description Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded */ + "filters.alertActionSourceType.notIn"?: string; + /** @description Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be included */ + "filters.alertCategory"?: string; + /** @description Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be excluded */ + "filters.alertCategory.notIn"?: string; + /** @description CVE ID */ + "filters.alertCveId"?: string; + /** @description CVE ID */ + "filters.alertCveId.notIn"?: string; + /** @description CVE title */ + "filters.alertCveTitle"?: string; + /** @description CVE title */ + "filters.alertCveTitle.notIn"?: string; + /** @description CWE ID */ + "filters.alertCweId"?: string; + /** @description CWE ID */ + "filters.alertCweId.notIn"?: string; + /** @description CWE name */ + "filters.alertCweName"?: string; + /** @description CWE name */ + "filters.alertCweName.notIn"?: string; + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + "filters.alertEPSS"?: string; + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + "filters.alertEPSS.notIn"?: string; + /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be included */ + "filters.alertFixType"?: string; + /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be excluded */ + "filters.alertFixType.notIn"?: string; + /** @description Alert KEV (Known Exploited Vulnerability) filter flag */ + "filters.alertKEV"?: boolean; + /** @description Alert KEV (Known Exploited Vulnerability) filter flag */ + "filters.alertKEV.notIn"?: boolean; + /** @description Alert priority ("low", "medium", "high", or "critical") */ + "filters.alertPriority"?: string; + /** @description Alert priority ("low", "medium", "high", or "critical") */ + "filters.alertPriority.notIn"?: string; + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be included */ + "filters.alertReachabilityAnalysisType"?: string; + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be excluded */ + "filters.alertReachabilityAnalysisType.notIn"?: string; + /** @description Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be included */ + "filters.alertReachabilityType"?: string; + /** @description Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be excluded */ + "filters.alertReachabilityType.notIn"?: string; + /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be included */ + "filters.alertSeverity"?: string; + /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be excluded */ + "filters.alertSeverity.notIn"?: string; + /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be included */ + "filters.alertType"?: string; + /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be excluded */ + "filters.alertType.notIn"?: string; + /** @description Name of artifact */ + "filters.artifactName"?: string; + /** @description Name of artifact */ + "filters.artifactName.notIn"?: string; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be included */ + "filters.artifactType"?: string; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be excluded */ + "filters.artifactType.notIn"?: string; + /** @description Comma-separated list of branch names that should be included */ + "filters.branch"?: string; + /** @description Comma-separated list of branch names that should be excluded */ + "filters.branch.notIn"?: string; + /** @description Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be included */ + "filters.cvePatchStatus"?: string; + /** @description Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be excluded */ + "filters.cvePatchStatus.notIn"?: string; + /** @description Dead/reachable dependency filter flag */ + "filters.dependencyDead"?: boolean; + /** @description Dead/reachable dependency filter flag */ + "filters.dependencyDead.notIn"?: boolean; + /** @description Development/production dependency filter flag */ + "filters.dependencyDev"?: boolean; + /** @description Development/production dependency filter flag */ + "filters.dependencyDev.notIn"?: boolean; + /** @description Direct/transitive dependency filter flag */ + "filters.dependencyDirect"?: boolean; + /** @description Direct/transitive dependency filter flag */ + "filters.dependencyDirect.notIn"?: boolean; + /** @description Comma-separated list of repo full names that should be included */ + "filters.repoFullName"?: string; + /** @description Comma-separated list of repo full names that should be excluded */ + "filters.repoFullName.notIn"?: string; + /** @description Comma-separated list of repo labels that should be included. Use "" to filter for repositories with no labels. */ + "filters.repoLabels"?: string; + /** @description Comma-separated list of repo labels that should be excluded. Use "" to filter for repositories with no labels. */ + "filters.repoLabels.notIn"?: string; + /** @description Comma-separated list of repo slugs that should be included */ + "filters.repoSlug"?: string; + /** @description Comma-separated list of repo slugs that should be excluded */ + "filters.repoSlug.notIn"?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description The trend data */ + 200: { + content: { + "application/json": { + meta: { + /** @default */ + organizationId: string; + /** @default */ + startDateInclusive: string; + /** @default */ + endDateInclusive: string; + /** @default */ + interval: string; + aggregation: { + fields: string[]; + groups: string[][]; + }; + filters: { + /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be included */ + alertAction?: string[]; + /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be excluded */ + "alertAction.notIn"?: string[]; + /** @description Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be included */ + alertActionSourceType?: string[]; + /** @description Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded */ + "alertActionSourceType.notIn"?: string[]; + /** @description Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be included */ + alertCategory?: string[]; + /** @description Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be excluded */ + "alertCategory.notIn"?: string[]; + /** @description CVE ID */ + alertCveId?: string[]; + /** @description CVE ID */ + "alertCveId.notIn"?: string[]; + /** @description CVE title */ + alertCveTitle?: string[]; + /** @description CVE title */ + "alertCveTitle.notIn"?: string[]; + /** @description CWE ID */ + alertCweId?: string[]; + /** @description CWE ID */ + "alertCweId.notIn"?: string[]; + /** @description CWE name */ + alertCweName?: string[]; + /** @description CWE name */ + "alertCweName.notIn"?: string[]; + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + alertEPSS?: string[]; + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + "alertEPSS.notIn"?: string[]; + /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be included */ + alertFixType?: string[]; + /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be excluded */ + "alertFixType.notIn"?: string[]; + /** @description Alert KEV (Known Exploited Vulnerability) filter flag */ + alertKEV?: boolean[]; + /** @description Alert priority ("low", "medium", "high", or "critical") */ + alertPriority?: string[]; + /** @description Alert priority ("low", "medium", "high", or "critical") */ + "alertPriority.notIn"?: string[]; + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be included */ + alertReachabilityAnalysisType?: string[]; + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be excluded */ + "alertReachabilityAnalysisType.notIn"?: string[]; + /** @description Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be included */ + alertReachabilityType?: string[]; + /** @description Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be excluded */ + "alertReachabilityType.notIn"?: string[]; + /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be included */ + alertSeverity?: string[]; + /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be excluded */ + "alertSeverity.notIn"?: string[]; + /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be included */ + alertType?: string[]; + /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be excluded */ + "alertType.notIn"?: string[]; + /** @description Name of artifact */ + artifactName?: string[]; + /** @description Name of artifact */ + "artifactName.notIn"?: string[]; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be included */ + artifactType?: string[]; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be excluded */ + "artifactType.notIn"?: string[]; + /** @description Comma-separated list of branch names that should be included */ + branch?: string[]; + /** @description Comma-separated list of branch names that should be excluded */ + "branch.notIn"?: string[]; + /** @description Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be included */ + cvePatchStatus?: string[]; + /** @description Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be excluded */ + "cvePatchStatus.notIn"?: string[]; + /** @description Dead/reachable dependency filter flag */ + dependencyDead?: boolean[]; + /** @description Development/production dependency filter flag */ + dependencyDev?: boolean[]; + /** @description Direct/transitive dependency filter flag */ + dependencyDirect?: boolean[]; + /** @description Comma-separated list of repo full names that should be included */ + repoFullName?: string[]; + /** @description Comma-separated list of repo full names that should be excluded */ + "repoFullName.notIn"?: string[]; + /** @description Comma-separated list of repo labels that should be included. Use "" to filter for repositories with no labels. */ + repoLabels?: string[]; + /** @description Comma-separated list of repo labels that should be excluded. Use "" to filter for repositories with no labels. */ + "repoLabels.notIn"?: string[]; + /** @description Comma-separated list of repo slugs that should be included */ + repoSlug?: string[]; + /** @description Comma-separated list of repo slugs that should be excluded */ + "repoSlug.notIn"?: string[]; + }; + }; + items: Array<{ + /** @default */ + date: string; + /** @default 0 */ + startOfDayTimestamp: number; + dataPoints: { + aggregationGroup: string[]; + /** @default 0 */ + count: number; + /** @default 0 */ + countDelta: number; + }[]; + }>; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Trend of historical dependencies (Beta) + * @description Trend analytics of historical dependencies. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - historical:dependencies-trend + */ + historicalDependenciesTrend: { + parameters: { + query?: { + /** @description The UTC date in YYYY-MM-DD format for which to fetch dependencies */ + date?: string; + /** @description The number of days of data to fetch as an offset from input date */ + range?: string; + /** @description Comma-separated list of repo full names that should be included */ + repoFullName?: string; + /** @description Comma-separated list of repo slugs that should be included */ + repoSlug?: string; + /** @description Comma-separated list of repo labels that should be included */ + repoLabels?: string; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be included */ + artifactType?: string; + /** @description Direct/transitive dependency filter flag */ + dependencyDirect?: boolean; + /** @description Development/production dependency filter flag */ + dependencyDev?: boolean; + /** @description Dead/reachable dependency filter flag */ + dependencyDead?: boolean; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description The trend data */ + 200: { + content: { + "application/json": { + meta: { + /** @default */ + organizationId: string; + /** @default */ + startDateInclusive: string; + /** @default */ + endDateInclusive: string; + /** @default */ + interval: string; + aggregation: { + fields: string[]; + groups: string[][]; + }; + filters: { + /** @description Comma-separated list of repo full names that should be included */ + repoFullName?: string[]; + /** @description Comma-separated list of repo slugs that should be included */ + repoSlug?: string[]; + /** @description Comma-separated list of repo labels that should be included */ + repoLabels?: string[]; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be included */ + artifactType?: string[]; + /** @description Direct/transitive dependency filter flag */ + dependencyDirect?: boolean[]; + /** @description Development/production dependency filter flag */ + dependencyDev?: boolean[]; + /** @description Dead/reachable dependency filter flag */ + dependencyDead?: boolean[]; + }; + }; + items: Array<{ + /** @default */ + date: string; + /** @default 0 */ + startOfDayTimestamp: number; + dataPoints: { + aggregationGroup: string[]; + /** @default 0 */ + count: number; + /** @default 0 */ + countDelta: number; + /** @default 0 */ + countDirect: number; + /** @default 0 */ + countDirectDelta: number; + /** @default 0 */ + countIndirect: number; + /** @default 0 */ + countIndirectDelta: number; + countsBySeverity: { + low: { + /** @default 0 */ + count: number; + /** @default 0 */ + countDelta: number; + /** @default 0 */ + countDirect: number; + /** @default 0 */ + countDirectDelta: number; + /** @default 0 */ + countIndirect: number; + /** @default 0 */ + countIndirectDelta: number; + }; + medium: { + /** @default 0 */ + count: number; + /** @default 0 */ + countDelta: number; + /** @default 0 */ + countDirect: number; + /** @default 0 */ + countDirectDelta: number; + /** @default 0 */ + countIndirect: number; + /** @default 0 */ + countIndirectDelta: number; + }; + high: { + /** @default 0 */ + count: number; + /** @default 0 */ + countDelta: number; + /** @default 0 */ + countDirect: number; + /** @default 0 */ + countDirectDelta: number; + /** @default 0 */ + countIndirect: number; + /** @default 0 */ + countIndirectDelta: number; + }; + critical: { + /** @default 0 */ + count: number; + /** @default 0 */ + countDelta: number; + /** @default 0 */ + countDirect: number; + /** @default 0 */ + countDirectDelta: number; + /** @default 0 */ + countIndirect: number; + /** @default 0 */ + countIndirectDelta: number; + }; + }; + }[]; + }>; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * List details of periodic historical data snapshots (Beta) + * @description This API endpoint is used to list the details of historical snapshots. + * Snapshots of organization data are taken periodically, and each historical snapshot record contains high-level overview metrics about the data that was collected. + * Other [Historical Data Endpoints](/reference/historical-data-endpoints) can be used to fetch the raw data associated with each snapshot. + * + * Historical snapshots contain details and raw data for the following resources: + * + * - Repositories + * - Alerts + * - Dependencies + * - Artifacts + * - Users + * - Settings + * + * Daily snapshot data is bucketed to the nearest day which is described in more detail at: [Historical Data Endpoints](/reference/historical-data-endpoints) + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - historical:snapshots-list + */ + historicalSnapshotsList: { + parameters: { + query?: { + /** @description The UTC date in YYYY-MM-DD format for which to fetch snapshots */ + date?: string; + /** @description The number of days of data to fetch as an offset from input date (e.g. "-7d" or "7d") or use "latest" to query for latest snapshots for each repo */ + range?: string; + /** @description Specify the maximum number of results to return per page (intermediate pages may have fewer than this limit and callers should always check "endCursor" in response body to know if there are more pages) */ + per_page?: number; + /** @description The pagination cursor that was returned as the "endCursor" property in previous request */ + startAfterCursor?: string; + /** @description Comma-separated list of historical snapshot statuses that should be included (allowed: "in-progress", "success", "failure", "timeout", "skipped") */ + "filters.status"?: string; + /** @description Comma-separated list of requestId values that were used to start the historical snapshot job */ + "filters.requestId"?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description The historical snapshots. */ + 200: { + content: { + "application/json": { + meta: { + /** @default */ + organizationId: string; + /** @default 0 */ + queryStartTimestamp: number; + /** @default */ + startDateInclusive: string; + /** @default */ + endDateInclusive: string; + filters: { + status?: string[]; + requestId?: string[]; + }; + }; + items: Array<({ + /** @default */ + id: string; + /** @default */ + requestId: string; + /** @default */ + requestedBy: string; + /** @default */ + requestedAt: string; + /** @default */ + startedAt: string; + /** @default */ + finishedAt: string | null; + /** @default 0 */ + durationMs: number; + /** @default */ + status: string; + /** @default 0 */ + numReposScanned: number; + /** @default 0 */ + numSbomsScanned: number; + /** @default 0 */ + numLowAlerts: number; + /** @default 0 */ + numHighAlerts: number; + /** @default 0 */ + numMediumAlerts: number; + /** @default 0 */ + numCriticalAlerts: number; + /** @default 0 */ + numIgnoredLowAlerts: number; + /** @default 0 */ + numIgnoredHighAlerts: number; + /** @default 0 */ + numIgnoredMediumAlerts: number; + /** @default 0 */ + numIgnoredCriticalAlerts: number; + })>; + /** @default */ + endCursor: string | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Update webhook. + * Start historical data snapshot job (Beta) + * @description This API endpoint is used to start a historical snapshot job. + * While snapshots are typically taken multiple times a day for paid plans and once a day for free plans, this endpoint can be used to start an "on demand" snapshot job to ensure the latest data is collected and stored for historical purposes. + * + * An historical snapshot will contain details and raw data for the following resources: + * + * - Repositories + * - Alerts + * - Dependencies + * - Artifacts + * - Users + * - Settings + * + * Historical snapshot data is bucketed to the nearest day which is described in more detail at: [Historical Data Endpoints](/reference/historical-data-endpoints) + * + * This endpoint consumes 10 units of your quota. * - * Update details of an existing webhook. - * This endpoint consumes 1 unit of your quota. * This endpoint requires the following org token scopes: - * - webhooks:update. + * - historical:snapshots-start */ - updateOrgWebhook: { + historicalSnapshotsStart: { parameters: { path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the webhook. - */ - webhook_id: string - } - } - requestBody?: { - content: { - 'application/json': { - /** - * The name of the webhook. - * - * @default - */ - name?: string - /** - * The description of the webhook. - * - * @default - */ - description?: string | null - /** - * The URL where webhook events will be sent. - * - * @default - */ - url?: string - /** - * The signing key used to sign webhook payloads. - * - * @default - */ - secret?: string | null - /** - * Array of event names. - */ - events?: string[] - /** - * Custom headers to include in webhook requests. - * - * @default null - */ - headers?: Record | null - filters?: { - /** - * Array of repository IDs. - */ - repositoryIds: string[] | null - } | null - } - } - } + /** @description The slug of the organization */ + org_slug: string; + }; + }; responses: { - /** - * Updated webhook details. - */ + /** @description The details of the snapshot job request. */ 200: { content: { - 'application/json': { - /** - * The ID of the webhook. - * - * @default - */ - id: string - /** - * The creation date of the webhook. - * - * @default - */ - created_at: string - /** - * The last update date of the webhook. - * - * @default - */ - updated_at: string - /** - * The name of the webhook. - * - * @default - */ - name: string - /** - * The description of the webhook. - * - * @default - */ - description: string | null - /** - * The URL where webhook events will be sent. - * - * @default - */ - url: string - /** - * The signing key used to sign webhook payloads. - * - * @default - */ - secret: string | null - /** - * Array of event names. - */ - events: string[] - /** - * Custom headers to include in webhook requests. - * - * @default null - */ - headers: Record | null - filters: { - /** - * Array of repository IDs. - */ - repositoryIds: string[] | null - } | null - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": { + /** @default */ + requestId: string; + /** @default */ + requestedBy: string; + /** @default */ + requestedAt: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Delete webhook. + * Get Audit Log Events + * @description Paginated list of audit log events. * - * Delete a webhook. This will stop all future webhook deliveries to the - * webhook URL. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: - webhooks:delete. + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - audit-log:list */ - deleteOrgWebhook: { + getAuditLogEvents: { parameters: { + query?: { + /** @description Filter audit log events by type. Omit for all types. */ + type?: "AddLicenseOverlayNote" | "AdminAlertTypeUpdated" | "AdminBotSkipIpsUpdated" | "AdminLinkGithubInstall" | "AdminSyncGithubInstall" | "AdminTriggerFullScan" | "AdminUnlinkGithubInstall" | "AdminUpdateGithubInstallWorkspace" | "AssociateLabel" | "AuthorizeOauthCimdClient" | "CancelInvitation" | "ChangeMemberRole" | "ChangePlanSubscriptionSeats" | "CreateApiToken" | "CreateArtifact" | "CreateAccessPolicyAttachment" | "CreateAccessPolicy" | "CreateAlertPolicy" | "CreateAlertPolicyRule" | "CreateFirewallCustomRegistry" | "CreateFirewallDeploymentConfig" | "CreateLabel" | "CreateOauthClientCredentialsToken" | "CreateOauthRefreshToken" | "CreateRepoAccessRule" | "CreateUserWithPassword" | "CreateWebhook" | "CreateTicket" | "CreateTicketingConfiguration" | "CoanaCliLegacyModeCutoffUpdated" | "CoanaCliLegacyModeDemoteOrg" | "CoanaCliLegacyModePromoteOrg" | "CreateAlertResolution" | "DeleteAccessPolicy" | "DeleteAlertPolicy" | "DeleteAlertPolicyRule" | "DeleteAlertNote" | "DeleteAlertResolution" | "DeleteAlertTriage" | "DeleteAccessPolicyAttachment" | "DeleteApiToken" | "DeleteFirewallCustomRegistry" | "DeleteFirewallDeploymentConfig" | "DeleteFullScan" | "DeleteLabel" | "DeleteLabelSetting" | "DeleteRepoAccessRule" | "DeleteReport" | "DeleteRepository" | "DeleteTicketingConfiguration" | "DeleteWebhook" | "DisableAccessPolicyAttachment" | "DisableAccessPolicy" | "DisablePythonCliRunStreamingOverride" | "DisassociateLabel" | "DisconnectAsanaIntegration" | "DisconnectClickupIntegration" | "DisconnectJiraIntegration" | "DisconnectLinearIntegration" | "DowngradeOrganizationPlan" | "EnablePythonCliRunStreamingOverride" | "EnqueueAutopatchMergeRun" | "EnqueueAutopatchPrepareJob" | "FinalizeAlertPolicyMigration" | "OptOutRulesAndPolicies" | "RestoreRulesAndPolicies" | "SetRulesAndPoliciesNewOrgCutoff" | "JoinOrganization" | "AsanaIntegrationConnected" | "ClickupIntegrationConnected" | "JiraIntegrationConnected" | "InvalidateOauthCimdClientGrants" | "LinearIntegrationConnected" | "NpmStagingTokenSaved" | "NpmStagingTokenRemoved" | "MemberAdded" | "MemberRemoved" | "MemberRoleChanged" | "OpenFixPullRequest" | "RemoveLicenseOverlay" | "RemoveMember" | "ReorderAlertPolicyRules" | "RollbackAlertPolicyMigration" | "ResetInvitationLink" | "ResetOrganizationSettingToDefault" | "ResolveOauthCimdClientMetadata" | "RevokeOauthToken" | "RotateOauthRefreshToken" | "RevokeApiToken" | "RotateApiToken" | "SendInvitation" | "SessionRevokedByUser" | "SetLabelSettingToDefault" | "SetSsoBypassMemberships" | "SetSsoBypassRbacRoles" | "StartAlertPolicyMigrationPreview" | "SSOEmailVerificationCompleted" | "SSOLoginCompleted" | "SvdBackfillLegacyOverlay" | "SvdImportLegacyOnlyGhsas" | "SvdImportLegacyOverlay" | "SvdReprocessClusters" | "SvdRetransformGhsaMirror" | "SvdSeedLegacyGithubMatches" | "SvdTruncateRederive" | "SvdWorkerPause" | "SyncOrganization" | "TransferOwnership" | "UpdateAlertPolicy" | "UpdateAlertPolicyRule" | "UpdateAlertNote" | "UpdateAccessPolicyAttachment" | "UpdateAccessPolicy" | "UpdateAlertTriage" | "UpdateApiTokenCommitter" | "UpdateApiTokenMaxQuota" | "UpdateApiTokenName" | "UpdateApiTokenScopes" | "UpdateApiTokenVisibility" | "UpdateAutopatchCurated" | "UpdateAutopatchPrepareConfig" | "UpdateFirewallCustomRegistry" | "UpdateFirewallDeploymentConfig" | "UpdateLabel" | "UpdateLabelSetting" | "UpdateLicenseOverlay" | "UpdateOrganizationSetting" | "UpdateRepoAccessRule" | "UpdateTicketingConfiguration" | "UpdateWebhook" | "UpgradeOrganizationPlan" | "UserMagicLinkSent" | "UserSignedIn" | "UserSignedOut" | "PurgeOrganizationData"; + /** @description Number of events per page */ + per_page?: number; + /** @description Page token */ + page?: string; + /** @description A Unix timestamp in seconds to filter results prior to this date. */ + from?: string; + }; path: { - /** - * The slug of the organization. - */ - org_slug: string - /** - * The ID of the webhook. - */ - webhook_id: string - } - } + /** @description The slug of the organization */ + org_slug: string; + }; + }; responses: { - /** - * Success. - */ + /** @description The paginated list of events in an organizations audit log and the next page querystring token. */ 200: { content: { - 'application/json': { - /** - * @default ok - */ - status: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": { + results: Array<({ + /** @default */ + event_id?: string; + /** @default */ + created_at?: string; + /** @default */ + updated_at?: string; + /** @default */ + country_code?: string | null; + /** @default */ + organization_id?: string | null; + /** @default */ + ip_address?: string | null; + /** @default null */ + payload?: Record | null; + /** @default 0 */ + status_code?: number | null; + /** @default */ + type?: string; + /** @default */ + user_agent?: string | null; + /** @default */ + user_id?: string | null; + /** @default */ + user_email?: string; + /** @default */ + user_image?: string; + /** @default */ + organization_name?: string; + })>; + /** @default */ + nextPage: string | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * List latest alerts (Beta) + * List API Tokens + * @description List all API Tokens. + * + * This endpoint consumes 10 units of your quota. * - * List latest alerts. Pagination: keep requesting pages (passing the previous - * response's `endCursor` as `startAfterCursor`) until `endCursor` is `null`. - * Do not stop when `items` is empty — an empty page can be returned while - * more results still remain on later pages, so `endCursor` being `null` is - * the only reliable end-of-results signal. This endpoint consumes 10 units of - * your quota. This endpoint requires the following org token scopes: - - * alerts:list. + * This endpoint requires the following org token scopes: + * - api-tokens:list */ - alertsList: { + getAPITokens: { parameters: { query?: { - /** - * Specify the maximum number of results to return per page - * (intermediate pages may have fewer than this limit and callers should - * always check "endCursor" in response body to know if there are more - * pages) - */ - per_page?: number - /** - * The pagination cursor that was returned as the "endCursor" property - * in previous request. - */ - startAfterCursor?: string - /** - * Comma-separated list of alert actions ("error", "warn", "monitor", or - * "ignore) that should be included. - */ - 'filters.alertAction'?: string - /** - * Comma-separated list of alert actions ("error", "warn", "monitor", or - * "ignore) that should be excluded. - */ - 'filters.alertAction.notIn'?: string - /** - * Comma-separated list of alert action source types ("resolution", - * "alert-policy", "fallback", "injected-alert", "org-policy", - * "reachability", "repo-label-policy", "socket-yml", or "triage") that - * should be included. - */ - 'filters.alertActionSourceType'?: string - /** - * Comma-separated list of alert action source types ("resolution", - * "alert-policy", "fallback", "injected-alert", "org-policy", - * "reachability", "repo-label-policy", "socket-yml", or "triage") that - * should be excluded. - */ - 'filters.alertActionSourceType.notIn'?: string - /** - * Comma-separated list of alert categories ("supplyChainRisk", - * "maintenance", "quality", "license", or "vulnerability") that should - * be included. - */ - 'filters.alertCategory'?: string - /** - * Comma-separated list of alert categories ("supplyChainRisk", - * "maintenance", "quality", "license", or "vulnerability") that should - * be excluded. - */ - 'filters.alertCategory.notIn'?: string - /** - * Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertClearedAt.eq'?: string - /** - * Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertClearedAt.lt'?: string - /** - * Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertClearedAt.lte'?: string - /** - * Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertClearedAt.gt'?: string - /** - * Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertClearedAt.gte'?: string - /** - * Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertCreatedAt.eq'?: string - /** - * Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertCreatedAt.lt'?: string - /** - * Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertCreatedAt.lte'?: string - /** - * Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertCreatedAt.gt'?: string - /** - * Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertCreatedAt.gte'?: string - /** - * CVE ID. - */ - 'filters.alertCveId'?: string - /** - * CVE ID. - */ - 'filters.alertCveId.notIn'?: string - /** - * CVE title. - */ - 'filters.alertCveTitle'?: string - /** - * CVE title. - */ - 'filters.alertCveTitle.notIn'?: string - /** - * CWE ID. - */ - 'filters.alertCweId'?: string - /** - * CWE ID. - */ - 'filters.alertCweId.notIn'?: string - /** - * CWE name. - */ - 'filters.alertCweName'?: string - /** - * CWE name. - */ - 'filters.alertCweName.notIn'?: string - /** - * Alert EPSS ("low", "medium", "high", "critical") - */ - 'filters.alertEPSS'?: string - /** - * Alert EPSS ("low", "medium", "high", "critical") - */ - 'filters.alertEPSS.notIn'?: string - /** - * Comma-separated list of alert fix types ("upgrade", "cve", or - * "remove") that should be included. - */ - 'filters.alertFixType'?: string - /** - * Comma-separated list of alert fix types ("upgrade", "cve", or - * "remove") that should be excluded. - */ - 'filters.alertFixType.notIn'?: string - /** - * Alert KEV (Known Exploited Vulnerability) filter flag. - */ - 'filters.alertKEV'?: boolean - /** - * Alert KEV (Known Exploited Vulnerability) filter flag. - */ - 'filters.alertKEV.notIn'?: boolean - /** - * Alert priority ("low", "medium", "high", or "critical") - */ - 'filters.alertPriority'?: string - /** - * Alert priority ("low", "medium", "high", or "critical") - */ - 'filters.alertPriority.notIn'?: string - /** - * Comma-separated list of alert CVE reachability analysis types - * ("full-scan" or "precomputed") that should be included. - */ - 'filters.alertReachabilityAnalysisType'?: string - /** - * Comma-separated list of alert CVE reachability analysis types - * ("full-scan" or "precomputed") that should be excluded. - */ - 'filters.alertReachabilityAnalysisType.notIn'?: string - /** - * Comma-separated list of alert CVE reachability types - * ("direct_dependency", "error", "maybe_reachable", "missing_support", - * "pending", "reachable", "undeterminable_reachability", "unknown", or - * "unreachable") that should be included. - */ - 'filters.alertReachabilityType'?: string - /** - * Comma-separated list of alert CVE reachability types - * ("direct_dependency", "error", "maybe_reachable", "missing_support", - * "pending", "reachable", "undeterminable_reachability", "unknown", or - * "unreachable") that should be excluded. - */ - 'filters.alertReachabilityType.notIn'?: string - /** - * Comma-separated list of alert severities ("low", "medium", "high", or - * "critical") that should be included. - */ - 'filters.alertSeverity'?: string - /** - * Comma-separated list of alert severities ("low", "medium", "high", or - * "critical") that should be excluded. - */ - 'filters.alertSeverity.notIn'?: string - /** - * A single alert status ("open" or "cleared") - */ - 'filters.alertStatus'?: string - /** - * A single alert status ("open" or "cleared") - */ - 'filters.alertStatus.notIn'?: string - /** - * Comma-separated list of alert types (e.g. "usesEval", "unmaintained", - * etc.) that should be included. - */ - 'filters.alertType'?: string - /** - * Comma-separated list of alert types (e.g. "usesEval", "unmaintained", - * etc.) that should be excluded. - */ - 'filters.alertType.notIn'?: string - /** - * Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertUpdatedAt.eq'?: string - /** - * Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertUpdatedAt.lt'?: string - /** - * Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertUpdatedAt.lte'?: string - /** - * Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertUpdatedAt.gt'?: string - /** - * Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'filters.alertUpdatedAt.gte'?: string - /** - * Name of artifact. - */ - 'filters.artifactName'?: string - /** - * Name of artifact. - */ - 'filters.artifactName.notIn'?: string - /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", - * "maven", "golang", etc.) that should be included. - */ - 'filters.artifactType'?: string - /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", - * "maven", "golang", etc.) that should be excluded. - */ - 'filters.artifactType.notIn'?: string - /** - * Comma-separated list of branch names that should be included. - */ - 'filters.branch'?: string - /** - * Comma-separated list of branch names that should be excluded. - */ - 'filters.branch.notIn'?: string - /** - * Comma-separated list of patch statuses ("patch_unavailable", - * "patch_available", or "patch_applied") that should be included. - */ - 'filters.cvePatchStatus'?: string - /** - * Comma-separated list of patch statuses ("patch_unavailable", - * "patch_available", or "patch_applied") that should be excluded. - */ - 'filters.cvePatchStatus.notIn'?: string - /** - * Dead/reachable dependency filter flag. - */ - 'filters.dependencyDead'?: boolean - /** - * Dead/reachable dependency filter flag. - */ - 'filters.dependencyDead.notIn'?: boolean - /** - * Development/production dependency filter flag. - */ - 'filters.dependencyDev'?: boolean - /** - * Development/production dependency filter flag. - */ - 'filters.dependencyDev.notIn'?: boolean - /** - * Direct/transitive dependency filter flag. - */ - 'filters.dependencyDirect'?: boolean - /** - * Direct/transitive dependency filter flag. - */ - 'filters.dependencyDirect.notIn'?: boolean - /** - * Comma-separated list of repo full names that should be included. - */ - 'filters.repoFullName'?: string - /** - * Comma-separated list of repo full names that should be excluded. - */ - 'filters.repoFullName.notIn'?: string - /** - * Comma-separated list of repo labels that should be included. Use "" - * to filter for repositories with no labels. - */ - 'filters.repoLabels'?: string - /** - * Comma-separated list of repo labels that should be excluded. Use "" - * to filter for repositories with no labels. - */ - 'filters.repoLabels.notIn'?: string - /** - * Comma-separated list of repo slugs that should be included. - */ - 'filters.repoSlug'?: string - /** - * Comma-separated list of repo slugs that should be excluded. - */ - 'filters.repoSlug.notIn'?: string - } + /** @description Specify Sort order. */ + sort?: "created_at"; + /** @description Specify sort direction. */ + direction?: "asc" | "desc"; + /** @description Specify the maximum number of results to return per page. */ + per_page?: number; + /** @description The token specifying which page to return. */ + page?: number; + /** @description Whether to include token values in response. Use "omit" to exclude tokens entirely. */ + token_values?: "include" | "omit"; + }; path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } + /** @description The slug of the organization */ + org_slug: string; + }; + }; responses: { - /** - * The paginated array of alert items for the organization and related - * metadata. - */ + /** @description The paginated array of API tokens for the organization, and related metadata. */ 200: { content: { - 'application/json': { - /** - * @default - */ - endCursor: string | null - items: Array<{ - /** - * @default - */ - key: string - /** - * @default - */ - type: string - /** - * @default - */ - category: string - /** - * @default - */ - description: string | null - fix: { + "application/json": { + tokens: Array<({ + /** @description List of committers associated with this API Token */ + committers: ({ + /** + * @description Email address of the committer + * @default + */ + email?: string; + /** + * @description The source control provider for the committer + * @default api + * @enum {string} + */ + provider?: "api" | "azure" | "bitbucket" | "github" | "gitlab"; + /** + * @description Login name on the provider platform + * @default + */ + providerLoginName?: string; + /** + * @description User ID on the provider platform + * @default + */ + providerUserId?: string; + })[]; /** + * Format: uuid + * @description ID of the Socket user who created the API Token * @default */ - type: string + created_by: string | null; /** + * Format: date + * @description Timestamp when the API Token was created * @default */ - description: string | null - } | null - vulnerability: { + created_at: string; /** + * Format: uuid + * @description The stable group UUID that remains constant across token rotations * @default */ - cveId: string | null + group_uuid: string; /** + * @description SRI-format hash of the token (e.g., sha512-base64hash). Null for tokens created before hash column was added. * @default */ - cveTitle: string | null + hash: string | null; /** + * @description The ID of the API Token * @default */ - cveDescription: string | null - /** - * @default 0 - */ - cvssScore: number + id: string; /** + * Format: date + * @description Timestamp when the API Token was last used * @default */ - cvssVectorString: string | null - cweIds: string[] | null - cweNames: string[] | null - ghsaIds: string[] | null - /** - * @default 0 - */ - epssScore: number - /** - * @default 0 - */ - epssPercentile: number + last_used_at: string; /** - * @default false + * @description Maximum number of API calls allowed per month + * @default 1000 */ - isKev: boolean + max_quota: number; /** - * @default + * @description Name for the API Token + * @default api token */ - firstPatchedVersionIdentifier: string | null + name: string | null; + /** @description List of scopes granted to the API Token */ + scopes: ("alerts" | "alerts:list" | "alerts:trend" | "alert-policy" | "alert-policy:list" | "alert-policy:read" | "alert-policy:create" | "alert-policy:update" | "alert-policy:delete" | "alert-resolution" | "alert-resolution:list" | "alert-resolution:create" | "alert-resolution:read" | "alert-resolution:delete" | "threat-campaigns" | "threat-campaigns:list" | "api-tokens" | "api-tokens:create" | "api-tokens:update" | "api-tokens:revoke" | "api-tokens:rotate" | "api-tokens:list" | "audit-log" | "audit-log:list" | "dependencies" | "dependencies:list" | "dependencies:trend" | "fixes" | "fixes:list" | "full-scans" | "full-scans:list" | "full-scans:create" | "full-scans:delete" | "diff-scans" | "diff-scans:list" | "diff-scans:create" | "diff-scans:delete" | "entitlements" | "entitlements:list" | "historical" | "historical:snapshots-list" | "historical:snapshots-start" | "historical:alerts-list" | "historical:alerts-trend" | "historical:dependencies-list" | "historical:dependencies-trend" | "integration" | "integration:list" | "integration:create" | "integration:update" | "integration:delete" | "access-policy" | "access-policy:read" | "access-policy:attach" | "access-policy:update" | "license-policy" | "license-policy:update" | "license-policy:read" | "packages" | "packages:list" | "access-policy-definition" | "access-policy-definition:attach" | "access-policy-definition:read" | "access-policy-definition:update" | "report" | "report:list" | "report:read" | "report:write" | "repo" | "repo:list" | "repo:create" | "repo:update" | "repo:delete" | "repo-label" | "repo-label:list" | "repo-label:create" | "repo-label:update" | "repo-label:delete" | "security-policy" | "security-policy:update" | "security-policy:read" | "socket-basics" | "socket-basics:read" | "telemetry-policy" | "telemetry-policy:update" | "telemetry-events" | "telemetry-events:list" | "threat-feed" | "threat-feed:list" | "triage" | "triage:alerts-list" | "triage:alerts-update" | "uploaded-artifacts" | "uploaded-artifacts:create" | "uploaded-artifacts:list" | "webhooks" | "webhooks:create" | "webhooks:list" | "webhooks:update" | "webhooks:delete" | "openid" | "profile" | "email" | "*")[]; /** + * @description The token of the API Token (redacted or omitted) * @default */ - url: string | null - } | null - /** - * @default - */ - id: string - /** - * @default 0 - */ - version: number - /** - * @default open - * - * @enum {string} - */ - status: 'open' | 'cleared' - /** - * @default - */ - createdAt: string - /** - * @default - */ - updatedAt: string - /** - * @default - */ - clearedAt: string | null + token: string | null; + /** + * @description The visibility of the API Token. Warning: this field is deprecated and will be removed in the future. + * @default organization + * @enum {string} + */ + visibility: "admin" | "organization"; + })>; + /** @default 0 */ + nextPage: number | null; + }; + }; + }; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Create API Token + * @description Create an API Token. The API Token created must use a subset of permissions the API token creating them. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - api-tokens:create + */ + postAPIToken: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + /** @description The settings to create the api token with. */ + requestBody?: { + content: { + "application/json": { + /** + * @description Maximum number of API calls allowed per month + * @default 1000 + */ + max_quota: number; + /** @description List of scopes granted to the API Token */ + scopes: Array<("alerts" | "alerts:list" | "alerts:trend" | "alert-policy" | "alert-policy:list" | "alert-policy:read" | "alert-policy:create" | "alert-policy:update" | "alert-policy:delete" | "alert-resolution" | "alert-resolution:list" | "alert-resolution:create" | "alert-resolution:read" | "alert-resolution:delete" | "threat-campaigns" | "threat-campaigns:list" | "api-tokens" | "api-tokens:create" | "api-tokens:update" | "api-tokens:revoke" | "api-tokens:rotate" | "api-tokens:list" | "audit-log" | "audit-log:list" | "dependencies" | "dependencies:list" | "dependencies:trend" | "fixes" | "fixes:list" | "full-scans" | "full-scans:list" | "full-scans:create" | "full-scans:delete" | "diff-scans" | "diff-scans:list" | "diff-scans:create" | "diff-scans:delete" | "entitlements" | "entitlements:list" | "historical" | "historical:snapshots-list" | "historical:snapshots-start" | "historical:alerts-list" | "historical:alerts-trend" | "historical:dependencies-list" | "historical:dependencies-trend" | "integration" | "integration:list" | "integration:create" | "integration:update" | "integration:delete" | "access-policy" | "access-policy:read" | "access-policy:attach" | "access-policy:update" | "license-policy" | "license-policy:update" | "license-policy:read" | "packages" | "packages:list" | "access-policy-definition" | "access-policy-definition:attach" | "access-policy-definition:read" | "access-policy-definition:update" | "report" | "report:list" | "report:read" | "report:write" | "repo" | "repo:list" | "repo:create" | "repo:update" | "repo:delete" | "repo-label" | "repo-label:list" | "repo-label:create" | "repo-label:update" | "repo-label:delete" | "security-policy" | "security-policy:update" | "security-policy:read" | "socket-basics" | "socket-basics:read" | "telemetry-policy" | "telemetry-policy:update" | "telemetry-events" | "telemetry-events:list" | "threat-feed" | "threat-feed:list" | "triage" | "triage:alerts-list" | "triage:alerts-update" | "uploaded-artifacts" | "uploaded-artifacts:create" | "uploaded-artifacts:list" | "webhooks" | "webhooks:create" | "webhooks:list" | "webhooks:update" | "webhooks:delete" | "openid" | "profile" | "email" | "*")>; + /** + * @description The visibility of the API Token. Warning: this field is deprecated and will be removed in the future. + * @default organization + * @enum {string} + */ + visibility: "admin" | "organization"; + /** @description Committer information to associate with the API Token */ + committer: { + /** + * @description Email address of the committer + * @default + */ + email?: string; + /** + * @description The source control provider for the committer + * @default api + * @enum {string} + */ + provider?: "api" | "azure" | "bitbucket" | "github" | "gitlab"; + /** + * @description Login name on the provider platform + * @default + */ + providerLoginName?: string; + /** + * @description User ID on the provider platform + * @default + */ + providerUserId?: string; + }; + /** + * @description Name for the API Token + * @default api token + */ + name?: string; + /** @description List of resources this API Token can access. Tokens with resource grants can only access a subset of routes that support this feature. */ + resources?: Array<{ /** + * @description Slug of the organization to grant access to * @default */ - dashboardUrl: string + organizationSlug: string; /** + * @description Slug of the repository to grant access to * @default */ - title: string - /** - * @default low - * - * @enum {string} - */ - severity: 'low' | 'medium' | 'high' | 'critical' - locations: { - /** - * @default - */ - scanType: string - /** - * @default - */ - action: string - /** - * @default - */ - actionSourceType: string - reachability: { - /** - * @default - */ - type: string - /** - * @default - */ - analysisType: string | null - } - licenseViolation: { - violationData: { - /** - * @default - */ - purl: string | null - /** - * @default - */ - spdxAtomOrExtraData: string - }[] - } | null - prioritization: { - /** - * @default 0 - */ - overallScore: number - /** - * @default 0 - */ - fixableScore: number - /** - * @default 0 - */ - reachableScore: number - /** - * @default 0 - */ - severityScore: number - } - repository: { - /** - * @default - */ - fullName: string | null - /** - * @default - */ - id: string | null - /** - * @default - */ - slug: string | null - /** - * @default - */ - workspace: string | null - labels: string[] - labelIds: string[] - } | null - branch: { - /** - * @default - */ - name: string - /** - * @default - */ - type: string | null - } | null - patch: { - /** - * @default - */ - uuid: string | null - /** - * @default patch_unavailable - * - * @enum {string} - */ - status: - | 'patch_unavailable' - | 'patch_available' - | 'patch_applied' - /** - * @default false - */ - deprecated: boolean - } - dependency: { - /** - * @default false - */ - direct: boolean - /** - * @default false - */ - dev: boolean - /** - * @default false - */ - dead: boolean - manifestFiles: components['schemas']['SocketManifestReference'][] - } - artifact: { - /** - * @default - */ - type: string - /** - * @default - */ - namespace: string | null - /** - * @default - */ - name: string - /** - * @default - */ - id: string - /** - * @default - */ - version: string - /** - * @default - */ - author: string | null - /** - * @default - */ - license: string | null - scores: components['schemas']['SocketScore'] - /** - * @default - */ - artifactId: string | null - capabilities: { - /** - * Package can read or modify environment variables. - * - * @default false - */ - env: boolean - /** - * Package uses dynamic code evaluation (eval, Function - * constructor, etc.) - * - * @default false - */ - eval: boolean - /** - * Package can read or write to the file system. - * - * @default false - */ - fs: boolean - /** - * Package can make network requests or create servers. - * - * @default false - */ - net: boolean - /** - * Package can execute shell commands or spawn processes. - * - * @default false - */ - shell: boolean - /** - * Package uses unsafe or dangerous operations that - * could compromise security. - * - * @default false - */ - unsafe: boolean - /** - * Package contains remote URL(s) in the source code. - * - * @default false - */ - url: boolean - } | null - } - }[] - }> - meta: { + repositorySlug: string; /** + * @description Workspace slug containing the specified repo * @default */ - organizationId: string - /** - * @default 0 - */ - queryStartTimestamp: number - filters: { - /** - * Comma-separated list of alert actions ("error", "warn", - * "monitor", or "ignore) that should be included. - */ - alertAction?: string[] - /** - * Comma-separated list of alert actions ("error", "warn", - * "monitor", or "ignore) that should be excluded. - */ - 'alertAction.notIn'?: string[] - /** - * Comma-separated list of alert action source types - * ("resolution", "alert-policy", "fallback", "injected-alert", - * "org-policy", "reachability", "repo-label-policy", - * "socket-yml", or "triage") that should be included. - */ - alertActionSourceType?: string[] - /** - * Comma-separated list of alert action source types - * ("resolution", "alert-policy", "fallback", "injected-alert", - * "org-policy", "reachability", "repo-label-policy", - * "socket-yml", or "triage") that should be excluded. - */ - 'alertActionSourceType.notIn'?: string[] - /** - * Comma-separated list of alert categories ("supplyChainRisk", - * "maintenance", "quality", "license", or "vulnerability") that - * should be included. - */ - alertCategory?: string[] - /** - * Comma-separated list of alert categories ("supplyChainRisk", - * "maintenance", "quality", "license", or "vulnerability") that - * should be excluded. - */ - 'alertCategory.notIn'?: string[] - /** - * Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'alertClearedAt.eq'?: string[] - /** - * Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'alertClearedAt.lt'?: string[] - /** - * Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'alertClearedAt.lte'?: string[] - /** - * Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'alertClearedAt.gt'?: string[] - /** - * Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'alertClearedAt.gte'?: string[] - /** - * Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'alertCreatedAt.eq'?: string[] - /** - * Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'alertCreatedAt.lt'?: string[] - /** - * Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'alertCreatedAt.lte'?: string[] - /** - * Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'alertCreatedAt.gt'?: string[] - /** - * Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) - */ - 'alertCreatedAt.gte'?: string[] - /** - * CVE ID. - */ - alertCveId?: string[] - /** - * CVE ID. - */ - 'alertCveId.notIn'?: string[] - /** - * CVE title. - */ - alertCveTitle?: string[] - /** - * CVE title. - */ - 'alertCveTitle.notIn'?: string[] - /** - * CWE ID. - */ - alertCweId?: string[] - /** - * CWE ID. - */ - 'alertCweId.notIn'?: string[] - /** - * CWE name. - */ - alertCweName?: string[] - /** - * CWE name. - */ - 'alertCweName.notIn'?: string[] - /** - * Alert EPSS ("low", "medium", "high", "critical") - */ - alertEPSS?: string[] - /** - * Alert EPSS ("low", "medium", "high", "critical") - */ - 'alertEPSS.notIn'?: string[] - /** - * Comma-separated list of alert fix types ("upgrade", "cve", or - * "remove") that should be included. - */ - alertFixType?: string[] - /** - * Comma-separated list of alert fix types ("upgrade", "cve", or - * "remove") that should be excluded. - */ - 'alertFixType.notIn'?: string[] - /** - * Alert KEV (Known Exploited Vulnerability) filter flag. - */ - alertKEV?: boolean[] + workspace?: string; + }>; + }; + }; + }; + responses: { + /** @description The newly created api token with its stable UUID and hash. */ + 200: { + content: { + "application/json": { + /** + * Format: uuid + * @description ID of the Socket user who created the API Token + * @default + */ + created_by: string | null; + /** + * Format: uuid + * @description The stable group UUID that remains constant across token rotations + * @default + */ + group_uuid: string; + /** @default */ + token: string; + /** @default */ + hash: string; + }; + }; + }; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Update API Token + * @description Update an API Token. The API Token created must use a subset of permissions the API token creating them. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - api-tokens:create + */ + postAPITokenUpdate: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + /** @description The token and properties to update on the token. */ + requestBody?: { + content: { + "application/json": { + /** + * @description Maximum number of API calls allowed per hour + * @default 1000 + */ + max_quota: number; + /** @description List of scopes granted to the API Token */ + scopes: Array<("alerts" | "alerts:list" | "alerts:trend" | "alert-policy" | "alert-policy:list" | "alert-policy:read" | "alert-policy:create" | "alert-policy:update" | "alert-policy:delete" | "alert-resolution" | "alert-resolution:list" | "alert-resolution:create" | "alert-resolution:read" | "alert-resolution:delete" | "threat-campaigns" | "threat-campaigns:list" | "api-tokens" | "api-tokens:create" | "api-tokens:update" | "api-tokens:revoke" | "api-tokens:rotate" | "api-tokens:list" | "audit-log" | "audit-log:list" | "dependencies" | "dependencies:list" | "dependencies:trend" | "fixes" | "fixes:list" | "full-scans" | "full-scans:list" | "full-scans:create" | "full-scans:delete" | "diff-scans" | "diff-scans:list" | "diff-scans:create" | "diff-scans:delete" | "entitlements" | "entitlements:list" | "historical" | "historical:snapshots-list" | "historical:snapshots-start" | "historical:alerts-list" | "historical:alerts-trend" | "historical:dependencies-list" | "historical:dependencies-trend" | "integration" | "integration:list" | "integration:create" | "integration:update" | "integration:delete" | "access-policy" | "access-policy:read" | "access-policy:attach" | "access-policy:update" | "license-policy" | "license-policy:update" | "license-policy:read" | "packages" | "packages:list" | "access-policy-definition" | "access-policy-definition:attach" | "access-policy-definition:read" | "access-policy-definition:update" | "report" | "report:list" | "report:read" | "report:write" | "repo" | "repo:list" | "repo:create" | "repo:update" | "repo:delete" | "repo-label" | "repo-label:list" | "repo-label:create" | "repo-label:update" | "repo-label:delete" | "security-policy" | "security-policy:update" | "security-policy:read" | "socket-basics" | "socket-basics:read" | "telemetry-policy" | "telemetry-policy:update" | "telemetry-events" | "telemetry-events:list" | "threat-feed" | "threat-feed:list" | "triage" | "triage:alerts-list" | "triage:alerts-update" | "uploaded-artifacts" | "uploaded-artifacts:create" | "uploaded-artifacts:list" | "webhooks" | "webhooks:create" | "webhooks:list" | "webhooks:update" | "webhooks:delete" | "openid" | "profile" | "email" | "*")>; + /** + * @description The visibility of the API Token. Warning: this field is deprecated and will be removed in the future. + * @default organization + * @enum {string} + */ + visibility: "admin" | "organization"; + /** @description Committer information to associate with the API Token */ + committer: { + /** + * @description Email address of the committer + * @default + */ + email?: string; + /** + * @description The source control provider for the committer + * @default api + * @enum {string} + */ + provider?: "api" | "azure" | "bitbucket" | "github" | "gitlab"; + /** + * @description Login name on the provider platform + * @default + */ + providerLoginName?: string; + /** + * @description User ID on the provider platform + * @default + */ + providerUserId?: string; + }; + /** + * @description Name for the API Token + * @default api token + */ + name?: string; + /** + * Format: uuid + * @description The stable group UUID to update (provide uuid, id, token, or hash. May provide uuid+hash together for validation) + * @default + */ + uuid?: string; + /** + * @description The API token ID to update (provide uuid, id, token, or hash) + * @default + */ + id?: string; + /** + * @description The API token to update (provide uuid, id, token, or hash) + * @default + */ + token?: string; + /** + * @description The API token hash to update (provide uuid, id, token, or hash) + * @default + */ + hash?: string; + }; + }; + }; + responses: { + /** @description The updated token. */ + 200: { + content: { + "application/json": { + /** + * @description SRI-format hash of the API token (e.g., sha512-base64hash) + * @default + */ + hash: string; + }; + }; + }; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Rotate API Token + * @description Rotate an API Token + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - api-tokens:rotate + */ + postAPITokensRotate: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + /** @description The API Token identifier to rotate. Provide uuid (recommended), id, token, or hash. May provide uuid+hash together for validation. */ + requestBody?: { + content: { + "application/json": { + /** + * Format: uuid + * @description The stable group UUID of the API token to rotate + * @default + */ + uuid?: string; + /** + * @description The API token ID to rotate + * @default + */ + id?: string; + /** @default */ + token?: string; + /** @default */ + hash?: string; + }; + }; + }; + responses: { + /** @description The replacement API Token with its stable UUID, new token value, and hash */ + 200: { + content: { + "application/json": { + /** + * @description The database ID of the new API token + * @default + */ + id: string; + /** + * Format: uuid + * @description The stable group UUID (unchanged after rotation) + * @default + */ + group_uuid: string; + /** + * Format: uuid + * @description ID of the Socket user who created the API Token + * @default + */ + created_by: string | null; + /** @default */ + token: string; + /** @default */ + hash: string; + }; + }; + }; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Revoke API Token + * @description Revoke an API Token + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - api-tokens:revoke + */ + postAPITokensRevoke: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + /** @description The API token identifier to revoke. Provide uuid (recommended), id, token, or hash. May provide uuid+hash together for validation. */ + requestBody?: { + content: { + "application/json": { + /** + * Format: uuid + * @description The stable group UUID of the API token to revoke + * @default + */ + uuid?: string; + /** + * @description The API token ID to revoke + * @default + */ + id?: string; + /** @default */ + token?: string; + /** @default */ + hash?: string; + }; + }; + }; + responses: { + /** @description Response body */ + 200: { + content: { + "application/json": { + /** + * @description The status of the token + * @default revoked + */ + status: string; + }; + }; + }; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get supported file types + * @description Get a list of supported files for full scan generation. + * Files are categorized first by environment (e.g. NPM or PyPI), then by name. + * + * Files whose names match the patterns returned by this endpoint can be uploaded for report generation. + * Examples of supported filenames include `package.json`, `package-lock.json`, and `yarn.lock`. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - No Scopes Required, but authentication is required + */ + getSupportedFiles: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Glob patterns used to match supported files */ + 200: { + content: { + "application/json": { + [key: string]: { + [key: string]: { + /** @default */ + pattern: string; + }; + }; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get Threat Feed Items (Deprecated) + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/getorgthreatfeeditems) instead. + * + * Paginated list of threat feed items. + * + * This endpoint requires an Enterprise Plan with Threat Feed add-on. [Contact](https://socket.dev/demo?utm_source=api-docs&utm_medium=referral&utm_campaign=tracking) our sales team for more details. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - threat-feed:list + */ + getThreatFeedItems: { + parameters: { + query?: { + /** @description Number of threats per page */ + per_page?: number; + /** @description Page token */ + page?: string; + /** @description Sort sort the threat feed by ID or createdAt attribute. */ + sort?: "id" | "created_at"; + /** @description Filter results by discovery period */ + discovery_period?: "1h" | "6h" | "1d" | "7d" | "30d" | "90d" | "365d"; + /** @description Ordering direction of the sort attribute */ + direction?: "desc" | "asc"; + /** @description Filter by threat classification. Supported values: `mal` (malware, including possible malware), `vuln` (vulnerability), `typo` (typosquat, including possible typosquat), `anom` (anomaly), `spy` (telemetry), `obf` (obfuscated code), `dual` (dual-use tool), `joke` (protestware or joke package), `tp` (all confirmed true positives), `fp` (false positive), `u` (unreviewed), `c` (classified, i.e. anything except unreviewed). */ + filter?: "u" | "c" | "fp" | "tp" | "mal" | "vuln" | "anom" | "joke" | "spy" | "typo" | "obf" | "dual"; + /** @description Filter threats by package name */ + name?: string; + /** @description Filter threats by package version */ + version?: string; + /** @description Only return threats which have been human-reviewed */ + is_human_reviewed?: boolean; + /** @description Filter threats by package ecosystem. */ + ecosystem?: "github" | "cargo" | "clawhub" | "composer" | "chrome" | "firefox-extension" | "edge-extension" | "golang" | "huggingface" | "maven" | "npm" | "nuget" | "vscode" | "vscode-extension" | "pypi" | "gem" | "swift"; + }; + }; + responses: { + /** @description The paginated list of threats in the feed and the next page querystring token. */ + 200: { + content: { + "application/json": { + results: Array<({ /** - * Alert priority ("low", "medium", "high", or "critical") + * Format: date-time + * @description ISO 8601 timestamp of when the threat in the package artifact was first discovered + * @default */ - alertPriority?: string[] + createdAt?: string; /** - * Alert priority ("low", "medium", "high", or "critical") + * Format: date-time + * @description ISO 8601 timestamp of when the threat record for the package artifact was last updated (e.g., classification changed, package removed from registry, etc.) + * @default */ - 'alertPriority.notIn'?: string[] + updatedAt?: string; /** - * Comma-separated list of alert CVE reachability analysis types - * ("full-scan" or "precomputed") that should be included. + * Format: date-time + * @description ISO 8601 timestamp of when the package artifact was published to the respective registry + * @default */ - alertReachabilityAnalysisType?: string[] + publishedAt?: string | null; /** - * Comma-separated list of alert CVE reachability analysis types - * ("full-scan" or "precomputed") that should be excluded. + * @description Detailed description of the underlying threat + * @default */ - 'alertReachabilityAnalysisType.notIn'?: string[] + description?: string; /** - * Comma-separated list of alert CVE reachability types - * ("direct_dependency", "error", "maybe_reachable", - * "missing_support", "pending", "reachable", - * "undeterminable_reachability", "unknown", or "unreachable") - * that should be included. + * @description Hex-encoded SHA-256 hash of the malicious file content, usable as an indicator of compromise (IOC). Null when no file content hash is available for the threat. + * @default */ - alertReachabilityType?: string[] + fileSha256?: string | null; /** - * Comma-separated list of alert CVE reachability types - * ("direct_dependency", "error", "maybe_reachable", - * "missing_support", "pending", "reachable", - * "undeterminable_reachability", "unknown", or "unreachable") - * that should be excluded. + * @description Unique identifier of the threat feed entry + * @default 0 */ - 'alertReachabilityType.notIn'?: string[] + id?: number; /** - * Comma-separated list of alert severities ("low", "medium", - * "high", or "critical") that should be included. + * Format: uri + * @description URL to the threat details page on Socket + * @default */ - alertSeverity?: string[] + locationHtmlUrl?: string; /** - * Comma-separated list of alert severities ("low", "medium", - * "high", or "critical") that should be excluded. + * Format: uri + * @description URL to the affected package page on Socket + * @default */ - 'alertSeverity.notIn'?: string[] + packageHtmlUrl?: string; /** - * A single alert status ("open" or "cleared") + * @description Package URL (PURL) of the affected package artifact + * @default */ - alertStatus?: string[] + purl?: string; /** - * A single alert status ("open" or "cleared") + * Format: date-time + * @description ISO 8601 timestamp of when the package artifact was removed from the respective registry, or null if the package is still available on the registry + * @default */ - 'alertStatus.notIn'?: string[] + removedAt?: string | null; /** - * Comma-separated list of alert types (e.g. "usesEval", - * "unmaintained", etc.) that should be included. + * @description Threat classification. Possible values: `malware` (known malware), `possible_malware` (AI-detected potential malware), `vulnerability` (potential vulnerability), `typosquat` (human-reviewed typosquat), `possible_typosquat` (AI-detected potential typosquat), `anomaly` (anomalous behavior), `telemetry` (telemetry), `obfuscated` (obfuscated code), `dual_use` (dual-use tool), `troll` (protestware or joke package), `unreviewed` (not yet reviewed), `false_positive` (confirmed false positive). + * @default */ - alertType?: string[] + threatType?: string; /** - * Comma-separated list of alert types (e.g. "usesEval", - * "unmaintained", etc.) that should be excluded. + * @description Whether the threat still is in need of human review by the threat research team + * @default false */ - 'alertType.notIn'?: string[] + needsHumanReview?: boolean; /** - * Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) + * @description Unique threat instance identifier across artifacts + * @default 0 */ - 'alertUpdatedAt.eq'?: string[] + threatInstanceId?: number; + })>; + /** @default */ + nextPage: string | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get Threat Feed Items (Beta) + * @description Paginated list of threats, sorted by updated_at by default. Set updated_after to the unix timestamp of your last sync while sorting by updated_at to synchronize all new or updated threats in the feed. + * + * This endpoint requires an Enterprise Plan with Threat Feed add-on. [Contact](https://socket.dev/demo?utm_source=api-docs&utm_medium=referral&utm_campaign=tracking) our sales team for more details. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - threat-feed:list + */ + getOrgThreatFeedItems: { + parameters: { + query?: { + /** @description Number of threats per page */ + per_page?: number; + /** @description Page cursor token. Pass the returned nextPageCursor to this query string to fetch the next page of the threat feed. */ + page_cursor?: string; + /** @description Set the sort order for the threat feed items. Default is descending order by updated_at, which includes all new and updated threat feed items. */ + sort?: "id" | "created_at" | "updated_at"; + /** @description A Unix timestamp in seconds that filters results to items only updated after the timestamp. */ + updated_after?: string; + /** @description A Unix timestamp in seconds that filters results to items only created after the date. */ + created_after?: string; + /** @description Order direction of the provided sort field. */ + direction?: "desc" | "asc"; + /** @description Filter by threat classification. Supported values: `mal` (malware, including possible malware), `vuln` (vulnerability), `typo` (typosquat, including possible typosquat), `anom` (anomaly), `spy` (telemetry), `obf` (obfuscated code), `dual` (dual-use tool), `joke` (protestware or joke package), `tp` (all confirmed true positives), `fp` (false positive), `u` (unreviewed), `c` (classified, i.e. anything except unreviewed). */ + filter?: "u" | "c" | "fp" | "tp" | "mal" | "vuln" | "anom" | "joke" | "spy" | "typo" | "obf" | "dual"; + /** @description Filter threats by package name */ + name?: string; + /** @description Filter threats by package version. */ + version?: string; + /** @description Only return threats which have been human-reviewed */ + is_human_reviewed?: boolean; + /** @description Filter threats by package ecosystem. */ + ecosystem?: "github" | "cargo" | "clawhub" | "composer" | "chrome" | "firefox-extension" | "edge-extension" | "golang" | "huggingface" | "maven" | "npm" | "nuget" | "vscode" | "vscode-extension" | "pypi" | "gem" | "swift"; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description The paginated list of items in the threat feed and the next page cursor. */ + 200: { + content: { + "application/json": { + results: Array<({ /** - * Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) + * Format: date-time + * @description ISO 8601 timestamp of when the threat in the package artifact was first discovered + * @default */ - 'alertUpdatedAt.lt'?: string[] + createdAt?: string; /** - * Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) + * Format: date-time + * @description ISO 8601 timestamp of when the threat record for the package artifact was last updated (e.g., classification changed, package removed from registry, etc.) + * @default */ - 'alertUpdatedAt.lte'?: string[] + updatedAt?: string; /** - * Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) + * Format: date-time + * @description ISO 8601 timestamp of when the package artifact was published to the respective registry + * @default */ - 'alertUpdatedAt.gt'?: string[] + publishedAt?: string | null; /** - * Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) + * @description Detailed description of the underlying threat + * @default */ - 'alertUpdatedAt.gte'?: string[] + description?: string; /** - * Name of artifact. + * @description Hex-encoded SHA-256 hash of the malicious file content, usable as an indicator of compromise (IOC). Null when no file content hash is available for the threat. + * @default */ - artifactName?: string[] + fileSha256?: string | null; /** - * Name of artifact. + * @description Unique identifier of the threat feed entry + * @default 0 */ - 'artifactName.notIn'?: string[] + id?: number; /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", - * "gem", "maven", "golang", etc.) that should be included. + * Format: uri + * @description URL to the threat details page on Socket + * @default */ - artifactType?: string[] + locationHtmlUrl?: string; /** - * Comma-separated list of artifact types (e.g. "npm", "pypi", - * "gem", "maven", "golang", etc.) that should be excluded. + * Format: uri + * @description URL to the affected package page on Socket + * @default */ - 'artifactType.notIn'?: string[] + packageHtmlUrl?: string; /** - * Comma-separated list of branch names that should be included. + * @description Package URL (PURL) of the affected package artifact + * @default */ - branch?: string[] + purl?: string; /** - * Comma-separated list of branch names that should be excluded. + * Format: date-time + * @description ISO 8601 timestamp of when the package artifact was removed from the respective registry, or null if the package is still available on the registry + * @default */ - 'branch.notIn'?: string[] + removedAt?: string | null; /** - * Comma-separated list of patch statuses ("patch_unavailable", - * "patch_available", or "patch_applied") that should be - * included. + * @description Threat classification. Possible values: `malware` (known malware), `possible_malware` (AI-detected potential malware), `vulnerability` (potential vulnerability), `typosquat` (human-reviewed typosquat), `possible_typosquat` (AI-detected potential typosquat), `anomaly` (anomalous behavior), `telemetry` (telemetry), `obfuscated` (obfuscated code), `dual_use` (dual-use tool), `troll` (protestware or joke package), `unreviewed` (not yet reviewed), `false_positive` (confirmed false positive). + * @default */ - cvePatchStatus?: string[] + threatType?: string; /** - * Comma-separated list of patch statuses ("patch_unavailable", - * "patch_available", or "patch_applied") that should be - * excluded. + * @description Whether the threat still is in need of human review by the threat research team + * @default false */ - 'cvePatchStatus.notIn'?: string[] + needsHumanReview?: boolean; /** - * Dead/reachable dependency filter flag. + * @description Unique threat instance identifier across artifacts + * @default 0 */ - dependencyDead?: boolean[] + threatInstanceId?: number; + })>; + /** @default */ + nextPageCursor: string | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get Packages by PURL (Org Scoped) + * @description Batch retrieval of package metadata and alerts by PURL strings for a specific organization. Compatible with CycloneDX reports. + * + * Package URLs (PURLs) are an ecosystem agnostic way to identify packages. + * CycloneDX SBOMs use the purl format to identify components. + * This endpoint supports fetching metadata and alerts for multiple packages at once by passing an array of purl strings, or by passing an entire CycloneDX report. + * + * **Note:** This endpoint has a batch size limit (default: 1024 PURLs per request). Requests exceeding this limit will return a 400 Bad Request error. + * + * More information on purl and CycloneDX: + * + * - [`purl` Spec](https://github.com/package-url/purl-spec) + * - [CycloneDX Spec](https://cyclonedx.org/specification/overview/#components) + * + * This endpoint returns the latest available alert data for artifacts in the batch (stale while revalidate). + * Actively running analysis will be returned when available on subsequent runs. + * + * When `alerts=true`, Socket may synthesize two alert types to make partial + * results actionable: + * + * - `pendingScan`: the package is known but analysis has not completed yet + * - `notFound`: Socket could not resolve the package/version metadata + * + * When `purlErrors=true`, unresolved `notFound` inputs keep the legacy + * `purlError` stream shape instead of emitting synthetic `notFound` + * artifacts. + * + * Use `poll=false` (default) to fail open and return the current known state + * quickly. Use `poll=true` to fail closed and wait up to `timeoutSec` for + * pending analysis before returning. + * + * **Conda (temporary compatibility):** `pkg:conda` inputs are served from the + * already-scanned PyPI package with the same normalized name and version when + * one exists; the response row keeps the original conda PURL in `inputPurl` + * but reports `type: pypi`. Conda `build`, `subdir`, `type`, and `channel` + * qualifiers are ignored, and conda packages without a scanned PyPI + * counterpart return the normal `notFound` result. This mapping will be + * replaced by native conda support. + * + * ## Query Parameters + * + * This endpoint supports all query parameters from `POST /v0/purl` including: `alerts`, `actions`, `compact`, `fixable`, `licenseattrib`, `licensedetails`, `purlErrors`, `poll`, `cachedResultsOnly`, and `summary`. + * + * Additionally, you may provide a `labels` query parameter to apply a repository label's security policies. Pass the label slug as the value (e.g., `?labels=production`). Only one label is currently supported. + * + * ## Examples: + * + * ### Looking up an npm package: + * + * ```json + * { + * "components": [ + * { + * "purl": "pkg:npm/express@4.19.2" + * } + * ] + * } + * ``` + * + * ### Looking up a PyPi package: + * + * ```json + * { + * "components": [ + * { + * "purl": "pkg:pypi/django@5.0.6" + * } + * ] + * } + * ``` + * + * ### Looking up a Maven package: + * + * ```json + * { + * "components": [ + * { + * "purl": "pkg:maven/log4j/log4j@1.2.17" + * } + * ] + * } + * ``` + * + * ### Batch lookup + * + * ```json + * { + * "components": [ + * { + * "purl": "pkg:npm/express@4.19.2" + * }, + * { + * "purl": "pkg:pypi/django@5.0.6" + * }, + * { + * "purl": "pkg:maven/log4j/log4j@1.2.17" + * } + * ] + * } + * ``` + * + * ### With label and options (query parameters): + * + * ``` + * POST /v0/orgs/{org_slug}/purl?labels=production&alerts=true&compact=true + * { + * "components": [ + * { + * "purl": "pkg:npm/express@4.19.2" + * } + * ] + * } + * ``` + * + * This endpoint consumes 100 units of your quota. + * + * This endpoint requires the following org token scopes: + * - packages:list + */ + batchPackageFetchByOrg: { + parameters: { + query?: { + /** @description Repository label slugs to apply policies. Only one label is supported currently; the parameter is an array to allow future support for multiple labels. */ + labels?: string[]; + /** @description Include alert metadata. */ + alerts?: boolean; + /** @description Include only alerts with comma separated actions defined by security policy. */ + actions?: Array<("error" | "monitor" | "warn" | "ignore")>; + /** @description Compact metadata. When enabled, excludes metadata fields like author, scores, size, dependencies, and manifest files. Always includes: id, type, name, version, release, namespace, subpath, alerts, and alertPriorities. */ + compact?: boolean; + /** @description Include only fixable alerts. */ + fixable?: boolean; + /** @description Include license attribution data, including license text and author information. Maps attribution/license text to a list of data objects to which that attribution info applies. */ + licenseattrib?: boolean; + /** @description Include detailed license information, including location and match strength, for each license datum. */ + licensedetails?: boolean; + /** @description Return errors found with handling PURLs as error objects in the stream. */ + purlErrors?: boolean; + /** @description When true, wait up to timeoutSec for pending analysis to complete before returning. When false (default), return the current known state immediately, including synthesized pendingScan and notFound alerts when alerts=true unless purlErrors=true keeps legacy not-found errors. */ + poll?: boolean; + /** @description Legacy fallback for older clients. Only used when poll is omitted: cachedResultsOnly=true behaves like poll=false, while cachedResultsOnly=false preserves the older blocking behavior. */ + cachedResultsOnly?: boolean; + /** @description Include a summary object at the end of the stream with counts of malformed, resolved, and not found PURLs. */ + summary?: boolean; + /** @description Maximum time in seconds to wait for package resolution and, when poll=true, pending analysis. Inputs that have not completed processing when the timeout is reached return pendingScan alerts when alerts=true, or errors when purlErrors=true. */ + timeoutSec?: number; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody?: { + content: { + "application/json": components["schemas"]["SocketOrgBatchPURLFetch"]; + }; + }; + responses: { + /** @description Socket issue lists and scores for all packages, and optional metadata objects */ + 200: { + content: { + "application/x-ndjson": components["schemas"]["BatchPurlStreamSchema"]; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Fetch fixes for vulnerabilities in a repository, scan, or uploaded manifest + * @description Fetches available fixes for vulnerabilities in a repository, scan, or uploaded manifest. + * Requires exactly one of repo_slug, full_scan_id, or tar_hash, as well as vulnerability_ids to be provided. + * vulnerability_ids can be a comma-separated list of GHSA or CVE IDs, or "*" for all vulnerabilities. + * + * ## Response Structure + * + * The response contains a `fixDetails` object where each key is a vulnerability ID (GHSA or CVE) and the value is a discriminated union based on the `type` field. + * + * ### Common Fields + * + * All response variants include: + * - `type`: Discriminator field (one of: "fixFound", "partialFixFound", "noFixAvailable", "fixNotApplicable", "errorComputingFix") + * - `value`: Object containing the variant-specific data + * + * The `value` object always contains: + * - `ghsa`: string | null - The GHSA ID + * - `cve`: string | null - The CVE ID (if available) + * - `advisoryDetails`: object | null - Advisory details (only if include_details=true) + * + * ### Response Variants + * + * **fixFound**: A complete fix is available for all vulnerable packages + * - `value.fixDetails.fixes`: Array of fix objects, each containing: + * - `purl`: Package URL to upgrade + * - `fixedVersion`: Version to upgrade to + * - `manifestFiles`: Array of manifest files containing the package + * - `updateType`: "patch" | "minor" | "major" | "unknown" + * - `value.fixDetails.responsibleDirectDependencies`: (optional) Map of direct dependencies responsible for the vulnerability + * + * **partialFixFound**: Fixes available for some but not all vulnerable packages + * - Same as fixFound, plus: + * - `value.fixDetails.unfixablePurls`: Array of packages that cannot be fixed, each containing: + * - `purl`: Package URL + * - `manifestFiles`: Array of manifest files + * - `reasons`: Human-readable explanations of why the package cannot be upgraded. May contain multiple distinct entries when different dependency chains are blocked for different causes (e.g. one chain has no compatible upstream version; another would require a major version bump skipped by `--no-major-updates`). + * - `dependencyChain`: (optional) Installed PURLs along the dependency chain where the fix search was blocked, from the blocking package down to this package. Present only when a chain was recorded; the first `reasons` entry describes this chain. + * - `withheldFix`: (optional) Present when a fix exists but this request's policy withheld it: `{ purl, version, reason }` where `purl` is the package (without version), `version` the lowest safe version the policy removed from the fix search, and `reason` one of `majorUpdate` (a major update while `allow_major_updates=false`), `releaseAge` (younger than `minimum_release_age`) or `publishDateUnknown` (publish date unavailable, so `minimum_release_age` cannot be verified). Lifting the policy is not guaranteed to make the fix applicable — other version constraints in the dependency tree may still block this version. + * + * **noFixAvailable**: No fix exists for this vulnerability (no patched version published) + * - `value.vulnerableArtifacts`: Array of vulnerable packages with their manifest files; each carries a static `reasons` entry stating that no patched version has been published + * + * **fixNotApplicable**: A patched version of the vulnerable package exists but cannot be applied. The most common cause is that there is no upgrade path through the dependency tree — for example, given a chain `App → A@1.0.0 → B@1.0.0` where `B < 2.0.0` is vulnerable, if no version of `A` accepts `B@2.0.0` the fix cannot be applied without a manual override (e.g. `pnpm overrides`). Other causes include callers passing `--no-major-updates` when the only patched version is a major bump. + * - `value.vulnerableArtifacts`: Array of vulnerable packages with their manifest files, each with per-artifact `reasons` explaining why the fix could not be applied (always at least one entry; a static fallback when the fix search reported no per-package cause) and an optional `dependencyChain` — installed PURLs from the package that blocked the upgrade down to the vulnerable package, present when a chain was recorded (the first `reasons` entry describes it), and an optional `withheldFix` — present when a fix exists but this request's policy withheld it (see the partialFixFound field list) + * + * **errorComputingFix**: An error occurred while computing fixes + * - `value.message`: Error description + * + * ### Fix version alignment + * + * When several requested vulnerabilities are fixed by upgrading the same package, their fix entries carry the SAME `fixedVersion` — the server computes a version that clears all of them together and verifies it against each advisory's affected ranges. Clients can apply the fixes per package without reconciling versions. Only when no single in-policy version fixes all advisories on a package (non-monotonic affected ranges) can entries differ; each is then the minimal upgrade for its own advisory. + * + * ### Advisory Details (when include_details=true) + * + * - `title`: string | null + * - `description`: string | null + * - `cwes`: string[] - CWE identifiers + * - `severity`: "LOW" | "MODERATE" | "HIGH" | "CRITICAL" + * - `cvssVector`: string | null + * - `publishedAt`: string (ISO date) + * - `kev`: boolean - Whether it's a Known Exploited Vulnerability + * - `epss`: number | null - Exploit Prediction Scoring System score + * - `affectedPurls`: Array of affected packages with version ranges + * + * ### Stateful Alert IDs (when include_stateful_alert_ids=true) + * + * Top-level `statefulAlertIds` field — a map of GHSA ID → array of open stateful alert IDs (the human-readable `SOCKET-XXX-N` identifiers also returned by `/v0/orgs/{org_slug}/alerts`). The lookup is org-scoped, so the same GHSA may map to multiple alert IDs when it appears in alerts across different repos or branches. Callers that need a repo/branch filter should intersect this map with results from the alerts API. + * + * The lookup honors the same scan-type visibility as `/v0/orgs/{org_slug}/alerts` — when the `enableTier1OrgAlertApiRead` feature flag is off for the org, only `socket` scans are visible (no `socket_tier1`). + * + * Note on scopes: this field surfaces identifiers that are otherwise reachable via `/v0/orgs/{org_slug}/alerts` (which requires `alerts:list`). The fixes route is gated on `fixes:list` alone; the GHSAs the alert IDs are keyed to are already part of every `/fixes` response, and exposing the matching alert IDs through this opt-in flag is intentional — it lets a caller with only `fixes:list` complete the correlation back to /alerts on a token that already has that scope. If you require strict scope separation, do not enable this flag. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - fixes:list + */ + "fetch-fixes": { + parameters: { + query: { + /** @description The slug of the repository to fetch fixes for (e.g. "my-repo" or "my-org/my-repo"). Use the full org/repo path to disambiguate when multiple GitHub orgs share the same repo name. Computes fixes based on the latest scan on the default branch */ + repo_slug?: string; + /** @description The ID of the scan to fetch fixes for */ + full_scan_id?: string; + /** @description A tarball hash from the upload-manifest-files endpoint. Mutually exclusive with repo_slug and full_scan_id. */ + tar_hash?: string; + /** @description Comma-separated list of GHSA or CVE IDs, or "*" for all vulnerabilities */ + vulnerability_ids: string; + /** @description Whether to allow major version updates in fixes */ + allow_major_updates: boolean; + /** @description Minimum release age for fixes packages (e.g., "1h", "2d", "1w"). Higher values reduces risk of installing recently released untested package versions. */ + minimum_release_age?: string; + /** @description Whether to include advisory details in the response */ + include_details?: boolean; + /** @description Set to include the direct dependencies responsible for introducing the dependency or dependencies with the vulnerability in the response */ + include_responsible_direct_dependencies?: boolean; + /** @description Set to include an allDetectedGhsas field listing every GHSA detected in the project, regardless of the vulnerability_ids filter. Useful for CLI clients that request a specific GHSA and want to show the user which GHSAs actually exist when the request has no overlap. */ + include_all_detected_ghsas?: boolean; + /** @description Set to include a statefulAlertIds map (GHSA ID → array of open stateful alert IDs detected in this organization) in the response. Lets callers correlate /fixes results back to the alert IDs surfaced by /v0/orgs/{org_slug}/alerts. Org-scoped only — multiple alerts across repos/branches may share a GHSA. Off by default to avoid an extra ClickHouse round-trip. */ + include_stateful_alert_ids?: boolean; + /** @description The id of an autofix-or-upgrade-cli-run record (created via /fixes/register-autofix-or-upgrade-cli-run) to associate this computation with. When set, the server records per-GHSA fix-computation telemetry into autofix_compute_vulnerability and updates the run's autofix_run row, mirroring the legacy /v0/fixes/compute-fixes endpoint. The caller must own the run's organization; foreign-org or unknown ids return 404. */ + autofix_run_id?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Fix details for requested vulnerabilities */ + 200: { + content: { + "application/json": { + fixDetails: { + [key: string]: Record; + }; + /** @description All vulnerability GHSA IDs detected in the project, regardless of the vulnerability_ids filter. Only present when include_all_detected_ghsas=true is set. */ + allDetectedGhsas?: string[]; + /** @description Map of GHSA ID → open stateful alert IDs detected in this organization. Lets callers correlate /fixes results back to the alert IDs they see in /v0/orgs/{org_slug}/alerts. Org-scoped, not repo/branch-scoped — the same GHSA may surface in multiple alerts across repos. Only present when include_stateful_alert_ids=true is set. */ + statefulAlertIds?: { + [key: string]: string[]; + }; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get Organization Telemetry Config + * @description Retrieve the telemetry config of an organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + */ + getOrgTelemetryConfig: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description Retrieved telemetry config details */ + 200: { + content: { + "application/json": { + /** @description Telemetry configuration */ + telemetry: { + /** + * @description Telemetry enabled + * @default false + */ + enabled: boolean; + }; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Update Telemetry Config + * @description Update the telemetry config of an organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - telemetry-policy:update + */ + updateOrgTelemetryConfig: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description Telemetry enabled + * @default false + */ + enabled?: boolean; + }; + }; + }; + responses: { + /** @description Updated telemetry config details */ + 200: { + content: { + "application/json": { + /** @description Telemetry configuration */ + telemetry: { + /** + * @description Telemetry enabled + * @default false + */ + enabled: boolean; + }; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * List all webhooks + * @description List all webhooks in the specified organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - webhooks:list + */ + getOrgWebhooksList: { + parameters: { + query?: { + sort?: string; + direction?: string; + per_page?: number; + page?: number; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description List of webhooks */ + 200: { + content: { + "application/json": { + results: Array<({ /** - * Development/production dependency filter flag. + * @description The ID of the webhook + * @default */ - dependencyDev?: boolean[] + id: string; /** - * Direct/transitive dependency filter flag. + * @description The creation date of the webhook + * @default */ - dependencyDirect?: boolean[] + created_at: string; /** - * Comma-separated list of repo full names that should be - * included. + * @description The last update date of the webhook + * @default */ - repoFullName?: string[] + updated_at: string; /** - * Comma-separated list of repo full names that should be - * excluded. + * @description The name of the webhook + * @default */ - 'repoFullName.notIn'?: string[] + name: string; /** - * Comma-separated list of repo labels that should be included. - * Use "" to filter for repositories with no labels. + * @description The description of the webhook + * @default */ - repoLabels?: string[] + description: string | null; /** - * Comma-separated list of repo labels that should be excluded. - * Use "" to filter for repositories with no labels. + * @description The URL where webhook events will be sent + * @default */ - 'repoLabels.notIn'?: string[] + url: string; /** - * Comma-separated list of repo slugs that should be included. + * @description The signing key used to sign webhook payloads + * @default */ - repoSlug?: string[] + secret: string | null; + /** @description Array of event names */ + events: string[]; /** - * Comma-separated list of repo slugs that should be excluded. + * @description Custom headers to include in webhook requests + * @default null */ - 'repoSlug.notIn'?: string[] - } - } - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + headers: Record | null; + filters: ({ + /** @description Array of repository IDs */ + repositoryIds: string[] | null; + }) | null; + })>; + /** @default 0 */ + nextPage: number | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Create a webhook + * @description Create a new webhook. Returns the created webhook details. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - webhooks:create + */ + createOrgWebhook: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The name of the webhook + * @default + */ + name: string; + /** + * @description The URL where webhook events will be sent + * @default + */ + url: string; + /** + * @description The signing key used to sign webhook payloads + * @default + */ + secret: string; + /** @description Array of event names */ + events: string[]; + /** + * @description The description of the webhook + * @default + */ + description?: string | null; + /** + * @description Custom headers to include in webhook requests + * @default null + */ + headers?: Record | null; + filters?: ({ + /** @description Array of repository IDs */ + repositoryIds: string[] | null; + }) | null; + }; + }; + }; + responses: { + /** @description The created webhook */ + 201: { + content: { + "application/json": { + /** + * @description The ID of the webhook + * @default + */ + id: string; + /** + * @description The creation date of the webhook + * @default + */ + created_at: string; + /** + * @description The last update date of the webhook + * @default + */ + updated_at: string; + /** + * @description The name of the webhook + * @default + */ + name: string; + /** + * @description The description of the webhook + * @default + */ + description: string | null; + /** + * @description The URL where webhook events will be sent + * @default + */ + url: string; + /** + * @description The signing key used to sign webhook payloads + * @default + */ + secret: string | null; + /** @description Array of event names */ + events: string[]; + /** + * @description Custom headers to include in webhook requests + * @default null + */ + headers: Record | null; + filters: ({ + /** @description Array of repository IDs */ + repositoryIds: string[] | null; + }) | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Get webhook + * @description Get a webhook for the specified organization. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - webhooks:list + */ + getOrgWebhook: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the webhook */ + webhook_id: string; + }; + }; + responses: { + /** @description Webhook details */ + 200: { + content: { + "application/json": { + /** + * @description The ID of the webhook + * @default + */ + id: string; + /** + * @description The creation date of the webhook + * @default + */ + created_at: string; + /** + * @description The last update date of the webhook + * @default + */ + updated_at: string; + /** + * @description The name of the webhook + * @default + */ + name: string; + /** + * @description The description of the webhook + * @default + */ + description: string | null; + /** + * @description The URL where webhook events will be sent + * @default + */ + url: string; + /** + * @description The signing key used to sign webhook payloads + * @default + */ + secret: string | null; + /** @description Array of event names */ + events: string[]; + /** + * @description Custom headers to include in webhook requests + * @default null + */ + headers: Record | null; + filters: ({ + /** @description Array of repository IDs */ + repositoryIds: string[] | null; + }) | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Update webhook + * @description Update details of an existing webhook. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - webhooks:update + */ + updateOrgWebhook: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the webhook */ + webhook_id: string; + }; + }; + requestBody?: { + content: { + "application/json": { + /** + * @description The name of the webhook + * @default + */ + name?: string; + /** + * @description The description of the webhook + * @default + */ + description?: string | null; + /** + * @description The URL where webhook events will be sent + * @default + */ + url?: string; + /** + * @description The signing key used to sign webhook payloads + * @default + */ + secret?: string | null; + /** @description Array of event names */ + events?: string[]; + /** + * @description Custom headers to include in webhook requests + * @default null + */ + headers?: Record | null; + filters?: ({ + /** @description Array of repository IDs */ + repositoryIds: string[] | null; + }) | null; + }; + }; + }; + responses: { + /** @description Updated webhook details */ + 200: { + content: { + "application/json": { + /** + * @description The ID of the webhook + * @default + */ + id: string; + /** + * @description The creation date of the webhook + * @default + */ + created_at: string; + /** + * @description The last update date of the webhook + * @default + */ + updated_at: string; + /** + * @description The name of the webhook + * @default + */ + name: string; + /** + * @description The description of the webhook + * @default + */ + description: string | null; + /** + * @description The URL where webhook events will be sent + * @default + */ + url: string; + /** + * @description The signing key used to sign webhook payloads + * @default + */ + secret: string | null; + /** @description Array of event names */ + events: string[]; + /** + * @description Custom headers to include in webhook requests + * @default null + */ + headers: Record | null; + filters: ({ + /** @description Array of repository IDs */ + repositoryIds: string[] | null; + }) | null; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * Delete webhook + * @description Delete a webhook. This will stop all future webhook deliveries to the webhook URL. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - webhooks:delete + */ + deleteOrgWebhook: { + parameters: { + path: { + /** @description The slug of the organization */ + org_slug: string; + /** @description The ID of the webhook */ + webhook_id: string; + }; + }; + responses: { + /** @description Success */ + 200: { + content: { + "application/json": { + /** @default ok */ + status: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; + /** + * List latest alerts (Beta) + * @description List latest alerts. + * + * Pagination: keep requesting pages (passing the previous response's `endCursor` as `startAfterCursor`) until `endCursor` is `null`. Do not stop when `items` is empty — an empty page can be returned while more results still remain on later pages, so `endCursor` being `null` is the only reliable end-of-results signal. + * + * This endpoint consumes 10 units of your quota. + * + * This endpoint requires the following org token scopes: + * - alerts:list + */ + alertsList: { + parameters: { + query?: { + /** @description Specify the maximum number of results to return per page (intermediate pages may have fewer than this limit and callers should always check "endCursor" in response body to know if there are more pages) */ + per_page?: number; + /** @description The pagination cursor that was returned as the "endCursor" property in previous request */ + startAfterCursor?: string; + /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be included */ + "filters.alertAction"?: string; + /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be excluded */ + "filters.alertAction.notIn"?: string; + /** @description Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be included */ + "filters.alertActionSourceType"?: string; + /** @description Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded */ + "filters.alertActionSourceType.notIn"?: string; + /** @description Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be included */ + "filters.alertCategory"?: string; + /** @description Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be excluded */ + "filters.alertCategory.notIn"?: string; + /** @description Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertClearedAt.eq"?: string; + /** @description Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertClearedAt.lt"?: string; + /** @description Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertClearedAt.lte"?: string; + /** @description Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertClearedAt.gt"?: string; + /** @description Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertClearedAt.gte"?: string; + /** @description Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertCreatedAt.eq"?: string; + /** @description Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertCreatedAt.lt"?: string; + /** @description Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertCreatedAt.lte"?: string; + /** @description Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertCreatedAt.gt"?: string; + /** @description Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertCreatedAt.gte"?: string; + /** @description CVE ID */ + "filters.alertCveId"?: string; + /** @description CVE ID */ + "filters.alertCveId.notIn"?: string; + /** @description CVE title */ + "filters.alertCveTitle"?: string; + /** @description CVE title */ + "filters.alertCveTitle.notIn"?: string; + /** @description CWE ID */ + "filters.alertCweId"?: string; + /** @description CWE ID */ + "filters.alertCweId.notIn"?: string; + /** @description CWE name */ + "filters.alertCweName"?: string; + /** @description CWE name */ + "filters.alertCweName.notIn"?: string; + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + "filters.alertEPSS"?: string; + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + "filters.alertEPSS.notIn"?: string; + /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be included */ + "filters.alertFixType"?: string; + /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be excluded */ + "filters.alertFixType.notIn"?: string; + /** @description Alert KEV (Known Exploited Vulnerability) filter flag */ + "filters.alertKEV"?: boolean; + /** @description Alert KEV (Known Exploited Vulnerability) filter flag */ + "filters.alertKEV.notIn"?: boolean; + /** @description Alert priority ("low", "medium", "high", or "critical") */ + "filters.alertPriority"?: string; + /** @description Alert priority ("low", "medium", "high", or "critical") */ + "filters.alertPriority.notIn"?: string; + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be included */ + "filters.alertReachabilityAnalysisType"?: string; + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be excluded */ + "filters.alertReachabilityAnalysisType.notIn"?: string; + /** @description Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be included */ + "filters.alertReachabilityType"?: string; + /** @description Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be excluded */ + "filters.alertReachabilityType.notIn"?: string; + /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be included */ + "filters.alertSeverity"?: string; + /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be excluded */ + "filters.alertSeverity.notIn"?: string; + /** @description A single alert status ("open" or "cleared") */ + "filters.alertStatus"?: string; + /** @description A single alert status ("open" or "cleared") */ + "filters.alertStatus.notIn"?: string; + /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be included */ + "filters.alertType"?: string; + /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be excluded */ + "filters.alertType.notIn"?: string; + /** @description Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertUpdatedAt.eq"?: string; + /** @description Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertUpdatedAt.lt"?: string; + /** @description Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertUpdatedAt.lte"?: string; + /** @description Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertUpdatedAt.gt"?: string; + /** @description Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "filters.alertUpdatedAt.gte"?: string; + /** @description Name of artifact */ + "filters.artifactName"?: string; + /** @description Name of artifact */ + "filters.artifactName.notIn"?: string; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be included */ + "filters.artifactType"?: string; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be excluded */ + "filters.artifactType.notIn"?: string; + /** @description Comma-separated list of branch names that should be included */ + "filters.branch"?: string; + /** @description Comma-separated list of branch names that should be excluded */ + "filters.branch.notIn"?: string; + /** @description Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be included */ + "filters.cvePatchStatus"?: string; + /** @description Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be excluded */ + "filters.cvePatchStatus.notIn"?: string; + /** @description Dead/reachable dependency filter flag */ + "filters.dependencyDead"?: boolean; + /** @description Dead/reachable dependency filter flag */ + "filters.dependencyDead.notIn"?: boolean; + /** @description Development/production dependency filter flag */ + "filters.dependencyDev"?: boolean; + /** @description Development/production dependency filter flag */ + "filters.dependencyDev.notIn"?: boolean; + /** @description Direct/transitive dependency filter flag */ + "filters.dependencyDirect"?: boolean; + /** @description Direct/transitive dependency filter flag */ + "filters.dependencyDirect.notIn"?: boolean; + /** @description Comma-separated list of repo full names that should be included */ + "filters.repoFullName"?: string; + /** @description Comma-separated list of repo full names that should be excluded */ + "filters.repoFullName.notIn"?: string; + /** @description Comma-separated list of repo labels that should be included. Use "" to filter for repositories with no labels. */ + "filters.repoLabels"?: string; + /** @description Comma-separated list of repo labels that should be excluded. Use "" to filter for repositories with no labels. */ + "filters.repoLabels.notIn"?: string; + /** @description Comma-separated list of repo slugs that should be included */ + "filters.repoSlug"?: string; + /** @description Comma-separated list of repo slugs that should be excluded */ + "filters.repoSlug.notIn"?: string; + }; + path: { + /** @description The slug of the organization */ + org_slug: string; + }; + }; + responses: { + /** @description The paginated array of alert items for the organization and related metadata. */ + 200: { + content: { + "application/json": { + /** @default */ + endCursor: string | null; + items: Array<({ + /** @default */ + key: string; + /** @default */ + type: string; + /** @default */ + category: string; + /** @default */ + description: string | null; + fix: ({ + /** @default */ + type: string; + /** @default */ + description: string | null; + }) | null; + vulnerability: ({ + /** @default */ + cveId: string | null; + /** @default */ + cveTitle: string | null; + /** @default */ + cveDescription: string | null; + /** @default 0 */ + cvssScore: number; + /** @default */ + cvssVectorString: string | null; + cweIds: string[] | null; + cweNames: string[] | null; + ghsaIds: string[] | null; + /** @default 0 */ + epssScore: number; + /** @default 0 */ + epssPercentile: number; + /** @default false */ + isKev: boolean; + /** @default */ + firstPatchedVersionIdentifier: string | null; + /** @default */ + url: string | null; + }) | null; + /** @default */ + id: string; + /** @default 0 */ + version: number; + /** + * @default open + * @enum {string} + */ + status: "open" | "cleared"; + /** @default */ + createdAt: string; + /** @default */ + updatedAt: string; + /** @default */ + clearedAt: string | null; + /** @default */ + dashboardUrl: string; + /** @default */ + title: string; + /** + * @default low + * @enum {string} + */ + severity: "low" | "medium" | "high" | "critical"; + locations: ({ + /** @default */ + scanType: string; + /** @default */ + action: string; + /** @default */ + actionSourceType: string; + reachability: { + /** @default */ + type: string; + /** @default */ + analysisType: string | null; + }; + licenseViolation: ({ + violationData: ({ + /** @default */ + purl: string | null; + /** @default */ + spdxAtomOrExtraData: string; + })[]; + }) | null; + prioritization: { + /** @default 0 */ + overallScore: number; + /** @default 0 */ + fixableScore: number; + /** @default 0 */ + reachableScore: number; + /** @default 0 */ + severityScore: number; + }; + repository: ({ + /** @default */ + fullName: string | null; + /** @default */ + id: string | null; + /** @default */ + slug: string | null; + /** @default */ + workspace: string | null; + labels: string[]; + labelIds: string[]; + }) | null; + branch: ({ + /** @default */ + name: string; + /** @default */ + type: string | null; + }) | null; + patch: { + /** @default */ + uuid: string | null; + /** + * @default patch_unavailable + * @enum {string} + */ + status: "patch_unavailable" | "patch_available" | "patch_applied"; + /** @default false */ + deprecated: boolean; + }; + dependency: { + /** @default false */ + direct: boolean; + /** @default false */ + dev: boolean; + /** @default false */ + dead: boolean; + manifestFiles: components["schemas"]["SocketManifestReference"][]; + }; + artifact: { + /** @default */ + type: string; + /** @default */ + namespace: string | null; + /** @default */ + name: string; + /** @default */ + id: string; + /** @default */ + version: string; + /** @default */ + author: string | null; + /** @default */ + license: string | null; + scores: components["schemas"]["SocketScore"]; + /** @default */ + artifactId: string | null; + capabilities: { + /** + * @description Package can read or modify environment variables + * @default false + */ + env: boolean; + /** + * @description Package uses dynamic code evaluation (eval, Function constructor, etc.) + * @default false + */ + eval: boolean; + /** + * @description Package can read or write to the file system + * @default false + */ + fs: boolean; + /** + * @description Package can make network requests or create servers + * @default false + */ + net: boolean; + /** + * @description Package can execute shell commands or spawn processes + * @default false + */ + shell: boolean; + /** + * @description Package uses unsafe or dangerous operations that could compromise security + * @default false + */ + unsafe: boolean; + /** + * @description Package contains remote URL(s) in the source code + * @default false + */ + url: boolean; + } | null; + }; + })[]; + })>; + meta: { + /** @default */ + organizationId: string; + /** @default 0 */ + queryStartTimestamp: number; + filters: { + /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be included */ + alertAction?: string[]; + /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be excluded */ + "alertAction.notIn"?: string[]; + /** @description Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be included */ + alertActionSourceType?: string[]; + /** @description Comma-separated list of alert action source types ("resolution", "alert-policy", "fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded */ + "alertActionSourceType.notIn"?: string[]; + /** @description Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be included */ + alertCategory?: string[]; + /** @description Comma-separated list of alert categories ("supplyChainRisk", "maintenance", "quality", "license", or "vulnerability") that should be excluded */ + "alertCategory.notIn"?: string[]; + /** @description Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertClearedAt.eq"?: string[]; + /** @description Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertClearedAt.lt"?: string[]; + /** @description Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertClearedAt.lte"?: string[]; + /** @description Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertClearedAt.gt"?: string[]; + /** @description Alert cleared at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertClearedAt.gte"?: string[]; + /** @description Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertCreatedAt.eq"?: string[]; + /** @description Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertCreatedAt.lt"?: string[]; + /** @description Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertCreatedAt.lte"?: string[]; + /** @description Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertCreatedAt.gt"?: string[]; + /** @description Alert created at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertCreatedAt.gte"?: string[]; + /** @description CVE ID */ + alertCveId?: string[]; + /** @description CVE ID */ + "alertCveId.notIn"?: string[]; + /** @description CVE title */ + alertCveTitle?: string[]; + /** @description CVE title */ + "alertCveTitle.notIn"?: string[]; + /** @description CWE ID */ + alertCweId?: string[]; + /** @description CWE ID */ + "alertCweId.notIn"?: string[]; + /** @description CWE name */ + alertCweName?: string[]; + /** @description CWE name */ + "alertCweName.notIn"?: string[]; + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + alertEPSS?: string[]; + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + "alertEPSS.notIn"?: string[]; + /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be included */ + alertFixType?: string[]; + /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be excluded */ + "alertFixType.notIn"?: string[]; + /** @description Alert KEV (Known Exploited Vulnerability) filter flag */ + alertKEV?: boolean[]; + /** @description Alert priority ("low", "medium", "high", or "critical") */ + alertPriority?: string[]; + /** @description Alert priority ("low", "medium", "high", or "critical") */ + "alertPriority.notIn"?: string[]; + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be included */ + alertReachabilityAnalysisType?: string[]; + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be excluded */ + "alertReachabilityAnalysisType.notIn"?: string[]; + /** @description Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be included */ + alertReachabilityType?: string[]; + /** @description Comma-separated list of alert CVE reachability types ("direct_dependency", "error", "maybe_reachable", "missing_support", "pending", "reachable", "undeterminable_reachability", "unknown", or "unreachable") that should be excluded */ + "alertReachabilityType.notIn"?: string[]; + /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be included */ + alertSeverity?: string[]; + /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be excluded */ + "alertSeverity.notIn"?: string[]; + /** @description A single alert status ("open" or "cleared") */ + alertStatus?: string[]; + /** @description A single alert status ("open" or "cleared") */ + "alertStatus.notIn"?: string[]; + /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be included */ + alertType?: string[]; + /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be excluded */ + "alertType.notIn"?: string[]; + /** @description Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertUpdatedAt.eq"?: string[]; + /** @description Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertUpdatedAt.lt"?: string[]; + /** @description Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertUpdatedAt.lte"?: string[]; + /** @description Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertUpdatedAt.gt"?: string[]; + /** @description Alert updated at (YYYY-MM-DD HH:MM:SS in UTC time zone) */ + "alertUpdatedAt.gte"?: string[]; + /** @description Name of artifact */ + artifactName?: string[]; + /** @description Name of artifact */ + "artifactName.notIn"?: string[]; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be included */ + artifactType?: string[]; + /** @description Comma-separated list of artifact types (e.g. "npm", "pypi", "gem", "maven", "golang", etc.) that should be excluded */ + "artifactType.notIn"?: string[]; + /** @description Comma-separated list of branch names that should be included */ + branch?: string[]; + /** @description Comma-separated list of branch names that should be excluded */ + "branch.notIn"?: string[]; + /** @description Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be included */ + cvePatchStatus?: string[]; + /** @description Comma-separated list of patch statuses ("patch_unavailable", "patch_available", or "patch_applied") that should be excluded */ + "cvePatchStatus.notIn"?: string[]; + /** @description Dead/reachable dependency filter flag */ + dependencyDead?: boolean[]; + /** @description Development/production dependency filter flag */ + dependencyDev?: boolean[]; + /** @description Direct/transitive dependency filter flag */ + dependencyDirect?: boolean[]; + /** @description Comma-separated list of repo full names that should be included */ + repoFullName?: string[]; + /** @description Comma-separated list of repo full names that should be excluded */ + "repoFullName.notIn"?: string[]; + /** @description Comma-separated list of repo labels that should be included. Use "" to filter for repositories with no labels. */ + repoLabels?: string[]; + /** @description Comma-separated list of repo labels that should be excluded. Use "" to filter for repositories with no labels. */ + "repoLabels.notIn"?: string[]; + /** @description Comma-separated list of repo slugs that should be included */ + repoSlug?: string[]; + /** @description Comma-separated list of repo slugs that should be excluded */ + "repoSlug.notIn"?: string[]; + }; + }; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** * List full scans associated with alert (Beta) + * @description List full scans associated with alert. * - * List full scans associated with alert. * This endpoint consumes 10 units of your quota. + * * This endpoint requires the following org token scopes: - * - alerts:list. + * - alerts:list */ alertFullScans: { parameters: { query: { - /** - * Specify the maximum number of items to return per page (intermediate - * pages may have fewer than this limit and callers should always check - * "endCursor" in response body to know if there are more pages) - */ - per_page?: number - /** - * The pagination cursor that was returned as the "endCursor" property - * in previous request. - */ - startAfterCursor?: string - /** - * One or more alert keys for which to find associated full scans. - */ - alertKey: string - /** - * The number of days of data to fetch as an offset from current date - * (e.g. "-7d" for past 7 days) - */ - range?: string - } + /** @description Specify the maximum number of items to return per page (intermediate pages may have fewer than this limit and callers should always check "endCursor" in response body to know if there are more pages) */ + per_page?: number; + /** @description The pagination cursor that was returned as the "endCursor" property in previous request */ + startAfterCursor?: string; + /** @description One or more alert keys for which to find associated full scans */ + alertKey: string; + /** @description The number of days of data to fetch as an offset from current date (e.g. "-7d" for past 7 days) */ + range?: string; + }; path: { - /** - * The slug of the organization. - */ - org_slug: string - } - } + /** @description The slug of the organization */ + org_slug: string; + }; + }; responses: { - /** - * The paginated array of full scans associated with alert for the - * organization and related metadata. - */ + /** @description The paginated array of full scans associated with alert for the organization and related metadata. */ 200: { content: { - 'application/json': { - /** - * @default - */ - endCursor: string | null - items: Array<{ - /** - * ID of full scan. - * - * @default - */ - fullScanId: string - /** - * @default - */ - branchName: string | null - /** - * Type of branch that was scanned. - * - * @default - * - * @enum {string} - */ - branchType: - | 'default' - | 'non-default' - | 'tracked' - | 'untracked' - | '' - /** - * Full name of repo which contains repo workspace and repo slug. - * - * @default - */ - repoFullName: string | null - /** - * ISO date when SBOM was created. - * - * @default - */ - sbomCreatedAt: string - /** - * ISO date when SBOM was scanned. - * - * @default - */ - scannedAt: string - alertKeys: string[] - }> + "application/json": { + /** @default */ + endCursor: string | null; + items: Array<({ + /** + * @description ID of full scan + * @default + */ + fullScanId: string; + /** @default */ + branchName: string | null; + /** + * @description Type of branch that was scanned + * @default + * @enum {string} + */ + branchType: "default" | "non-default" | "tracked" | "untracked" | ""; + /** + * @description Full name of repo which contains repo workspace and repo slug + * @default + */ + repoFullName: string | null; + /** + * @description ISO date when SBOM was created + * @default + */ + sbomCreatedAt: string; + /** + * @description ISO date when SBOM was scanned + * @default + */ + scannedAt: string; + alertKeys: string[]; + })>; meta: { - /** - * @default - */ - organizationId: string - alertKeys: string[] - /** - * @default 0 - */ - queryStartTimestamp: number - /** - * @default - */ - startDateInclusive: string - /** - * @default - */ - endDateInclusive: string - } - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + /** @default */ + organizationId: string; + alertKeys: string[]; + /** @default 0 */ + queryStartTimestamp: number; + /** @default */ + startDateInclusive: string; + /** @default */ + endDateInclusive: string; + }; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** * License Policy (Beta) + * @description Compare the license data found for a list of packages (given as PURL strings) with the contents of a configurable license policy, + * returning information about license data which does not comply with the license allow list. * - * Compare the license data found for a list of packages (given as PURL - * strings) with the contents of a configurable license policy, returning - * information about license data which does not comply with the license allow - * list. - * - * ## Example request body: + * ## Example request body: * - * ```json - * { - * "components": [ - * { - * "purl": "pkg:npm/lodash@4.17.21" - * }, + * ```json * { - * "purl": "pkg:npm/lodash@4.14.1" + * "components": [ + * { + * "purl": "pkg:npm/lodash@4.17.21" + * }, + * { + * "purl": "pkg:npm/lodash@4.14.1" + * } + * ], + * "allow": [ + * "permissive", + * "pkg:npm/lodash?file_name=foo/test/*&version_glob=4.17.*" + * ], + * "warn": [ + * "copyleft", + * "pkg:npm/lodash?file_name=foo/prod/*&version_glob=4.14.*" + * ], + * "options": ["toplevelOnly"] * } - * ], - * "allow": [ - * "permissive", - * "pkg:npm/lodash?file_name=foo/test/*&version_glob=4.17.*" - * ], - * "warn": [ - * "copyleft", - * "pkg:npm/lodash?file_name=foo/prod/*&version_glob=4.14.*" - * ], - * "options": ["toplevelOnly"] - * } - * ``` + * ``` * - * ## Return value * - * For each requested PURL, an array is returned. Each array contains a list - * of license policy violations detected for the requested PURL. Violations - * are accompanied by a string identifying the offending license data as - * `spdxAtomOrExtraData`, a message describing why the license data is - * believed to be incompatible with the license policy, and a list of - * locations (by filepath or other provenance information) where the offending - * license data may be found. + * ## Return value * - * ```json - * Array< - * Array<{ - * filepathOrProvenance: Array, - * level: "warning" | "violation", - * purl: string, - * spdxAtomOrExtraData: string, - * violationExplanation: string - * }> - * > - * ``` + * For each requested PURL, an array is returned. Each array contains a list of license policy violations + * detected for the requested PURL. * - * ## License policy schema + * Violations are accompanied by a string identifying the offending license data as `spdxAtomOrExtraData`, + * a message describing why the license data is believed to be incompatible with the license policy, and a list + * of locations (by filepath or other provenance information) where the offending license data may be found. + * + * ```json + * Array< + * Array<{ + * filepathOrProvenance: Array, + * level: "warning" | "violation", + * purl: string, + * spdxAtomOrExtraData: string, + * violationExplanation: string + * }> + * > + * ``` + * + * ## License policy schema * * ```json * { - * allow?: Array - * warn?: Array - * options?: Array + * allow?: Array + * warn?: Array + * options?: Array * } * ``` * - * Elements of the `allow` and `warn` arrays strings representing items which - * should be allowed, or which should trigger a warning; license data found in - * package which not present in either array will produce a license violation - * (effectively a "hard" error). For example, to allow Apache-2.0 and MIT to - * the allow list, simply add the strings "Apache-2.0" and "MIT" to the - * `allow` array. Strings appearing in these arrays are generally "what you - * see is what you get", with two important exceptions: strings which are - * recognized as license classes and strings which are recognized as PURLs are - * handled differently to allow for more flexible license policy creation. + * Elements of the `allow` and `warn` arrays strings representing items which should be allowed, or which should trigger a warning; license data found in package which not present in either array will produce a license violation (effectively a "hard" error). For example, to allow Apache-2.0 and MIT to the allow list, simply add the strings "Apache-2.0" and "MIT" to the `allow` array. Strings appearing in these arrays are generally "what you see is what you get", with two important exceptions: strings which are recognized as license classes and strings which are recognized as PURLs are handled differently to allow for more flexible license policy creation. * * ## License Classes * - * Strings which are license classes will expand to a list of licenses known - * to be in that particular license class. Recognized license classes are: - * 'permissive', 'permissive (model)', 'permissive (gold)', 'permissive - * (silver)', 'permissive (bronze)', 'permissive (lead)', 'copyleft', 'maximal - * copyleft', 'network copyleft', 'strong copyleft', 'weak copyleft', - * 'contributor license agreement', 'public domain', 'proprietary free', - * 'source available', 'proprietary', 'commercial', 'patent' Users can learn - * more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and - * [permissive tiers](https://blueoakcouncil.org/list) by reading the linked - * resources. + * Strings which are license classes will expand to a list of licenses known to be in that particular license class. Recognized license classes are: + * 'permissive', + * 'permissive (model)', + * 'permissive (gold)', + * 'permissive (silver)', + * 'permissive (bronze)', + * 'permissive (lead)', + * 'copyleft', + * 'maximal copyleft', + * 'network copyleft', + * 'strong copyleft', + * 'weak copyleft', + * 'contributor license agreement', + * 'public domain', + * 'proprietary free', + * 'source available', + * 'proprietary', + * 'commercial', + * 'patent' + * + * Users can learn more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and [permissive tiers](https://blueoakcouncil.org/list) by reading the linked resources. + * * * ## PURLs * - * Users may also modify their license policy's allow and warn lists by using - * [package URLs](https://github.com/package-url/purl-spec) (aka PURLs), which - * support glob patterns to allow a range of versions, files and directories, - * etc. purl qualifiers which support globs are `filename`, `version_glob`, - * `artifact_id` and `license_provenance` (primarily used for allowing data - * from registry metadata). + * Users may also modify their license policy's allow and warn lists by using [package URLs](https://github.com/package-url/purl-spec) (aka PURLs), which support glob patterns to allow a range of versions, files and directories, etc. * - * ### Examples: + * purl qualifiers which support globs are `filename`, `version_glob`, `artifact_id` and `license_provenance` (primarily used for allowing data from registry metadata). * - * Allow all license data found in a specific version of a package 4.14.1: - * `pkg:npm/lodash@4.14.1` Allow all license data found in a version range of - * a package: `pkg:npm/lodash?version_glob=15.*` Allow all license data in the - * test directory of a given package for certain version ranges: - * `pkg:npm/lodash@15.*.*?file_name=lodash/test/*` Allow all license data - * taken from the package registry for a package and version range: - * `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata` + * ### Examples: + * Allow all license data found in a specific version of a package 4.14.1: `pkg:npm/lodash@4.14.1` + * Allow all license data found in a version range of a package: `pkg:npm/lodash?version_glob=15.*` + * Allow all license data in the test directory of a given package for certain version ranges: `pkg:npm/lodash@15.*.*?file_name=lodash/test/*` + * Allow all license data taken from the package registry for a package and version range: `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata` * * ## Available options * - * `toplevelOnly`: only apply the license policy to "top level" license data - * in a package, which includes registry metadata, LICENSE files, and manifest - * files which are closest to the root of the package. `applyToUnidentified`: - * Apply license policy to found but unidentified license data. If enabled, - * the license policy will be applied to license data which could not be - * affirmatively identified as a known license (this will effectively merge - * the license policy violation and unidentified license alerts). If disabled, - * license policy alerts will only be shown for license data which is - * positively identified as something not allowed or set to warn by the - * license policy. This endpoint consumes 100 units of your quota. This - * endpoint requires the following org token scopes: - * - * - Packages:list - * - License-policy:read + * `toplevelOnly`: only apply the license policy to "top level" license data in a package, which includes registry metadata, LICENSE files, and manifest files which are closest to the root of the package. + * + * `applyToUnidentified`: Apply license policy to found but unidentified license data. If enabled, the license policy will be applied to license data which could not be affirmatively identified as a known license (this will effectively merge the license policy violation and unidentified license alerts). If disabled, license policy alerts will only be shown for license data which is positively identified as something not allowed or set to warn by the license policy. + * + * This endpoint consumes 100 units of your quota. + * + * This endpoint requires the following org token scopes: + * - packages:list + * - license-policy:read */ licensePolicy: { requestBody?: { content: { - 'application/json': components['schemas']['LicenseAllowListRequest'] - } - } + "application/json": components["schemas"]["LicenseAllowListRequest"]; + }; + }; responses: { - /** - * Data about license policy violations, if any exist. - */ + /** @description Data about license policy violations, if any exist */ 200: { content: { - 'application/x-ndjson': Array<{ - filepathOrProvenance: string[] - /** - * @default - */ - level: string - /** - * @default - */ - purl: string - /** - * @default - */ - spdxAtomOrExtraData: string - /** - * @default - */ - violationExplanation: string - }> - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - 500: components['responses']['SocketInternalServerError'] - } - } + "application/x-ndjson": Array<{ + filepathOrProvenance: string[]; + /** @default */ + level: string; + /** @default */ + purl: string; + /** @default */ + spdxAtomOrExtraData: string; + /** @default */ + violationExplanation: string; + }>; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + 500: components["responses"]["SocketInternalServerError"]; + }; + }; /** * Saturate License Policy (Legacy) + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/updateorglicensepolicy) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/updateorglicensepolicy) instead. - * Get the "saturated" version of a license policy's allow list, filling in - * the entire set of allowed license data. For example, the saturated form of - * a license allow list which only specifies that licenses in the tier - * "maximal copyleft" are allowed is shown below (note the expanded - * `allowedStrings` property): + * Get the "saturated" version of a license policy's allow list, filling in the entire set of allowed + * license data. For example, the saturated form of a license allow list which only specifies that + * licenses in the tier "maximal copyleft" are allowed is shown below (note the expanded `allowedStrings` property): * * ```json * { * "allowedApprovalSources": [], * "allowedFamilies": [], - * "allowedTiers": ["maximal copyleft"], + * "allowedTiers": [ + * "maximal copyleft" + * ], * "allowedStrings": [ * "Parity-6.0.0", * "QPL-1.0-INRIA-2004", @@ -25510,19 +20999,19 @@ export interface operations { * } * ``` * - * This may be helpful for users who want to compose more complex sets of - * allowed license data via the "allowedStrings" property, or for users who - * want to know more about the contents of a particular license group (family, - * tier, or approval source). + * This may be helpful for users who want to compose more complex sets of allowed license data via + * the "allowedStrings" property, or for users who want to know more about the contents of a particular + * license group (family, tier, or approval source). * * ## Allow List Schema * * ```json * ``` * - * Where PermissiveTier ::= "model permissive" | "gold" | "silver" | "bronze" - * | "lead" CopyleftTier ::= "maximal copyleft" | "network copyleft" | "strong - * copyleft" | "weak copyleft" + * where + * + * PermissiveTier ::= "model permissive" | "gold" | "silver" | "bronze" | "lead" + * CopyleftTier ::= "maximal copyleft" | "network copyleft" | "strong copyleft" | "weak copyleft" * * ## Return Value * @@ -25530,23 +21019,23 @@ export interface operations { * * ```json * { - * allowedApprovalSources?: Array<"fsf" | "osi">, - * allowedFamilies?: Array<"copyleft" | "permissive">, - * allowedTiers?: Array, - * allowedStrings?: Array - * allowedPURLs?: Array - * focusAlertsHere?: boolean + * allowedApprovalSources?: Array<"fsf" | "osi">, + * allowedFamilies?: Array<"copyleft" | "permissive">, + * allowedTiers?: Array, + * allowedStrings?: Array + * allowedPURLs?: Array + * focusAlertsHere?: boolean * } * ``` * - * Where PermissiveTier ::= "model permissive" | "gold" | "silver" | "bronze" - * | "lead" CopyleftTier ::= "maximal copyleft" | "network copyleft" | "strong - * copyleft" | "weak copyleft" readers can learn more about [copyleft - * tiers](https://blueoakcouncil.org/copyleft) and [permissive - * tiers](https://blueoakcouncil.org/list) by reading the linked resources. + * where * - * ### Example request bodies: + * PermissiveTier ::= "model permissive" | "gold" | "silver" | "bronze" | "lead" + * CopyleftTier ::= "maximal copyleft" | "network copyleft" | "strong copyleft" | "weak copyleft" + * + * readers can learn more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and [permissive tiers](https://blueoakcouncil.org/list) by reading the linked resources. * + * ### Example request bodies: * ```json * { * "allowedApprovalSources": ["fsf"], @@ -25559,1138 +21048,900 @@ export interface operations { * ``` * * This endpoint consumes 100 units of your quota. - * This endpoint requires the following org token scopes: * - * - Packages:list - * - * @deprecated + * This endpoint requires the following org token scopes: + * - packages:list */ saturateLicensePolicy: { requestBody?: { content: { - 'application/json': { - allow: components['schemas']['LicenseAllowList'] - warn: components['schemas']['LicenseAllowList'] - monitor: components['schemas']['LicenseAllowList'] - allowedApprovalSources: string[] | null - allowedFamilies: string[] | null - allowedTiers: string[] | null - allowedStrings: string[] | null - allowedPURLs: string[] | null - /** - * @default false - */ - focusAlertsHere: boolean | null - } - } - } + "application/json": { + allow: components["schemas"]["LicenseAllowList"]; + warn: components["schemas"]["LicenseAllowList"]; + monitor: components["schemas"]["LicenseAllowList"]; + allowedApprovalSources: string[] | null; + allowedFamilies: string[] | null; + allowedTiers: string[] | null; + allowedStrings: string[] | null; + allowedPURLs: string[] | null; + /** @default false */ + focusAlertsHere: boolean | null; + }; + }; + }; responses: { - /** - * Saturated License Allow List. - */ + /** @description Saturated License Allow List */ 200: { content: { - 'application/json': components['schemas']['LicensePolicy'] - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - 500: components['responses']['SocketInternalServerError'] - } - } + "application/json": components["schemas"]["LicensePolicy"]; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + 500: components["responses"]["SocketInternalServerError"]; + }; + }; /** - * License Metadata. + * License Metadata + * @description For an array of license identifiers or names (short form SPDX identifiers, or long form license names), + * returns an array of metadata for the corresponding license, if the license is recognized. If the query + * parameter `includetext=true` is set, the returned metadata will also include the license text. * - * For an array of license identifiers or names (short form SPDX identifiers, - * or long form license names), returns an array of metadata for the - * corresponding license, if the license is recognized. If the query parameter - * `includetext=true` is set, the returned metadata will also include the - * license text. * - * ## Example request body: + * ## Example request body: * - * ```json - * ["Apache-2.0", "BSD Zero Clause License"] - * ``` + * ```json + * [ + * "Apache-2.0", + * "BSD Zero Clause License" + * ] + * ``` * - * ## Return value * - * ```json - * // Response schema: - * Array<{ - * licenseId: string, - * name?: string, - * deprecated?: string, - * crossref?: string - * classes: Array - * text?: string - * }> - * // Example response: - * [ - * { - * "licenseId": "Apache-2.0", - * "name": "Apache License 2.0", - * "deprecated": false, - * "crossref": "https://spdx.org/licenses/Apache-2.0.html", - * "classes": [ - * "fsf libre", - * "osi approved", - * "permissive (silver)" - * ] - * }, - * { - * "licenseId": "0BSD", - * "name": "BSD Zero Clause License", - * "deprecated": false, - * "crossref": "https://spdx.org/licenses/0BSD.html", - * "classes": [ - * "osi approved", - * "permissive (bronze)" - * ] - * } - * ] - * ``` + * ## Return value * - * ## License policy schema + * ```json + * // Response schema: + * Array<{ + * licenseId: string, + * name?: string, + * deprecated?: string, + * crossref?: string + * classes: Array + * text?: string + * }> + * + * // Example response: + * [ + * { + * "licenseId": "Apache-2.0", + * "name": "Apache License 2.0", + * "deprecated": false, + * "crossref": "https://spdx.org/licenses/Apache-2.0.html", + * "classes": [ + * "fsf libre", + * "osi approved", + * "permissive (silver)" + * ] + * }, + * { + * "licenseId": "0BSD", + * "name": "BSD Zero Clause License", + * "deprecated": false, + * "crossref": "https://spdx.org/licenses/0BSD.html", + * "classes": [ + * "osi approved", + * "permissive (bronze)" + * ] + * } + * ] + * ``` + * + * ## License policy schema * * ```json * { - * allow?: Array - * warn?: Array - * options?: Array + * allow?: Array + * warn?: Array + * options?: Array * } * ``` * - * Elements of the `allow` and `warn` arrays strings representing items which - * should be allowed, or which should trigger a warning; license data found in - * package which not present in either array will produce a license violation - * (effectively a "hard" error). For example, to allow Apache-2.0 and MIT to - * the allow list, simply add the strings "Apache-2.0" and "MIT" to the - * `allow` array. Strings appearing in these arrays are generally "what you - * see is what you get", with two important exceptions: strings which are - * recognized as license classes and strings which are recognized as PURLs are - * handled differently to allow for more flexible license policy creation. + * Elements of the `allow` and `warn` arrays strings representing items which should be allowed, or which should trigger a warning; license data found in package which not present in either array will produce a license violation (effectively a "hard" error). For example, to allow Apache-2.0 and MIT to the allow list, simply add the strings "Apache-2.0" and "MIT" to the `allow` array. Strings appearing in these arrays are generally "what you see is what you get", with two important exceptions: strings which are recognized as license classes and strings which are recognized as PURLs are handled differently to allow for more flexible license policy creation. * * ## License Classes * - * Strings which are license classes will expand to a list of licenses known - * to be in that particular license class. Recognized license classes are: - * 'permissive', 'permissive (model)', 'permissive (gold)', 'permissive - * (silver)', 'permissive (bronze)', 'permissive (lead)', 'copyleft', 'maximal - * copyleft', 'network copyleft', 'strong copyleft', 'weak copyleft', - * 'contributor license agreement', 'public domain', 'proprietary free', - * 'source available', 'proprietary', 'commercial', 'patent' Users can learn - * more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and - * [permissive tiers](https://blueoakcouncil.org/list) by reading the linked - * resources. + * Strings which are license classes will expand to a list of licenses known to be in that particular license class. Recognized license classes are: + * 'permissive', + * 'permissive (model)', + * 'permissive (gold)', + * 'permissive (silver)', + * 'permissive (bronze)', + * 'permissive (lead)', + * 'copyleft', + * 'maximal copyleft', + * 'network copyleft', + * 'strong copyleft', + * 'weak copyleft', + * 'contributor license agreement', + * 'public domain', + * 'proprietary free', + * 'source available', + * 'proprietary', + * 'commercial', + * 'patent' + * + * Users can learn more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and [permissive tiers](https://blueoakcouncil.org/list) by reading the linked resources. + * * * ## PURLs * - * Users may also modify their license policy's allow and warn lists by using - * [package URLs](https://github.com/package-url/purl-spec) (aka PURLs), which - * support glob patterns to allow a range of versions, files and directories, - * etc. purl qualifiers which support globs are `filename`, `version_glob`, - * `artifact_id` and `license_provenance` (primarily used for allowing data - * from registry metadata). + * Users may also modify their license policy's allow and warn lists by using [package URLs](https://github.com/package-url/purl-spec) (aka PURLs), which support glob patterns to allow a range of versions, files and directories, etc. * - * ### Examples: + * purl qualifiers which support globs are `filename`, `version_glob`, `artifact_id` and `license_provenance` (primarily used for allowing data from registry metadata). * - * Allow all license data found in a specific version of a package 4.14.1: - * `pkg:npm/lodash@4.14.1` Allow all license data found in a version range of - * a package: `pkg:npm/lodash?version_glob=15.*` Allow all license data in the - * test directory of a given package for certain version ranges: - * `pkg:npm/lodash@15.*.*?file_name=lodash/test/*` Allow all license data - * taken from the package registry for a package and version range: - * `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata` + * ### Examples: + * Allow all license data found in a specific version of a package 4.14.1: `pkg:npm/lodash@4.14.1` + * Allow all license data found in a version range of a package: `pkg:npm/lodash?version_glob=15.*` + * Allow all license data in the test directory of a given package for certain version ranges: `pkg:npm/lodash@15.*.*?file_name=lodash/test/*` + * Allow all license data taken from the package registry for a package and version range: `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata` * * ## Available options * - * `toplevelOnly`: only apply the license policy to "top level" license data - * in a package, which includes registry metadata, LICENSE files, and manifest - * files which are closest to the root of the package. `applyToUnidentified`: - * Apply license policy to found but unidentified license data. If enabled, - * the license policy will be applied to license data which could not be - * affirmatively identified as a known license (this will effectively merge - * the license policy violation and unidentified license alerts). If disabled, - * license policy alerts will only be shown for license data which is - * positively identified as something not allowed or set to warn by the - * license policy. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: + * `toplevelOnly`: only apply the license policy to "top level" license data in a package, which includes registry metadata, LICENSE files, and manifest files which are closest to the root of the package. + * + * `applyToUnidentified`: Apply license policy to found but unidentified license data. If enabled, the license policy will be applied to license data which could not be affirmatively identified as a known license (this will effectively merge the license policy violation and unidentified license alerts). If disabled, license policy alerts will only be shown for license data which is positively identified as something not allowed or set to warn by the license policy. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: */ licenseMetadata: { parameters: { query?: { - /** - * If `true`, the response will include the full text of the requested - * licenses. - */ - includetext?: boolean - } - } + /** @description If `true`, the response will include the full text of the requested licenses */ + includetext?: boolean; + }; + }; requestBody?: { content: { - 'application/json': components['schemas']['SLicenseMetaReq'] - } - } + "application/json": components["schemas"]["SLicenseMetaReq"]; + }; + }; responses: { - /** - * Metadata for the requested licenses. - */ + /** @description Metadata for the requested licenses */ 200: { content: { - 'application/json': components['schemas']['SLicenseMetaRes'] - } - } - 400: components['responses']['SocketBadRequest'] - } - } + "application/json": components["schemas"]["SLicenseMetaRes"]; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + }; + }; /** - * Alert Types Metadata. + * Alert Types Metadata + * @description For an array of alert type identifiers, returns metadata for each alert type. Optionally, specify a language via the 'language' query parameter. * - * For an array of alert type identifiers, returns metadata for each alert - * type. Optionally, specify a language via the 'language' query parameter. - * This endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: */ alertTypes: { parameters: { query?: { - /** - * Language for alert metadata. - */ - language?: 'ach-UG' | 'de-DE' | 'en-US' | 'es-ES' | 'fr-FR' | 'it-IT' - } - } + /** @description Language for alert metadata */ + language?: "ach-UG" | "de-DE" | "en-US" | "es-ES" | "fr-FR" | "it-IT"; + }; + }; requestBody?: { content: { - 'application/json': string[] - } - } + "application/json": string[]; + }; + }; responses: { - /** - * Metadata for the requested alert types. - */ + /** @description Metadata for the requested alert types */ 200: { content: { - 'application/json': Array<{ - /** - * @default - */ - type: string - /** - * @default - */ - title: string - /** - * @default - */ - description: string - /** - * @default - */ - suggestion: string - /** - * @default - */ - emoji: string - /** - * @default - */ - nextStepTitle: string - props: { - [key: string]: string - } | null - }> - } - } - 400: components['responses']['SocketBadRequest'] - } - } + "application/json": Array<({ + /** @default */ + type: string; + /** @default */ + title: string; + /** @default */ + description: string; + /** @default */ + suggestion: string; + /** @default */ + emoji: string; + /** @default */ + nextStepTitle: string; + props: { + [key: string]: string; + } | null; + })>; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + }; + }; /** - * Returns the OpenAPI definition. + * Returns the OpenAPI definition + * @description Retrieve the API specification in an Openapi JSON format. * - * Retrieve the API specification in an Openapi JSON format. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: */ getOpenAPI: { responses: { - /** - * OpenAPI specification. - */ + /** @description OpenAPI specification */ 200: { content: { - 'application/json': unknown - } - } - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": unknown; + }; + }; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Returns the OpenAPI definition. + * Returns the OpenAPI definition + * @description Retrieve the API specification in an Openapi JSON format. * - * Retrieve the API specification in an Openapi JSON format. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: */ getOpenAPIJSON: { responses: { - /** - * OpenAPI specification. - */ + /** @description OpenAPI specification */ 200: { content: { - 'application/json': unknown - } - } - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": unknown; + }; + }; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Get quota. + * Get quota + * @description Get your current API quota. You can use this endpoint to prevent doing requests that might spend all your quota. + * + * This endpoint consumes 0 units of your quota. * - * Get your current API quota. You can use this endpoint to prevent doing - * requests that might spend all your quota. This endpoint consumes 0 units of - * your quota. This endpoint requires the following org token scopes: - No - * Scopes Required, but authentication is required. + * This endpoint requires the following org token scopes: + * - No Scopes Required, but authentication is required */ getQuota: { responses: { - /** - * Quota information. - */ + /** @description Quota information */ 200: { content: { - 'application/json': { - /** - * @default 0 - */ - quota: number - /** - * @default 0 - */ - maxQuota: number - /** - * @default - */ - nextWindowRefresh: string | null - } - } - } - 401: components['responses']['SocketUnauthorized'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": { + /** @default 0 */ + quota: number; + /** @default 0 */ + maxQuota: number; + /** @default */ + nextWindowRefresh: string | null; + }; + }; + }; + 401: components["responses"]["SocketUnauthorized"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * List organizations. + * List organizations + * @description Get information on the current organizations associated with the API token. * - * Get information on the current organizations associated with the API token. * This endpoint consumes 1 unit of your quota. + * * This endpoint requires the following org token scopes: - * - No Scopes Required, but authentication is required. + * - No Scopes Required, but authentication is required */ getOrganizations: { responses: { - /** - * Organizations information. - */ + /** @description Organizations information */ 200: { content: { - 'application/json': { + "application/json": { organizations: { [key: string]: { - /** - * @default - */ - id: string - /** - * @default - */ - name: string | null - /** - * @default - */ - image: string | null - /** - * @default - */ - plan: string - /** - * @default - */ - slug: string - } - } - } - } - } - 401: components['responses']['SocketUnauthorized'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + /** @default */ + id: string; + /** @default */ + name: string | null; + /** @default */ + image: string | null; + /** @default */ + plan: string; + /** @default */ + slug: string; + }; + }; + }; + }; + }; + 401: components["responses"]["SocketUnauthorized"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Calculate settings. + * Calculate settings + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/updateorgsecuritypolicy) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/updateorgsecuritypolicy) - * instead. Get current settings for the requested organizations and default - * settings to allow deferrals. This endpoint consumes 1 unit of your quota. - * This endpoint requires the following org token scopes: + * Get current settings for the requested organizations and default settings to allow deferrals. * - * - No Scopes Required, but authentication is required + * This endpoint consumes 1 unit of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - No Scopes Required, but authentication is required */ postSettings: { - /** - * Array of organization selector objects (with `organization` field holding - * the organization ID) to get settings for. - */ + /** @description Array of organization selector objects (with `organization` field holding the organization ID) to get settings for */ requestBody?: { content: { - 'application/json': Array<{ - /** - * @default - */ - organization?: string - }> - } - } + "application/json": Array<{ + /** @default */ + organization?: string; + }>; + }; + }; responses: { - /** - * Organization settings. Returned object contains default issue rules and - * an array of entries, with each entry representing an organization's - * settings. - */ + /** @description Organization settings. Returned object contains default issue rules and an array of entries, with each entry representing an organization's settings. */ 200: { content: { - 'application/json': { + "application/json": { defaults: { issueRules: { [key: string]: { - /** - * @enum {string} - */ - action?: 'error' | 'ignore' | 'warn' - } - } - } - entries: Array<{ - /** - * @default - */ - start: string | null - settings: { - [key: string]: { - deferTo: string | null - issueRules: { - [key: string]: { - /** - * @enum {string} - */ - action: 'defer' | 'error' | 'ignore' | 'warn' | 'monitor' - } - } - } - } - }> - } - } - } - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + /** @enum {string} */ + action?: "error" | "ignore" | "warn"; + }; + }; + }; + entries: Array<({ + /** @default */ + start: string | null; + settings: { + [key: string]: { + deferTo: string | null; + issueRules: { + [key: string]: { + /** @enum {string} */ + action: "defer" | "error" | "ignore" | "warn" | "monitor"; + }; + }; + }; + }; + })>; + }; + }; + }; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Get supported files for report. - * - * _This endpoint is deprecated._* Deprecated since 2023-01-15. Use the - * [successor version](https://docs.socket.dev/reference/getsupportedfiles) - * instead. This route has been moved to the `orgs/{org_slug}/supported-files` - * endpoint. Get a list of supported files for project report generation. - * Files are categorized first by environment (e.g. NPM or PyPI), then by - * name. Files whose names match the patterns returned by this endpoint can be - * uploaded for report generation. Examples of supported filenames include - * `package.json`, `package-lock.json`, and `yarn.lock`. This endpoint - * consumes 1 unit of your quota. This endpoint requires the following org - * token scopes: - * + * Get supported files for report * @deprecated + * @description **This endpoint is deprecated.** Deprecated since 2023-01-15. Use the [successor version](https://docs.socket.dev/reference/getsupportedfiles) instead. + * + * This route has been moved to the `orgs/{org_slug}/supported-files` endpoint. + * + * Get a list of supported files for project report generation. + * Files are categorized first by environment (e.g. NPM or PyPI), then by name. + * + * Files whose names match the patterns returned by this endpoint can be uploaded for report generation. + * Examples of supported filenames include `package.json`, `package-lock.json`, and `yarn.lock`. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: */ getReportSupportedFiles: { responses: { - /** - * Glob patterns used to match supported files. - */ + /** @description Glob patterns used to match supported files */ 200: { content: { - 'application/json': { + "application/json": { [key: string]: { [key: string]: { - /** - * @default - */ - pattern: string - } - } - } - } - } - 400: components['responses']['SocketBadRequest'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + /** @default */ + pattern: string; + }; + }; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Delete a report. + * Delete a report + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference) instead. Deprecated: Use - * `/orgs/{org_slug}/full-scans` instead. Delete a specific project report - * generated with the GitHub app. This endpoint consumes 10 units of your - * quota. This endpoint requires the following org token scopes: + * Deprecated: Use `/orgs/{org_slug}/full-scans` instead. Delete a specific project report generated with the GitHub app. * - * - Report:write + * This endpoint consumes 10 units of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - report:write */ deleteReport: { parameters: { path: { - id: string - } - } + id: string; + }; + }; responses: { - /** - * Success. - */ + /** @description Success */ 200: { content: { - 'application/json': { - /** - * @default ok - */ - status: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": { + /** @default ok */ + status: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Get list of reports. + * Get list of reports + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference) instead. Deprecated: Use - * `/orgs/{org_slug}/full-scans` instead. Get all your project reports - * generated with the GitHub app. This endpoint consumes 10 units of your - * quota. This endpoint requires the following org token scopes: + * Deprecated: Use `/orgs/{org_slug}/full-scans` instead. Get all your project reports generated with the GitHub app. * - * - Report:list + * This endpoint consumes 10 units of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - report:list */ getReportList: { parameters: { query?: { - /** - * A Unix timestamp in seconds to filter results prior to this date. - */ - from?: string - /** - * When defined, returns only reports for the associated repository - * slug. - */ - repo?: string - } - } + /** @description A Unix timestamp in seconds to filter results prior to this date. */ + from?: string; + /** @description When defined, returns only reports for the associated repository slug. */ + repo?: string; + }; + }; responses: { - /** - * List of project reports. - */ + /** @description List of project reports */ 200: { content: { - 'application/json': Array<{ - /** - * @default - */ - id: string - /** - * @default - */ - url: string - /** - * @default - */ - repo: string - /** - * @default - */ - branch: string - /** - * @default null - */ - pull_requests: Record - /** - * @default - */ - commit: string - /** - * @default - */ - owner: string - /** - * @default - */ - created_at: string - }> - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": Array<{ + /** @default */ + id: string; + /** @default */ + url: string; + /** @default */ + repo: string; + /** @default */ + branch: string; + /** @default null */ + pull_requests: Record; + /** @default */ + commit: string; + /** @default */ + owner: string; + /** @default */ + created_at: string; + }>; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Create a report. + * Create a report + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/createorgfullscan) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/createorgfullscan) instead. - * Deprecated: Use `/orgs/{org_slug}/full-scans` instead. Upload a lockfile to - * get your project analyzed by Socket. You can upload multiple lockfiles in - * the same request, but each filename must be unique. The name of the file - * must be in the supported list. For example, these are valid filenames: - * `package.json`, `folder/package.json` and - * `deep/nested/folder/package.json`. This endpoint consumes 100 units of your - * quota. This endpoint requires the following org token scopes: + * Deprecated: Use `/orgs/{org_slug}/full-scans` instead. * - * - Report:write + * Upload a lockfile to get your project analyzed by Socket. + * You can upload multiple lockfiles in the same request, but each filename must be unique. * - * @deprecated + * The name of the file must be in the supported list. + * + * For example, these are valid filenames: `package.json`, `folder/package.json` and `deep/nested/folder/package.json`. + * + * This endpoint consumes 100 units of your quota. + * + * This endpoint requires the following org token scopes: + * - report:write */ createReport: { parameters: { query?: { - /** - * The workspace of the repository to associate the full-scan with. - */ - workspace?: string - } - } + /** @description The workspace of the repository to associate the full-scan with. */ + workspace?: string; + }; + }; requestBody?: { content: { - 'multipart/form-data': { + "multipart/form-data": { issueRules?: { - [key: string]: boolean - } - [key: string]: undefined - } - } - } + [key: string]: boolean; + }; + [key: string]: undefined; + }; + }; + }; responses: { - /** - * ID and URL of the project report. - */ + /** @description ID and URL of the project report */ 200: { content: { - 'application/json': { - /** - * @default - */ - id: string - /** - * @default - */ - url: string - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": { + /** @default */ + id: string; + /** @default */ + url: string; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * View a report. + * View a report + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/getorgfullscan) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/getorgfullscan) instead. - * Deprecated: Use `/orgs/{org_slug}/full-scans` instead. Get all the issues, - * packages, and scores related to an specific project report. This endpoint - * consumes 10 units of your quota. This endpoint requires the following org - * token scopes: + * Deprecated: Use `/orgs/{org_slug}/full-scans` instead. Get all the issues, packages, and scores related to an specific project report. * - * - Report:read + * This endpoint consumes 10 units of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - report:read */ getReport: { parameters: { path: { - id: string - } - } + id: string; + }; + }; responses: { - /** - * Socket report. - */ + /** @description Socket report */ 200: { content: { - 'application/json': components['schemas']['SocketReport'] - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 410: components['responses']['SocketGone'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": components["schemas"]["SocketReport"]; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 410: components["responses"]["SocketGone"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * List GitHub repositories. + * List GitHub repositories + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/getorgrepolist) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/getorgrepolist) instead. - * Deprecated: Use `/orgs/{org_slug}/repos` instead. Get all GitHub - * repositories associated with a Socket org. This endpoint consumes 1 unit of - * your quota. This endpoint requires the following org token scopes: + * Deprecated: Use `/orgs/{org_slug}/repos` instead. Get all GitHub repositories associated with a Socket org. * - * - Repo:list + * This endpoint consumes 1 unit of your quota. * - * @deprecated + * This endpoint requires the following org token scopes: + * - repo:list */ getRepoList: { parameters: { query?: { - pageToken?: string - } - } + pageToken?: string; + }; + }; responses: { - /** - * List of GitHub repositories associated with the organization. - */ + /** @description List of GitHub repositories associated with the organization. */ 200: { content: { - 'application/json': { - results: Array<{ - /** - * @default - */ - id: string - /** - * @default - */ - created_at: string - /** - * @default - */ - updated_at: string - /** - * @default - */ - github_install_id: string - /** - * @default - */ - github_repo_id: string - /** - * @default - */ - name: string - /** - * @default - */ - github_full_name: string - /** - * @default - */ - organization_id: string | null - /** - * @default - */ - workspace: string - latest_project_report?: { - /** - * @default - */ - id: string - /** - * @default - */ - created_at: string - } - }> - } - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": { + results: Array<({ + /** @default */ + id: string; + /** @default */ + created_at: string; + /** @default */ + updated_at: string; + /** @default */ + github_install_id: string; + /** @default */ + github_repo_id: string; + /** @default */ + name: string; + /** @default */ + github_full_name: string; + /** @default */ + organization_id: string | null; + /** @default */ + workspace: string; + latest_project_report?: { + /** @default */ + id: string; + /** @default */ + created_at: string; + }; + })>; + }; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Get issues by package. + * Get issues by package + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference) instead. Get all the issues - * related with a particular npm package version. This endpoint returns the - * issue type, location, and additional details related to each issue in the - * `props` attribute. You can [see here](https://socket.dev/alerts) the full - * list of issues. This endpoint consumes 1 unit of your quota. This endpoint - * requires the following org token scopes: + * Get all the issues related with a particular npm package version. + * This endpoint returns the issue type, location, and additional details related to each issue in the `props` attribute. * - * - No Scopes Required, but authentication is required + * You can [see here](https://socket.dev/alerts) the full list of issues. * - * @deprecated + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - No Scopes Required, but authentication is required */ getIssuesByNPMPackage: { parameters: { path: { - package: string - version: string - } - } + package: string; + version: string; + }; + }; responses: { - /** - * Socket issue lists. - */ + /** @description Socket issue lists */ 200: { content: { - 'application/json': components['schemas']['SocketIssueList'] - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": components["schemas"]["SocketIssueList"]; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Get score by package. - * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/batchpackagefetch) instead. Get - * all the scores and metrics by category that are used to evaluate the - * package version. - * - * - Depscore: The average of all score factors. (0-1) - * - SupplyChainRisk: Score factors relating to supply chain security (0-1) - * - DownloadCount: The number of downloads for the package. Higher downloads - * contribute to a higher score. - * - SupplyChainRiskIssueLow/Mid/High/Critical: The number of supply chain risk - * issues of varying severity. Lower numbers contribute to a higher score. - * - DependencyCount: The number of production dependencies. Lower count - * contributes to a higher score. - * - DevDependencyCount: The number of development dependencies. Lower count - * contributes to a higher score. - * - TransitiveDependencyCount: The number of transitive dependencies. Lower - * count contributes to a higher score. - * - TotalDependencyCount: The total number of dependencies (production + - * development + transitive). Lower count contributes to a higher score. - * - Quality: Score factors relating to code quality (0-1) - * - QualityIssueLow/Mid/High/Critical: The number of code quality issues of - * varying severity. Lower numbers contribute to a higher score. - * - LinesOfCode: The number of lines of code in the package. Lower count - * contributes to a higher score. - * - ReadmeLength: The length of the package's README file. Longer READMEs - * contribute to a higher score. - * - Maintenance: Score factors relating to package maintenance (0-1) - * - MaintainerCount: The number of maintainers for the package. More - * maintainers contribute to a higher score. - * - VersionsLastWeek/Month/TwoMonths/Year: The number of versions released in - * different time periods. More recent releases contribute to a higher - * score. - * - VersionCount: The total number of versions released. Higher count - * contributes to a higher score. - * - MaintenanceIssueLow/Mid/High/Critical: The number of maintenance issues of - * varying severity. Lower numbers contribute to a higher score. - * - Vulnerability: Score factors relating to package vulnerabilities (0-1) - * - VulnerabilityIssueLow/Mid/High/Critical: The number of vulnerability issues - * of varying severity. Lower numbers contribute to a higher score. - * - DependencyVulnerabilityCount: The number of vulnerabilities in the - * package's dependencies. Lower count contributes to a higher score. - * - VulnerabilityCount: The number of vulnerabilities in the package itself. - * Lower count contributes to a higher score. - * - License: Score factors relating to package licensing (0-1) - * - LicenseIssueLow/Mid/High/Critical: The number of license issues of varying - * severity. Lower numbers contribute to a higher score. - * - LicenseQuality: A score indicating the quality/permissiveness of the - * package's license. Higher quality contributes to a higher score. - * - Miscellaneous: Miscellaneous metadata about the package version. - * - VersionAuthorName/Email: The name and email of the version author. - * - FileCount: The number of files in the package. - * - ByteCount: The total size in bytes of the package. - * - TypeModule: Whether the package declares a "type": "module" field. This - * endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: - * - No Scopes Required, but authentication is required - * + * Get score by package * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/batchpackagefetch) instead. + * + * Get all the scores and metrics by category that are used to evaluate the package version. + * + * - depscore: The average of all score factors. (0-1) + * - supplyChainRisk: Score factors relating to supply chain security (0-1) + * - downloadCount: The number of downloads for the package. Higher downloads contribute to a higher score. + * - supplyChainRiskIssueLow/Mid/High/Critical: The number of supply chain risk issues of varying severity. Lower numbers contribute to a higher score. + * - dependencyCount: The number of production dependencies. Lower count contributes to a higher score. + * - devDependencyCount: The number of development dependencies. Lower count contributes to a higher score. + * - transitiveDependencyCount: The number of transitive dependencies. Lower count contributes to a higher score. + * - totalDependencyCount: The total number of dependencies (production + development + transitive). Lower count contributes to a higher score. + * - quality: Score factors relating to code quality (0-1) + * - qualityIssueLow/Mid/High/Critical: The number of code quality issues of varying severity. Lower numbers contribute to a higher score. + * - linesOfCode: The number of lines of code in the package. Lower count contributes to a higher score. + * - readmeLength: The length of the package's README file. Longer READMEs contribute to a higher score. + * - maintenance: Score factors relating to package maintenance (0-1) + * - maintainerCount: The number of maintainers for the package. More maintainers contribute to a higher score. + * - versionsLastWeek/Month/TwoMonths/Year: The number of versions released in different time periods. More recent releases contribute to a higher score. + * - versionCount: The total number of versions released. Higher count contributes to a higher score. + * - maintenanceIssueLow/Mid/High/Critical: The number of maintenance issues of varying severity. Lower numbers contribute to a higher score. + * - vulnerability: Score factors relating to package vulnerabilities (0-1) + * - vulnerabilityIssueLow/Mid/High/Critical: The number of vulnerability issues of varying severity. Lower numbers contribute to a higher score. + * - dependencyVulnerabilityCount: The number of vulnerabilities in the package's dependencies. Lower count contributes to a higher score. + * - vulnerabilityCount: The number of vulnerabilities in the package itself. Lower count contributes to a higher score. + * - license: Score factors relating to package licensing (0-1) + * - licenseIssueLow/Mid/High/Critical: The number of license issues of varying severity. Lower numbers contribute to a higher score. + * - licenseQuality: A score indicating the quality/permissiveness of the package's license. Higher quality contributes to a higher score. + * - miscellaneous: Miscellaneous metadata about the package version. + * - versionAuthorName/Email: The name and email of the version author. + * - fileCount: The number of files in the package. + * - byteCount: The total size in bytes of the package. + * - typeModule: Whether the package declares a "type": "module" field. + * + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - No Scopes Required, but authentication is required */ getScoreByNPMPackage: { parameters: { path: { - package: string - version: string - } - } + package: string; + version: string; + }; + }; responses: { - /** - * Socket package scores. - */ + /** @description Socket package scores */ 200: { content: { - 'application/json': components['schemas']['SocketPackageScore'] - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": components["schemas"]["SocketPackageScore"]; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** * Get organization analytics (unstable) + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/historicalalertstrend) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/historicalalertstrend) instead. - * Please implement against the [Historical - * dependencies](/reference/historicaldependenciestrend) or [Historical - * alerts](/reference/historicalalertstrend) endpoints. Get analytics data - * regarding the number of alerts found across all active repositories. This - * endpoint consumes 1 unit of your quota. This endpoint requires the - * following org token scopes: + * Please implement against the [Historical dependencies](/reference/historicaldependenciestrend) or [Historical alerts](/reference/historicalalertstrend) endpoints. * - * - Report:write + * Get analytics data regarding the number of alerts found across all active repositories. * - * @deprecated + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - report:write */ getOrgAnalytics: { parameters: { path: { - filter: string - } - } + filter: string; + }; + }; responses: { - /** - * Socket analytics - organization-level data. - */ + /** @description Socket analytics - organization-level data */ 200: { content: { - 'application/json': Array<{ - /** - * @default 0 - */ - id: number - /** - * @default - */ - created_at: string - /** - * @default - */ - repository_id: string - /** - * @default 0 - */ - organization_id: number - /** - * @default - */ - repository_name: string - /** - * @default 0 - */ - total_critical_alerts: number - /** - * @default 0 - */ - total_high_alerts: number - /** - * @default 0 - */ - total_medium_alerts: number - /** - * @default 0 - */ - total_low_alerts: number - /** - * @default 0 - */ - total_critical_added: number - /** - * @default 0 - */ - total_high_added: number - /** - * @default 0 - */ - total_medium_added: number - /** - * @default 0 - */ - total_low_added: number - /** - * @default 0 - */ - total_critical_prevented: number - /** - * @default 0 - */ - total_high_prevented: number - /** - * @default 0 - */ - total_medium_prevented: number - /** - * @default 0 - */ - total_low_prevented: number - /** - * @default {} - */ - top_five_alert_types: Record - }> - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } + "application/json": Array<{ + /** @default 0 */ + id: number; + /** @default */ + created_at: string; + /** @default */ + repository_id: string; + /** @default 0 */ + organization_id: number; + /** @default */ + repository_name: string; + /** @default 0 */ + total_critical_alerts: number; + /** @default 0 */ + total_high_alerts: number; + /** @default 0 */ + total_medium_alerts: number; + /** @default 0 */ + total_low_alerts: number; + /** @default 0 */ + total_critical_added: number; + /** @default 0 */ + total_high_added: number; + /** @default 0 */ + total_medium_added: number; + /** @default 0 */ + total_low_added: number; + /** @default 0 */ + total_critical_prevented: number; + /** @default 0 */ + total_high_prevented: number; + /** @default 0 */ + total_medium_prevented: number; + /** @default 0 */ + total_low_prevented: number; + /** @default {} */ + top_five_alert_types: Record; + }>; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; /** - * Get repository analytics. + * Get repository analytics + * @deprecated + * @description **This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/historicalalertstrend) instead. * - * _This endpoint is deprecated._* Use the [successor - * version](https://docs.socket.dev/reference/historicalalertstrend) instead. - * Please implement against the [Historical - * dependencies](/reference/historicaldependenciestrend) or [Historical - * alerts](/reference/historicalalertstrend) endpoints. Get analytics data - * regarding the number of alerts found in a single repository. This endpoint - * consumes 1 unit of your quota. This endpoint requires the following org - * token scopes: + * Please implement against the [Historical dependencies](/reference/historicaldependenciestrend) or [Historical alerts](/reference/historicalalertstrend) endpoints. * - * - Report:write + * Get analytics data regarding the number of alerts found in a single repository. * - * @deprecated + * This endpoint consumes 1 unit of your quota. + * + * This endpoint requires the following org token scopes: + * - report:write */ getRepoAnalytics: { parameters: { path: { - name: string - filter: string - } - } + name: string; + filter: string; + }; + }; responses: { - /** - * Socket analytics - repo-level data. - */ + /** @description Socket analytics - repo-level data */ 200: { content: { - 'application/json': Array<{ - /** - * @default 0 - */ - id: number - /** - * @default - */ - repository_id: string - /** - * @default - */ - created_at: string - /** - * @default 0 - */ - organization_id: number - /** - * @default - */ - repository_name: string - /** - * @default 0 - */ - total_critical_alerts: number - /** - * @default 0 - */ - total_high_alerts: number - /** - * @default 0 - */ - total_medium_alerts: number - /** - * @default 0 - */ - total_low_alerts: number - /** - * @default 0 - */ - total_critical_added: number - /** - * @default 0 - */ - total_high_added: number - /** - * @default 0 - */ - total_medium_added: number - /** - * @default 0 - */ - total_low_added: number - /** - * @default 0 - */ - total_critical_prevented: number - /** - * @default 0 - */ - total_high_prevented: number - /** - * @default 0 - */ - total_medium_prevented: number - /** - * @default 0 - */ - total_low_prevented: number - /** - * @default {} - */ - top_five_alert_types: Record - }> - } - } - 400: components['responses']['SocketBadRequest'] - 401: components['responses']['SocketUnauthorized'] - 403: components['responses']['SocketForbidden'] - 404: components['responses']['SocketNotFoundResponse'] - 429: components['responses']['SocketTooManyRequestsResponse'] - } - } // SDK v3 method name aliases for TypeScript compatibility. + "application/json": Array<{ + /** @default 0 */ + id: number; + /** @default */ + repository_id: string; + /** @default */ + created_at: string; + /** @default 0 */ + organization_id: number; + /** @default */ + repository_name: string; + /** @default 0 */ + total_critical_alerts: number; + /** @default 0 */ + total_high_alerts: number; + /** @default 0 */ + total_medium_alerts: number; + /** @default 0 */ + total_low_alerts: number; + /** @default 0 */ + total_critical_added: number; + /** @default 0 */ + total_high_added: number; + /** @default 0 */ + total_medium_added: number; + /** @default 0 */ + total_low_added: number; + /** @default 0 */ + total_critical_prevented: number; + /** @default 0 */ + total_high_prevented: number; + /** @default 0 */ + total_medium_prevented: number; + /** @default 0 */ + total_low_prevented: number; + /** @default {} */ + top_five_alert_types: Record; + }>; + }; + }; + 400: components["responses"]["SocketBadRequest"]; + 401: components["responses"]["SocketUnauthorized"]; + 403: components["responses"]["SocketForbidden"]; + 404: components["responses"]["SocketNotFoundResponse"]; + 429: components["responses"]["SocketTooManyRequestsResponse"]; + }; + }; // SDK v3 method name aliases for TypeScript compatibility. // These map the new SDK method names to their underlying OpenAPI operation names. listOrganizations: operations['getOrganizations'] listRepositories: operations['getOrgRepoList'] @@ -26704,4 +21955,5 @@ export interface operations { streamFullScan: operations['getOrgFullScan'] deleteFullScan: operations['deleteOrgFullScan'] getFullScanMetadata: operations['getOrgFullScanMetadata'] + }