diff --git a/openapi.json b/openapi.json index e4abdf9e..aaeb8ba0 100644 --- a/openapi.json +++ b/openapi.json @@ -3,7 +3,7 @@ "info": { "description": "Specification of the Socket API endpoints", "title": "API Endpoints", - "version": "0.1.0" + "version": "0" }, "servers": [ { @@ -23,6 +23,9 @@ { "name": "Full Scans" }, + { + "name": "Fixes" + }, { "name": "Diff Scans" }, @@ -56,11 +59,17 @@ { "name": "API Tokens" }, + { + "name": "Webhooks" + }, { "name": "Metadata" }, { "name": "Deprecated" + }, + { + "name": "Telemetry" } ], "components": { @@ -373,6 +382,25 @@ "_type", "value" ] + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "_type": { + "type": "string", + "enum": [ + "summary" + ] + }, + "value": { + "$ref": "#/components/schemas/PurlSummarySchema" + } + }, + "required": [ + "_type", + "value" + ] } ] }, @@ -436,6 +464,9 @@ "score": { "$ref": "#/components/schemas/SocketScore" }, + "patch": { + "$ref": "#/components/schemas/SocketArtifactPatch" + }, "inputPurl": { "type": "string", "description": "Original unmodified PURL input string before normalization", @@ -1247,6 +1278,16 @@ "description": "", "nullable": true }, + "deny": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "", + "nullable": true + }, "options": { "type": "array", "items": { @@ -1260,6 +1301,7 @@ }, "required": [ "allow", + "deny", "monitor", "options", "warn" @@ -1573,6 +1615,49 @@ "inputPurl" ] }, + "PurlSummarySchema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "purl_input": { + "type": "integer", + "description": "", + "default": 0 + }, + "resolved": { + "type": "integer", + "description": "", + "default": 0 + }, + "errors": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "purl_malformed": { + "type": "integer", + "description": "", + "default": 0 + }, + "package_not_found": { + "type": "integer", + "description": "", + "default": 0 + } + }, + "required": [ + "package_not_found", + "purl_malformed" + ] + } + }, + "required": [ + "errors", + "purl_input", + "resolved" + ] + }, "SocketBatchPURLRequest": { "type": "object", "additionalProperties": false, @@ -1731,7 +1816,6 @@ "fix": { "type": "object", "additionalProperties": false, - "description": "", "properties": { "type": { "type": "string", @@ -1742,6 +1826,39 @@ "type": "string", "description": "Human-readable description of how to fix this issue", "default": "" + }, + "patch": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "description": "Unique identifier for this patch", + "default": "" + }, + "tier": { + "type": "string", + "enum": [ + "free", + "paid" + ], + "description": "Access tier required for this patch (free or paid)", + "default": "free" + }, + "deprecated": { + "type": "boolean", + "default": false, + "description": "Indicates if this patch is deprecated and should not be used" + } + }, + "required": [ + "tier", + "uuid" + ] + }, + "description": "Patches available to fix this specific alert" } }, "required": [ @@ -1749,6 +1866,9 @@ "type" ] }, + "patch": { + "$ref": "#/components/schemas/SocketPatch" + }, "reachability": { "type": "object", "additionalProperties": false, @@ -1761,6 +1881,11 @@ } }, "description": "" + }, + "subType": { + "type": "string", + "description": "Generic alert sub-type", + "default": "" } }, "required": [ @@ -1768,6 +1893,23 @@ "type" ] }, + "SocketArtifactPatch": { + "type": "object", + "additionalProperties": false, + "properties": { + "appliedPatch": { + "$ref": "#/components/schemas/SocketPatch" + }, + "availablePatches": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SocketPatch" + }, + "description": "List of available patches that can be applied to fix vulnerabilities" + } + }, + "description": "" + }, "LicenseDetails": { "type": "array", "items": { @@ -4346,7 +4488,7 @@ "type": { "type": "string", "enum": [ - "licenseSpdxDisj" + "ghaArgToSink" ] }, "value": { @@ -4368,17 +4510,17 @@ "additionalProperties": false, "description": "", "properties": { - "spdxDisj": { + "message": { "type": "string", "description": "", "default": "" }, - "licenseScanResult": { - "type": "string", + "sourceLocation": { + "type": "object", "description": "", - "default": "" + "default": null }, - "violationData": { + "sinkLocations": { "type": "array", "items": { "type": "object", @@ -4386,8 +4528,67 @@ "default": null }, "description": "" + } + }, + "required": [ + "message", + "sinkLocations", + "sourceLocation" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "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": "" }, - "warnData": { + "sourceLocation": { + "type": "object", + "description": "", + "default": null + }, + "sinkLocations": { "type": "array", "items": { "type": "object", @@ -4395,8 +4596,67 @@ "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": "" }, - "monitorData": { + "sourceLocation": { + "type": "object", + "description": "", + "default": null + }, + "sinkLocations": { "type": "array", "items": { "type": "object", @@ -4407,11 +4667,9 @@ } }, "required": [ - "licenseScanResult", - "monitorData", - "spdxDisj", - "violationData", - "warnData" + "message", + "sinkLocations", + "sourceLocation" ] }, "usage": { @@ -4434,7 +4692,7 @@ "type": { "type": "string", "enum": [ - "unsafeCopyright" + "ghaArgToOutput" ] }, "value": { @@ -4455,7 +4713,32 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "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" @@ -4477,7 +4760,7 @@ "type": { "type": "string", "enum": [ - "licenseChange" + "ghaArgToEnv" ] }, "value": { @@ -4499,20 +4782,30 @@ "additionalProperties": false, "description": "", "properties": { - "prevLicenseId": { + "message": { "type": "string", "description": "", "default": "" }, - "newLicenseId": { - "type": "string", + "sourceLocation": { + "type": "object", "description": "", - "default": "" + "default": null + }, + "sinkLocations": { + "type": "array", + "items": { + "type": "object", + "description": "", + "default": null + }, + "description": "" } }, "required": [ - "newLicenseId", - "prevLicenseId" + "message", + "sinkLocations", + "sourceLocation" ] }, "usage": { @@ -4535,7 +4828,7 @@ "type": { "type": "string", "enum": [ - "nonOSILicense" + "ghaContextToOutput" ] }, "value": { @@ -4557,14 +4850,30 @@ "additionalProperties": false, "description": "", "properties": { - "licenseId": { + "message": { "type": "string", "description": "", "default": "" + }, + "sourceLocation": { + "type": "object", + "description": "", + "default": null + }, + "sinkLocations": { + "type": "array", + "items": { + "type": "object", + "description": "", + "default": null + }, + "description": "" } }, "required": [ - "licenseId" + "message", + "sinkLocations", + "sourceLocation" ] }, "usage": { @@ -4587,7 +4896,7 @@ "type": { "type": "string", "enum": [ - "deprecatedLicense" + "ghaContextToEnv" ] }, "value": { @@ -4609,14 +4918,30 @@ "additionalProperties": false, "description": "", "properties": { - "licenseId": { + "message": { "type": "string", "description": "", "default": "" + }, + "sourceLocation": { + "type": "object", + "description": "", + "default": null + }, + "sinkLocations": { + "type": "array", + "items": { + "type": "object", + "description": "", + "default": null + }, + "description": "" } }, "required": [ - "licenseId" + "message", + "sinkLocations", + "sourceLocation" ] }, "usage": { @@ -4639,7 +4964,7 @@ "type": { "type": "string", "enum": [ - "missingLicense" + "licenseSpdxDisj" ] }, "value": { @@ -4660,7 +4985,52 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "spdxDisj": { + "type": "string", + "description": "", + "default": "" + }, + "licenseScanResult": { + "type": "string", + "description": "", + "default": "" + }, + "violationData": { + "type": "array", + "items": { + "type": "object", + "description": "", + "default": null + }, + "description": "" + }, + "warnData": { + "type": "array", + "items": { + "type": "object", + "description": "", + "default": null + }, + "description": "" + }, + "monitorData": { + "type": "array", + "items": { + "type": "object", + "description": "", + "default": null + }, + "description": "" + } + }, + "required": [ + "licenseScanResult", + "monitorData", + "spdxDisj", + "violationData", + "warnData" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -4682,7 +5052,7 @@ "type": { "type": "string", "enum": [ - "nonSPDXLicense" + "unsafeCopyright" ] }, "value": { @@ -4725,7 +5095,7 @@ "type": { "type": "string", "enum": [ - "unclearLicense" + "licenseChange" ] }, "value": { @@ -4747,14 +5117,20 @@ "additionalProperties": false, "description": "", "properties": { - "possibleLicenseId": { + "prevLicenseId": { + "type": "string", + "description": "", + "default": "" + }, + "newLicenseId": { "type": "string", "description": "", "default": "" } }, "required": [ - "possibleLicenseId" + "newLicenseId", + "prevLicenseId" ] }, "usage": { @@ -4777,7 +5153,7 @@ "type": { "type": "string", "enum": [ - "mixedLicense" + "nonOSILicense" ] }, "value": { @@ -4829,7 +5205,7 @@ "type": { "type": "string", "enum": [ - "notice" + "deprecatedLicense" ] }, "value": { @@ -4850,7 +5226,16 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "licenseId": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "licenseId" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -4872,7 +5257,7 @@ "type": { "type": "string", "enum": [ - "modifiedLicense" + "missingLicense" ] }, "value": { @@ -4893,22 +5278,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "licenseId": { - "type": "string", - "description": "", - "default": "" - }, - "similarity": { - "type": "number", - "description": "", - "default": 0 - } - }, - "required": [ - "licenseId", - "similarity" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -4930,7 +5300,7 @@ "type": { "type": "string", "enum": [ - "modifiedException" + "nonSPDXLicense" ] }, "value": { @@ -4951,28 +5321,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "exceptionId": { - "type": "string", - "description": "", - "default": "" - }, - "similarity": { - "type": "number", - "description": "", - "default": 0 - }, - "comments": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "comments", - "exceptionId", - "similarity" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -4994,7 +5343,7 @@ "type": { "type": "string", "enum": [ - "licenseException" + "unclearLicense" ] }, "value": { @@ -5016,20 +5365,14 @@ "additionalProperties": false, "description": "", "properties": { - "exceptionId": { - "type": "string", - "description": "", - "default": "" - }, - "comments": { + "possibleLicenseId": { "type": "string", "description": "", "default": "" } }, "required": [ - "comments", - "exceptionId" + "possibleLicenseId" ] }, "usage": { @@ -5052,7 +5395,7 @@ "type": { "type": "string", "enum": [ - "deprecatedException" + "mixedLicense" ] }, "value": { @@ -5074,20 +5417,14 @@ "additionalProperties": false, "description": "", "properties": { - "exceptionId": { - "type": "string", - "description": "", - "default": "" - }, - "comments": { + "licenseId": { "type": "string", "description": "", "default": "" } }, "required": [ - "comments", - "exceptionId" + "licenseId" ] }, "usage": { @@ -5110,7 +5447,7 @@ "type": { "type": "string", "enum": [ - "miscLicenseIssues" + "notice" ] }, "value": { @@ -5131,22 +5468,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "description": { - "type": "string", - "description": "", - "default": "" - }, - "location": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "description", - "location" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -5168,7 +5490,7 @@ "type": { "type": "string", "enum": [ - "unidentifiedLicense" + "modifiedLicense" ] }, "value": { @@ -5190,32 +5512,20 @@ "additionalProperties": false, "description": "", "properties": { - "location": { - "type": "string", - "description": "", - "default": "" - }, - "maybeByteSpan": { - "type": "object", - "description": "", - "default": {} - }, - "maybeTruncatedSource": { + "licenseId": { "type": "string", "description": "", "default": "" }, - "match_strength": { - "type": "integer", + "similarity": { + "type": "number", "description": "", "default": 0 } }, "required": [ - "location", - "match_strength", - "maybeByteSpan", - "maybeTruncatedSource" + "licenseId", + "similarity" ] }, "usage": { @@ -5238,7 +5548,7 @@ "type": { "type": "string", "enum": [ - "noLicenseFound" + "modifiedException" ] }, "value": { @@ -5259,7 +5569,28 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "exceptionId": { + "type": "string", + "description": "", + "default": "" + }, + "similarity": { + "type": "number", + "description": "", + "default": 0 + }, + "comments": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "comments", + "exceptionId", + "similarity" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -5281,7 +5612,7 @@ "type": { "type": "string", "enum": [ - "explicitlyUnlicensedItem" + "licenseException" ] }, "value": { @@ -5303,26 +5634,20 @@ "additionalProperties": false, "description": "", "properties": { - "location": { + "exceptionId": { "type": "string", "description": "", "default": "" }, - "maybeByteSpan": { - "type": "object", - "description": "", - "default": {} - }, - "maybeTruncatedSource": { + "comments": { "type": "string", "description": "", "default": "" } }, "required": [ - "location", - "maybeByteSpan", - "maybeTruncatedSource" + "comments", + "exceptionId" ] }, "usage": { @@ -5345,7 +5670,7 @@ "type": { "type": "string", "enum": [ - "copyleftLicense" + "deprecatedException" ] }, "value": { @@ -5367,14 +5692,20 @@ "additionalProperties": false, "description": "", "properties": { - "licenseId": { + "exceptionId": { + "type": "string", + "description": "", + "default": "" + }, + "comments": { "type": "string", "description": "", "default": "" } }, "required": [ - "licenseId" + "comments", + "exceptionId" ] }, "usage": { @@ -5397,7 +5728,7 @@ "type": { "type": "string", "enum": [ - "nonpermissiveLicense" + "miscLicenseIssues" ] }, "value": { @@ -5419,14 +5750,20 @@ "additionalProperties": false, "description": "", "properties": { - "licenseId": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "location": { "type": "string", "description": "", "default": "" } }, "required": [ - "licenseId" + "description", + "location" ] }, "usage": { @@ -5449,7 +5786,7 @@ "type": { "type": "string", "enum": [ - "ambiguousClassifier" + "unidentifiedLicense" ] }, "value": { @@ -5471,26 +5808,32 @@ "additionalProperties": false, "description": "", "properties": { - "classifier": { + "location": { "type": "string", "description": "", "default": "" }, - "filepathOrProvenance": { + "maybeByteSpan": { + "type": "object", + "description": "", + "default": {} + }, + "maybeTruncatedSource": { "type": "string", "description": "", "default": "" }, - "maybeByteSpan": { - "type": "object", + "match_strength": { + "type": "integer", "description": "", - "default": {} + "default": 0 } }, "required": [ - "classifier", - "filepathOrProvenance", - "maybeByteSpan" + "location", + "match_strength", + "maybeByteSpan", + "maybeTruncatedSource" ] }, "usage": { @@ -5513,7 +5856,7 @@ "type": { "type": "string", "enum": [ - "invalidPackageJSON" + "noLicenseFound" ] }, "value": { @@ -5556,7 +5899,7 @@ "type": { "type": "string", "enum": [ - "httpDependency" + "explicitlyUnlicensedItem" ] }, "value": { @@ -5578,20 +5921,26 @@ "additionalProperties": false, "description": "", "properties": { - "packageName": { + "location": { "type": "string", "description": "", "default": "" }, - "url": { + "maybeByteSpan": { + "type": "object", + "description": "", + "default": {} + }, + "maybeTruncatedSource": { "type": "string", "description": "", "default": "" } }, "required": [ - "packageName", - "url" + "location", + "maybeByteSpan", + "maybeTruncatedSource" ] }, "usage": { @@ -5614,7 +5963,7 @@ "type": { "type": "string", "enum": [ - "gitDependency" + "copyleftLicense" ] }, "value": { @@ -5636,20 +5985,14 @@ "additionalProperties": false, "description": "", "properties": { - "packageName": { - "type": "string", - "description": "", - "default": "" - }, - "url": { + "licenseId": { "type": "string", "description": "", "default": "" } }, "required": [ - "packageName", - "url" + "licenseId" ] }, "usage": { @@ -5672,7 +6015,7 @@ "type": { "type": "string", "enum": [ - "gitHubDependency" + "nonpermissiveLicense" ] }, "value": { @@ -5694,32 +6037,14 @@ "additionalProperties": false, "description": "", "properties": { - "packageName": { - "type": "string", - "description": "", - "default": "" - }, - "githubUser": { - "type": "string", - "description": "", - "default": "" - }, - "githubRepo": { - "type": "string", - "description": "", - "default": "" - }, - "commitsh": { + "licenseId": { "type": "string", "description": "", "default": "" } }, "required": [ - "commitsh", - "githubRepo", - "githubUser", - "packageName" + "licenseId" ] }, "usage": { @@ -5742,7 +6067,7 @@ "type": { "type": "string", "enum": [ - "fileDependency" + "ambiguousClassifier" ] }, "value": { @@ -5764,20 +6089,26 @@ "additionalProperties": false, "description": "", "properties": { - "packageName": { + "classifier": { "type": "string", "description": "", "default": "" }, - "filePath": { + "filepathOrProvenance": { "type": "string", "description": "", "default": "" + }, + "maybeByteSpan": { + "type": "object", + "description": "", + "default": {} } }, "required": [ - "filePath", - "packageName" + "classifier", + "filepathOrProvenance", + "maybeByteSpan" ] }, "usage": { @@ -5800,93 +6131,7 @@ "type": { "type": "string", "enum": [ - "noTests" - ] - }, - "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": [ - "noRepository" - ] - }, - "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": [ - "badSemver" + "invalidPackageJSON" ] }, "value": { @@ -5929,7 +6174,7 @@ "type": { "type": "string", "enum": [ - "badSemverDependency" + "httpDependency" ] }, "value": { @@ -5956,7 +6201,7 @@ "description": "", "default": "" }, - "packageVersion": { + "url": { "type": "string", "description": "", "default": "" @@ -5964,7 +6209,7 @@ }, "required": [ "packageName", - "packageVersion" + "url" ] }, "usage": { @@ -5987,50 +6232,7 @@ "type": { "type": "string", "enum": [ - "noV1" - ] - }, - "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": [ - "noWebsite" + "gitDependency" ] }, "value": { @@ -6051,7 +6253,22 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "packageName": { + "type": "string", + "description": "", + "default": "" + }, + "url": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "packageName", + "url" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -6073,7 +6290,7 @@ "type": { "type": "string", "enum": [ - "noBugTracker" + "gitHubDependency" ] }, "value": { @@ -6094,7 +6311,34 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "packageName": { + "type": "string", + "description": "", + "default": "" + }, + "githubUser": { + "type": "string", + "description": "", + "default": "" + }, + "githubRepo": { + "type": "string", + "description": "", + "default": "" + }, + "commitsh": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "commitsh", + "githubRepo", + "githubUser", + "packageName" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -6116,7 +6360,7 @@ "type": { "type": "string", "enum": [ - "noAuthorData" + "fileDependency" ] }, "value": { @@ -6137,7 +6381,22 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "packageName": { + "type": "string", + "description": "", + "default": "" + }, + "filePath": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "filePath", + "packageName" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -6159,7 +6418,7 @@ "type": { "type": "string", "enum": [ - "typeModuleCompatibility" + "noTests" ] }, "value": { @@ -6202,7 +6461,7 @@ "type": { "type": "string", "enum": [ - "floatingDependency" + "noRepository" ] }, "value": { @@ -6223,16 +6482,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "dependency": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "dependency" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -6254,7 +6504,7 @@ "type": { "type": "string", "enum": [ - "manifestConfusion" + "badSemver" ] }, "value": { @@ -6275,22 +6525,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "key": { - "type": "string", - "description": "", - "default": "" - }, - "description": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "description", - "key" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -6312,7 +6547,7 @@ "type": { "type": "string", "enum": [ - "malware" + "badSemverDependency" ] }, "value": { @@ -6334,78 +6569,20 @@ "additionalProperties": false, "description": "", "properties": { - "id": { - "type": "integer", - "description": "", - "default": 0 - }, - "note": { + "packageName": { "type": "string", "description": "", "default": "" - } - }, - "required": [ - "id", - "note" - ] - }, - "usage": { - "$ref": "#/components/schemas/SocketUsageRef" - } - }, - "required": [ - "description", - "props" - ] - } - ] - } - } - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": [ - "telemetry" - ] - }, - "value": { - "allOf": [ - { - "$ref": "#/components/schemas/SocketIssueBasics" - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "description": { - "type": "string", - "description": "", - "default": "" - }, - "props": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "id": { - "type": "integer", - "description": "", - "default": 0 }, - "note": { + "packageVersion": { "type": "string", "description": "", "default": "" } }, "required": [ - "id", - "note" + "packageName", + "packageVersion" ] }, "usage": { @@ -6428,7 +6605,7 @@ "type": { "type": "string", "enum": [ - "troll" + "noV1" ] }, "value": { @@ -6449,22 +6626,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "id": { - "type": "integer", - "description": "", - "default": 0 - }, - "note": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "id", - "note" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -6486,7 +6648,7 @@ "type": { "type": "string", "enum": [ - "deprecated" + "noWebsite" ] }, "value": { @@ -6507,16 +6669,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "reason": { - "type": "string", - "description": "", - "default": "This package is deprecated" - } - }, - "required": [ - "reason" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -6538,7 +6691,7 @@ "type": { "type": "string", "enum": [ - "chronoAnomaly" + "noBugTracker" ] }, "value": { @@ -6559,34 +6712,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "prevChronoDate": { - "type": "string", - "description": "", - "default": "" - }, - "prevChronoVersion": { - "type": "string", - "description": "", - "default": "" - }, - "prevSemverDate": { - "type": "string", - "description": "", - "default": "" - }, - "prevSemverVersion": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "prevChronoDate", - "prevChronoVersion", - "prevSemverDate", - "prevSemverVersion" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -6608,7 +6734,7 @@ "type": { "type": "string", "enum": [ - "compromisedSSHKey" + "noAuthorData" ] }, "value": { @@ -6629,28 +6755,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "fingerprint": { - "type": "string", - "description": "", - "default": "" - }, - "sshKey": { - "type": "string", - "description": "", - "default": "" - }, - "username": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "fingerprint", - "sshKey", - "username" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -6672,7 +6777,7 @@ "type": { "type": "string", "enum": [ - "semverAnomaly" + "typeModuleCompatibility" ] }, "value": { @@ -6693,22 +6798,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "prevVersion": { - "type": "string", - "description": "", - "default": "" - }, - "newVersion": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "newVersion", - "prevVersion" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -6730,7 +6820,7 @@ "type": { "type": "string", "enum": [ - "newAuthor" + "floatingDependency" ] }, "value": { @@ -6752,20 +6842,14 @@ "additionalProperties": false, "description": "", "properties": { - "prevAuthor": { - "type": "string", - "description": "", - "default": "" - }, - "newAuthor": { + "dependency": { "type": "string", "description": "", "default": "" } }, "required": [ - "newAuthor", - "prevAuthor" + "dependency" ] }, "usage": { @@ -6788,7 +6872,7 @@ "type": { "type": "string", "enum": [ - "unstableOwnership" + "manifestConfusion" ] }, "value": { @@ -6810,14 +6894,20 @@ "additionalProperties": false, "description": "", "properties": { - "author": { + "key": { + "type": "string", + "description": "", + "default": "" + }, + "description": { "type": "string", "description": "", "default": "" } }, "required": [ - "author" + "description", + "key" ] }, "usage": { @@ -6840,7 +6930,7 @@ "type": { "type": "string", "enum": [ - "missingAuthor" + "malware" ] }, "value": { @@ -6861,7 +6951,22 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "id": { + "type": "integer", + "description": "", + "default": 0 + }, + "note": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "id", + "note" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -6883,7 +6988,7 @@ "type": { "type": "string", "enum": [ - "unmaintained" + "telemetry" ] }, "value": { @@ -6905,14 +7010,20 @@ "additionalProperties": false, "description": "", "properties": { - "lastPublish": { + "id": { + "type": "integer", + "description": "", + "default": 0 + }, + "note": { "type": "string", "description": "", "default": "" } }, "required": [ - "lastPublish" + "id", + "note" ] }, "usage": { @@ -6935,7 +7046,7 @@ "type": { "type": "string", "enum": [ - "unpublished" + "troll" ] }, "value": { @@ -6957,14 +7068,20 @@ "additionalProperties": false, "description": "", "properties": { - "version": { + "id": { + "type": "integer", + "description": "", + "default": 0 + }, + "note": { "type": "string", "description": "", "default": "" } }, "required": [ - "version" + "id", + "note" ] }, "usage": { @@ -6987,7 +7104,7 @@ "type": { "type": "string", "enum": [ - "majorRefactor" + "deprecated" ] }, "value": { @@ -7009,32 +7126,14 @@ "additionalProperties": false, "description": "", "properties": { - "linesChanged": { - "type": "integer", - "description": "", - "default": 0 - }, - "prevSize": { - "type": "integer", - "description": "", - "default": 0 - }, - "curSize": { - "type": "integer", - "description": "", - "default": 0 - }, - "changedPercent": { - "type": "integer", + "reason": { + "type": "string", "description": "", - "default": 0 + "default": "This package is deprecated" } }, "required": [ - "changedPercent", - "curSize", - "linesChanged", - "prevSize" + "reason" ] }, "usage": { @@ -7057,7 +7156,7 @@ "type": { "type": "string", "enum": [ - "missingTarball" + "chronoAnomaly" ] }, "value": { @@ -7078,7 +7177,34 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "prevChronoDate": { + "type": "string", + "description": "", + "default": "" + }, + "prevChronoVersion": { + "type": "string", + "description": "", + "default": "" + }, + "prevSemverDate": { + "type": "string", + "description": "", + "default": "" + }, + "prevSemverVersion": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "prevChronoDate", + "prevChronoVersion", + "prevSemverDate", + "prevSemverVersion" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -7100,7 +7226,7 @@ "type": { "type": "string", "enum": [ - "suspiciousStarActivity" + "compromisedSSHKey" ] }, "value": { @@ -7122,20 +7248,26 @@ "additionalProperties": false, "description": "", "properties": { - "percentageSuspiciousStars": { - "type": "number", + "fingerprint": { + "type": "string", "description": "", - "default": 0 + "default": "" }, - "repository": { + "sshKey": { + "type": "string", + "description": "", + "default": "" + }, + "username": { "type": "string", "description": "", "default": "" } }, "required": [ - "percentageSuspiciousStars", - "repository" + "fingerprint", + "sshKey", + "username" ] }, "usage": { @@ -7158,7 +7290,7 @@ "type": { "type": "string", "enum": [ - "unpopularPackage" + "semverAnomaly" ] }, "value": { @@ -7179,7 +7311,22 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "prevVersion": { + "type": "string", + "description": "", + "default": "" + }, + "newVersion": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "newVersion", + "prevVersion" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -7201,7 +7348,7 @@ "type": { "type": "string", "enum": [ - "socketUpgradeAvailable" + "newAuthor" ] }, "value": { @@ -7223,46 +7370,20 @@ "additionalProperties": false, "description": "", "properties": { - "categories": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" - }, - "deprecated": { - "type": "boolean", - "default": false, - "description": "" - }, - "interop": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" - }, - "replacementPURL": { + "prevAuthor": { "type": "string", "description": "", "default": "" }, - "version": { + "newAuthor": { "type": "string", "description": "", "default": "" } }, "required": [ - "categories", - "deprecated", - "interop", - "replacementPURL", - "version" + "newAuthor", + "prevAuthor" ] }, "usage": { @@ -7285,7 +7406,7 @@ "type": { "type": "string", "enum": [ - "longStrings" + "unstableOwnership" ] }, "value": { @@ -7306,7 +7427,16 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "author": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "author" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -7328,7 +7458,7 @@ "type": { "type": "string", "enum": [ - "highEntropyStrings" + "missingAuthor" ] }, "value": { @@ -7371,7 +7501,7 @@ "type": { "type": "string", "enum": [ - "urlStrings" + "unmaintained" ] }, "value": { @@ -7393,18 +7523,14 @@ "additionalProperties": false, "description": "", "properties": { - "urls": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" + "lastPublish": { + "type": "string", + "description": "", + "default": "" } }, "required": [ - "urls" + "lastPublish" ] }, "usage": { @@ -7427,7 +7553,7 @@ "type": { "type": "string", "enum": [ - "usesEval" + "unpublished" ] }, "value": { @@ -7449,14 +7575,14 @@ "additionalProperties": false, "description": "", "properties": { - "evalType": { + "version": { "type": "string", "description": "", - "default": "eval" + "default": "" } }, "required": [ - "evalType" + "version" ] }, "usage": { @@ -7479,7 +7605,77 @@ "type": { "type": "string", "enum": [ - "dynamicRequire" + "majorRefactor" + ] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "linesChanged": { + "type": "integer", + "description": "", + "default": 0 + }, + "prevSize": { + "type": "integer", + "description": "", + "default": 0 + }, + "curSize": { + "type": "integer", + "description": "", + "default": 0 + }, + "changedPercent": { + "type": "integer", + "description": "", + "default": 0 + } + }, + "required": [ + "changedPercent", + "curSize", + "linesChanged", + "prevSize" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "missingTarball" ] }, "value": { @@ -7522,7 +7718,7 @@ "type": { "type": "string", "enum": [ - "envVars" + "suspiciousStarActivity" ] }, "value": { @@ -7544,14 +7740,20 @@ "additionalProperties": false, "description": "", "properties": { - "envVars": { + "percentageSuspiciousStars": { + "type": "number", + "description": "", + "default": 0 + }, + "repository": { "type": "string", "description": "", "default": "" } }, "required": [ - "envVars" + "percentageSuspiciousStars", + "repository" ] }, "usage": { @@ -7574,7 +7776,7 @@ "type": { "type": "string", "enum": [ - "missingDependency" + "unpopularPackage" ] }, "value": { @@ -7595,16 +7797,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "name": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "name" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -7626,7 +7819,7 @@ "type": { "type": "string", "enum": [ - "unusedDependency" + "socketUpgradeAvailable" ] }, "value": { @@ -7648,7 +7841,30 @@ "additionalProperties": false, "description": "", "properties": { - "name": { + "categories": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "deprecated": { + "type": "boolean", + "default": false, + "description": "" + }, + "interop": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "replacementPURL": { "type": "string", "description": "", "default": "" @@ -7660,7 +7876,10 @@ } }, "required": [ - "name", + "categories", + "deprecated", + "interop", + "replacementPURL", "version" ] }, @@ -7684,7 +7903,7 @@ "type": { "type": "string", "enum": [ - "peerDependency" + "longStrings" ] }, "value": { @@ -7705,16 +7924,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "name": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "name" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -7736,7 +7946,50 @@ "type": { "type": "string", "enum": [ - "uncaughtOptionalDependency" + "highEntropyStrings" + ] + }, + "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": [ + "urlStrings" ] }, "value": { @@ -7758,14 +8011,18 @@ "additionalProperties": false, "description": "", "properties": { - "name": { - "type": "string", - "description": "", - "default": "" + "urls": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" } }, "required": [ - "name" + "urls" ] }, "usage": { @@ -7788,7 +8045,7 @@ "type": { "type": "string", "enum": [ - "unresolvedRequire" + "usesEval" ] }, "value": { @@ -7809,7 +8066,16 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "evalType": { + "type": "string", + "description": "", + "default": "eval" + } + }, + "required": [ + "evalType" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -7831,7 +8097,7 @@ "type": { "type": "string", "enum": [ - "extraneousDependency" + "dynamicRequire" ] }, "value": { @@ -7874,7 +8140,7 @@ "type": { "type": "string", "enum": [ - "obfuscatedRequire" + "envVars" ] }, "value": { @@ -7895,7 +8161,16 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "envVars": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "envVars" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -7917,7 +8192,7 @@ "type": { "type": "string", "enum": [ - "obfuscatedFile" + "missingDependency" ] }, "value": { @@ -7939,20 +8214,14 @@ "additionalProperties": false, "description": "", "properties": { - "confidence": { - "type": "number", - "description": "", - "default": 0 - }, - "notes": { + "name": { "type": "string", "description": "", "default": "" } }, "required": [ - "confidence", - "notes" + "name" ] }, "usage": { @@ -7975,7 +8244,7 @@ "type": { "type": "string", "enum": [ - "minifiedFile" + "unusedDependency" ] }, "value": { @@ -7997,14 +8266,20 @@ "additionalProperties": false, "description": "", "properties": { - "confidence": { - "type": "number", + "name": { + "type": "string", "description": "", - "default": 0 + "default": "" + }, + "version": { + "type": "string", + "description": "", + "default": "" } }, "required": [ - "confidence" + "name", + "version" ] }, "usage": { @@ -8027,7 +8302,7 @@ "type": { "type": "string", "enum": [ - "installScripts" + "peerDependency" ] }, "value": { @@ -8049,20 +8324,66 @@ "additionalProperties": false, "description": "", "properties": { - "script": { + "name": { "type": "string", "description": "", "default": "" - }, - "source": { + } + }, + "required": [ + "name" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "uncaughtOptionalDependency" + ] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "name": { "type": "string", "description": "", "default": "" } }, "required": [ - "script", - "source" + "name" ] }, "usage": { @@ -8085,7 +8406,7 @@ "type": { "type": "string", "enum": [ - "hasNativeCode" + "unresolvedRequire" ] }, "value": { @@ -8128,7 +8449,7 @@ "type": { "type": "string", "enum": [ - "binScriptConfusion" + "extraneousDependency" ] }, "value": { @@ -8149,16 +8470,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "binScript": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "binScript" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -8180,7 +8492,50 @@ "type": { "type": "string", "enum": [ - "shellScriptOverride" + "obfuscatedRequire" + ] + }, + "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": [ + "obfuscatedFile" ] }, "value": { @@ -8202,14 +8557,20 @@ "additionalProperties": false, "description": "", "properties": { - "binScript": { + "confidence": { + "type": "number", + "description": "", + "default": 0 + }, + "notes": { "type": "string", "description": "", "default": "" } }, "required": [ - "binScript" + "confidence", + "notes" ] }, "usage": { @@ -8232,7 +8593,7 @@ "type": { "type": "string", "enum": [ - "didYouMean" + "minifiedFile" ] }, "value": { @@ -8254,14 +8615,14 @@ "additionalProperties": false, "description": "", "properties": { - "alternatePackage": { - "type": "string", + "confidence": { + "type": "number", "description": "", - "default": "" + "default": 0 } }, "required": [ - "alternatePackage" + "confidence" ] }, "usage": { @@ -8284,7 +8645,7 @@ "type": { "type": "string", "enum": [ - "gptDidYouMean" + "installScripts" ] }, "value": { @@ -8306,14 +8667,20 @@ "additionalProperties": false, "description": "", "properties": { - "alternatePackage": { + "script": { + "type": "string", + "description": "", + "default": "" + }, + "source": { "type": "string", "description": "", "default": "" } }, "required": [ - "alternatePackage" + "script", + "source" ] }, "usage": { @@ -8336,7 +8703,7 @@ "type": { "type": "string", "enum": [ - "bidi" + "hasNativeCode" ] }, "value": { @@ -8379,7 +8746,7 @@ "type": { "type": "string", "enum": [ - "zeroWidth" + "binScriptConfusion" ] }, "value": { @@ -8400,7 +8767,16 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "binScript": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "binScript" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -8422,7 +8798,7 @@ "type": { "type": "string", "enum": [ - "badEncoding" + "shellScriptOverride" ] }, "value": { @@ -8444,14 +8820,14 @@ "additionalProperties": false, "description": "", "properties": { - "encoding": { + "binScript": { "type": "string", "description": "", - "default": "utf8" + "default": "" } }, "required": [ - "encoding" + "binScript" ] }, "usage": { @@ -8474,7 +8850,7 @@ "type": { "type": "string", "enum": [ - "homoglyphs" + "didYouMean" ] }, "value": { @@ -8495,7 +8871,16 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": {} + "properties": { + "alternatePackage": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "alternatePackage" + ] }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -8517,7 +8902,59 @@ "type": { "type": "string", "enum": [ - "invisibleChars" + "gptDidYouMean" + ] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "alternatePackage": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "alternatePackage" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "bidi" ] }, "value": { @@ -8560,7 +8997,7 @@ "type": { "type": "string", "enum": [ - "suspiciousString" + "zeroWidth" ] }, "value": { @@ -8581,22 +9018,7 @@ "type": "object", "additionalProperties": false, "description": "", - "properties": { - "pattern": { - "type": "string", - "description": "", - "default": "" - }, - "explanation": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "explanation", - "pattern" - ] + "properties": {} }, "usage": { "$ref": "#/components/schemas/SocketUsageRef" @@ -8618,7 +9040,7 @@ "type": { "type": "string", "enum": [ - "potentialVulnerability" + "badEncoding" ] }, "value": { @@ -8640,25 +9062,14 @@ "additionalProperties": false, "description": "", "properties": { - "note": { - "type": "string", - "description": "", - "default": "" - }, - "risk": { + "encoding": { "type": "string", - "enum": [ - "low", - "medium", - "high" - ], "description": "", - "default": "medium" + "default": "utf8" } }, "required": [ - "note", - "risk" + "encoding" ] }, "usage": { @@ -8673,376 +9084,7 @@ ] } } - } - ] - }, - "SocketMetricSchema": { - "type": "object", - "additionalProperties": false, - "properties": { - "score": { - "type": "number", - "description": "", - "default": 0 - }, - "components": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/SocketMetricComponent" - }, - "properties": {}, - "description": "" - }, - "limit": { - "type": "number", - "description": "", - "default": 0 - }, - "limitingMetric": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "components", - "score" - ] - }, - "SocketPURL_Type": { - "type": "string", - "enum": [ - "apk", - "bitbucket", - "cocoapods", - "cargo", - "chrome", - "composer", - "conan", - "conda", - "cran", - "deb", - "docker", - "gem", - "generic", - "github", - "golang", - "hackage", - "hex", - "huggingface", - "maven", - "mlflow", - "npm", - "nuget", - "qpkg", - "oci", - "pub", - "pypi", - "rpm", - "swid", - "swift", - "unknown" - ], - "description": "Package ecosystem type identifier based on the PURL specification", - "default": "unknown" - }, - "SocketIssueSeverity": { - "type": "string", - "enum": [ - "low", - "middle", - "high", - "critical" - ], - "description": "", - "default": "low" - }, - "SocketCategory": { - "type": "string", - "enum": [ - "supplyChainRisk", - "quality", - "maintenance", - "vulnerability", - "license", - "other" - ], - "description": "", - "default": "other" - }, - "ReachabilityResult": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "type": { - "type": "string", - "enum": [ - "precomputed", - "full-scan" - ], - "description": "Type of reachability analysis performed", - "default": "precomputed" - }, - "results": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReachabilityResultItem" - }, - "description": "Reachability analysis results for each vulnerability" - } - }, - "required": [ - "results", - "type" - ] - }, - "SocketIssueBasics": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "severity": { - "$ref": "#/components/schemas/SocketIssueSeverity" - }, - "category": { - "$ref": "#/components/schemas/SocketCategory" - }, - "locations": { - "$ref": "#/components/schemas/SocketRefList" - }, - "label": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "category", - "label", - "locations", - "severity" - ] - }, - "SocketUsageRef": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "file": { - "$ref": "#/components/schemas/SocketRefFile" - }, - "dependencies": { - "$ref": "#/components/schemas/SocketRefList" - } - }, - "required": [ - "dependencies", - "file" - ] - }, - "SocketMetricComponent": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "score": { - "type": "number", - "description": "", - "default": 0 - }, - "maxScore": { - "type": "number", - "description": "", - "default": 0 - }, - "limit": { - "type": "number", - "description": "", - "default": 0 - }, - "value": { - "type": "object", - "description": "", - "default": null - } - }, - "required": [ - "limit", - "maxScore", - "score", - "value" - ] - }, - "ReachabilityResultItem": { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "$ref": "#/components/schemas/ReachabilityType" - }, - "truncated": { - "type": "boolean", - "default": false, - "description": "Indicates if the reachability analysis was stopped early due to depth or complexity limits" - }, - "error": { - "type": "string", - "description": "Error message if reachability analysis failed", - "default": "" - }, - "matches": { - "anyOf": [ - { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": [ - "function-level" - ] - }, - "value": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CallStackItem" - }, - "description": "" - }, - "description": "" - } - } - }, - { - "type": "object", - "additionalProperties": false, - "properties": { - "type": { - "type": "string", - "enum": [ - "class-level" - ] - }, - "value": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ClassStackItem" - }, - "description": "" - }, - "description": "" - } - } - } - ] - }, - "workspacePath": { - "type": "string", - "description": "Path to the workspace root for multi-workspace projects", - "default": "" - }, - "subprojectPath": { - "type": "string", - "description": "Path to the subproject within the workspace", - "default": "" - } - }, - "required": [ - "type" - ] - }, - "SocketRefList": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocketRef" - }, - "description": "" - }, - "SocketRefFile": { - "type": "object", - "additionalProperties": false, - "properties": { - "path": { - "type": "string", - "description": "", - "default": "" - }, - "range": { - "$ref": "#/components/schemas/SocketRefTextRange" }, - "bytes": { - "$ref": "#/components/schemas/SocketRefByteRange" - } - }, - "required": [ - "path" - ] - }, - "ReachabilityType": { - "type": "string", - "enum": [ - "missing_support", - "undeterminable_reachability", - "pending", - "unreachable", - "unknown", - "direct_dependency", - "error", - "maybe_reachable", - "reachable" - ], - "description": "Status of reachability analysis for vulnerable code paths", - "default": "unknown" - }, - "CallStackItem": { - "type": "object", - "additionalProperties": false, - "properties": { - "purl": { - "type": "string", - "description": "Package URL (PURL) of the dependency containing this code", - "default": "" - }, - "sourceLocation": { - "$ref": "#/components/schemas/SourceLocation" - }, - "confidence": { - "type": "number", - "description": "Confidence score from 0.0 to 1.0 indicating how certain the reachability analysis is about this result", - "default": 0 - } - }, - "description": "" - }, - "ClassStackItem": { - "type": "object", - "additionalProperties": false, - "properties": { - "purl": { - "type": "string", - "description": "Package URL (PURL) of the dependency containing this class", - "default": "" - }, - "class": { - "type": "string", - "description": "Name of the class in the dependency", - "default": "" - }, - "confidence": { - "type": "number", - "description": "Confidence score from 0.0 to 1.0 indicating how certain the reachability analysis is about this result", - "default": 0 - } - }, - "description": "" - }, - "SocketRef": { - "anyOf": [ { "type": "object", "additionalProperties": false, @@ -9050,14 +9092,39 @@ "type": { "type": "string", "enum": [ - "unknown" + "homoglyphs" ] }, "value": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": {} + "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" + ] + } + ] } } }, @@ -9068,11 +9135,39 @@ "type": { "type": "string", "enum": [ - "npm" + "invisibleChars" ] }, "value": { - "$ref": "#/components/schemas/SocketRefNPM" + "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" + ] + } + ] } } }, @@ -9083,11 +9178,54 @@ "type": { "type": "string", "enum": [ - "git" + "suspiciousString" ] }, "value": { - "$ref": "#/components/schemas/SocketRefGit" + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "pattern": { + "type": "string", + "description": "", + "default": "" + }, + "explanation": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "explanation", + "pattern" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] } } }, @@ -9098,26 +9236,111 @@ "type": { "type": "string", "enum": [ - "web" + "potentialVulnerability" ] }, "value": { - "$ref": "#/components/schemas/SocketRefWeb" - } - } - }, - { - "type": "object", - "additionalProperties": false, - "properties": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "note": { + "type": "string", + "description": "", + "default": "" + }, + "risk": { + "type": "string", + "enum": [ + "low", + "medium", + "high" + ], + "description": "", + "default": "medium" + } + }, + "required": [ + "note", + "risk" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { "type": { "type": "string", "enum": [ - "pypi" + "vsxProposedApiUsage" ] }, "value": { - "$ref": "#/components/schemas/SocketRefPyPI" + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "proposals": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "proposals" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] } } }, @@ -9128,64 +9351,940 @@ "type": { "type": "string", "enum": [ - "go" + "vsxActivationWildcard" ] }, "value": { - "$ref": "#/components/schemas/SocketRefGo" + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "event": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "event" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "vsxWorkspaceContainsActivation" + ] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "pattern": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "pattern" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "vsxUntrustedWorkspaceSupported" + ] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "supported": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "supported" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "vsxVirtualWorkspaceSupported" + ] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "supported": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "supported" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "vsxWebviewContribution" + ] + }, + "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": [ + "vsxDebuggerContribution" + ] + }, + "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": [ + "vsxExtensionDependency" + ] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "extension": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "extension" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "vsxExtensionPack" + ] + }, + "value": { + "allOf": [ + { + "$ref": "#/components/schemas/SocketIssueBasics" + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "description": { + "type": "string", + "description": "", + "default": "" + }, + "props": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "count": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "count" + ] + }, + "usage": { + "$ref": "#/components/schemas/SocketUsageRef" + } + }, + "required": [ + "description", + "props" + ] + } + ] } } } ] }, - "SocketRefTextRange": { + "SocketMetricSchema": { "type": "object", "additionalProperties": false, - "description": "", "properties": { - "startLine": { - "type": "integer", + "score": { + "type": "number", "description": "", "default": 0 }, - "startColumn": { - "type": "integer", - "description": "", - "default": 0 + "components": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/SocketMetricComponent" + }, + "properties": {}, + "description": "" }, - "endLine": { - "type": "integer", + "limit": { + "type": "number", "description": "", "default": 0 }, - "endColumn": { - "type": "integer", + "limitingMetric": { + "type": "string", "description": "", - "default": 0 + "default": "" } }, "required": [ - "endColumn", - "endLine", - "startColumn", - "startLine" + "components", + "score" ] }, - "SocketRefByteRange": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "start": { - "type": "integer", - "description": "", - "default": 0 - }, - "end": { - "type": "integer", - "description": "", - "default": 0 - } + "SocketPURL_Type": { + "type": "string", + "enum": [ + "alpm", + "apk", + "bitbucket", + "cocoapods", + "cargo", + "chrome", + "composer", + "conan", + "conda", + "cran", + "deb", + "docker", + "gem", + "generic", + "github", + "golang", + "hackage", + "hex", + "huggingface", + "maven", + "mlflow", + "npm", + "nuget", + "qpkg", + "oci", + "pub", + "pypi", + "rpm", + "swid", + "swift", + "vscode", + "unknown" + ], + "description": "Package ecosystem type identifier based on the PURL specification", + "default": "unknown" + }, + "SocketIssueSeverity": { + "type": "string", + "enum": [ + "low", + "middle", + "high", + "critical" + ], + "description": "", + "default": "low" + }, + "SocketCategory": { + "type": "string", + "enum": [ + "supplyChainRisk", + "quality", + "maintenance", + "vulnerability", + "license", + "other" + ], + "description": "", + "default": "other" + }, + "SocketPatch": { + "type": "object", + "additionalProperties": false, + "properties": { + "uuid": { + "type": "string", + "description": "Unique identifier for this patch", + "default": "" + }, + "tier": { + "type": "string", + "enum": [ + "free", + "paid" + ], + "description": "Access tier required for this patch (free or paid)", + "default": "free" + }, + "deprecated": { + "type": "boolean", + "default": false, + "description": "Indicates if this patch is deprecated and should not be used" + } + }, + "required": [ + "tier", + "uuid" + ] + }, + "ReachabilityResult": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "type": { + "type": "string", + "enum": [ + "precomputed", + "full-scan" + ], + "description": "Type of reachability analysis performed", + "default": "precomputed" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReachabilityResultItem" + }, + "description": "Reachability analysis results for each vulnerability" + } + }, + "required": [ + "results", + "type" + ] + }, + "SocketIssueBasics": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "severity": { + "$ref": "#/components/schemas/SocketIssueSeverity" + }, + "category": { + "$ref": "#/components/schemas/SocketCategory" + }, + "locations": { + "$ref": "#/components/schemas/SocketRefList" + }, + "label": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "category", + "label", + "locations", + "severity" + ] + }, + "SocketUsageRef": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "file": { + "$ref": "#/components/schemas/SocketRefFile" + }, + "dependencies": { + "$ref": "#/components/schemas/SocketRefList" + } + }, + "required": [ + "dependencies", + "file" + ] + }, + "SocketMetricComponent": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "score": { + "type": "number", + "description": "", + "default": 0 + }, + "maxScore": { + "type": "number", + "description": "", + "default": 0 + }, + "limit": { + "type": "number", + "description": "", + "default": 0 + }, + "value": { + "type": "object", + "description": "", + "default": null + } + }, + "required": [ + "limit", + "maxScore", + "score", + "value" + ] + }, + "ReachabilityResultItem": { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "$ref": "#/components/schemas/ReachabilityType" + }, + "truncated": { + "type": "boolean", + "default": false, + "description": "Indicates if the reachability analysis was stopped early due to depth or complexity limits" + }, + "error": { + "type": "string", + "description": "Error message if reachability analysis failed", + "default": "" + }, + "matches": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "function-level" + ] + }, + "value": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CallStackItem" + }, + "description": "" + }, + "description": "" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "class-level" + ] + }, + "value": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ClassStackItem" + }, + "description": "" + }, + "description": "" + } + } + } + ] + }, + "workspacePath": { + "type": "string", + "description": "Path to the workspace root for multi-workspace projects", + "default": "" + }, + "subprojectPath": { + "type": "string", + "description": "Path to the subproject within the workspace", + "default": "" + } + }, + "required": [ + "type" + ] + }, + "SocketRefList": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SocketRef" + }, + "description": "" + }, + "SocketRefFile": { + "type": "object", + "additionalProperties": false, + "properties": { + "path": { + "type": "string", + "description": "", + "default": "" + }, + "range": { + "$ref": "#/components/schemas/SocketRefTextRange" + }, + "bytes": { + "$ref": "#/components/schemas/SocketRefByteRange" + } + }, + "required": [ + "path" + ] + }, + "ReachabilityType": { + "type": "string", + "enum": [ + "missing_support", + "undeterminable_reachability", + "pending", + "unreachable", + "unknown", + "direct_dependency", + "error", + "maybe_reachable", + "reachable" + ], + "description": "Status of reachability analysis for vulnerable code paths", + "default": "unknown" + }, + "CallStackItem": { + "type": "object", + "additionalProperties": false, + "properties": { + "purl": { + "type": "string", + "description": "Package URL (PURL) of the dependency containing this code", + "default": "" + }, + "sourceLocation": { + "$ref": "#/components/schemas/SourceLocation" + }, + "confidence": { + "type": "number", + "description": "Confidence score from 0.0 to 1.0 indicating how certain the reachability analysis is about this result", + "default": 0 + } + }, + "description": "" + }, + "ClassStackItem": { + "type": "object", + "additionalProperties": false, + "properties": { + "purl": { + "type": "string", + "description": "Package URL (PURL) of the dependency containing this class", + "default": "" + }, + "class": { + "type": "string", + "description": "Name of the class in the dependency", + "default": "" + }, + "confidence": { + "type": "number", + "description": "Confidence score from 0.0 to 1.0 indicating how certain the reachability analysis is about this result", + "default": 0 + } + }, + "description": "" + }, + "SocketRef": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "unknown" + ] + }, + "value": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": {} + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "npm" + ] + }, + "value": { + "$ref": "#/components/schemas/SocketRefNPM" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "git" + ] + }, + "value": { + "$ref": "#/components/schemas/SocketRefGit" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "web" + ] + }, + "value": { + "$ref": "#/components/schemas/SocketRefWeb" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "pypi" + ] + }, + "value": { + "$ref": "#/components/schemas/SocketRefPyPI" + } + } + }, + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "go" + ] + }, + "value": { + "$ref": "#/components/schemas/SocketRefGo" + } + } + } + ] + }, + "SocketRefTextRange": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "startLine": { + "type": "integer", + "description": "", + "default": 0 + }, + "startColumn": { + "type": "integer", + "description": "", + "default": 0 + }, + "endLine": { + "type": "integer", + "description": "", + "default": 0 + }, + "endColumn": { + "type": "integer", + "description": "", + "default": 0 + } + }, + "required": [ + "endColumn", + "endLine", + "startColumn", + "startLine" + ] + }, + "SocketRefByteRange": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "start": { + "type": "integer", + "description": "", + "default": 0 + }, + "end": { + "type": "integer", + "description": "", + "default": 0 + } }, "required": [ "end", @@ -9485,6 +10584,26 @@ "type": "boolean", "default": false } + }, + { + "name": "cachedResultsOnly", + "in": "query", + "required": false, + "description": "Return only cached results, do not attempt to scan new artifacts or rescan stale results.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "summary", + "in": "query", + "required": false, + "description": "Include a summary object at the end of the stream with counts of malformed, resolved, and not found PURLs.", + "schema": { + "type": "boolean", + "default": false + } } ], "requestBody": { @@ -9912,7 +11031,7 @@ "name": "page", "in": "query", "required": false, - "description": "The token specifying which page to return.", + "description": "The page number to return when using offset-style pagination. Ignored when cursor pagination is used.", "schema": { "type": "integer", "minimum": 1, @@ -9920,7 +11039,26 @@ } }, { - "name": "from", + "name": "startAfterCursor", + "in": "query", + "required": false, + "description": "Cursor token for pagination. Pass the returned nextPageCursor from previous responses to fetch the next set of results.", + "schema": { + "type": "string" + } + }, + { + "name": "use_cursor", + "in": "query", + "required": false, + "description": "Set to true on the first request to opt into cursor-based pagination.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "from", "in": "query", "required": false, "description": "A Unix timestamp in seconds that filters full-scans prior to the date.", @@ -9928,6 +11066,15 @@ "type": "string" } }, + { + "name": "workspace", + "in": "query", + "required": false, + "description": "A repository workspace to filter full-scans by.", + "schema": { + "type": "string" + } + }, { "name": "repo", "in": "query", @@ -10073,6 +11220,11 @@ "default": "", "nullable": true }, + "workspace": { + "type": "string", + "description": "", + "default": "" + }, "repo": { "type": "string", "description": "", @@ -10129,6 +11281,12 @@ }, "description": "" }, + "nextPageCursor": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, "nextPage": { "type": "integer", "description": "", @@ -10138,6 +11296,7 @@ }, "required": [ "nextPage", + "nextPageCursor", "results" ] } @@ -10188,6 +11347,15 @@ "type": "string" } }, + { + "name": "workspace", + "in": "query", + "required": false, + "description": "The workspace of the repository to associate the full-scan with.", + "schema": { + "type": "string" + } + }, { "name": "branch", "in": "query", @@ -10229,7 +11397,7 @@ "name": "committers", "in": "query", "required": false, - "description": "The committers to associate the full-scan with. Set query more than once to set multiple.", + "description": "The committers to associate with the full-scan. Set query more than once to set multiple.", "schema": { "type": "string" } @@ -10288,6 +11456,16 @@ "type": "boolean", "default": false } + }, + { + "name": "scan_type", + "in": "query", + "required": false, + "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.", + "schema": { + "type": "string", + "default": "socket" + } } ], "requestBody": { @@ -10323,7 +11501,7 @@ ] } ], - "description": "Create a full scan from a set of package manifest files. Returns a full scan including all SBOM artifacts.\n\nTo get a list of supported filetypes that can be uploaded in a full-scan, see the [Get supported file types](/reference/getsupportedfiles) endpoint.\n\nThe maximum number of files you can upload at a time is 5000 and each file can be no bigger than 67 MB.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- full-scans:create", + "description": "Create a full scan from a set of package manifest files. Returns a full scan including all SBOM artifacts.\n\nTo get a list of supported filetypes that can be uploaded in a full-scan, see the [Get supported file types](/reference/getsupportedfiles) endpoint.\n\nThe maximum number of files you can upload at a time is 5000 and each file can be no bigger than 67 MB.\n\n**Query Parameters:**\n- `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.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- full-scans:create", "responses": { "201": { "content": { @@ -10412,6 +11590,11 @@ "default": "", "nullable": true }, + "workspace": { + "type": "string", + "description": "", + "default": "" + }, "repo": { "type": "string", "description": "", @@ -10811,6 +11994,11 @@ "default": "", "nullable": true }, + "workspace": { + "type": "string", + "description": "", + "default": "" + }, "repo": { "type": "string", "description": "", @@ -11301,6 +12489,15 @@ "schema": { "type": "string" } + }, + { + "name": "github_installation_id", + "in": "query", + "required": false, + "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.", + "schema": { + "type": "string" + } } ], "security": [ @@ -11595,13 +12792,13 @@ "x-readme": {} } }, - "/orgs/{org_slug}/export/cdx/{id}": { + "/orgs/{org_slug}/full-scans/{full_scan_id}/files/tar": { "get": { "tags": [ "Full Scans" ], - "summary": "Export CycloneDX SBOM (Beta)", - "operationId": "exportCDX", + "summary": "Download full scan files as tarball", + "operationId": "downloadOrgFullScanFilesAsTar", "parameters": [ { "name": "org_slug", @@ -11613,98 +12810,394 @@ } }, { - "name": "id", + "name": "full_scan_id", "in": "path", "required": true, - "description": "The full scan OR sbom report ID", + "description": "The ID of the full scan", "schema": { "type": "string" } + } + ], + "security": [ + { + "bearerAuth": [ + "full-scans:list" + ] }, { - "name": "author", + "basicAuth": [ + "full-scans:list" + ] + } + ], + "description": "Download all files associated with a full scan in tar format.\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": { + "application/x-tar": {} + }, + "description": "Tar archive of full scan files" + }, + "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}/full-scans/archive": { + "post": { + "tags": [ + "Full Scans" + ], + "summary": "Create full scan from archive", + "operationId": "CreateOrgFullScanArchive", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "repo", + "in": "query", + "required": true, + "description": "The slug of the repository to associate the full-scan with.", + "schema": { + "type": "string" + } + }, + { + "name": "workspace", "in": "query", "required": false, - "description": "The person(s) who created the BOM.\nSet this value if you're intending the modify the BOM and claim authorship.", + "description": "The workspace of the repository to associate the full-scan with.", "schema": { - "type": "string", - "default": "OWASP Foundation" + "type": "string" } }, { - "name": "project_group", + "name": "branch", "in": "query", "required": false, - "description": "Dependency track project group", + "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 ~^:?*[.", "schema": { - "type": "string", - "default": "" + "type": "string" } }, { - "name": "project_name", + "name": "commit_message", "in": "query", "required": false, - "description": "Dependency track project name. Default use the directory name", + "description": "The commit message to associate the full-scan with.", "schema": { - "type": "string", - "default": "" + "type": "string" } }, { - "name": "project_version", + "name": "commit_hash", "in": "query", "required": false, - "description": "Dependency track project version", + "description": "The commit hash to associate the full-scan with.", "schema": { - "type": "string", - "default": "" + "type": "string" } }, { - "name": "project_id", + "name": "pull_request", "in": "query", "required": false, - "description": "Dependency track project id. Either provide the id or the project name and version together", + "description": "The pull request number to associate the full-scan with.", + "schema": { + "type": "integer", + "minimum": 1 + } + }, + { + "name": "committers", + "in": "query", + "required": false, + "description": "The committers to associate with the full-scan. Set query more than once to set multiple.", + "schema": { + "type": "string" + } + }, + { + "name": "integration_type", + "in": "query", + "required": false, + "description": "The integration type to associate the full-scan with. Defaults to \"Api\" if omitted.", "schema": { "type": "string", - "default": "" + "enum": [ + "api", + "github", + "gitlab", + "bitbucket", + "azure" + ] } }, { - "name": "include_vulnerabilities", + "name": "integration_org_slug", "in": "query", "required": false, - "description": "Include vulnerability information in the SBOM. Also includes reachability/VEX if available", + "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.", + "schema": { + "type": "string" + } + }, + { + "name": "make_default_branch", + "in": "query", + "required": false, + "description": "Set the default branch of the repository to the branch of this full-scan. A branch name is required with this option.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "set_as_pending_head", + "in": "query", + "required": false, + "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.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "tmp", + "in": "query", + "required": false, + "description": "Create a temporary full-scan that is not listed in the reports dashboard. Cannot be used when set_as_pending_head=true.", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "scan_type", + "in": "query", + "required": false, + "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.", "schema": { "type": "string", - "default": "false" + "default": "socket" } } ], + "requestBody": { + "content": { + "multipart/form-data": { + "schema": { + "type": "object", + "additionalProperties": { + "type": "string", + "default": { + "type": "Buffer", + "data": [] + }, + "format": "binary", + "description": "" + }, + "properties": {}, + "description": "" + } + } + }, + "required": false + }, "security": [ { "bearerAuth": [ - "report:read" + "full-scans:create" ] }, { "basicAuth": [ - "report:read" + "full-scans:create" ] } ], - "description": "Export a Socket SBOM as a CycloneDX SBOM\n\nSupported ecosystems:\n\n- crates\n- go\n- maven\n- npm\n- nuget\n- pypi\n- rubygems\n- spdx\n- cdx\n\nUnsupported ecosystems are filtered from the export.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- report:read", + "description": "Create a full scan by uploading one or more archives. Supported archive formats include **.tar**, **.tar.gz/.tgz**, and **.zip**.\n\nEach 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.\n\nThe maximum combined number of files extracted from your upload is 5000 and each extracted file can be no bigger than 67 MB.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- full-scans:create", "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CDXManifestSchema" + "type": "object", + "additionalProperties": false, + "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 + }, + "workspace": { + "type": "string", + "description": "", + "default": "" + }, + "repo": { + "type": "string", + "description": "", + "default": "" + }, + "html_report_url": { + "type": "string", + "description": "", + "default": "" + }, + "integration_type": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "integration_repo_url": { + "type": "string", + "description": "", + "default": "" + }, + "integration_branch_url": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "integration_commit_url": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "integration_pull_request_url": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "scan_state": { + "type": "string", + "enum": [ + "pending", + "precrawl", + "resolve", + "scan" + ], + "description": "The current processing status of the SBOM", + "default": "pending", + "nullable": true + }, + "unmatchedFiles": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + } + }, + "description": "" } } }, - "description": "CycloneDX SBOM" + "description": "The details of the created full scan." }, "400": { "$ref": "#/components/responses/SocketBadRequest" @@ -11715,6 +13208,9 @@ "403": { "$ref": "#/components/responses/SocketForbidden" }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } @@ -11722,13 +13218,140 @@ "x-readme": {} } }, - "/orgs/{org_slug}/export/spdx/{id}": { + "/orgs/{org_slug}/export/cdx/{id}": { "get": { "tags": [ "Full Scans" ], - "summary": "Export SPDX SBOM (Beta)", - "operationId": "exportSPDX", + "summary": "Export CycloneDX SBOM (Beta)", + "operationId": "exportCDX", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "id", + "in": "path", + "required": true, + "description": "The full scan OR sbom report ID", + "schema": { + "type": "string" + } + }, + { + "name": "author", + "in": "query", + "required": false, + "description": "The person(s) who created the BOM.\nSet this value if you're intending the modify the BOM and claim authorship.", + "schema": { + "type": "string", + "default": "OWASP Foundation" + } + }, + { + "name": "project_group", + "in": "query", + "required": false, + "description": "Dependency track project group", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "project_name", + "in": "query", + "required": false, + "description": "Dependency track project name. Default use the directory name", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "project_version", + "in": "query", + "required": false, + "description": "Dependency track project version", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "project_id", + "in": "query", + "required": false, + "description": "Dependency track project id. Either provide the id or the project name and version together", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "include_vulnerabilities", + "in": "query", + "required": false, + "description": "Include vulnerability information in the SBOM. Also includes reachability/VEX if available", + "schema": { + "type": "string", + "default": "false" + } + } + ], + "security": [ + { + "bearerAuth": [ + "report:read" + ] + }, + { + "basicAuth": [ + "report:read" + ] + } + ], + "description": "Export a Socket SBOM as a CycloneDX SBOM\n\nSupported ecosystems:\n\n- crates\n- go\n- maven\n- npm\n- nuget\n- pypi\n- rubygems\n- spdx\n- cdx\n\nUnsupported ecosystems are filtered from the export.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- report:read", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CDXManifestSchema" + } + } + }, + "description": "CycloneDX SBOM" + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/export/spdx/{id}": { + "get": { + "tags": [ + "Full Scans" + ], + "summary": "Export SPDX SBOM (Beta)", + "operationId": "exportSPDX", "parameters": [ { "name": "org_slug", @@ -12633,6 +14256,15 @@ "type": "string", "format": "uuid" } + }, + { + "name": "github_installation_id", + "in": "query", + "required": false, + "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.", + "schema": { + "type": "string" + } } ], "security": [ @@ -13112,6 +14744,15 @@ "type": "boolean", "default": false } + }, + { + "name": "workspace", + "in": "query", + "required": false, + "description": "The workspace of the repository.", + "schema": { + "type": "string" + } } ], "requestBody": { @@ -14288,6 +15929,58 @@ "default": "", "nullable": true }, + "integration_meta": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "github" + ] + }, + "value": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "installation_id": { + "type": "string", + "description": "The GitHub installation_id of the active associated Socket GitHub App", + "default": "" + }, + "installation_login": { + "type": "string", + "description": "The GitHub login name that the active Socket GitHub App installation is installed to", + "default": "" + }, + "repo_name": { + "type": "string", + "description": "The name of the associated GitHub repo.", + "default": "", + "nullable": true + }, + "repo_id": { + "type": "string", + "description": "The id of the associated GitHub repo.", + "default": "", + "nullable": true + } + }, + "required": [ + "installation_id", + "installation_login", + "repo_id", + "repo_name" + ] + } + } + } + ], + "nullable": true + }, "name": { "type": "string", "description": "The name of the repository", @@ -14324,6 +16017,11 @@ "description": "The default branch of the repository", "default": "main", "nullable": true + }, + "workspace": { + "type": "string", + "description": "The workspace of the repository", + "default": "" } }, "description": "" @@ -14424,6 +16122,11 @@ "description": "The default branch of the repository", "default": "main", "nullable": true + }, + "workspace": { + "type": "string", + "description": "The workspace of the repository", + "default": "" } }, "description": "" @@ -14479,6 +16182,58 @@ "default": "", "nullable": true }, + "integration_meta": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "github" + ] + }, + "value": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "installation_id": { + "type": "string", + "description": "The GitHub installation_id of the active associated Socket GitHub App", + "default": "" + }, + "installation_login": { + "type": "string", + "description": "The GitHub login name that the active Socket GitHub App installation is installed to", + "default": "" + }, + "repo_name": { + "type": "string", + "description": "The name of the associated GitHub repo.", + "default": "", + "nullable": true + }, + "repo_id": { + "type": "string", + "description": "The id of the associated GitHub repo.", + "default": "", + "nullable": true + } + }, + "required": [ + "installation_id", + "installation_login", + "repo_id", + "repo_name" + ] + } + } + } + ], + "nullable": true + }, "name": { "type": "string", "description": "The name of the repository", @@ -14515,6 +16270,11 @@ "description": "The default branch of the repository", "default": "main", "nullable": true + }, + "workspace": { + "type": "string", + "description": "The workspace of the repository", + "default": "" } }, "description": "" @@ -14567,6 +16327,15 @@ "schema": { "type": "string" } + }, + { + "name": "workspace", + "in": "query", + "required": false, + "description": "The workspace of the repository", + "schema": { + "type": "string" + } } ], "security": [ @@ -14617,6 +16386,58 @@ "default": "", "nullable": true }, + "integration_meta": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "github" + ] + }, + "value": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "installation_id": { + "type": "string", + "description": "The GitHub installation_id of the active associated Socket GitHub App", + "default": "" + }, + "installation_login": { + "type": "string", + "description": "The GitHub login name that the active Socket GitHub App installation is installed to", + "default": "" + }, + "repo_name": { + "type": "string", + "description": "The name of the associated GitHub repo.", + "default": "", + "nullable": true + }, + "repo_id": { + "type": "string", + "description": "The id of the associated GitHub repo.", + "default": "", + "nullable": true + } + }, + "required": [ + "installation_id", + "installation_login", + "repo_id", + "repo_name" + ] + } + } + } + ], + "nullable": true + }, "name": { "type": "string", "description": "The name of the repository", @@ -14654,6 +16475,11 @@ "default": "main", "nullable": true }, + "workspace": { + "type": "string", + "description": "The workspace of the repository", + "default": "" + }, "slig": { "type": "string", "description": "The slug of the repository. This typo is intentionally preserved for backwards compatibility reasons.", @@ -14668,11 +16494,13 @@ "head_full_scan_id", "homepage", "id", + "integration_meta", "name", "slig", "slug", "updated_at", - "visibility" + "visibility", + "workspace" ] } } @@ -14721,6 +16549,15 @@ "schema": { "type": "string" } + }, + { + "name": "workspace", + "in": "query", + "required": false, + "description": "The workspace of the repository", + "schema": { + "type": "string" + } } ], "requestBody": { @@ -14766,6 +16603,11 @@ "description": "The default branch of the repository", "default": "main", "nullable": true + }, + "workspace": { + "type": "string", + "description": "The workspace of the repository", + "default": "" } }, "description": "" @@ -14821,6 +16663,58 @@ "default": "", "nullable": true }, + "integration_meta": { + "anyOf": [ + { + "type": "object", + "additionalProperties": false, + "properties": { + "type": { + "type": "string", + "enum": [ + "github" + ] + }, + "value": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "installation_id": { + "type": "string", + "description": "The GitHub installation_id of the active associated Socket GitHub App", + "default": "" + }, + "installation_login": { + "type": "string", + "description": "The GitHub login name that the active Socket GitHub App installation is installed to", + "default": "" + }, + "repo_name": { + "type": "string", + "description": "The name of the associated GitHub repo.", + "default": "", + "nullable": true + }, + "repo_id": { + "type": "string", + "description": "The id of the associated GitHub repo.", + "default": "", + "nullable": true + } + }, + "required": [ + "installation_id", + "installation_login", + "repo_id", + "repo_name" + ] + } + } + } + ], + "nullable": true + }, "name": { "type": "string", "description": "The name of the repository", @@ -14857,6 +16751,11 @@ "description": "The default branch of the repository", "default": "main", "nullable": true + }, + "workspace": { + "type": "string", + "description": "The workspace of the repository", + "default": "" } }, "description": "" @@ -14907,6 +16806,15 @@ "schema": { "type": "string" } + }, + { + "name": "workspace", + "in": "query", + "required": false, + "description": "The workspace of the repository", + "schema": { + "type": "string" + } } ], "security": [ @@ -16268,6 +18176,153 @@ "action" ] }, + "ghaArgToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaEnvToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaEnvToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaArgToOutput": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToOutput issues." + } + }, + "required": [ + "action" + ] + }, + "ghaArgToEnv": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToEnv issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToOutput": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToOutput issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToEnv": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToEnv issues." + } + }, + "required": [ + "action" + ] + }, "licenseSpdxDisj": { "type": "object", "additionalProperties": false, @@ -17989,6 +20044,195 @@ "required": [ "action" ] + }, + "vsxProposedApiUsage": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxProposedApiUsage issues." + } + }, + "required": [ + "action" + ] + }, + "vsxActivationWildcard": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxActivationWildcard issues." + } + }, + "required": [ + "action" + ] + }, + "vsxWorkspaceContainsActivation": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxWorkspaceContainsActivation issues." + } + }, + "required": [ + "action" + ] + }, + "vsxUntrustedWorkspaceSupported": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxUntrustedWorkspaceSupported issues." + } + }, + "required": [ + "action" + ] + }, + "vsxVirtualWorkspaceSupported": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxVirtualWorkspaceSupported issues." + } + }, + "required": [ + "action" + ] + }, + "vsxWebviewContribution": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxWebviewContribution issues." + } + }, + "required": [ + "action" + ] + }, + "vsxDebuggerContribution": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxDebuggerContribution issues." + } + }, + "required": [ + "action" + ] + }, + "vsxExtensionDependency": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxExtensionDependency issues." + } + }, + "required": [ + "action" + ] + }, + "vsxExtensionPack": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxExtensionPack issues." + } + }, + "required": [ + "action" + ] } }, "description": "", @@ -18494,6 +20738,153 @@ "action" ] }, + "ghaArgToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaEnvToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaEnvToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaArgToOutput": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToOutput issues." + } + }, + "required": [ + "action" + ] + }, + "ghaArgToEnv": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToEnv issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToOutput": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToOutput issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToEnv": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToEnv issues." + } + }, + "required": [ + "action" + ] + }, "licenseSpdxDisj": { "type": "object", "additionalProperties": false, @@ -20215,6 +22606,195 @@ "required": [ "action" ] + }, + "vsxProposedApiUsage": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxProposedApiUsage issues." + } + }, + "required": [ + "action" + ] + }, + "vsxActivationWildcard": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxActivationWildcard issues." + } + }, + "required": [ + "action" + ] + }, + "vsxWorkspaceContainsActivation": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxWorkspaceContainsActivation issues." + } + }, + "required": [ + "action" + ] + }, + "vsxUntrustedWorkspaceSupported": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxUntrustedWorkspaceSupported issues." + } + }, + "required": [ + "action" + ] + }, + "vsxVirtualWorkspaceSupported": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxVirtualWorkspaceSupported issues." + } + }, + "required": [ + "action" + ] + }, + "vsxWebviewContribution": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxWebviewContribution issues." + } + }, + "required": [ + "action" + ] + }, + "vsxDebuggerContribution": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxDebuggerContribution issues." + } + }, + "required": [ + "action" + ] + }, + "vsxExtensionDependency": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxExtensionDependency issues." + } + }, + "required": [ + "action" + ] + }, + "vsxExtensionPack": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxExtensionPack issues." + } + }, + "required": [ + "action" + ] } }, "description": "" @@ -21033,6 +23613,153 @@ "action" ] }, + "ghaArgToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaEnvToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaEnvToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaArgToOutput": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToOutput issues." + } + }, + "required": [ + "action" + ] + }, + "ghaArgToEnv": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToEnv issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToOutput": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToOutput issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToEnv": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToEnv issues." + } + }, + "required": [ + "action" + ] + }, "licenseSpdxDisj": { "type": "object", "additionalProperties": false, @@ -22754,6 +25481,195 @@ "required": [ "action" ] + }, + "vsxProposedApiUsage": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxProposedApiUsage issues." + } + }, + "required": [ + "action" + ] + }, + "vsxActivationWildcard": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxActivationWildcard issues." + } + }, + "required": [ + "action" + ] + }, + "vsxWorkspaceContainsActivation": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxWorkspaceContainsActivation issues." + } + }, + "required": [ + "action" + ] + }, + "vsxUntrustedWorkspaceSupported": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxUntrustedWorkspaceSupported issues." + } + }, + "required": [ + "action" + ] + }, + "vsxVirtualWorkspaceSupported": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxVirtualWorkspaceSupported issues." + } + }, + "required": [ + "action" + ] + }, + "vsxWebviewContribution": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxWebviewContribution issues." + } + }, + "required": [ + "action" + ] + }, + "vsxDebuggerContribution": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxDebuggerContribution issues." + } + }, + "required": [ + "action" + ] + }, + "vsxExtensionDependency": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxExtensionDependency issues." + } + }, + "required": [ + "action" + ] + }, + "vsxExtensionPack": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxExtensionPack issues." + } + }, + "required": [ + "action" + ] } }, "description": "" @@ -23262,6 +26178,153 @@ "action" ] }, + "ghaArgToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaEnvToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaEnvToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaArgToOutput": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToOutput issues." + } + }, + "required": [ + "action" + ] + }, + "ghaArgToEnv": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToEnv issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToOutput": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToOutput issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToEnv": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToEnv issues." + } + }, + "required": [ + "action" + ] + }, "licenseSpdxDisj": { "type": "object", "additionalProperties": false, @@ -24983,6 +28046,195 @@ "required": [ "action" ] + }, + "vsxProposedApiUsage": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxProposedApiUsage issues." + } + }, + "required": [ + "action" + ] + }, + "vsxActivationWildcard": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxActivationWildcard issues." + } + }, + "required": [ + "action" + ] + }, + "vsxWorkspaceContainsActivation": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxWorkspaceContainsActivation issues." + } + }, + "required": [ + "action" + ] + }, + "vsxUntrustedWorkspaceSupported": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxUntrustedWorkspaceSupported issues." + } + }, + "required": [ + "action" + ] + }, + "vsxVirtualWorkspaceSupported": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxVirtualWorkspaceSupported issues." + } + }, + "required": [ + "action" + ] + }, + "vsxWebviewContribution": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxWebviewContribution issues." + } + }, + "required": [ + "action" + ] + }, + "vsxDebuggerContribution": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxDebuggerContribution issues." + } + }, + "required": [ + "action" + ] + }, + "vsxExtensionDependency": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxExtensionDependency issues." + } + }, + "required": [ + "action" + ] + }, + "vsxExtensionPack": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxExtensionPack issues." + } + }, + "required": [ + "action" + ] } }, "description": "" @@ -25444,6 +28696,153 @@ "action" ] }, + "ghaArgToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaEnvToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaEnvToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToSink": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToSink issues." + } + }, + "required": [ + "action" + ] + }, + "ghaArgToOutput": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToOutput issues." + } + }, + "required": [ + "action" + ] + }, + "ghaArgToEnv": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaArgToEnv issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToOutput": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToOutput issues." + } + }, + "required": [ + "action" + ] + }, + "ghaContextToEnv": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for ghaContextToEnv issues." + } + }, + "required": [ + "action" + ] + }, "licenseSpdxDisj": { "type": "object", "additionalProperties": false, @@ -27162,238 +30561,2012 @@ "description": "The action to take for potentialVulnerability issues." } }, - "required": [ - "action" - ] + "required": [ + "action" + ] + }, + "vsxProposedApiUsage": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxProposedApiUsage issues." + } + }, + "required": [ + "action" + ] + }, + "vsxActivationWildcard": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxActivationWildcard issues." + } + }, + "required": [ + "action" + ] + }, + "vsxWorkspaceContainsActivation": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxWorkspaceContainsActivation issues." + } + }, + "required": [ + "action" + ] + }, + "vsxUntrustedWorkspaceSupported": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxUntrustedWorkspaceSupported issues." + } + }, + "required": [ + "action" + ] + }, + "vsxVirtualWorkspaceSupported": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxVirtualWorkspaceSupported issues." + } + }, + "required": [ + "action" + ] + }, + "vsxWebviewContribution": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxWebviewContribution issues." + } + }, + "required": [ + "action" + ] + }, + "vsxDebuggerContribution": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxDebuggerContribution issues." + } + }, + "required": [ + "action" + ] + }, + "vsxExtensionDependency": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxExtensionDependency issues." + } + }, + "required": [ + "action" + ] + }, + "vsxExtensionPack": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "action": { + "type": "string", + "enum": [ + "defer", + "error", + "warn", + "monitor", + "ignore" + ], + "description": "The action to take for vsxExtensionPack issues." + } + }, + "required": [ + "action" + ] + } + }, + "description": "" + }, + "securityPolicyDefault": { + "type": "string", + "enum": [ + "default", + "low", + "medium", + "high" + ], + "description": "The default security policy for the organization", + "default": "default" + } + }, + "description": "" + } + } + }, + "description": "Updated repository details" + }, + "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}/settings/license-policy": { + "get": { + "tags": [ + "Deprecated" + ], + "summary": "Get Organization License Policy", + "deprecated": true, + "operationId": "getOrgLicensePolicy", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "bearerAuth": [ + "license-policy:read" + ] + }, + { + "basicAuth": [ + "license-policy:read" + ] + } + ], + "description": "**This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/viewlicensepolicy) instead.\n\nRetrieve the license policy of an organization.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- license-policy:read", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "", + "default": null + } + } + }, + "description": "Retrieved license policy details" + }, + "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": [ + "License Policy" + ], + "summary": "Update License Policy", + "operationId": "updateOrgLicensePolicy", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "merge_update", + "in": "query", + "required": true, + "description": "Merge the policy update with the existing policy. Default is true. If false, the existing policy will be replaced with the new policy.", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "", + "default": null + } + } + }, + "required": false + }, + "security": [ + { + "bearerAuth": [ + "license-policy:update" + ] + }, + { + "basicAuth": [ + "license-policy:update" + ] + } + ], + "description": "Set the organization's license policy\n\n ## License policy schema\n\n```json\n{\n allow?: Array\n warn?: Array\n options?: Array\n}\n```\n\nElements 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.\n\n## License Classes\n\nStrings which are license classes will expand to a list of licenses known to be in that particular license class. Recognized license classes are:\n 'permissive',\n 'permissive (model)',\n 'permissive (gold)',\n 'permissive (silver)',\n 'permissive (bronze)',\n 'permissive (lead)',\n 'copyleft',\n 'maximal copyleft',\n 'network copyleft',\n 'strong copyleft',\n 'weak copyleft',\n 'contributor license agreement',\n 'public domain',\n 'proprietary free',\n 'source available',\n 'proprietary',\n 'commercial',\n 'patent'\n\nUsers can learn more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and [permissive tiers](https://blueoakcouncil.org/list) by reading the linked resources.\n\n\n## PURLs\n\nUsers 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.\n\npurl qualifiers which support globs are `filename`, `version_glob`, `artifact_id` and `license_provenance` (primarily used for allowing data from registry metadata).\n\n### Examples:\nAllow all license data found in a specific version of a package 4.14.1: `pkg:npm/lodash@4.14.1`\nAllow all license data found in a version range of a package: `pkg:npm/lodash?version_glob=15.*`\nAllow all license data in the test directory of a given package for certain version ranges: `pkg:npm/lodash@15.*.*?file_name=lodash/test/*`\nAllow all license data taken from the package registry for a package and version range: `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata`\n\n## Available options\n\n`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.\n\n`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.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- license-policy:update", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "description": "", + "default": null + } + } + }, + "description": "Updated repository details" + }, + "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}/settings/license-policy/view": { + "get": { + "tags": [ + "License Policy" + ], + "summary": "Get License Policy (Beta)", + "operationId": "viewLicensePolicy", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "bearerAuth": [ + "license-policy:read" + ] + }, + { + "basicAuth": [ + "license-policy:read" + ] + } + ], + "description": "Returns an organization's license policy including allow, warn, monitor, and deny categories.\nThe deny category contains all licenses that are not explicitly categorized as allow, warn, or monitor.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- license-policy:read", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SStoredLicensePolicy" + } + } + }, + "description": "Saturated License Allow List" + }, + "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" + }, + "500": { + "$ref": "#/components/responses/SocketInternalServerError" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/settings/socket-basics": { + "get": { + "tags": [ + "Org Settings" + ], + "summary": "Get Socket Basics configuration, including toggles for the various tools it supports.", + "operationId": "getSocketBasicsConfig", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + } + ], + "security": [ + { + "bearerAuth": [ + "socket-basics:read" + ] + }, + { + "basicAuth": [ + "socket-basics:read" + ] + } + ], + "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.\n\n- **SAST** - Find issues and risks with your code via static analysis using best in class Open Source tools\n- **Secret Scanning** - Detected potentially leaked secrets and credentials within your code\n- **Container Security** - Docker image and Dockerfile vulnerability scanning\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- socket-basics:read", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "consoleTabularEnabled": { + "type": "boolean", + "default": false, + "description": "Enable tabular console output" + }, + "consoleJsonEnabled": { + "type": "boolean", + "default": false, + "description": "Enable JSON console output" + }, + "verbose": { + "type": "boolean", + "default": false, + "description": "Enable verbose logging" + }, + "allLanguagesEnabled": { + "type": "boolean", + "default": false, + "description": "Enable all language SAST scanning" + }, + "pythonSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run Python SAST scanning" + }, + "javascriptSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run JavaScript SAST scanning" + }, + "goSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run Go SAST scanning" + }, + "golangSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run Golang SAST scanning" + }, + "javaSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run Java SAST scanning" + }, + "phpSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run PHP SAST scanning" + }, + "rubySastEnabled": { + "type": "boolean", + "default": false, + "description": "Run Ruby SAST scanning" + }, + "csharpSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run C# SAST scanning" + }, + "dotnetSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run .NET SAST scanning" + }, + "cSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run C SAST scanning" + }, + "cppSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run C++ SAST scanning" + }, + "kotlinSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run Kotlin SAST scanning" + }, + "scalaSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run Scala SAST scanning" + }, + "swiftSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run Swift SAST scanning" + }, + "rustSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run Rust SAST scanning" + }, + "elixirSastEnabled": { + "type": "boolean", + "default": false, + "description": "Run Elixir SAST scanning" + }, + "allRulesEnabled": { + "type": "boolean", + "default": false, + "description": "Enable all SAST rules" + }, + "pythonEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled Python SAST rules", + "default": "" + }, + "pythonDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled Python SAST rules", + "default": "" + }, + "javascriptEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled JavaScript SAST rules", + "default": "" + }, + "javascriptDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled JavaScript SAST rules", + "default": "" + }, + "goEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled Go SAST rules", + "default": "" + }, + "goDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled Go SAST rules", + "default": "" + }, + "javaEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled Java SAST rules", + "default": "" + }, + "javaDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled Java SAST rules", + "default": "" + }, + "kotlinEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled Kotlin SAST rules", + "default": "" + }, + "kotlinDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled Kotlin SAST rules", + "default": "" + }, + "scalaEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled Scala SAST rules", + "default": "" + }, + "scalaDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled Scala SAST rules", + "default": "" + }, + "phpEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled PHP SAST rules", + "default": "" + }, + "phpDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled PHP SAST rules", + "default": "" + }, + "rubyEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled Ruby SAST rules", + "default": "" + }, + "rubyDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled Ruby SAST rules", + "default": "" + }, + "csharpEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled C# SAST rules", + "default": "" + }, + "csharpDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled C# SAST rules", + "default": "" + }, + "dotnetEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled .NET SAST rules", + "default": "" + }, + "dotnetDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled .NET SAST rules", + "default": "" + }, + "cEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled C SAST rules", + "default": "" + }, + "cDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled C SAST rules", + "default": "" + }, + "cppEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled C++ SAST rules", + "default": "" + }, + "cppDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled C++ SAST rules", + "default": "" + }, + "swiftEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled Swift SAST rules", + "default": "" + }, + "swiftDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled Swift SAST rules", + "default": "" + }, + "rustEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled Rust SAST rules", + "default": "" + }, + "rustDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled Rust SAST rules", + "default": "" + }, + "elixirEnabledRules": { + "type": "string", + "description": "Comma-separated list of enabled Elixir SAST rules", + "default": "" + }, + "elixirDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled Elixir SAST rules", + "default": "" + }, + "openGrepNotificationMethod": { + "type": "string", + "description": "Notification method for OpenGrep", + "default": "" + }, + "socketTier1Enabled": { + "type": "boolean", + "default": false, + "description": "Enable Socket Tier 1 reachability analysis" + }, + "socketAdditionalParams": { + "type": "string", + "description": "Additional parameters for Socket SCA", + "default": "" + }, + "secretScanningEnabled": { + "type": "boolean", + "default": false, + "description": "Enable secret scanning" + }, + "trufflehogExcludeDir": { + "type": "string", + "description": "Directories to exclude from Trufflehog scanning", + "default": "" + }, + "trufflehogShowUnverified": { + "type": "boolean", + "default": false, + "description": "Show unverified secrets in Trufflehog results" + }, + "trufflehogNotificationMethod": { + "type": "string", + "description": "Notification method for Trufflehog", + "default": "" + }, + "containerImagesToScan": { + "type": "string", + "description": "Comma-separated list of container images to scan", + "default": "" + }, + "dockerfiles": { + "type": "string", + "description": "Comma-separated list of Dockerfiles to scan", + "default": "" + }, + "trivyImageEnabled": { + "type": "boolean", + "default": false, + "description": "Enable Trivy image scanning" + }, + "trivyDockerfileEnabled": { + "type": "boolean", + "default": false, + "description": "Enable Trivy Dockerfile scanning" + }, + "trivyNotificationMethod": { + "type": "string", + "description": "Notification method for Trivy", + "default": "" + }, + "trivyDisabledRules": { + "type": "string", + "description": "Comma-separated list of disabled Trivy rules", + "default": "" + }, + "trivyImageScanningDisabled": { + "type": "boolean", + "default": false, + "description": "Disable Trivy image scanning" + }, + "slackWebhookUrl": { + "type": "string", + "description": "Slack webhook URL for notifications", + "default": "" + }, + "webhookUrl": { + "type": "string", + "description": "Generic webhook URL for notifications", + "default": "" + }, + "msSentinelWorkspaceId": { + "type": "string", + "description": "Microsoft Sentinel workspace ID", + "default": "" + }, + "msSentinelKey": { + "type": "string", + "description": "Microsoft Sentinel key", + "default": "" + }, + "sumologicEndpoint": { + "type": "string", + "description": "Sumo Logic endpoint URL", + "default": "" + }, + "jiraUrl": { + "type": "string", + "description": "Jira server URL", + "default": "" + }, + "jiraProject": { + "type": "string", + "description": "Jira project key", + "default": "" + }, + "jiraEmail": { + "type": "string", + "description": "Jira user email", + "default": "" + }, + "jiraApiToken": { + "type": "string", + "description": "Jira API token", + "default": "" + }, + "githubToken": { + "type": "string", + "description": "GitHub API token", + "default": "" + }, + "githubApiUrl": { + "type": "string", + "description": "GitHub API URL", + "default": "" + }, + "msteamsWebhookUrl": { + "type": "string", + "description": "Microsoft Teams webhook URL", + "default": "" + }, + "s3Enabled": { + "type": "boolean", + "default": false, + "description": "Enable S3 upload for scan results" + }, + "s3Bucket": { + "type": "string", + "description": "S3 bucket name", + "default": "" + }, + "s3AccessKey": { + "type": "string", + "description": "S3 access key", + "default": "" + }, + "s3SecretKey": { + "type": "string", + "description": "S3 secret key", + "default": "" + }, + "s3Endpoint": { + "type": "string", + "description": "S3 endpoint URL", + "default": "" + }, + "s3Region": { + "type": "string", + "description": "S3 region", + "default": "" + }, + "externalCveScanningEnabled": { + "type": "boolean", + "default": false, + "description": "Enable external CVE scanning" + }, + "socketScanningEnabled": { + "type": "boolean", + "default": false, + "description": "Enable Socket dependency scanning (legacy)" + }, + "socketScaEnabled": { + "type": "boolean", + "default": false, + "description": "Enable Socket SCA scanning (legacy)" + }, + "additionalParameters": { + "type": "string", + "description": "Additional configuration parameters (legacy)", + "default": "" + } + }, + "description": "" + } + } + }, + "description": "Socket Basics settings" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/historical/alerts": { + "get": { + "tags": [ + "Alerts" + ], + "summary": "List historical alerts (Beta)", + "operationId": "historicalAlertsList", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "date", + "in": "query", + "required": false, + "description": "The UTC date in YYYY-MM-DD format for which to fetch alerts", + "schema": { + "type": "string", + "default": "CURRENT_DATE" + } + }, + { + "name": "range", + "in": "query", + "required": false, + "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", + "schema": { + "type": "string", + "default": "-7d" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "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)", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 10000, + "default": 10000 + } + }, + { + "name": "startAfterCursor", + "in": "query", + "required": false, + "description": "The pagination cursor that was returned as the \"endCursor\" property in previous request", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "filters.alertSeverity", + "in": "query", + "required": false, + "description": "Comma-separated list of alert severities (\"low\", \"medium\", \"high\", or \"critical\") that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertSeverity.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of alert severities (\"low\", \"medium\", \"high\", or \"critical\") that should be excluded", + "schema": { + "type": "string" + } + }, + { + "name": "filters.repoSlug", + "in": "query", + "required": false, + "description": "Comma-separated list of repo slugs that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "filters.repoSlug.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of repo slugs that should be excluded", + "schema": { + "type": "string" + } + }, + { + "name": "filters.repoFullName", + "in": "query", + "required": false, + "description": "Comma-separated list of repo full names that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "filters.repoFullName.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of repo full names that should be excluded", + "schema": { + "type": "string" + } + }, + { + "name": "filters.repoLabels", + "in": "query", + "required": false, + "description": "Comma-separated list of repo labels that should be included. Use \"\" to filter for repositories with no labels.", + "schema": { + "type": "string" + } + }, + { + "name": "filters.repoLabels.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of repo labels that should be excluded. Use \"\" to filter for repositories with no labels.", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertType", + "in": "query", + "required": false, + "description": "Comma-separated list of alert types (e.g. \"usesEval\", \"unmaintained\", etc.) that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertType.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of alert types (e.g. \"usesEval\", \"unmaintained\", etc.) that should be excluded", + "schema": { + "type": "string" + } + }, + { + "name": "filters.artifactName", + "in": "query", + "required": false, + "description": "Name of artifact", + "schema": { + "type": "string" + } + }, + { + "name": "filters.artifactName.notIn", + "in": "query", + "required": false, + "description": "Name of artifact", + "schema": { + "type": "string" + } + }, + { + "name": "filters.artifactType", + "in": "query", + "required": false, + "description": "Comma-separated list of artifact types (e.g. \"npm\", \"pypi\", \"gem\", \"maven\", \"golang\", etc.) that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "filters.artifactType.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of artifact types (e.g. \"npm\", \"pypi\", \"gem\", \"maven\", \"golang\", etc.) that should be excluded", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertAction", + "in": "query", + "required": false, + "description": "Comma-separated list of alert actions (\"error\", \"warn\", \"monitor\", or \"ignore) that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertAction.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of alert actions (\"error\", \"warn\", \"monitor\", or \"ignore) that should be excluded", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertActionSourceType", + "in": "query", + "required": false, + "description": "Comma-separated list of alert action source types (\"fallback\", \"injected-alert\", \"org-policy\", \"reachability\", \"repo-label-policy\", \"socket-yml\", or \"triage\") that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertActionSourceType.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of alert action source types (\"fallback\", \"injected-alert\", \"org-policy\", \"reachability\", \"repo-label-policy\", \"socket-yml\", or \"triage\") that should be excluded", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertFixType", + "in": "query", + "required": false, + "description": "Comma-separated list of alert fix types (\"upgrade\", \"cve\", or \"remove\") that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertFixType.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of alert fix types (\"upgrade\", \"cve\", or \"remove\") that should be excluded", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertCategory", + "in": "query", + "required": false, + "description": "Comma-separated list of alert categories (\"supplyChainRisk\", \"maintenance\", \"quality\", \"license\", or \"vulnerability\") that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertCategory.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of alert categories (\"supplyChainRisk\", \"maintenance\", \"quality\", \"license\", or \"vulnerability\") that should be excluded", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertCveId", + "in": "query", + "required": false, + "description": "CVE ID", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertCveId.notIn", + "in": "query", + "required": false, + "description": "CVE ID", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertCveTitle", + "in": "query", + "required": false, + "description": "CVE title", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertCveTitle.notIn", + "in": "query", + "required": false, + "description": "CVE title", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertCweId", + "in": "query", + "required": false, + "description": "CWE ID", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertCweId.notIn", + "in": "query", + "required": false, + "description": "CWE ID", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertCweName", + "in": "query", + "required": false, + "description": "CWE name", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertCweName.notIn", + "in": "query", + "required": false, + "description": "CWE name", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertReachabilityType", + "in": "query", + "required": false, + "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", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertReachabilityType.notIn", + "in": "query", + "required": false, + "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", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertReachabilityAnalysisType", + "in": "query", + "required": false, + "description": "Comma-separated list of alert CVE reachability analysis types (\"full-scan\" or \"precomputed\") that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertReachabilityAnalysisType.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of alert CVE reachability analysis types (\"full-scan\" or \"precomputed\") that should be excluded", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertPriority", + "in": "query", + "required": false, + "description": "Alert priority (\"low\", \"medium\", \"high\", or \"critical\")", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertPriority.notIn", + "in": "query", + "required": false, + "description": "Alert priority (\"low\", \"medium\", \"high\", or \"critical\")", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertKEV", + "in": "query", + "required": false, + "description": "Alert KEV (Known Exploited Vulnerability) filter flag", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "filters.alertKEV.notIn", + "in": "query", + "required": false, + "description": "Alert KEV (Known Exploited Vulnerability) filter flag", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "filters.alertEPSS", + "in": "query", + "required": false, + "description": "Alert EPSS (\"low\", \"medium\", \"high\", \"critical\")", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertEPSS.notIn", + "in": "query", + "required": false, + "description": "Alert EPSS (\"low\", \"medium\", \"high\", \"critical\")", + "schema": { + "type": "string" + } + }, + { + "name": "filters.dependencyDirect", + "in": "query", + "required": false, + "description": "Direct/transitive dependency filter flag", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "filters.dependencyDirect.notIn", + "in": "query", + "required": false, + "description": "Direct/transitive dependency filter flag", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "filters.dependencyDev", + "in": "query", + "required": false, + "description": "Development/production dependency filter flag", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "filters.dependencyDev.notIn", + "in": "query", + "required": false, + "description": "Development/production dependency filter flag", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "filters.dependencyDead", + "in": "query", + "required": false, + "description": "Dead/reachable dependency filter flag", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "filters.dependencyDead.notIn", + "in": "query", + "required": false, + "description": "Dead/reachable dependency filter flag", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "security": [ + { + "bearerAuth": [ + "historical:alerts-list" + ] + }, + { + "basicAuth": [ + "historical:alerts-list" + ] + } + ], + "description": "List historical alerts.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- historical:alerts-list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "endCursor": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "items": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "repoFullName": { + "type": "string", + "description": "", + "default": "" + }, + "repoId": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "repoSlug": { + "type": "string", + "description": "", + "default": "" + }, + "repoLabels": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "repoLabelIds": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "branch": { + "type": "string", + "description": "", + "default": "" + }, + "defaultBranch": { + "type": "boolean", + "default": false, + "description": "" + }, + "fullScanId": { + "type": "string", + "description": "", + "default": "" + }, + "scannedAt": { + "type": "string", + "description": "", + "default": "" + }, + "artifact": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "license": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "name": { + "type": "string", + "description": "", + "default": "" + }, + "namespace": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "type": { + "type": "string", + "description": "", + "default": "" + }, + "version": { + "type": "string", + "description": "", + "default": "" + }, + "artifact_id": { + "type": "string", + "description": "", + "default": "" + }, + "artifactId": { + "type": "string", + "description": "", + "default": "" + }, + "author": { + "type": "string", + "description": "", + "default": "" + }, + "capabilities": { + "$ref": "#/components/schemas/Capabilities" + }, + "qualifiers": { + "$ref": "#/components/schemas/Qualifiers" + }, + "scores": { + "$ref": "#/components/schemas/SocketScore" + }, + "size": { + "type": "integer", + "description": "", + "default": 0 + }, + "subpath": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "id", + "license", + "name", + "namespace", + "type", + "version" + ] + }, + "alert": { + "type": "object", + "additionalProperties": false, + "properties": { + "key": { + "type": "string", + "description": "", + "default": "" + }, + "type": { + "type": "string", + "description": "", + "default": "" + }, + "severity": { + "type": "integer", + "description": "", + "default": 0 + }, + "severityName": { + "type": "string", + "description": "", + "default": "" + }, + "action": { + "type": "string", + "description": "", + "default": "" + }, + "category": { + "type": "string", + "description": "", + "default": "" + }, + "file": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "props": { + "type": "object", + "description": "", + "default": null, + "nullable": true + }, + "start": { + "type": "integer", + "description": "", + "default": 0, + "nullable": true + }, + "end": { + "type": "integer", + "description": "", + "default": 0, + "nullable": true + }, + "fix": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "type": { + "type": "string", + "description": "", + "default": "" + }, + "description": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "description", + "type" + ], + "nullable": true + } + }, + "required": [ + "action", + "category", + "key", + "severity", + "severityName", + "type" + ] + }, + "dependency": { + "type": "object", + "additionalProperties": false, + "properties": { + "direct": { + "type": "boolean", + "default": false, + "description": "" + }, + "dev": { + "type": "boolean", + "default": false, + "description": "" + }, + "dead": { + "type": "boolean", + "default": false, + "description": "" + }, + "manifestFiles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SocketManifestReference" + }, + "description": "" + }, + "topLevelAncestors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SocketId" + }, + "description": "" + }, + "dependencies": { + "type": "array", + "items": { + "$ref": "#/components/schemas/SocketId" + }, + "description": "" + } + }, + "required": [ + "dead", + "dev", + "direct" + ] + } + }, + "required": [ + "alert", + "artifact", + "branch", + "defaultBranch", + "dependency", + "fullScanId", + "repoFullName", + "repoId", + "repoLabelIds", + "repoLabels", + "repoSlug", + "scannedAt" + ] + }, + "description": "" + }, + "meta": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "organizationId": { + "type": "string", + "description": "", + "default": "" + }, + "queryStartTimestamp": { + "type": "number", + "description": "", + "default": 0 + }, + "startDateInclusive": { + "type": "string", + "description": "", + "default": "" + }, + "endDateInclusive": { + "type": "string", + "description": "", + "default": "" + }, + "includeLatestAlertsOnly": { + "type": "boolean", + "default": false, + "description": "" + }, + "filters": { + "type": "object", + "additionalProperties": false, + "properties": { + "alertSeverity": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Comma-separated list of alert severities (\"low\", \"medium\", \"high\", or \"critical\") that should be excluded" + }, + "repoSlug": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Comma-separated list of repo slugs that should be excluded" + }, + "repoFullName": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Comma-separated list of repo full names that should be excluded" + }, + "repoLabels": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Comma-separated list of repo labels that should be excluded. Use \"\" to filter for repositories with no labels." + }, + "alertType": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Comma-separated list of alert types (e.g. \"usesEval\", \"unmaintained\", etc.) that should be excluded" + }, + "artifactName": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Name of artifact" + }, + "artifactType": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Comma-separated list of artifact types (e.g. \"npm\", \"pypi\", \"gem\", \"maven\", \"golang\", etc.) that should be excluded" + }, + "alertAction": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Comma-separated list of alert actions (\"error\", \"warn\", \"monitor\", or \"ignore) that should be excluded" + }, + "alertActionSourceType": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Comma-separated list of alert action source types (\"fallback\", \"injected-alert\", \"org-policy\", \"reachability\", \"repo-label-policy\", \"socket-yml\", or \"triage\") that should be excluded" + }, + "alertFixType": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Comma-separated list of alert fix types (\"upgrade\", \"cve\", or \"remove\") that should be excluded" + }, + "alertCategory": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Comma-separated list of alert categories (\"supplyChainRisk\", \"maintenance\", \"quality\", \"license\", or \"vulnerability\") that should be excluded" + }, + "alertCveId": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "CVE ID" + }, + "alertCveTitle": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "CVE title" + }, + "alertCweId": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "CWE ID" + }, + "alertCweName": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "CWE name" + }, + "alertReachabilityType": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "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" + }, + "alertReachabilityAnalysisType": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Comma-separated list of alert CVE reachability analysis types (\"full-scan\" or \"precomputed\") that should be excluded" + }, + "alertPriority": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Alert priority (\"low\", \"medium\", \"high\", or \"critical\")" + }, + "alertKEV": { + "type": "array", + "items": { + "type": "boolean", + "default": false, + "description": "" + }, + "description": "Alert KEV (Known Exploited Vulnerability) filter flag" + }, + "alertEPSS": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "Alert EPSS (\"low\", \"medium\", \"high\", \"critical\")" + }, + "dependencyDirect": { + "type": "array", + "items": { + "type": "boolean", + "default": false, + "description": "" + }, + "description": "Direct/transitive dependency filter flag" + }, + "dependencyDev": { + "type": "array", + "items": { + "type": "boolean", + "default": false, + "description": "" + }, + "description": "Development/production dependency filter flag" + }, + "dependencyDead": { + "type": "array", + "items": { + "type": "boolean", + "default": false, + "description": "" + }, + "description": "Dead/reachable dependency filter flag" + } + }, + "description": "" } }, - "description": "" - }, - "securityPolicyDefault": { - "type": "string", - "enum": [ - "default", - "low", - "medium", - "high" - ], - "description": "The default security policy for the organization", - "default": "default" + "required": [ + "endDateInclusive", + "filters", + "includeLatestAlertsOnly", + "organizationId", + "queryStartTimestamp", + "startDateInclusive" + ] } }, - "description": "" - } - } - }, - "description": "Updated repository details" - }, - "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}/settings/license-policy": { - "get": { - "tags": [ - "Deprecated" - ], - "summary": "Get Organization License Policy", - "deprecated": true, - "operationId": "getOrgLicensePolicy", - "parameters": [ - { - "name": "org_slug", - "in": "path", - "required": true, - "description": "The slug of the organization", - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "bearerAuth": [ - "license-policy:read" - ] - }, - { - "basicAuth": [ - "license-policy:read" - ] - } - ], - "description": "**This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/viewlicensepolicy) instead.\n\nRetrieve the license policy of an organization.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- license-policy:read", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "", - "default": null - } - } - }, - "description": "Retrieved license policy details" - }, - "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": [ - "License Policy" - ], - "summary": "Update License Policy", - "operationId": "updateOrgLicensePolicy", - "parameters": [ - { - "name": "org_slug", - "in": "path", - "required": true, - "description": "The slug of the organization", - "schema": { - "type": "string" - } - }, - { - "name": "merge_update", - "in": "query", - "required": true, - "description": "Merge the policy update with the existing policy. Default is true. If false, the existing policy will be replaced with the new policy.", - "schema": { - "type": "boolean", - "default": false - } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "", - "default": null - } - } - }, - "required": false - }, - "security": [ - { - "bearerAuth": [ - "license-policy:update" - ] - }, - { - "basicAuth": [ - "license-policy:update" - ] - } - ], - "description": "Set the organization's license policy\n\n ## License policy schema\n\n```json\n{\n allow?: Array\n warn?: Array\n options?: Array\n}\n```\n\nElements 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.\n\n## License Classes\n\nStrings which are license classes will expand to a list of licenses known to be in that particular license class. Recognized license classes are:\n 'permissive',\n 'permissive (model)',\n 'permissive (gold)',\n 'permissive (silver)',\n 'permissive (bronze)',\n 'permissive (lead)',\n 'copyleft',\n 'maximal copyleft',\n 'network copyleft',\n 'strong copyleft',\n 'weak copyleft',\n 'contributor license agreement',\n 'public domain',\n 'proprietary free',\n 'source available',\n 'proprietary',\n 'commercial',\n 'patent'\n\nUsers can learn more about [copyleft tiers](https://blueoakcouncil.org/copyleft) and [permissive tiers](https://blueoakcouncil.org/list) by reading the linked resources.\n\n\n## PURLs\n\nUsers 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.\n\npurl qualifiers which support globs are `filename`, `version_glob`, `artifact_id` and `license_provenance` (primarily used for allowing data from registry metadata).\n\n### Examples:\nAllow all license data found in a specific version of a package 4.14.1: `pkg:npm/lodash@4.14.1`\nAllow all license data found in a version range of a package: `pkg:npm/lodash?version_glob=15.*`\nAllow all license data in the test directory of a given package for certain version ranges: `pkg:npm/lodash@15.*.*?file_name=lodash/test/*`\nAllow all license data taken from the package registry for a package and version range: `pkg:npm/lodash?version_glob=*&license_provenance=registry_metadata`\n\n## Available options\n\n`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.\n\n`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.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- license-policy:update", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object", - "description": "", - "default": null - } - } - }, - "description": "Updated repository details" - }, - "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}/settings/license-policy/view": { - "get": { - "tags": [ - "License Policy" - ], - "summary": "Get License Policy (Beta)", - "operationId": "viewLicensePolicy", - "parameters": [ - { - "name": "org_slug", - "in": "path", - "required": true, - "description": "The slug of the organization", - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "bearerAuth": [ - "license-policy:read" - ] - }, - { - "basicAuth": [ - "license-policy:read" - ] - } - ], - "description": "Returns an organization's license policy\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- license-policy:read", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SStoredLicensePolicy" + "required": [ + "endCursor", + "items", + "meta" + ] } } }, - "description": "Saturated License Allow List" + "description": "The paginated array of API tokens for the organization, and related metadata." }, "400": { "$ref": "#/components/responses/SocketBadRequest" @@ -27404,114 +32577,6 @@ "403": { "$ref": "#/components/responses/SocketForbidden" }, - "404": { - "$ref": "#/components/responses/SocketNotFoundResponse" - }, - "429": { - "$ref": "#/components/responses/SocketTooManyRequestsResponse" - }, - "500": { - "$ref": "#/components/responses/SocketInternalServerError" - } - }, - "x-readme": {} - } - }, - "/orgs/{org_slug}/settings/socket-basics": { - "get": { - "tags": [ - "Org Settings" - ], - "summary": "Get Socket Basics configuration, including toggles for the various tools it supports.", - "operationId": "getSocketBasicsConfig", - "parameters": [ - { - "name": "org_slug", - "in": "path", - "required": true, - "description": "The slug of the organization", - "schema": { - "type": "string" - } - } - ], - "security": [ - { - "bearerAuth": [ - "socket-basics:read" - ] - }, - { - "basicAuth": [ - "socket-basics:read" - ] - } - ], - "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.\n\n- **SAST** - Find issues and risks with your code via static analysis using best in class Open Source tools\n- **Secret Scanning** - Detected potentially leaked secrets and credentials within your code\n- **Container Security** - Docker image and Dockerfile vulnerability scanning\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- socket-basics:read", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": false, - "properties": { - "pythonSastEnabled": { - "type": "boolean", - "default": false, - "description": "Run a SAST Scan on your source code as part of the Socket Basics scan" - }, - "golangSastEnabled": { - "type": "boolean", - "default": false, - "description": "Run a SAST Scan on your source code as part of the Socket Basics scan" - }, - "javascriptSastEnabled": { - "type": "boolean", - "default": false, - "description": "Run a SAST Scan on your source code as part of the Socket Basics scan" - }, - "secretScanningEnabled": { - "type": "boolean", - "default": false, - "description": "Scan for hardcoded secrets and credentials in your code as part of the Socket Basics scan" - }, - "trivyImageEnabled": { - "type": "boolean", - "default": false, - "description": "Run a vulnerability scan on your Docker images as part of the Socket Basics scan" - }, - "trivyDockerfileEnabled": { - "type": "boolean", - "default": false, - "description": "Run a vulnerability scan on your Dockerfiles as part of the Socket Basics scan" - }, - "socketScanningEnabled": { - "type": "boolean", - "default": false, - "description": "Scan dependencies for security vulnerabilities and issues as part of the Socket Basics scan" - }, - "socketScaEnabled": { - "type": "boolean", - "default": false, - "description": "Enables or disable running a Socket SCA Scan as part of the Socket Basics scan. If you have Socket already enabled via the Github App this is not needed. Socket SCA provides 0 day protection of Open Source Supply Chain packages, CVE Reachability, and operational risk of packages." - }, - "additionalParameters": { - "type": "string", - "description": "", - "default": "", - "format": "Additional configuration for Socket Basics, includes support for experimental and custom tooling." - } - }, - "description": "" - } - } - }, - "description": "Socket Basics settings" - }, - "403": { - "$ref": "#/components/responses/SocketForbidden" - }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } @@ -27519,13 +32584,13 @@ "x-readme": {} } }, - "/orgs/{org_slug}/historical/alerts": { + "/orgs/{org_slug}/historical/alerts/trend": { "get": { "tags": [ "Alerts" ], - "summary": "List historical alerts (Beta)", - "operationId": "historicalAlertsList", + "summary": "Trend of historical alerts (Beta)", + "operationId": "historicalAlertsTrend", "parameters": [ { "name": "org_slug", @@ -27550,29 +32615,17 @@ "name": "range", "in": "query", "required": false, - "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", + "description": "The number of days of data to fetch as an offset from input date", "schema": { "type": "string", "default": "-7d" } }, { - "name": "per_page", - "in": "query", - "required": false, - "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)", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 10000, - "default": 10000 - } - }, - { - "name": "startAfterCursor", + "name": "aggregation.fields", "in": "query", "required": false, - "description": "The pagination cursor that was returned as the \"endCursor\" property in previous request", + "description": "Comma-separated list of fields that should be used for count aggregation (allowed: alertSeverity,repoSlug,repoFullName,repoLabels,alertType,artifactType,alertAction,alertActionSourceType,alertFixType,alertCategory,alertCveId,alertCveTitle,alertCweId,alertCweName,alertReachabilityType,alertReachabilityAnalysisType,alertPriority,alertKEV,alertEPSS,dependencyDirect,dependencyDev,dependencyDead)", "schema": { "type": "string", "default": "" @@ -27614,11 +32667,29 @@ "type": "string" } }, + { + "name": "filters.repoFullName", + "in": "query", + "required": false, + "description": "Comma-separated list of repo full names that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "filters.repoFullName.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of repo full names that should be excluded", + "schema": { + "type": "string" + } + }, { "name": "filters.repoLabels", "in": "query", "required": false, - "description": "Comma-separated list of repo labels that should be included", + "description": "Comma-separated list of repo labels that should be included. Use \"\" to filter for repositories with no labels.", "schema": { "type": "string" } @@ -27627,7 +32698,7 @@ "name": "filters.repoLabels.notIn", "in": "query", "required": false, - "description": "Comma-separated list of repo labels that should be excluded", + "description": "Comma-separated list of repo labels that should be excluded. Use \"\" to filter for repositories with no labels.", "schema": { "type": "string" } @@ -27708,7 +32779,7 @@ "name": "filters.alertActionSourceType", "in": "query", "required": false, - "description": "Comma-separated list of alert action source types (\"fallback\", \"org-policy\", \"reachability\", \"repo-label-policy\", \"socket-yml\", or \"triage\") that should be included", + "description": "Comma-separated list of alert action source types (\"fallback\", \"injected-alert\", \"org-policy\", \"reachability\", \"repo-label-policy\", \"socket-yml\", or \"triage\") that should be included", "schema": { "type": "string" } @@ -27717,7 +32788,7 @@ "name": "filters.alertActionSourceType.notIn", "in": "query", "required": false, - "description": "Comma-separated list of alert action source types (\"fallback\", \"org-policy\", \"reachability\", \"repo-label-policy\", \"socket-yml\", or \"triage\") that should be excluded", + "description": "Comma-separated list of alert action source types (\"fallback\", \"injected-alert\", \"org-policy\", \"reachability\", \"repo-label-policy\", \"socket-yml\", or \"triage\") that should be excluded", "schema": { "type": "string" } @@ -27848,11 +32919,29 @@ "type": "string" } }, + { + "name": "filters.alertReachabilityAnalysisType", + "in": "query", + "required": false, + "description": "Comma-separated list of alert CVE reachability analysis types (\"full-scan\" or \"precomputed\") that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertReachabilityAnalysisType.notIn", + "in": "query", + "required": false, + "description": "Comma-separated list of alert CVE reachability analysis types (\"full-scan\" or \"precomputed\") that should be excluded", + "schema": { + "type": "string" + } + }, { "name": "filters.alertPriority", "in": "query", "required": false, - "description": "Alert priority (\"low\", \"medium\", or \"high\")", + "description": "Alert priority (\"low\", \"medium\", \"high\", or \"critical\")", "schema": { "type": "string" } @@ -27861,7 +32950,45 @@ "name": "filters.alertPriority.notIn", "in": "query", "required": false, - "description": "Alert priority (\"low\", \"medium\", or \"high\")", + "description": "Alert priority (\"low\", \"medium\", \"high\", or \"critical\")", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertKEV", + "in": "query", + "required": false, + "description": "Alert KEV (Known Exploited Vulnerability) filter flag", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "filters.alertKEV.notIn", + "in": "query", + "required": false, + "description": "Alert KEV (Known Exploited Vulnerability) filter flag", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "filters.alertEPSS", + "in": "query", + "required": false, + "description": "Alert EPSS (\"low\", \"medium\", \"high\", \"critical\")", + "schema": { + "type": "string" + } + }, + { + "name": "filters.alertEPSS.notIn", + "in": "query", + "required": false, + "description": "Alert EPSS (\"low\", \"medium\", \"high\", \"critical\")", "schema": { "type": "string" } @@ -27930,16 +33057,16 @@ "security": [ { "bearerAuth": [ - "historical:alerts-list" + "historical:alerts-trend" ] }, { "basicAuth": [ - "historical:alerts-list" + "historical:alerts-trend" ] } ], - "description": "List historical alerts.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- historical:alerts-list", + "description": "Trend analytics of historical alerts.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- historical:alerts-trend", "responses": { "200": { "content": { @@ -27949,303 +33076,501 @@ "additionalProperties": false, "description": "", "properties": { - "endCursor": { - "type": "string", + "meta": { + "type": "object", + "additionalProperties": false, "description": "", - "default": "", - "nullable": true - }, - "items": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "repoId": { - "type": "string", - "description": "", - "default": "", - "nullable": true - }, - "repoSlug": { - "type": "string", - "description": "", - "default": "" - }, - "repoLabels": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" - }, - "repoLabelIds": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" - }, - "branch": { - "type": "string", - "description": "", - "default": "" - }, - "defaultBranch": { - "type": "boolean", - "default": false, - "description": "" - }, - "fullScanId": { - "type": "string", - "description": "", - "default": "" - }, - "scannedAt": { - "type": "string", - "description": "", - "default": "" - }, - "artifact": { - "type": "object", - "additionalProperties": false, - "properties": { - "id": { + "properties": { + "organizationId": { + "type": "string", + "description": "", + "default": "" + }, + "startDateInclusive": { + "type": "string", + "description": "", + "default": "" + }, + "endDateInclusive": { + "type": "string", + "description": "", + "default": "" + }, + "interval": { + "type": "string", + "description": "", + "default": "" + }, + "aggregation": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "fields": { + "type": "array", + "items": { "type": "string", "description": "", - "default": "", - "nullable": true + "default": "" }, - "license": { + "description": "" + }, + "groups": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "description": "" + } + }, + "required": [ + "fields", + "groups" + ] + }, + "filters": { + "type": "object", + "additionalProperties": false, + "properties": { + "alertSeverity": { + "type": "array", + "items": { "type": "string", "description": "", - "default": "", - "nullable": true + "default": "" }, - "name": { + "description": "Comma-separated list of alert severities (\"low\", \"medium\", \"high\", or \"critical\") that should be excluded" + }, + "repoSlug": { + "type": "array", + "items": { "type": "string", "description": "", "default": "" }, - "namespace": { + "description": "Comma-separated list of repo slugs that should be excluded" + }, + "repoFullName": { + "type": "array", + "items": { "type": "string", "description": "", - "default": "", - "nullable": true + "default": "" }, - "type": { + "description": "Comma-separated list of repo full names that should be excluded" + }, + "repoLabels": { + "type": "array", + "items": { "type": "string", "description": "", "default": "" }, - "version": { + "description": "Comma-separated list of repo labels that should be excluded. Use \"\" to filter for repositories with no labels." + }, + "alertType": { + "type": "array", + "items": { "type": "string", "description": "", "default": "" }, - "artifact_id": { + "description": "Comma-separated list of alert types (e.g. \"usesEval\", \"unmaintained\", etc.) that should be excluded" + }, + "artifactName": { + "type": "array", + "items": { "type": "string", "description": "", "default": "" }, - "artifactId": { + "description": "Name of artifact" + }, + "artifactType": { + "type": "array", + "items": { "type": "string", "description": "", "default": "" }, - "author": { + "description": "Comma-separated list of artifact types (e.g. \"npm\", \"pypi\", \"gem\", \"maven\", \"golang\", etc.) that should be excluded" + }, + "alertAction": { + "type": "array", + "items": { "type": "string", "description": "", "default": "" }, - "capabilities": { - "$ref": "#/components/schemas/Capabilities" - }, - "qualifiers": { - "$ref": "#/components/schemas/Qualifiers" - }, - "scores": { - "$ref": "#/components/schemas/SocketScore" - }, - "size": { - "type": "integer", + "description": "Comma-separated list of alert actions (\"error\", \"warn\", \"monitor\", or \"ignore) that should be excluded" + }, + "alertActionSourceType": { + "type": "array", + "items": { + "type": "string", "description": "", - "default": 0 + "default": "" }, - "subpath": { + "description": "Comma-separated list of alert action source types (\"fallback\", \"injected-alert\", \"org-policy\", \"reachability\", \"repo-label-policy\", \"socket-yml\", or \"triage\") that should be excluded" + }, + "alertFixType": { + "type": "array", + "items": { "type": "string", "description": "", "default": "" - } + }, + "description": "Comma-separated list of alert fix types (\"upgrade\", \"cve\", or \"remove\") that should be excluded" }, - "required": [ - "id", - "license", - "name", - "namespace", - "type", - "version" - ] - }, - "alert": { - "type": "object", - "additionalProperties": false, - "properties": { - "key": { + "alertCategory": { + "type": "array", + "items": { "type": "string", "description": "", "default": "" }, - "type": { + "description": "Comma-separated list of alert categories (\"supplyChainRisk\", \"maintenance\", \"quality\", \"license\", or \"vulnerability\") that should be excluded" + }, + "alertCveId": { + "type": "array", + "items": { "type": "string", "description": "", "default": "" }, - "severity": { - "type": "integer", + "description": "CVE ID" + }, + "alertCveTitle": { + "type": "array", + "items": { + "type": "string", "description": "", - "default": 0 + "default": "" }, - "severityName": { + "description": "CVE title" + }, + "alertCweId": { + "type": "array", + "items": { "type": "string", "description": "", "default": "" }, - "action": { + "description": "CWE ID" + }, + "alertCweName": { + "type": "array", + "items": { "type": "string", "description": "", "default": "" }, - "category": { + "description": "CWE name" + }, + "alertReachabilityType": { + "type": "array", + "items": { "type": "string", "description": "", "default": "" }, - "file": { + "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" + }, + "alertReachabilityAnalysisType": { + "type": "array", + "items": { "type": "string", "description": "", - "default": "", - "nullable": true + "default": "" }, - "props": { - "type": "object", + "description": "Comma-separated list of alert CVE reachability analysis types (\"full-scan\" or \"precomputed\") that should be excluded" + }, + "alertPriority": { + "type": "array", + "items": { + "type": "string", "description": "", - "default": null, - "nullable": true + "default": "" }, - "start": { - "type": "integer", - "description": "", - "default": 0, - "nullable": true + "description": "Alert priority (\"low\", \"medium\", \"high\", or \"critical\")" + }, + "alertKEV": { + "type": "array", + "items": { + "type": "boolean", + "default": false, + "description": "" }, - "end": { - "type": "integer", + "description": "Alert KEV (Known Exploited Vulnerability) filter flag" + }, + "alertEPSS": { + "type": "array", + "items": { + "type": "string", "description": "", - "default": 0, - "nullable": true + "default": "" }, - "fix": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "type": { - "type": "string", - "description": "", - "default": "" - }, - "description": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "description", - "type" - ], - "nullable": true - } + "description": "Alert EPSS (\"low\", \"medium\", \"high\", \"critical\")" }, - "required": [ - "action", - "category", - "key", - "severity", - "severityName", - "type" - ] - }, - "dependency": { - "type": "object", - "additionalProperties": false, - "properties": { - "direct": { + "dependencyDirect": { + "type": "array", + "items": { "type": "boolean", "default": false, "description": "" }, - "dev": { + "description": "Direct/transitive dependency filter flag" + }, + "dependencyDev": { + "type": "array", + "items": { "type": "boolean", "default": false, "description": "" }, - "dead": { + "description": "Development/production dependency filter flag" + }, + "dependencyDead": { + "type": "array", + "items": { "type": "boolean", "default": false, "description": "" }, - "manifestFiles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocketManifestReference" + "description": "Dead/reachable dependency filter flag" + } + }, + "description": "" + } + }, + "required": [ + "aggregation", + "endDateInclusive", + "filters", + "interval", + "organizationId", + "startDateInclusive" + ] + }, + "items": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "date": { + "type": "string", + "description": "", + "default": "" + }, + "startOfDayTimestamp": { + "type": "number", + "description": "", + "default": 0 + }, + "dataPoints": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "aggregationGroup": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" }, - "description": "" - }, - "topLevelAncestors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocketId" + "count": { + "type": "integer", + "description": "", + "default": 0 }, - "description": "" + "countDelta": { + "type": "integer", + "description": "", + "default": 0 + } }, - "dependencies": { - "type": "array", - "items": { - "$ref": "#/components/schemas/SocketId" - }, - "description": "" - } + "required": [ + "aggregationGroup", + "count", + "countDelta" + ] }, - "required": [ - "dead", - "dev", - "direct" - ] + "description": "" } }, "required": [ - "alert", - "artifact", - "branch", - "defaultBranch", - "dependency", - "fullScanId", - "repoId", - "repoLabelIds", - "repoLabels", - "repoSlug", - "scannedAt" + "dataPoints", + "date", + "startOfDayTimestamp" ] }, "description": "" - }, + } + }, + "required": [ + "items", + "meta" + ] + } + } + }, + "description": "The trend data" + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/historical/dependencies/trend": { + "get": { + "tags": [ + "Dependencies" + ], + "summary": "Trend of historical dependencies (Beta)", + "operationId": "historicalDependenciesTrend", + "parameters": [ + { + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", + "schema": { + "type": "string" + } + }, + { + "name": "date", + "in": "query", + "required": false, + "description": "The UTC date in YYYY-MM-DD format for which to fetch dependencies", + "schema": { + "type": "string", + "default": "CURRENT_DATE" + } + }, + { + "name": "range", + "in": "query", + "required": false, + "description": "The number of days of data to fetch as an offset from input date", + "schema": { + "type": "string", + "default": "-7d" + } + }, + { + "name": "repoFullName", + "in": "query", + "required": false, + "description": "Comma-separated list of repo full names that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "repoSlug", + "in": "query", + "required": false, + "description": "Comma-separated list of repo slugs that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "repoLabels", + "in": "query", + "required": false, + "description": "Comma-separated list of repo labels that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "artifactType", + "in": "query", + "required": false, + "description": "Comma-separated list of artifact types (e.g. \"npm\", \"pypi\", \"gem\", \"maven\", \"golang\", etc.) that should be included", + "schema": { + "type": "string" + } + }, + { + "name": "dependencyDirect", + "in": "query", + "required": false, + "description": "Direct/transitive dependency filter flag", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "dependencyDev", + "in": "query", + "required": false, + "description": "Development/production dependency filter flag", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "dependencyDead", + "in": "query", + "required": false, + "description": "Dead/reachable dependency filter flag", + "schema": { + "type": "boolean", + "default": false + } + } + ], + "security": [ + { + "bearerAuth": [ + "historical:dependencies-trend" + ] + }, + { + "basicAuth": [ + "historical:dependencies-trend" + ] + } + ], + "description": "Trend analytics of historical dependencies.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- historical:dependencies-trend", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { "meta": { "type": "object", "additionalProperties": false, @@ -28256,11 +33581,6 @@ "description": "", "default": "" }, - "queryStartTimestamp": { - "type": "number", - "description": "", - "default": 0 - }, "startDateInclusive": { "type": "string", "description": "", @@ -28271,59 +33591,74 @@ "description": "", "default": "" }, - "includeLatestAlertsOnly": { - "type": "boolean", - "default": false, - "description": "" + "interval": { + "type": "string", + "description": "", + "default": "" }, - "filters": { + "aggregation": { "type": "object", "additionalProperties": false, + "description": "", "properties": { - "alertSeverity": { + "fields": { "type": "array", "items": { "type": "string", "description": "", "default": "" }, - "description": "Comma-separated list of alert severities (\"low\", \"medium\", \"high\", or \"critical\") that should be excluded" + "description": "" }, - "repoSlug": { + "groups": { "type": "array", "items": { - "type": "string", - "description": "", - "default": "" + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" }, - "description": "Comma-separated list of repo slugs that should be excluded" - }, - "repoLabels": { + "description": "" + } + }, + "required": [ + "fields", + "groups" + ] + }, + "filters": { + "type": "object", + "additionalProperties": false, + "properties": { + "repoFullName": { "type": "array", "items": { "type": "string", "description": "", "default": "" }, - "description": "Comma-separated list of repo labels that should be excluded" + "description": "Comma-separated list of repo full names that should be included" }, - "alertType": { + "repoSlug": { "type": "array", "items": { "type": "string", "description": "", "default": "" }, - "description": "Comma-separated list of alert types (e.g. \"usesEval\", \"unmaintained\", etc.) that should be excluded" + "description": "Comma-separated list of repo slugs that should be included" }, - "artifactName": { + "repoLabels": { "type": "array", "items": { "type": "string", "description": "", "default": "" }, - "description": "Name of artifact" + "description": "Comma-separated list of repo labels that should be included" }, "artifactType": { "type": "array", @@ -28332,148 +33667,336 @@ "description": "", "default": "" }, - "description": "Comma-separated list of artifact types (e.g. \"npm\", \"pypi\", \"gem\", \"maven\", \"golang\", etc.) that should be excluded" - }, - "alertAction": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of alert actions (\"error\", \"warn\", \"monitor\", or \"ignore) that should be excluded" - }, - "alertActionSourceType": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of alert action source types (\"fallback\", \"org-policy\", \"reachability\", \"repo-label-policy\", \"socket-yml\", or \"triage\") that should be excluded" - }, - "alertFixType": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of alert fix types (\"upgrade\", \"cve\", or \"remove\") that should be excluded" - }, - "alertCategory": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of alert categories (\"supplyChainRisk\", \"maintenance\", \"quality\", \"license\", or \"vulnerability\") that should be excluded" - }, - "alertCveId": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "CVE ID" - }, - "alertCveTitle": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "CVE title" - }, - "alertCweId": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "CWE ID" - }, - "alertCweName": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "CWE name" - }, - "alertReachabilityType": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "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" + "description": "Comma-separated list of artifact types (e.g. \"npm\", \"pypi\", \"gem\", \"maven\", \"golang\", etc.) that should be included" }, - "alertPriority": { + "dependencyDirect": { "type": "array", "items": { - "type": "string", - "description": "", - "default": "" + "type": "boolean", + "default": false, + "description": "" }, - "description": "Alert priority (\"low\", \"medium\", or \"high\")" + "description": "Direct/transitive dependency filter flag" }, - "dependencyDirect": { + "dependencyDev": { "type": "array", "items": { "type": "boolean", "default": false, "description": "" }, - "description": "Direct/transitive dependency filter flag" + "description": "Development/production dependency filter flag" }, - "dependencyDev": { + "dependencyDead": { "type": "array", "items": { "type": "boolean", "default": false, "description": "" }, - "description": "Development/production dependency filter flag" + "description": "Dead/reachable dependency filter flag" + } + }, + "description": "" + } + }, + "required": [ + "aggregation", + "endDateInclusive", + "filters", + "interval", + "organizationId", + "startDateInclusive" + ] + }, + "items": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "date": { + "type": "string", + "description": "", + "default": "" + }, + "startOfDayTimestamp": { + "type": "number", + "description": "", + "default": 0 + }, + "dataPoints": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "aggregationGroup": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "count": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDelta": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDirect": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDirectDelta": { + "type": "integer", + "description": "", + "default": 0 + }, + "countIndirect": { + "type": "integer", + "description": "", + "default": 0 + }, + "countIndirectDelta": { + "type": "integer", + "description": "", + "default": 0 + }, + "countsBySeverity": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "low": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "count": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDelta": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDirect": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDirectDelta": { + "type": "integer", + "description": "", + "default": 0 + }, + "countIndirect": { + "type": "integer", + "description": "", + "default": 0 + }, + "countIndirectDelta": { + "type": "integer", + "description": "", + "default": 0 + } + }, + "required": [ + "count", + "countDelta", + "countDirect", + "countDirectDelta", + "countIndirect", + "countIndirectDelta" + ] + }, + "medium": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "count": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDelta": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDirect": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDirectDelta": { + "type": "integer", + "description": "", + "default": 0 + }, + "countIndirect": { + "type": "integer", + "description": "", + "default": 0 + }, + "countIndirectDelta": { + "type": "integer", + "description": "", + "default": 0 + } + }, + "required": [ + "count", + "countDelta", + "countDirect", + "countDirectDelta", + "countIndirect", + "countIndirectDelta" + ] + }, + "high": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "count": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDelta": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDirect": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDirectDelta": { + "type": "integer", + "description": "", + "default": 0 + }, + "countIndirect": { + "type": "integer", + "description": "", + "default": 0 + }, + "countIndirectDelta": { + "type": "integer", + "description": "", + "default": 0 + } + }, + "required": [ + "count", + "countDelta", + "countDirect", + "countDirectDelta", + "countIndirect", + "countIndirectDelta" + ] + }, + "critical": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "count": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDelta": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDirect": { + "type": "integer", + "description": "", + "default": 0 + }, + "countDirectDelta": { + "type": "integer", + "description": "", + "default": 0 + }, + "countIndirect": { + "type": "integer", + "description": "", + "default": 0 + }, + "countIndirectDelta": { + "type": "integer", + "description": "", + "default": 0 + } + }, + "required": [ + "count", + "countDelta", + "countDirect", + "countDirectDelta", + "countIndirect", + "countIndirectDelta" + ] + } + }, + "required": [ + "critical", + "high", + "low", + "medium" + ] + } + }, + "required": [ + "aggregationGroup", + "count", + "countDelta", + "countDirect", + "countDirectDelta", + "countIndirect", + "countIndirectDelta", + "countsBySeverity" + ] }, - "dependencyDead": { - "type": "array", - "items": { - "type": "boolean", - "default": false, - "description": "" - }, - "description": "Dead/reachable dependency filter flag" - } - }, - "description": "" - } + "description": "" + } + }, + "required": [ + "dataPoints", + "date", + "startOfDayTimestamp" + ] }, - "required": [ - "endDateInclusive", - "filters", - "includeLatestAlertsOnly", - "organizationId", - "queryStartTimestamp", - "startDateInclusive" - ] + "description": "" } }, "required": [ - "endCursor", "items", "meta" ] } } }, - "description": "The paginated array of API tokens for the organization, and related metadata." + "description": "The trend data" }, "400": { "$ref": "#/components/responses/SocketBadRequest" @@ -28491,13 +34014,13 @@ "x-readme": {} } }, - "/orgs/{org_slug}/historical/alerts/trend": { + "/orgs/{org_slug}/historical/snapshots": { "get": { "tags": [ - "Alerts" + "Org Snapshots" ], - "summary": "Trend of historical alerts (Beta)", - "operationId": "historicalAlertsTrend", + "summary": "List details of periodic historical data snapshots (Beta)", + "operationId": "historicalSnapshotsList", "parameters": [ { "name": "org_slug", @@ -28512,7 +34035,7 @@ "name": "date", "in": "query", "required": false, - "description": "The UTC date in YYYY-MM-DD format for which to fetch alerts", + "description": "The UTC date in YYYY-MM-DD format for which to fetch snapshots", "schema": { "type": "string", "default": "CURRENT_DATE" @@ -28522,384 +34045,1462 @@ "name": "range", "in": "query", "required": false, - "description": "The number of days of data to fetch as an offset from input date", + "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", "schema": { "type": "string", "default": "-7d" } }, { - "name": "aggregation.fields", + "name": "per_page", "in": "query", "required": false, - "description": "Comma-separated list of fields that should be used for count aggregation (allowed: alertSeverity,repoSlug,repoLabels,alertType,artifactType,alertAction,alertActionSourceType,alertFixType,alertCategory,alertCveId,alertCveTitle,alertCweId,alertCweName,alertReachabilityType,alertPriority,dependencyDirect,dependencyDev,dependencyDead)", + "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)", "schema": { - "type": "string", - "default": "" + "type": "integer", + "minimum": 1, + "maximum": 10000, + "default": 10000 } }, { - "name": "filters.alertSeverity", + "name": "startAfterCursor", "in": "query", "required": false, - "description": "Comma-separated list of alert severities (\"low\", \"medium\", \"high\", or \"critical\") that should be included", + "description": "The pagination cursor that was returned as the \"endCursor\" property in previous request", "schema": { - "type": "string" + "type": "string", + "default": "" } }, { - "name": "filters.alertSeverity.notIn", + "name": "filters.status", "in": "query", "required": false, - "description": "Comma-separated list of alert severities (\"low\", \"medium\", \"high\", or \"critical\") that should be excluded", + "description": "Comma-separated list of historical snapshot statuses that should be included (allowed: \"in-progress\", \"success\", \"failure\", \"timeout\", \"skipped\")", "schema": { - "type": "string" + "type": "string", + "default": "" } }, { - "name": "filters.repoSlug", + "name": "filters.requestId", "in": "query", "required": false, - "description": "Comma-separated list of repo slugs that should be included", + "description": "Comma-separated list of requestId values that were used to start the historical snapshot job", "schema": { - "type": "string" + "type": "string", + "default": "" } - }, + } + ], + "security": [ { - "name": "filters.repoSlug.notIn", - "in": "query", - "required": false, - "description": "Comma-separated list of repo slugs that should be excluded", - "schema": { - "type": "string" - } + "bearerAuth": [ + "historical:snapshots-list" + ] }, { - "name": "filters.repoLabels", - "in": "query", - "required": false, - "description": "Comma-separated list of repo labels that should be included", - "schema": { - "type": "string" - } + "basicAuth": [ + "historical:snapshots-list" + ] + } + ], + "description": "This API endpoint is used to list the details of historical snapshots.\nSnapshots of organization data are taken periodically, and each historical snapshot record contains high-level overview metrics about the data that was collected.\nOther [Historical Data Endpoints](/reference/historical-data-endpoints) can be used to fetch the raw data associated with each snapshot.\n\nHistorical snapshots contain details and raw data for the following resources:\n\n- Repositories\n- Alerts\n- Dependencies\n- Artifacts\n- Users\n- Settings\n\nDaily snapshot data is bucketed to the nearest day which is described in more detail at: [Historical Data Endpoints](/reference/historical-data-endpoints)\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- historical:snapshots-list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "meta": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "organizationId": { + "type": "string", + "description": "", + "default": "" + }, + "queryStartTimestamp": { + "type": "number", + "description": "", + "default": 0 + }, + "startDateInclusive": { + "type": "string", + "description": "", + "default": "" + }, + "endDateInclusive": { + "type": "string", + "description": "", + "default": "" + }, + "filters": { + "type": "object", + "additionalProperties": false, + "properties": { + "status": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "requestId": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + } + }, + "description": "" + } + }, + "required": [ + "endDateInclusive", + "filters", + "organizationId", + "queryStartTimestamp", + "startDateInclusive" + ] + }, + "items": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "id": { + "type": "string", + "description": "", + "default": "" + }, + "requestId": { + "type": "string", + "description": "", + "default": "" + }, + "requestedBy": { + "type": "string", + "description": "", + "default": "" + }, + "requestedAt": { + "type": "string", + "description": "", + "default": "" + }, + "startedAt": { + "type": "string", + "description": "", + "default": "" + }, + "finishedAt": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "durationMs": { + "type": "integer", + "description": "", + "default": 0 + }, + "status": { + "type": "string", + "description": "", + "default": "" + }, + "numReposScanned": { + "type": "integer", + "description": "", + "default": 0 + }, + "numSbomsScanned": { + "type": "integer", + "description": "", + "default": 0 + }, + "numLowAlerts": { + "type": "integer", + "description": "", + "default": 0 + }, + "numHighAlerts": { + "type": "integer", + "description": "", + "default": 0 + }, + "numMediumAlerts": { + "type": "integer", + "description": "", + "default": 0 + }, + "numCriticalAlerts": { + "type": "integer", + "description": "", + "default": 0 + }, + "numIgnoredLowAlerts": { + "type": "integer", + "description": "", + "default": 0 + }, + "numIgnoredHighAlerts": { + "type": "integer", + "description": "", + "default": 0 + }, + "numIgnoredMediumAlerts": { + "type": "integer", + "description": "", + "default": 0 + }, + "numIgnoredCriticalAlerts": { + "type": "integer", + "description": "", + "default": 0 + } + }, + "required": [ + "durationMs", + "finishedAt", + "id", + "numCriticalAlerts", + "numHighAlerts", + "numIgnoredCriticalAlerts", + "numIgnoredHighAlerts", + "numIgnoredLowAlerts", + "numIgnoredMediumAlerts", + "numLowAlerts", + "numMediumAlerts", + "numReposScanned", + "numSbomsScanned", + "requestId", + "requestedAt", + "requestedBy", + "startedAt", + "status" + ] + }, + "description": "" + }, + "endCursor": { + "type": "string", + "description": "", + "default": "", + "nullable": true + } + }, + "required": [ + "endCursor", + "items", + "meta" + ] + } + } + }, + "description": "The historical snapshots." }, - { - "name": "filters.repoLabels.notIn", - "in": "query", - "required": false, - "description": "Comma-separated list of repo labels that should be excluded", - "schema": { - "type": "string" - } + "400": { + "$ref": "#/components/responses/SocketBadRequest" }, - { - "name": "filters.alertType", - "in": "query", - "required": false, - "description": "Comma-separated list of alert types (e.g. \"usesEval\", \"unmaintained\", etc.) that should be included", - "schema": { - "type": "string" - } + "401": { + "$ref": "#/components/responses/SocketUnauthorized" }, - { - "name": "filters.alertType.notIn", - "in": "query", - "required": false, - "description": "Comma-separated list of alert types (e.g. \"usesEval\", \"unmaintained\", etc.) that should be excluded", - "schema": { - "type": "string" - } + "403": { + "$ref": "#/components/responses/SocketForbidden" }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + }, + "post": { + "tags": [ + "Org Snapshots" + ], + "summary": "Start historical data snapshot job (Beta)", + "operationId": "historicalSnapshotsStart", + "parameters": [ { - "name": "filters.artifactName", - "in": "query", - "required": false, - "description": "Name of artifact", + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", "schema": { "type": "string" } - }, + } + ], + "security": [ { - "name": "filters.artifactName.notIn", - "in": "query", - "required": false, - "description": "Name of artifact", - "schema": { - "type": "string" - } + "bearerAuth": [ + "historical:snapshots-start" + ] }, { - "name": "filters.artifactType", - "in": "query", - "required": false, - "description": "Comma-separated list of artifact types (e.g. \"npm\", \"pypi\", \"gem\", \"maven\", \"golang\", etc.) that should be included", - "schema": { - "type": "string" - } + "basicAuth": [ + "historical:snapshots-start" + ] + } + ], + "description": "This API endpoint is used to start a historical snapshot job.\nWhile snapshots are typically taken at least once a day, this endpoint can be used to start an \"on demand\" snapshot job to ensure the latest data is collected and stored for historical purposes.\n\nAn historical snapshot will contain details and raw data for the following resources:\n\n- Repositories\n- Alerts\n- Dependencies\n- Artifacts\n- Users\n- Settings\n\nHistorical snapshot data is bucketed to the nearest day which is described in more detail at: [Historical Data Endpoints](/reference/historical-data-endpoints)\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- historical:snapshots-start", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "requestId": { + "type": "string", + "description": "", + "default": "" + }, + "requestedBy": { + "type": "string", + "description": "", + "default": "" + }, + "requestedAt": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "requestId", + "requestedAt", + "requestedBy" + ] + } + } + }, + "description": "The details of the snapshot job request." + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/audit-log": { + "get": { + "tags": [ + "Audit Log" + ], + "summary": "Get Audit Log Events", + "operationId": "getAuditLogEvents", + "parameters": [ { - "name": "filters.artifactType.notIn", - "in": "query", - "required": false, - "description": "Comma-separated list of artifact types (e.g. \"npm\", \"pypi\", \"gem\", \"maven\", \"golang\", etc.) that should be excluded", + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", "schema": { "type": "string" } }, { - "name": "filters.alertAction", + "name": "type", "in": "query", "required": false, - "description": "Comma-separated list of alert actions (\"error\", \"warn\", \"monitor\", or \"ignore) that should be included", + "description": "Filter audit log events by type. Omit for all types.", "schema": { - "type": "string" + "type": "string", + "enum": [ + "AddLicenseOverlayNote", + "AssociateLabel", + "CancelInvitation", + "ChangeMemberRole", + "ChangePlanSubscriptionSeats", + "CreateApiToken", + "CreateLabel", + "CreateWebhook", + "DeleteFullScan", + "DeleteLabel", + "DeleteLabelSetting", + "DeleteReport", + "DeleteRepository", + "DeleteWebhook", + "DisassociateLabel", + "DowngradeOrganizationPlan", + "JoinOrganization", + "MemberAdded", + "MemberRemoved", + "MemberRoleChanged", + "RemoveLicenseOverlay", + "RemoveMember", + "ResetInvitationLink", + "ResetOrganizationSettingToDefault", + "RevokeApiToken", + "RotateApiToken", + "SendInvitation", + "SetLabelSettingToDefault", + "SyncOrganization", + "TransferOwnership", + "UpdateAlertTriage", + "UpdateApiTokenCommitter", + "UpdateApiTokenMaxQuota", + "UpdateApiTokenName", + "UpdateApiTokenScopes", + "UpdateApiTokenVisibility", + "UpdateAutopatchCurated", + "UpdateLabel", + "UpdateLabelSetting", + "UpdateLicenseOverlay", + "UpdateOrganizationSetting", + "UpdateWebhook", + "UpgradeOrganizationPlan" + ] } }, { - "name": "filters.alertAction.notIn", + "name": "per_page", "in": "query", "required": false, - "description": "Comma-separated list of alert actions (\"error\", \"warn\", \"monitor\", or \"ignore) that should be excluded", + "description": "Number of events per page", "schema": { - "type": "string" + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 30 } }, { - "name": "filters.alertActionSourceType", + "name": "page", "in": "query", "required": false, - "description": "Comma-separated list of alert action source types (\"fallback\", \"org-policy\", \"reachability\", \"repo-label-policy\", \"socket-yml\", or \"triage\") that should be included", + "description": "Page token", "schema": { - "type": "string" + "type": "string", + "default": "1" } }, { - "name": "filters.alertActionSourceType.notIn", + "name": "from", "in": "query", "required": false, - "description": "Comma-separated list of alert action source types (\"fallback\", \"org-policy\", \"reachability\", \"repo-label-policy\", \"socket-yml\", or \"triage\") that should be excluded", + "description": "A Unix timestamp in seconds to filter results prior to this date.", "schema": { "type": "string" } - }, + } + ], + "security": [ { - "name": "filters.alertFixType", - "in": "query", - "required": false, - "description": "Comma-separated list of alert fix types (\"upgrade\", \"cve\", or \"remove\") that should be included", - "schema": { - "type": "string" - } + "bearerAuth": [ + "audit-log:list" + ] }, { - "name": "filters.alertFixType.notIn", - "in": "query", - "required": false, - "description": "Comma-separated list of alert fix types (\"upgrade\", \"cve\", or \"remove\") that should be excluded", - "schema": { - "type": "string" - } + "basicAuth": [ + "audit-log:list" + ] + } + ], + "description": "Paginated list of audit log events.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- audit-log:list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "event_id": { + "type": "string", + "description": "", + "default": "" + }, + "created_at": { + "type": "string", + "description": "", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "", + "default": "" + }, + "country_code": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "organization_id": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "ip_address": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "payload": { + "type": "object", + "description": "", + "default": null, + "nullable": true + }, + "status_code": { + "type": "integer", + "description": "", + "default": 0, + "nullable": true + }, + "type": { + "type": "string", + "description": "", + "default": "" + }, + "user_agent": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "user_id": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "user_email": { + "type": "string", + "description": "", + "default": "" + }, + "user_image": { + "type": "string", + "description": "", + "default": "" + }, + "organization_name": { + "type": "string", + "description": "", + "default": "" + } + }, + "description": "" + }, + "description": "" + }, + "nextPage": { + "type": "string", + "description": "", + "default": "", + "nullable": true + } + }, + "required": [ + "nextPage", + "results" + ] + } + } + }, + "description": "The paginated list of events in an organizations audit log and the next page querystring token." }, - { - "name": "filters.alertCategory", - "in": "query", - "required": false, - "description": "Comma-separated list of alert categories (\"supplyChainRisk\", \"maintenance\", \"quality\", \"license\", or \"vulnerability\") that should be included", - "schema": { - "type": "string" - } + "400": { + "$ref": "#/components/responses/SocketBadRequest" }, - { - "name": "filters.alertCategory.notIn", - "in": "query", - "required": false, - "description": "Comma-separated list of alert categories (\"supplyChainRisk\", \"maintenance\", \"quality\", \"license\", or \"vulnerability\") that should be excluded", - "schema": { - "type": "string" - } + "401": { + "$ref": "#/components/responses/SocketUnauthorized" }, - { - "name": "filters.alertCveId", - "in": "query", - "required": false, - "description": "CVE ID", - "schema": { - "type": "string" - } + "403": { + "$ref": "#/components/responses/SocketForbidden" }, - { - "name": "filters.alertCveId.notIn", - "in": "query", - "required": false, - "description": "CVE ID", - "schema": { - "type": "string" - } + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/api-tokens": { + "post": { + "tags": [ + "API Tokens" + ], + "summary": "Create API Token", + "operationId": "postAPIToken", + "parameters": [ { - "name": "filters.alertCveTitle", - "in": "query", - "required": false, - "description": "CVE title", + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", "schema": { "type": "string" } - }, - { - "name": "filters.alertCveTitle.notIn", - "in": "query", - "required": false, - "description": "CVE title", - "schema": { - "type": "string" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "max_quota": { + "type": "integer", + "description": "Maximum number of API calls allowed per month", + "default": 1000 + }, + "scopes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "alerts", + "alerts:list", + "alerts:trend", + "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", + "license-policy", + "license-policy:update", + "license-policy:read", + "packages", + "packages:list", + "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", + "threat-feed", + "threat-feed:list", + "triage", + "triage:alerts-list", + "triage:alerts-update", + "webhooks", + "webhooks:create", + "webhooks:list", + "webhooks:update", + "webhooks:delete" + ], + "description": "The scope of permissions for this API Token", + "default": "repo:list" + }, + "description": "List of scopes granted to the API Token" + }, + "visibility": { + "type": "string", + "enum": [ + "admin", + "organization" + ], + "description": "The visibility of the API Token. Warning: this field is deprecated and will be removed in the future.", + "default": "organization" + }, + "committer": { + "type": "object", + "additionalProperties": false, + "properties": { + "email": { + "type": "string", + "description": "Email address of the committer", + "default": "" + }, + "provider": { + "type": "string", + "enum": [ + "api", + "azure", + "bitbucket", + "github", + "gitlab" + ], + "description": "The source control provider for the committer", + "default": "api" + }, + "providerLoginName": { + "type": "string", + "description": "Login name on the provider platform", + "default": "" + }, + "providerUserId": { + "type": "string", + "description": "User ID on the provider platform", + "default": "" + } + }, + "description": "Committer information to associate with the API Token" + }, + "name": { + "type": "string", + "description": "Name for the API Token", + "default": "api token" + }, + "resources": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "organizationSlug": { + "type": "string", + "description": "Slug of the organization to grant access to", + "default": "" + }, + "repositorySlug": { + "type": "string", + "description": "Slug of the repository to grant access to", + "default": "" + }, + "workspace": { + "type": "string", + "description": "Workspace slug containing the specified repo", + "default": "" + } + }, + "required": [ + "organizationSlug", + "repositorySlug" + ] + }, + "description": "List of resources this API Token can access. Tokens with resource grants can only access a subset of routes that support this feature." + } + }, + "required": [ + "committer", + "max_quota", + "scopes", + "visibility" + ] + } } }, + "description": "The settings to create the api token with.", + "required": false + }, + "security": [ { - "name": "filters.alertCweId", - "in": "query", - "required": false, - "description": "CWE ID", - "schema": { - "type": "string" - } + "bearerAuth": [ + "api-tokens:create" + ] }, { - "name": "filters.alertCweId.notIn", - "in": "query", - "required": false, - "description": "CWE ID", - "schema": { - "type": "string" - } + "basicAuth": [ + "api-tokens:create" + ] + } + ], + "description": "Create an API Token. The API Token created must use a subset of permissions the API token creating them.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- api-tokens:create", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "token": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "token" + ] + } + } + }, + "description": "The newly created api token." }, - { - "name": "filters.alertCweName", - "in": "query", - "required": false, - "description": "CWE name", - "schema": { - "type": "string" - } + "401": { + "$ref": "#/components/responses/SocketUnauthorized" }, - { - "name": "filters.alertCweName.notIn", - "in": "query", - "required": false, - "description": "CWE name", - "schema": { - "type": "string" - } + "403": { + "$ref": "#/components/responses/SocketForbidden" }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + }, + "get": { + "tags": [ + "API Tokens" + ], + "summary": "List API Tokens", + "operationId": "getAPITokens", + "parameters": [ { - "name": "filters.alertReachabilityType", - "in": "query", - "required": false, - "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", + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", "schema": { "type": "string" } }, { - "name": "filters.alertReachabilityType.notIn", + "name": "sort", "in": "query", "required": false, - "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", + "description": "Specify Sort order.", "schema": { - "type": "string" + "type": "string", + "enum": [ + "created_at" + ], + "default": "created_at" } }, { - "name": "filters.alertPriority", + "name": "direction", "in": "query", "required": false, - "description": "Alert priority (\"low\", \"medium\", or \"high\")", + "description": "Specify sort direction.", "schema": { - "type": "string" + "type": "string", + "enum": [ + "asc", + "desc" + ], + "default": "desc" } }, { - "name": "filters.alertPriority.notIn", + "name": "per_page", "in": "query", "required": false, - "description": "Alert priority (\"low\", \"medium\", or \"high\")", + "description": "Specify the maximum number of results to return per page.", "schema": { - "type": "string" + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 30 } }, { - "name": "filters.dependencyDirect", + "name": "page", "in": "query", "required": false, - "description": "Direct/transitive dependency filter flag", + "description": "The token specifying which page to return.", "schema": { - "type": "boolean", - "default": false + "type": "integer", + "minimum": 1, + "default": 1 } + } + ], + "security": [ + { + "bearerAuth": [ + "api-tokens:list" + ] }, { - "name": "filters.dependencyDirect.notIn", - "in": "query", - "required": false, - "description": "Direct/transitive dependency filter flag", - "schema": { - "type": "boolean", - "default": false - } + "basicAuth": [ + "api-tokens:list" + ] + } + ], + "description": "List all API Tokens.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- api-tokens:list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "tokens": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "API Token response schema", + "properties": { + "committers": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "properties": { + "email": { + "type": "string", + "description": "Email address of the committer", + "default": "" + }, + "provider": { + "type": "string", + "enum": [ + "api", + "azure", + "bitbucket", + "github", + "gitlab" + ], + "description": "The source control provider for the committer", + "default": "api" + }, + "providerLoginName": { + "type": "string", + "description": "Login name on the provider platform", + "default": "" + }, + "providerUserId": { + "type": "string", + "description": "User ID on the provider platform", + "default": "" + } + }, + "description": "Committer information associated with the API Token" + }, + "description": "List of committers associated with this API Token" + }, + "created_at": { + "type": "string", + "description": "Timestamp when the API Token was created", + "default": "", + "format": "date" + }, + "id": { + "type": "string", + "description": "The ID of the API Token", + "default": "" + }, + "last_used_at": { + "type": "string", + "description": "Timestamp when the API Token was last used", + "default": "", + "format": "date" + }, + "max_quota": { + "type": "integer", + "description": "Maximum number of API calls allowed per month", + "default": 1000 + }, + "name": { + "type": "string", + "description": "Name for the API Token", + "default": "api token", + "nullable": true + }, + "scopes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "alerts", + "alerts:list", + "alerts:trend", + "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", + "license-policy", + "license-policy:update", + "license-policy:read", + "packages", + "packages:list", + "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", + "threat-feed", + "threat-feed:list", + "triage", + "triage:alerts-list", + "triage:alerts-update", + "webhooks", + "webhooks:create", + "webhooks:list", + "webhooks:update", + "webhooks:delete" + ], + "description": "The scope of permissions for this API Token", + "default": "repo:list" + }, + "description": "List of scopes granted to the API Token" + }, + "token": { + "type": "string", + "description": "The obfuscated token of the API Token", + "default": "" + }, + "visibility": { + "type": "string", + "enum": [ + "admin", + "organization" + ], + "description": "The visibility of the API Token. Warning: this field is deprecated and will be removed in the future.", + "default": "organization" + } + }, + "required": [ + "committers", + "created_at", + "id", + "last_used_at", + "max_quota", + "name", + "scopes", + "token", + "visibility" + ] + }, + "description": "" + }, + "nextPage": { + "type": "integer", + "description": "", + "default": 0, + "nullable": true + } + }, + "required": [ + "nextPage", + "tokens" + ] + } + } + }, + "description": "The paginated array of API tokens for the organization, and related metadata." + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/api-tokens/update": { + "post": { + "tags": [ + "API Tokens" + ], + "summary": "Update API Token", + "operationId": "postAPITokenUpdate", + "parameters": [ { - "name": "filters.dependencyDev", - "in": "query", - "required": false, - "description": "Development/production dependency filter flag", + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", "schema": { - "type": "boolean", - "default": false + "type": "string" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "max_quota": { + "type": "integer", + "description": "Maximum number of API calls allowed per hour", + "default": 1000 + }, + "scopes": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "alerts", + "alerts:list", + "alerts:trend", + "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", + "license-policy", + "license-policy:update", + "license-policy:read", + "packages", + "packages:list", + "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", + "threat-feed", + "threat-feed:list", + "triage", + "triage:alerts-list", + "triage:alerts-update", + "webhooks", + "webhooks:create", + "webhooks:list", + "webhooks:update", + "webhooks:delete" + ], + "description": "The scope of permissions for this API Token", + "default": "repo:list" + }, + "description": "List of scopes granted to the API Token" + }, + "token": { + "type": "string", + "description": "The API token to update", + "default": "" + }, + "visibility": { + "type": "string", + "enum": [ + "admin", + "organization" + ], + "description": "The visibility of the API Token. Warning: this field is deprecated and will be removed in the future.", + "default": "organization" + }, + "committer": { + "type": "object", + "additionalProperties": false, + "properties": { + "email": { + "type": "string", + "description": "Email address of the committer", + "default": "" + }, + "provider": { + "type": "string", + "enum": [ + "api", + "azure", + "bitbucket", + "github", + "gitlab" + ], + "description": "The source control provider for the committer", + "default": "api" + }, + "providerLoginName": { + "type": "string", + "description": "Login name on the provider platform", + "default": "" + }, + "providerUserId": { + "type": "string", + "description": "User ID on the provider platform", + "default": "" + } + }, + "description": "Committer information to associate with the API Token" + }, + "name": { + "type": "string", + "description": "Name for the API Token", + "default": "api token" + } + }, + "required": [ + "committer", + "max_quota", + "scopes", + "token", + "visibility" + ] + } } }, + "description": "The token and properties to update on the token.", + "required": false + }, + "security": [ { - "name": "filters.dependencyDev.notIn", - "in": "query", - "required": false, - "description": "Development/production dependency filter flag", - "schema": { - "type": "boolean", - "default": false - } + "bearerAuth": [ + "api-tokens:create" + ] }, { - "name": "filters.dependencyDead", - "in": "query", - "required": false, - "description": "Dead/reachable dependency filter flag", - "schema": { - "type": "boolean", - "default": false - } + "basicAuth": [ + "api-tokens:create" + ] + } + ], + "description": "Update an API Token. The API Token created must use a subset of permissions the API token creating them.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- api-tokens:create", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "token": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "token" + ] + } + } + }, + "description": "The updated token." + }, + "401": { + "$ref": "#/components/responses/SocketUnauthorized" }, + "403": { + "$ref": "#/components/responses/SocketForbidden" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/api-tokens/rotate": { + "post": { + "tags": [ + "API Tokens" + ], + "summary": "Rotate API Token", + "operationId": "postAPITokensRotate", + "parameters": [ { - "name": "filters.dependencyDead.notIn", - "in": "query", - "required": false, - "description": "Dead/reachable dependency filter flag", + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", "schema": { - "type": "boolean", - "default": false + "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "token": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "token" + ] + } + } + }, + "description": "The API Token to rotate", + "required": false + }, "security": [ { "bearerAuth": [ - "historical:alerts-trend" + "api-tokens:rotate" ] }, { "basicAuth": [ - "historical:alerts-trend" + "api-tokens:rotate" ] } ], - "description": "Trend analytics of historical alerts.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- historical:alerts-trend", + "description": "Rotate an API Token\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- api-tokens:rotate", "responses": { "200": { "content": { @@ -28909,325 +35510,19 @@ "additionalProperties": false, "description": "", "properties": { - "meta": { - "type": "object", - "additionalProperties": false, + "token": { + "type": "string", "description": "", - "properties": { - "organizationId": { - "type": "string", - "description": "", - "default": "" - }, - "startDateInclusive": { - "type": "string", - "description": "", - "default": "" - }, - "endDateInclusive": { - "type": "string", - "description": "", - "default": "" - }, - "interval": { - "type": "string", - "description": "", - "default": "" - }, - "aggregation": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "fields": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" - }, - "groups": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" - }, - "description": "" - } - }, - "required": [ - "fields", - "groups" - ] - }, - "filters": { - "type": "object", - "additionalProperties": false, - "properties": { - "alertSeverity": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of alert severities (\"low\", \"medium\", \"high\", or \"critical\") that should be excluded" - }, - "repoSlug": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of repo slugs that should be excluded" - }, - "repoLabels": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of repo labels that should be excluded" - }, - "alertType": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of alert types (e.g. \"usesEval\", \"unmaintained\", etc.) that should be excluded" - }, - "artifactName": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Name of artifact" - }, - "artifactType": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of artifact types (e.g. \"npm\", \"pypi\", \"gem\", \"maven\", \"golang\", etc.) that should be excluded" - }, - "alertAction": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of alert actions (\"error\", \"warn\", \"monitor\", or \"ignore) that should be excluded" - }, - "alertActionSourceType": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of alert action source types (\"fallback\", \"org-policy\", \"reachability\", \"repo-label-policy\", \"socket-yml\", or \"triage\") that should be excluded" - }, - "alertFixType": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of alert fix types (\"upgrade\", \"cve\", or \"remove\") that should be excluded" - }, - "alertCategory": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of alert categories (\"supplyChainRisk\", \"maintenance\", \"quality\", \"license\", or \"vulnerability\") that should be excluded" - }, - "alertCveId": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "CVE ID" - }, - "alertCveTitle": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "CVE title" - }, - "alertCweId": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "CWE ID" - }, - "alertCweName": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "CWE name" - }, - "alertReachabilityType": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "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" - }, - "alertPriority": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Alert priority (\"low\", \"medium\", or \"high\")" - }, - "dependencyDirect": { - "type": "array", - "items": { - "type": "boolean", - "default": false, - "description": "" - }, - "description": "Direct/transitive dependency filter flag" - }, - "dependencyDev": { - "type": "array", - "items": { - "type": "boolean", - "default": false, - "description": "" - }, - "description": "Development/production dependency filter flag" - }, - "dependencyDead": { - "type": "array", - "items": { - "type": "boolean", - "default": false, - "description": "" - }, - "description": "Dead/reachable dependency filter flag" - } - }, - "description": "" - } - }, - "required": [ - "aggregation", - "endDateInclusive", - "filters", - "interval", - "organizationId", - "startDateInclusive" - ] - }, - "items": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "date": { - "type": "string", - "description": "", - "default": "" - }, - "startOfDayTimestamp": { - "type": "number", - "description": "", - "default": 0 - }, - "dataPoints": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "aggregationGroup": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" - }, - "count": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDelta": { - "type": "integer", - "description": "", - "default": 0 - } - }, - "required": [ - "aggregationGroup", - "count", - "countDelta" - ] - }, - "description": "" - } - }, - "required": [ - "dataPoints", - "date", - "startOfDayTimestamp" - ] - }, - "description": "" + "default": "" } }, "required": [ - "items", - "meta" + "token" ] } } }, - "description": "The trend data" - }, - "400": { - "$ref": "#/components/responses/SocketBadRequest" + "description": "The replacement API Token" }, "401": { "$ref": "#/components/responses/SocketUnauthorized" @@ -29242,13 +35537,13 @@ "x-readme": {} } }, - "/orgs/{org_slug}/historical/dependencies/trend": { - "get": { + "/orgs/{org_slug}/api-tokens/revoke": { + "post": { "tags": [ - "Dependencies" + "API Tokens" ], - "summary": "Trend of historical dependencies (Beta)", - "operationId": "historicalDependenciesTrend", + "summary": "Revoke API Token", + "operationId": "postAPITokensRevoke", "parameters": [ { "name": "org_slug", @@ -29258,534 +35553,145 @@ "schema": { "type": "string" } - }, - { - "name": "date", - "in": "query", - "required": false, - "description": "The UTC date in YYYY-MM-DD format for which to fetch dependencies", - "schema": { - "type": "string", - "default": "CURRENT_DATE" - } - }, - { - "name": "range", - "in": "query", - "required": false, - "description": "The number of days of data to fetch as an offset from input date", - "schema": { - "type": "string", - "default": "-7d" - } - }, - { - "name": "repoSlug", - "in": "query", - "required": false, - "description": "Comma-separated list of repo slugs that should be included", - "schema": { - "type": "string" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "token": { + "type": "string", + "description": "", + "default": "" + } + }, + "required": [ + "token" + ] + } } }, + "description": "The token to revoke.", + "required": false + }, + "security": [ { - "name": "repoLabels", - "in": "query", - "required": false, - "description": "Comma-separated list of repo labels that should be included", - "schema": { - "type": "string" - } + "bearerAuth": [ + "api-tokens:revoke" + ] }, { - "name": "artifactType", - "in": "query", - "required": false, - "description": "Comma-separated list of artifact types (e.g. \"npm\", \"pypi\", \"gem\", \"maven\", \"golang\", etc.) that should be included", - "schema": { - "type": "string" - } + "basicAuth": [ + "api-tokens:revoke" + ] + } + ], + "description": "Revoke an API Token\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- api-tokens:revoke", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "status": { + "type": "string", + "description": "The status of the token", + "default": "revoked" + } + }, + "required": [ + "status" + ] + } + } + }, + "description": "Response body" }, - { - "name": "dependencyDirect", - "in": "query", - "required": false, - "description": "Direct/transitive dependency filter flag", - "schema": { - "type": "boolean", - "default": false - } + "401": { + "$ref": "#/components/responses/SocketUnauthorized" }, - { - "name": "dependencyDev", - "in": "query", - "required": false, - "description": "Development/production dependency filter flag", - "schema": { - "type": "boolean", - "default": false - } + "403": { + "$ref": "#/components/responses/SocketForbidden" }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, + "/orgs/{org_slug}/supported-files": { + "get": { + "tags": [ + "Metadata", + "Full Scans", + "Diff Scans" + ], + "summary": "Get supported file types", + "operationId": "getSupportedFiles", + "parameters": [ { - "name": "dependencyDead", - "in": "query", - "required": false, - "description": "Dead/reachable dependency filter flag", + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", "schema": { - "type": "boolean", - "default": false + "type": "string" } } ], "security": [ { - "bearerAuth": [ - "historical:dependencies-trend" - ] + "bearerAuth": [] }, { - "basicAuth": [ - "historical:dependencies-trend" - ] + "basicAuth": [] } ], - "description": "Trend analytics of historical dependencies.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- historical:dependencies-trend", + "description": "Get a list of supported files for full scan generation.\nFiles are categorized first by environment (e.g. NPM or PyPI), then by name.\n\nFiles whose names match the patterns returned by this endpoint can be uploaded for report generation.\nExamples of supported filenames include `package.json`, `package-lock.json`, and `yarn.lock`.\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": { "application/json": { "schema": { "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "meta": { + "additionalProperties": { + "type": "object", + "additionalProperties": { "type": "object", "additionalProperties": false, "description": "", "properties": { - "organizationId": { - "type": "string", - "description": "", - "default": "" - }, - "startDateInclusive": { - "type": "string", - "description": "", - "default": "" - }, - "endDateInclusive": { - "type": "string", - "description": "", - "default": "" - }, - "interval": { + "pattern": { "type": "string", "description": "", "default": "" - }, - "aggregation": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "fields": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" - }, - "groups": { - "type": "array", - "items": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" - }, - "description": "" - } - }, - "required": [ - "fields", - "groups" - ] - }, - "filters": { - "type": "object", - "additionalProperties": false, - "properties": { - "repoSlug": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of repo slugs that should be included" - }, - "repoLabels": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of repo labels that should be included" - }, - "artifactType": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "Comma-separated list of artifact types (e.g. \"npm\", \"pypi\", \"gem\", \"maven\", \"golang\", etc.) that should be included" - }, - "dependencyDirect": { - "type": "array", - "items": { - "type": "boolean", - "default": false, - "description": "" - }, - "description": "Direct/transitive dependency filter flag" - }, - "dependencyDev": { - "type": "array", - "items": { - "type": "boolean", - "default": false, - "description": "" - }, - "description": "Development/production dependency filter flag" - }, - "dependencyDead": { - "type": "array", - "items": { - "type": "boolean", - "default": false, - "description": "" - }, - "description": "Dead/reachable dependency filter flag" - } - }, - "description": "" } }, "required": [ - "aggregation", - "endDateInclusive", - "filters", - "interval", - "organizationId", - "startDateInclusive" + "pattern" ] }, - "items": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "date": { - "type": "string", - "description": "", - "default": "" - }, - "startOfDayTimestamp": { - "type": "number", - "description": "", - "default": 0 - }, - "dataPoints": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "aggregationGroup": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" - }, - "count": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDelta": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDirect": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDirectDelta": { - "type": "integer", - "description": "", - "default": 0 - }, - "countIndirect": { - "type": "integer", - "description": "", - "default": 0 - }, - "countIndirectDelta": { - "type": "integer", - "description": "", - "default": 0 - }, - "countsBySeverity": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "low": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "count": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDelta": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDirect": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDirectDelta": { - "type": "integer", - "description": "", - "default": 0 - }, - "countIndirect": { - "type": "integer", - "description": "", - "default": 0 - }, - "countIndirectDelta": { - "type": "integer", - "description": "", - "default": 0 - } - }, - "required": [ - "count", - "countDelta", - "countDirect", - "countDirectDelta", - "countIndirect", - "countIndirectDelta" - ] - }, - "medium": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "count": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDelta": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDirect": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDirectDelta": { - "type": "integer", - "description": "", - "default": 0 - }, - "countIndirect": { - "type": "integer", - "description": "", - "default": 0 - }, - "countIndirectDelta": { - "type": "integer", - "description": "", - "default": 0 - } - }, - "required": [ - "count", - "countDelta", - "countDirect", - "countDirectDelta", - "countIndirect", - "countIndirectDelta" - ] - }, - "high": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "count": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDelta": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDirect": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDirectDelta": { - "type": "integer", - "description": "", - "default": 0 - }, - "countIndirect": { - "type": "integer", - "description": "", - "default": 0 - }, - "countIndirectDelta": { - "type": "integer", - "description": "", - "default": 0 - } - }, - "required": [ - "count", - "countDelta", - "countDirect", - "countDirectDelta", - "countIndirect", - "countIndirectDelta" - ] - }, - "critical": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "count": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDelta": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDirect": { - "type": "integer", - "description": "", - "default": 0 - }, - "countDirectDelta": { - "type": "integer", - "description": "", - "default": 0 - }, - "countIndirect": { - "type": "integer", - "description": "", - "default": 0 - }, - "countIndirectDelta": { - "type": "integer", - "description": "", - "default": 0 - } - }, - "required": [ - "count", - "countDelta", - "countDirect", - "countDirectDelta", - "countIndirect", - "countIndirectDelta" - ] - } - }, - "required": [ - "critical", - "high", - "low", - "medium" - ] - } - }, - "required": [ - "aggregationGroup", - "count", - "countDelta", - "countDirect", - "countDirectDelta", - "countIndirect", - "countIndirectDelta", - "countsBySeverity" - ] - }, - "description": "" - } - }, - "required": [ - "dataPoints", - "date", - "startOfDayTimestamp" - ] - }, - "description": "" - } + "properties": {}, + "description": "" }, - "required": [ - "items", - "meta" - ] + "properties": {}, + "description": "" } } }, - "description": "The trend data" + "description": "Glob patterns used to match supported files" }, "400": { "$ref": "#/components/responses/SocketBadRequest" }, - "401": { - "$ref": "#/components/responses/SocketUnauthorized" - }, - "403": { - "$ref": "#/components/responses/SocketForbidden" - }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } @@ -29793,99 +35699,174 @@ "x-readme": {} } }, - "/orgs/{org_slug}/historical/snapshots": { + "/threat-feed": { "get": { "tags": [ - "Org Snapshots" + "Deprecated" ], - "summary": "List details of periodic historical data snapshots (Beta)", - "operationId": "historicalSnapshotsList", + "summary": "Get Threat Feed Items (Deprecated)", + "deprecated": true, + "operationId": "getThreatFeedItems", "parameters": [ { - "name": "org_slug", - "in": "path", - "required": true, - "description": "The slug of the organization", + "name": "per_page", + "in": "query", + "required": false, + "description": "Number of threats per page", "schema": { - "type": "string" + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 30 } }, { - "name": "date", + "name": "page", "in": "query", "required": false, - "description": "The UTC date in YYYY-MM-DD format for which to fetch snapshots", + "description": "Page token", "schema": { "type": "string", - "default": "CURRENT_DATE" + "default": "1" + } + }, + { + "name": "sort", + "in": "query", + "required": false, + "description": "Sort sort the threat feed by ID or createdAt attribute.", + "schema": { + "type": "string", + "enum": [ + "id", + "created_at" + ], + "default": "id" + } + }, + { + "name": "discovery_period", + "in": "query", + "required": false, + "description": "Filter results by discovery period", + "schema": { + "type": "string", + "enum": [ + "1h", + "6h", + "1d", + "7d", + "30d", + "90d", + "365d" + ] + } + }, + { + "name": "direction", + "in": "query", + "required": false, + "description": "Ordering direction of the sort attribute", + "schema": { + "type": "string", + "enum": [ + "desc", + "asc" + ], + "default": "desc" + } + }, + { + "name": "filter", + "in": "query", + "required": false, + "description": "Filter what type of threats to return", + "schema": { + "type": "string", + "enum": [ + "u", + "c", + "fp", + "tp", + "mal", + "vuln", + "anom", + "joke", + "spy", + "typo", + "secret", + "obf", + "dual" + ], + "default": "mal" } }, { - "name": "range", + "name": "name", "in": "query", "required": false, - "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", + "description": "Filter threats by package name", "schema": { "type": "string", - "default": "-7d" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "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)", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 10000, - "default": 10000 + "default": "" } }, { - "name": "startAfterCursor", + "name": "version", "in": "query", "required": false, - "description": "The pagination cursor that was returned as the \"endCursor\" property in previous request", + "description": "Filter threats by package version", "schema": { "type": "string", "default": "" } }, { - "name": "filters.status", + "name": "is_human_reviewed", "in": "query", "required": false, - "description": "Comma-separated list of historical snapshot statuses that should be included (allowed: \"in-progress\", \"success\", \"failure\", \"timeout\", \"skipped\")", + "description": "Only return threats which have been human-reviewed", "schema": { - "type": "string", - "default": "" + "type": "boolean", + "default": false } }, { - "name": "filters.requestId", + "name": "ecosystem", "in": "query", "required": false, - "description": "Comma-separated list of requestId values that were used to start the historical snapshot job", + "description": "Filter threats by package ecosystem type", "schema": { "type": "string", - "default": "" + "enum": [ + "github", + "cargo", + "chrome", + "golang", + "huggingface", + "maven", + "npm", + "nuget", + "vscode", + "pypi", + "gem" + ] } } ], "security": [ { "bearerAuth": [ - "historical:snapshots-list" + "threat-feed:list" ] }, { "basicAuth": [ - "historical:snapshots-list" + "threat-feed:list" ] } ], - "description": "This API endpoint is used to list the details of historical snapshots.\nSnapshots of organization data are taken periodically, and each historical snapshot record contains high-level overview metrics about the data that was collected.\nOther [Historical Data Endpoints](/reference/historical-data-endpoints) can be used to fetch the raw data associated with each snapshot.\n\nHistorical snapshots contain details and raw data for the following resources:\n\n- Repositories\n- Alerts\n- Dependencies\n- Artifacts\n- Users\n- Settings\n\nDaily snapshot data is bucketed to the nearest day which is described in more detail at: [Historical Data Endpoints](/reference/historical-data-endpoints)\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- historical:snapshots-list", + "description": "**This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/getorgthreatfeeditems) instead.\n\nPaginated list of threat feed items.\n\nThis 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.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- threat-feed:list", "responses": { "200": { "content": { @@ -29895,188 +35876,74 @@ "additionalProperties": false, "description": "", "properties": { - "meta": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "organizationId": { - "type": "string", - "description": "", - "default": "" - }, - "queryStartTimestamp": { - "type": "number", - "description": "", - "default": 0 - }, - "startDateInclusive": { - "type": "string", - "description": "", - "default": "" - }, - "endDateInclusive": { - "type": "string", - "description": "", - "default": "" - }, - "filters": { - "type": "object", - "additionalProperties": false, - "properties": { - "status": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" - }, - "requestId": { - "type": "array", - "items": { - "type": "string", - "description": "", - "default": "" - }, - "description": "" - } - }, - "description": "" - } - }, - "required": [ - "endDateInclusive", - "filters", - "organizationId", - "queryStartTimestamp", - "startDateInclusive" - ] - }, - "items": { + "results": { "type": "array", "items": { "type": "object", "additionalProperties": false, - "description": "", "properties": { - "id": { + "createdAt": { "type": "string", "description": "", "default": "" }, - "requestId": { + "updatedAt": { "type": "string", "description": "", "default": "" }, - "requestedBy": { + "description": { "type": "string", "description": "", "default": "" }, - "requestedAt": { - "type": "string", + "id": { + "type": "integer", "description": "", - "default": "" + "default": 0 }, - "startedAt": { + "locationHtmlUrl": { "type": "string", "description": "", "default": "" }, - "finishedAt": { + "packageHtmlUrl": { "type": "string", "description": "", - "default": "", - "nullable": true - }, - "durationMs": { - "type": "integer", - "description": "", - "default": 0 + "default": "" }, - "status": { + "purl": { "type": "string", "description": "", "default": "" }, - "numReposScanned": { - "type": "integer", - "description": "", - "default": 0 - }, - "numSbomsScanned": { - "type": "integer", - "description": "", - "default": 0 - }, - "numLowAlerts": { - "type": "integer", - "description": "", - "default": 0 - }, - "numHighAlerts": { - "type": "integer", - "description": "", - "default": 0 - }, - "numMediumAlerts": { - "type": "integer", - "description": "", - "default": 0 - }, - "numCriticalAlerts": { - "type": "integer", - "description": "", - "default": 0 - }, - "numIgnoredLowAlerts": { - "type": "integer", + "removedAt": { + "type": "string", "description": "", - "default": 0 + "default": "", + "nullable": true }, - "numIgnoredHighAlerts": { - "type": "integer", + "threatType": { + "type": "string", "description": "", - "default": 0 + "default": "" }, - "numIgnoredMediumAlerts": { - "type": "integer", - "description": "", - "default": 0 + "needsHumanReview": { + "type": "boolean", + "default": false, + "description": "Whether the threat still is in need of human review by the threat research team" }, - "numIgnoredCriticalAlerts": { + "threatInstanceId": { "type": "integer", - "description": "", + "description": "Unique threat instance identifier across artifacts", "default": 0 } }, - "required": [ - "durationMs", - "finishedAt", - "id", - "numCriticalAlerts", - "numHighAlerts", - "numIgnoredCriticalAlerts", - "numIgnoredHighAlerts", - "numIgnoredLowAlerts", - "numIgnoredMediumAlerts", - "numLowAlerts", - "numMediumAlerts", - "numReposScanned", - "numSbomsScanned", - "requestId", - "requestedAt", - "requestedBy", - "startedAt", - "status" - ] + "description": "" }, "description": "" }, - "endCursor": { + "nextPage": { "type": "string", "description": "", "default": "", @@ -30084,14 +35951,13 @@ } }, "required": [ - "endCursor", - "items", - "meta" + "nextPage", + "results" ] } } }, - "description": "The historical snapshots." + "description": "The paginated list of threats in the feed and the next page querystring token." }, "400": { "$ref": "#/components/responses/SocketBadRequest" @@ -30102,18 +35968,23 @@ "403": { "$ref": "#/components/responses/SocketForbidden" }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } }, "x-readme": {} - }, - "post": { + } + }, + "/orgs/{org_slug}/threat-feed": { + "get": { "tags": [ - "Org Snapshots" + "Threat Feed" ], - "summary": "Start historical data snapshot job (Beta)", - "operationId": "historicalSnapshotsStart", + "summary": "Get Threat Feed Items (Beta)", + "operationId": "getOrgThreatFeedItems", "parameters": [ { "name": "org_slug", @@ -30123,179 +35994,166 @@ "schema": { "type": "string" } - } - ], - "security": [ - { - "bearerAuth": [ - "historical:snapshots-start" - ] }, { - "basicAuth": [ - "historical:snapshots-start" - ] - } - ], - "description": "This API endpoint is used to start a historical snapshot job.\nWhile snapshots are typically taken at least once a day, this endpoint can be used to start an \"on demand\" snapshot job to ensure the latest data is collected and stored for historical purposes.\n\nAn historical snapshot will contain details and raw data for the following resources:\n\n- Repositories\n- Alerts\n- Dependencies\n- Artifacts\n- Users\n- Settings\n\nHistorical snapshot data is bucketed to the nearest day which is described in more detail at: [Historical Data Endpoints](/reference/historical-data-endpoints)\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- historical:snapshots-start", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "requestId": { - "type": "string", - "description": "", - "default": "" - }, - "requestedBy": { - "type": "string", - "description": "", - "default": "" - }, - "requestedAt": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "requestId", - "requestedAt", - "requestedBy" - ] - } - } - }, - "description": "The details of the snapshot job request." + "name": "per_page", + "in": "query", + "required": false, + "description": "Number of threats per page", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 30 + } }, - "400": { - "$ref": "#/components/responses/SocketBadRequest" + { + "name": "page_cursor", + "in": "query", + "required": false, + "description": "Page cursor token. Pass the returned nextPageCursor to this query string to fetch the next page of the threat feed.", + "schema": { + "type": "string" + } }, - "401": { - "$ref": "#/components/responses/SocketUnauthorized" + { + "name": "sort", + "in": "query", + "required": false, + "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.", + "schema": { + "type": "string", + "enum": [ + "id", + "created_at", + "updated_at" + ], + "default": "updated_at" + } }, - "403": { - "$ref": "#/components/responses/SocketForbidden" + { + "name": "updated_after", + "in": "query", + "required": false, + "description": "A Unix timestamp in seconds that filters results to items only updated after the timestamp.", + "schema": { + "type": "string" + } }, - "429": { - "$ref": "#/components/responses/SocketTooManyRequestsResponse" - } - }, - "x-readme": {} - } - }, - "/orgs/{org_slug}/audit-log": { - "get": { - "tags": [ - "Audit Log" - ], - "summary": "Get Audit Log Events", - "operationId": "getAuditLogEvents", - "parameters": [ { - "name": "org_slug", - "in": "path", - "required": true, - "description": "The slug of the organization", + "name": "created_after", + "in": "query", + "required": false, + "description": "A Unix timestamp in seconds that filters results to items only created after the date.", "schema": { "type": "string" } }, { - "name": "type", + "name": "direction", "in": "query", "required": false, - "description": "Filter audit log events by type. Omit for all types.", + "description": "Order direction of the provided sort field.", "schema": { "type": "string", "enum": [ - "AddLicenseOverlayNote", - "AssociateLabel", - "CancelInvitation", - "ChangeMemberRole", - "ChangePlanSubscriptionSeats", - "CreateApiToken", - "CreateLabel", - "DeleteLabel", - "DeleteLabelSetting", - "DeleteReport", - "DeleteRepository", - "DisassociateLabel", - "JoinOrganization", - "RemoveLicenseOverlay", - "RemoveMember", - "ResetInvitationLink", - "ResetOrganizationSettingToDefault", - "RevokeApiToken", - "RotateApiToken", - "SendInvitation", - "SetLabelSettingToDefault", - "SyncOrganization", - "TransferOwnership", - "UpdateAlertTriage", - "UpdateApiTokenCommitter", - "UpdateApiTokenMaxQuota", - "UpdateApiTokenName", - "UpdateApiTokenScopes", - "UpdateApiTokenVisibility", - "UpdateAutopatchCurated", - "UpdateLabel", - "UpdateLabelSetting", - "UpdateOrganizationSetting", - "UpgradeOrganizationPlan" - ] + "desc", + "asc" + ], + "default": "desc" } }, { - "name": "per_page", + "name": "filter", "in": "query", "required": false, - "description": "Number of events per page", + "description": "Filter what type of threats to return", "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 30 + "type": "string", + "enum": [ + "u", + "c", + "fp", + "tp", + "mal", + "vuln", + "anom", + "joke", + "spy", + "typo", + "secret", + "obf", + "dual" + ], + "default": "mal" } }, { - "name": "page", + "name": "name", "in": "query", "required": false, - "description": "Page token", + "description": "Filter threats by package name", "schema": { "type": "string", - "default": "1" + "default": "" } }, { - "name": "from", + "name": "version", "in": "query", "required": false, - "description": "A Unix timestamp in seconds to filter results prior to this date.", + "description": "Filter threats by package version.", "schema": { - "type": "string" + "type": "string", + "default": "" + } + }, + { + "name": "is_human_reviewed", + "in": "query", + "required": false, + "description": "Only return threats which have been human-reviewed", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "ecosystem", + "in": "query", + "required": false, + "description": "Filter threats by package ecosystem type", + "schema": { + "type": "string", + "enum": [ + "github", + "cargo", + "chrome", + "golang", + "huggingface", + "maven", + "npm", + "nuget", + "vscode", + "pypi", + "gem" + ] } } ], "security": [ { "bearerAuth": [ - "audit-log:list" + "threat-feed:list" ] }, { "basicAuth": [ - "audit-log:list" + "threat-feed:list" ] } ], - "description": "Paginated list of audit log events.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- audit-log:list", + "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.\n\nThis 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.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- threat-feed:list", "responses": { "200": { "content": { @@ -30311,89 +36169,68 @@ "type": "object", "additionalProperties": false, "properties": { - "event_id": { + "createdAt": { "type": "string", "description": "", "default": "" }, - "created_at": { + "updatedAt": { "type": "string", "description": "", "default": "" }, - "updated_at": { + "description": { "type": "string", "description": "", "default": "" }, - "country_code": { - "type": "string", - "description": "", - "default": "", - "nullable": true - }, - "organization_id": { - "type": "string", + "id": { + "type": "integer", "description": "", - "default": "", - "nullable": true + "default": 0 }, - "ip_address": { + "locationHtmlUrl": { "type": "string", - "description": "", - "default": "", - "nullable": true - }, - "payload": { - "type": "object", - "description": "", - "default": null, - "nullable": true - }, - "status_code": { - "type": "integer", - "description": "", - "default": 0, - "nullable": true + "description": "", + "default": "" }, - "type": { + "packageHtmlUrl": { "type": "string", "description": "", "default": "" }, - "user_agent": { + "purl": { "type": "string", "description": "", - "default": "", - "nullable": true + "default": "" }, - "user_id": { + "removedAt": { "type": "string", "description": "", "default": "", "nullable": true }, - "user_email": { + "threatType": { "type": "string", "description": "", "default": "" }, - "user_image": { - "type": "string", - "description": "", - "default": "" + "needsHumanReview": { + "type": "boolean", + "default": false, + "description": "Whether the threat still is in need of human review by the threat research team" }, - "organization_name": { - "type": "string", - "description": "", - "default": "" + "threatInstanceId": { + "type": "integer", + "description": "Unique threat instance identifier across artifacts", + "default": 0 } }, "description": "" }, "description": "" }, - "nextPage": { + "nextPageCursor": { "type": "string", "description": "", "default": "", @@ -30401,13 +36238,13 @@ } }, "required": [ - "nextPage", + "nextPageCursor", "results" ] } } }, - "description": "The paginated list of events in an organizations audit log and the next page querystring token." + "description": "The paginated list of items in the threat feed and the next page cursor." }, "400": { "$ref": "#/components/responses/SocketBadRequest" @@ -30428,13 +36265,13 @@ "x-readme": {} } }, - "/orgs/{org_slug}/api-tokens": { - "post": { + "/orgs/{org_slug}/fixes": { + "get": { "tags": [ - "API Tokens" + "Fixes" ], - "summary": "Create API Token", - "operationId": "postAPIToken", + "summary": "Fetch fixes for vulnerabilities in a repository or scan", + "operationId": "fetch-fixes", "parameters": [ { "name": "org_slug", @@ -30444,192 +36281,1102 @@ "schema": { "type": "string" } + }, + { + "name": "repo_slug", + "in": "query", + "required": false, + "description": "The slug of the repository to fetch fixes for. Computes fixes based on the latest scan on the default branch", + "schema": { + "type": "string" + } + }, + { + "name": "full_scan_id", + "in": "query", + "required": false, + "description": "The ID of the scan to fetch fixes for", + "schema": { + "type": "string" + } + }, + { + "name": "vulnerability_ids", + "in": "query", + "required": true, + "description": "Comma-separated list of GHSA or CVE IDs, or \"*\" for all vulnerabilities", + "schema": { + "type": "string" + } + }, + { + "name": "allow_major_updates", + "in": "query", + "required": true, + "description": "Whether to allow major version updates in fixes", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "minimum_release_age", + "in": "query", + "required": false, + "description": "Minimum release age for fixes packages (e.g., \"1h\", \"2d\", \"1w\"). Higher values reduces risk of installing recently released untested package versions.", + "schema": { + "type": "string", + "default": "0d" + } + }, + { + "name": "include_details", + "in": "query", + "required": false, + "description": "Whether to include advisory details in the response", + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "include_responsible_direct_dependencies", + "in": "query", + "required": false, + "description": "Set to include the direct dependencies responsible for introducing the dependency or dependencies with the vulnerability in the response", + "schema": { + "type": "boolean", + "default": false + } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": false, - "properties": { - "max_quota": { - "type": "integer", - "description": "", - "default": 1000 - }, - "scopes": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "alerts", - "alerts:list", - "alerts:trend", - "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", - "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", - "license-policy", - "license-policy:update", - "license-policy:read", - "packages", - "packages:list", - "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", - "threat-feed", - "threat-feed:list", - "triage", - "triage:alerts-list", - "triage:alerts-update" - ], - "description": "", - "default": "repo:list" - }, - "description": "" - }, - "visibility": { - "type": "string", - "enum": [ - "admin", - "organization" - ], - "description": "The visibility of the API Token. Warning: this field is deprecated and will be removed in the future.", - "default": "organization" - }, - "committer": { - "type": "object", - "additionalProperties": false, - "properties": { - "email": { - "type": "string", - "description": "", - "default": "" - }, - "provider": { - "type": "string", - "enum": [ - "api", - "azure", - "bitbucket", - "github", - "gitlab" + "security": [ + { + "bearerAuth": [ + "fixes:list" + ] + }, + { + "basicAuth": [ + "fixes:list" + ] + } + ], + "description": "Fetches available fixes for vulnerabilities in a repository or scan.\nRequires either repo_slug or full_scan_id 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\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- fixes:list", + "responses": { + "200": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "description": "Response containing fix details for each requested vulnerability ID", + "properties": { + "fixDetails": { + "type": "object", + "description": "Map of vulnerability IDs (GHSA or CVE) to their fix details. Each entry contains information about available fixes, partial fixes, or reasons why fixes are not available.", + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "fixFound" + ] + }, + "value": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "type": { + "type": "string", + "enum": [ + "fixFound" + ], + "description": "", + "default": "fixFound" + }, + "ghsa": { + "type": "string", + "description": "", + "default": "" + }, + "cve": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "fixDetails": { + "type": "object", + "additionalProperties": false, + "properties": { + "fixes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "purl": { + "type": "string", + "description": "", + "default": "The PURL (unique package identifier) of the package to upgrade" + }, + "fixedVersion": { + "type": "string", + "description": "", + "default": "The version of the package to upgrade to" + }, + "manifestFiles": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "The manifest file(s) that contain the package" + }, + "description": "" + }, + "updateType": { + "type": "string", + "enum": [ + "patch", + "minor", + "major", + "unknown" + ], + "description": "The type of version update (patch, minor, major, or unknown if it cannot be determined)", + "default": "unknown" + } + }, + "required": [ + "fixedVersion", + "manifestFiles", + "purl", + "updateType" + ] + }, + "description": "" + }, + "responsibleDirectDependencies": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": false, + "properties": { + "currentVersion": { + "type": "string", + "description": "", + "default": "", + "format": "The current version of the package" + }, + "nextAvailableVersion": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "version": { + "type": "string", + "description": "", + "default": "", + "format": "The next available version of the package" + }, + "updateType": { + "type": "string", + "enum": [ + "patch", + "minor", + "major", + "unknown" + ], + "description": "The type of version update (patch, minor, major, or unknown if it cannot be determined)", + "default": "unknown" + } + }, + "required": [ + "updateType", + "version" + ], + "nullable": true + }, + "fixByUpgradingTo": { + "type": "object", + "additionalProperties": false, + "description": "The version and update type of the package that is necessary to fix the vulnerability. If the value is null, it means the package does not have to be upgraded to fix the vulnerability", + "properties": { + "version": { + "type": "string", + "description": "", + "default": "" + }, + "updateType": { + "type": "string", + "enum": [ + "patch", + "minor", + "major", + "unknown" + ], + "description": "The type of version update (patch, minor, major, or unknown if it cannot be determined)", + "default": "unknown" + } + }, + "required": [ + "updateType", + "version" + ], + "nullable": true + } + }, + "required": [ + "currentVersion" + ] + }, + "properties": {}, + "description": "The keys are the PURL (unique package identifier) of the direct dependency(ies) responsible for introducing the vulnerability.", + "nullable": true + } + }, + "required": [ + "fixes" + ] + }, + "advisoryDetails": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "description": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "cwes": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "severity": { + "type": "string", + "enum": [ + "LOW", + "MODERATE", + "HIGH", + "CRITICAL" + ], + "description": "Severity level of the vulnerability", + "default": "LOW" + }, + "cvssVector": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "publishedAt": { + "type": "string", + "description": "", + "default": "" + }, + "kev": { + "type": "boolean", + "default": false, + "description": "Whether the vulnerability is a Known Exploited Vulnerability" + }, + "epss": { + "type": "number", + "description": "Exploit Prediction Scoring System score", + "default": 0, + "nullable": true + }, + "affectedPurls": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "purl": { + "type": "string", + "description": "", + "default": "", + "format": "The PURL (unique package identifier) of the affected package" + }, + "affectedRange": { + "type": "string", + "description": "", + "default": "The range of vulnerable versions" + } + }, + "required": [ + "affectedRange", + "purl" + ] + }, + "description": "" + } + }, + "description": "", + "nullable": true + } + }, + "required": [ + "advisoryDetails", + "cve", + "fixDetails", + "ghsa", + "type" + ] + } + } + }, + { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "partialFixFound" + ] + }, + "value": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "type": { + "type": "string", + "enum": [ + "partialFixFound" + ], + "description": "", + "default": "partialFixFound" + }, + "ghsa": { + "type": "string", + "description": "", + "default": "" + }, + "cve": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "fixDetails": { + "type": "object", + "additionalProperties": false, + "properties": { + "fixes": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "purl": { + "type": "string", + "description": "", + "default": "The PURL (unique package identifier) of the package to upgrade" + }, + "fixedVersion": { + "type": "string", + "description": "", + "default": "The version of the package to upgrade to" + }, + "manifestFiles": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "The manifest file(s) that contain the package" + }, + "description": "" + }, + "updateType": { + "type": "string", + "enum": [ + "patch", + "minor", + "major", + "unknown" + ], + "description": "The type of version update (patch, minor, major, or unknown if it cannot be determined)", + "default": "unknown" + } + }, + "required": [ + "fixedVersion", + "manifestFiles", + "purl", + "updateType" + ] + }, + "description": "" + }, + "unfixablePurls": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "purl": { + "type": "string", + "description": "", + "default": "The PURL (unique package identifier) of the package that cannot be upgraded" + }, + "manifestFiles": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "The manifest file(s) that contain the package" + }, + "description": "" + } + }, + "required": [ + "manifestFiles", + "purl" + ] + }, + "description": "" + }, + "responsibleDirectDependencies": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": false, + "properties": { + "currentVersion": { + "type": "string", + "description": "", + "default": "", + "format": "The current version of the package" + }, + "nextAvailableVersion": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "version": { + "type": "string", + "description": "", + "default": "", + "format": "The next available version of the package" + }, + "updateType": { + "type": "string", + "enum": [ + "patch", + "minor", + "major", + "unknown" + ], + "description": "The type of version update (patch, minor, major, or unknown if it cannot be determined)", + "default": "unknown" + } + }, + "required": [ + "updateType", + "version" + ], + "nullable": true + }, + "fixByUpgradingTo": { + "type": "object", + "additionalProperties": false, + "description": "The version and update type of the package that is necessary to fix the vulnerability. If the value is null, it means the package does not have to be upgraded to fix the vulnerability", + "properties": { + "version": { + "type": "string", + "description": "", + "default": "" + }, + "updateType": { + "type": "string", + "enum": [ + "patch", + "minor", + "major", + "unknown" + ], + "description": "The type of version update (patch, minor, major, or unknown if it cannot be determined)", + "default": "unknown" + } + }, + "required": [ + "updateType", + "version" + ], + "nullable": true + } + }, + "required": [ + "currentVersion" + ] + }, + "properties": {}, + "description": "The keys are the PURL (unique package identifier) of the direct dependency(ies) responsible for introducing the vulnerability.", + "nullable": true + } + }, + "required": [ + "fixes", + "unfixablePurls" + ] + }, + "advisoryDetails": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "description": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "cwes": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "severity": { + "type": "string", + "enum": [ + "LOW", + "MODERATE", + "HIGH", + "CRITICAL" + ], + "description": "Severity level of the vulnerability", + "default": "LOW" + }, + "cvssVector": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "publishedAt": { + "type": "string", + "description": "", + "default": "" + }, + "kev": { + "type": "boolean", + "default": false, + "description": "Whether the vulnerability is a Known Exploited Vulnerability" + }, + "epss": { + "type": "number", + "description": "Exploit Prediction Scoring System score", + "default": 0, + "nullable": true + }, + "affectedPurls": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "purl": { + "type": "string", + "description": "", + "default": "", + "format": "The PURL (unique package identifier) of the affected package" + }, + "affectedRange": { + "type": "string", + "description": "", + "default": "The range of vulnerable versions" + } + }, + "required": [ + "affectedRange", + "purl" + ] + }, + "description": "" + } + }, + "description": "", + "nullable": true + } + }, + "required": [ + "advisoryDetails", + "cve", + "fixDetails", + "ghsa", + "type" + ] + } + } + }, + { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "errorComputingFix" + ] + }, + "value": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "type": { + "type": "string", + "enum": [ + "errorComputingFix" + ], + "description": "", + "default": "errorComputingFix" + }, + "ghsa": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "cve": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "message": { + "type": "string", + "description": "", + "default": "" + }, + "advisoryDetails": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "description": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "cwes": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "severity": { + "type": "string", + "enum": [ + "LOW", + "MODERATE", + "HIGH", + "CRITICAL" + ], + "description": "Severity level of the vulnerability", + "default": "LOW" + }, + "cvssVector": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "publishedAt": { + "type": "string", + "description": "", + "default": "" + }, + "kev": { + "type": "boolean", + "default": false, + "description": "Whether the vulnerability is a Known Exploited Vulnerability" + }, + "epss": { + "type": "number", + "description": "Exploit Prediction Scoring System score", + "default": 0, + "nullable": true + }, + "affectedPurls": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "purl": { + "type": "string", + "description": "", + "default": "", + "format": "The PURL (unique package identifier) of the affected package" + }, + "affectedRange": { + "type": "string", + "description": "", + "default": "The range of vulnerable versions" + } + }, + "required": [ + "affectedRange", + "purl" + ] + }, + "description": "" + } + }, + "description": "", + "nullable": true + } + }, + "required": [ + "advisoryDetails", + "cve", + "ghsa", + "message", + "type" + ] + } + } + }, + { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "noFixAvailable" + ] + }, + "value": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "type": { + "type": "string", + "enum": [ + "noFixAvailable" + ], + "description": "", + "default": "noFixAvailable" + }, + "ghsa": { + "type": "string", + "description": "", + "default": "" + }, + "cve": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "advisoryDetails": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "description": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "cwes": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "severity": { + "type": "string", + "enum": [ + "LOW", + "MODERATE", + "HIGH", + "CRITICAL" + ], + "description": "Severity level of the vulnerability", + "default": "LOW" + }, + "cvssVector": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "publishedAt": { + "type": "string", + "description": "", + "default": "" + }, + "kev": { + "type": "boolean", + "default": false, + "description": "Whether the vulnerability is a Known Exploited Vulnerability" + }, + "epss": { + "type": "number", + "description": "Exploit Prediction Scoring System score", + "default": 0, + "nullable": true + }, + "affectedPurls": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "purl": { + "type": "string", + "description": "", + "default": "", + "format": "The PURL (unique package identifier) of the affected package" + }, + "affectedRange": { + "type": "string", + "description": "", + "default": "The range of vulnerable versions" + } + }, + "required": [ + "affectedRange", + "purl" + ] + }, + "description": "" + } + }, + "description": "", + "nullable": true + } + }, + "required": [ + "advisoryDetails", + "cve", + "ghsa", + "type" + ] + } + } + }, + { + "type": "object", + "required": [ + "type", + "value" + ], + "properties": { + "type": { + "type": "string", + "enum": [ + "fixNotApplicable" + ] + }, + "value": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "type": { + "type": "string", + "enum": [ + "fixNotApplicable" + ], + "description": "", + "default": "fixNotApplicable" + }, + "ghsa": { + "type": "string", + "description": "", + "default": "" + }, + "cve": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "advisoryDetails": { + "type": "object", + "additionalProperties": false, + "properties": { + "title": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "description": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "cwes": { + "type": "array", + "items": { + "type": "string", + "description": "", + "default": "" + }, + "description": "" + }, + "severity": { + "type": "string", + "enum": [ + "LOW", + "MODERATE", + "HIGH", + "CRITICAL" + ], + "description": "Severity level of the vulnerability", + "default": "LOW" + }, + "cvssVector": { + "type": "string", + "description": "", + "default": "", + "nullable": true + }, + "publishedAt": { + "type": "string", + "description": "", + "default": "" + }, + "kev": { + "type": "boolean", + "default": false, + "description": "Whether the vulnerability is a Known Exploited Vulnerability" + }, + "epss": { + "type": "number", + "description": "Exploit Prediction Scoring System score", + "default": 0, + "nullable": true + }, + "affectedPurls": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "purl": { + "type": "string", + "description": "", + "default": "", + "format": "The PURL (unique package identifier) of the affected package" + }, + "affectedRange": { + "type": "string", + "description": "", + "default": "The range of vulnerable versions" + } + }, + "required": [ + "affectedRange", + "purl" + ] + }, + "description": "" + } + }, + "description": "", + "nullable": true + } + }, + "required": [ + "advisoryDetails", + "cve", + "ghsa", + "type" + ] + } + } + } ], - "description": "", - "default": "api" - }, - "providerLoginName": { - "type": "string", - "description": "", - "default": "" + "discriminator": { + "propertyName": "type" + } }, - "providerUserId": { - "type": "string", - "description": "", - "default": "" - } - }, - "description": "" - }, - "name": { - "type": "string", - "description": "Name for the API Token", - "default": "api token" - } - }, - "required": [ - "committer", - "max_quota", - "scopes", - "visibility" - ] - } - } - }, - "description": "The settings to create the api token with.", - "required": false - }, - "security": [ - { - "bearerAuth": [ - "api-tokens:create" - ] - }, - { - "basicAuth": [ - "api-tokens:create" - ] - } - ], - "description": "Create an API Token. The API Token created must use a subset of permissions the API token creating them.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- api-tokens:create", - "responses": { - "200": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "token": { - "type": "string", - "description": "", - "default": "" + "properties": {} } }, "required": [ - "token" + "fixDetails" ] } } }, - "description": "The newly created api token." + "description": "Fix details for requested vulnerabilities" + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" }, "401": { "$ref": "#/components/responses/SocketUnauthorized" @@ -30637,18 +37384,23 @@ "403": { "$ref": "#/components/responses/SocketForbidden" }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } }, "x-readme": {} - }, + } + }, + "/orgs/{org_slug}/telemetry/config": { "get": { "tags": [ - "API Tokens" + "Telemetry" ], - "summary": "List API Tokens", - "operationId": "getAPITokens", + "summary": "Get Organization Telemetry Config", + "operationId": "getOrgTelemetryConfig", "parameters": [ { "name": "org_slug", @@ -30658,71 +37410,17 @@ "schema": { "type": "string" } - }, - { - "name": "sort", - "in": "query", - "required": false, - "description": "Specify Sort order.", - "schema": { - "type": "string", - "enum": [ - "created_at" - ], - "default": "created_at" - } - }, - { - "name": "direction", - "in": "query", - "required": false, - "description": "Specify sort direction.", - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "in": "query", - "required": false, - "description": "Specify the maximum number of results to return per page.", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 30 - } - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "The token specifying which page to return.", - "schema": { - "type": "integer", - "minimum": 1, - "default": 1 - } } ], "security": [ { - "bearerAuth": [ - "api-tokens:list" - ] + "bearerAuth": [] }, { - "basicAuth": [ - "api-tokens:list" - ] + "basicAuth": [] } ], - "description": "List all API Tokens.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- api-tokens:list", + "description": "Retrieve the telemetry config of an organization.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:", "responses": { "200": { "content": { @@ -30732,199 +37430,32 @@ "additionalProperties": false, "description": "", "properties": { - "tokens": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "committers": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "email": { - "type": "string", - "description": "", - "default": "" - }, - "provider": { - "type": "string", - "enum": [ - "api", - "azure", - "bitbucket", - "github", - "gitlab" - ], - "description": "", - "default": "api" - }, - "providerLoginName": { - "type": "string", - "description": "", - "default": "" - }, - "providerUserId": { - "type": "string", - "description": "", - "default": "" - } - }, - "description": "" - }, - "description": "" - }, - "created_at": { - "type": "string", - "description": "", - "default": "", - "format": "date" - }, - "id": { - "type": "string", - "description": "The ID of the API Token", - "default": "" - }, - "last_used_at": { - "type": "string", - "description": "", - "default": "", - "format": "date" - }, - "max_quota": { - "type": "integer", - "description": "", - "default": 1000 - }, - "name": { - "type": "string", - "description": "Name for the API Token", - "default": "api token", - "nullable": true - }, - "scopes": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "alerts", - "alerts:list", - "alerts:trend", - "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", - "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", - "license-policy", - "license-policy:update", - "license-policy:read", - "packages", - "packages:list", - "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", - "threat-feed", - "threat-feed:list", - "triage", - "triage:alerts-list", - "triage:alerts-update" - ], - "description": "", - "default": "repo:list" - }, - "description": "" - }, - "token": { - "type": "string", - "description": "The obfuscated token of the API Token", - "default": "" - }, - "visibility": { - "type": "string", - "enum": [ - "admin", - "organization" - ], - "description": "The visibility of the API Token. Warning: this field is deprecated and will be removed in the future.", - "default": "organization" - } - }, - "required": [ - "committers", - "created_at", - "id", - "last_used_at", - "max_quota", - "name", - "scopes", - "token", - "visibility" - ] + "telemetry": { + "type": "object", + "additionalProperties": false, + "description": "Telemetry configuration", + "properties": { + "enabled": { + "type": "boolean", + "default": false, + "description": "Telemetry enabled" + } }, - "description": "" - }, - "nextPage": { - "type": "integer", - "description": "", - "default": 0, - "nullable": true + "required": [ + "enabled" + ] } }, "required": [ - "nextPage", - "tokens" + "telemetry" ] } } }, - "description": "The paginated array of API tokens for the organization, and related metadata." + "description": "Retrieved telemetry config details" + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" }, "401": { "$ref": "#/components/responses/SocketUnauthorized" @@ -30932,20 +37463,21 @@ "403": { "$ref": "#/components/responses/SocketForbidden" }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } }, "x-readme": {} - } - }, - "/orgs/{org_slug}/api-tokens/update": { - "post": { + }, + "put": { "tags": [ - "API Tokens" + "Telemetry" ], - "summary": "Update API Token", - "operationId": "postAPITokenUpdate", + "summary": "Update Telemetry Config", + "operationId": "updateOrgTelemetryConfig", "parameters": [ { "name": "org_slug", @@ -30964,167 +37496,31 @@ "type": "object", "additionalProperties": false, "properties": { - "max_quota": { - "type": "integer", - "description": "", - "default": 1000 - }, - "scopes": { - "type": "array", - "items": { - "type": "string", - "enum": [ - "alerts", - "alerts:list", - "alerts:trend", - "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", - "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", - "license-policy", - "license-policy:update", - "license-policy:read", - "packages", - "packages:list", - "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", - "threat-feed", - "threat-feed:list", - "triage", - "triage:alerts-list", - "triage:alerts-update" - ], - "description": "", - "default": "repo:list" - }, - "description": "" - }, - "token": { - "type": "string", - "description": "", - "default": "" - }, - "visibility": { - "type": "string", - "enum": [ - "admin", - "organization" - ], - "description": "The visibility of the API Token. Warning: this field is deprecated and will be removed in the future.", - "default": "organization" - }, - "committer": { - "type": "object", - "additionalProperties": false, - "properties": { - "email": { - "type": "string", - "description": "", - "default": "" - }, - "provider": { - "type": "string", - "enum": [ - "api", - "azure", - "bitbucket", - "github", - "gitlab" - ], - "description": "", - "default": "api" - }, - "providerLoginName": { - "type": "string", - "description": "", - "default": "" - }, - "providerUserId": { - "type": "string", - "description": "", - "default": "" - } - }, - "description": "" - }, - "name": { - "type": "string", - "description": "Name for the API Token", - "default": "api token" + "enabled": { + "type": "boolean", + "default": false, + "description": "Telemetry enabled" } }, - "required": [ - "committer", - "max_quota", - "scopes", - "token", - "visibility" - ] + "description": "" } } }, - "description": "The token and properties to update on the token.", "required": false }, "security": [ { "bearerAuth": [ - "api-tokens:create" + "telemetry-policy:update" ] }, { "basicAuth": [ - "api-tokens:create" + "telemetry-policy:update" ] } ], - "description": "Update an API Token. The API Token created must use a subset of permissions the API token creating them.\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- api-tokens:create", + "description": "Update the telemetry config of an organization.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- telemetry-policy:update", "responses": { "200": { "content": { @@ -31134,19 +37530,32 @@ "additionalProperties": false, "description": "", "properties": { - "token": { - "type": "string", - "description": "", - "default": "" + "telemetry": { + "type": "object", + "additionalProperties": false, + "description": "Telemetry configuration", + "properties": { + "enabled": { + "type": "boolean", + "default": false, + "description": "Telemetry enabled" + } + }, + "required": [ + "enabled" + ] } }, "required": [ - "token" + "telemetry" ] } } }, - "description": "The updated token." + "description": "Updated telemetry config details" + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" }, "401": { "$ref": "#/components/responses/SocketUnauthorized" @@ -31154,6 +37563,9 @@ "403": { "$ref": "#/components/responses/SocketForbidden" }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } @@ -31161,13 +37573,17 @@ "x-readme": {} } }, - "/orgs/{org_slug}/api-tokens/rotate": { - "post": { + "/orgs/{org_slug}/webhooks": { + "get": { "tags": [ - "API Tokens" + "Webhooks" ], - "summary": "Rotate API Token", - "operationId": "postAPITokensRotate", + "summary": "List all webhooks", + "externalDocs": { + "description": "Webhooks documentation", + "url": "https://docs.socket.dev/docs/webhooks" + }, + "operationId": "getOrgWebhooksList", "parameters": [ { "name": "org_slug", @@ -31177,44 +37593,64 @@ "schema": { "type": "string" } - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": false, - "description": "", - "properties": { - "token": { - "type": "string", - "description": "", - "default": "" - } - }, - "required": [ - "token" - ] - } + }, + { + "name": "sort", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "string", + "default": "created_at" } }, - "description": "The API Token to rotate", - "required": false - }, + { + "name": "direction", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "string", + "default": "desc" + } + }, + { + "name": "per_page", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 100, + "default": 30 + } + }, + { + "name": "page", + "in": "query", + "required": false, + "description": "", + "schema": { + "type": "integer", + "minimum": 1, + "default": 1 + } + } + ], "security": [ { "bearerAuth": [ - "api-tokens:rotate" + "webhooks:list" ] }, { "basicAuth": [ - "api-tokens:rotate" + "webhooks:list" ] } ], - "description": "Rotate an API Token\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- api-tokens:rotate", + "description": "List all webhooks in the specified organization.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- webhooks:list", "responses": { "200": { "content": { @@ -31224,19 +37660,120 @@ "additionalProperties": false, "description": "", "properties": { - "token": { - "type": "string", + "results": { + "type": "array", + "items": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "id": { + "type": "string", + "description": "The ID of the webhook", + "default": "" + }, + "created_at": { + "type": "string", + "description": "The creation date of the webhook", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "The last update date of the webhook", + "default": "" + }, + "name": { + "type": "string", + "description": "The name of the webhook", + "default": "" + }, + "description": { + "type": "string", + "description": "The description of the webhook", + "default": "", + "nullable": true + }, + "url": { + "type": "string", + "description": "The URL where webhook events will be sent", + "default": "" + }, + "secret": { + "type": "string", + "description": "The signing key used to sign webhook payloads", + "default": "", + "nullable": true + }, + "events": { + "type": "array", + "items": { + "type": "string", + "description": "The event types to subscribe to", + "default": "" + }, + "description": "Array of event names" + }, + "headers": { + "type": "object", + "description": "Custom headers to include in webhook requests", + "default": null, + "nullable": true + }, + "filters": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "repositoryIds": { + "type": "array", + "items": { + "type": "string", + "description": "Repository IDs to filter events", + "default": "" + }, + "description": "Array of repository IDs", + "nullable": true + } + }, + "required": [ + "repositoryIds" + ], + "nullable": true + } + }, + "required": [ + "created_at", + "description", + "events", + "filters", + "headers", + "id", + "name", + "secret", + "updated_at", + "url" + ] + }, + "description": "" + }, + "nextPage": { + "type": "integer", "description": "", - "default": "" + "default": 0, + "nullable": true } }, "required": [ - "token" + "nextPage", + "results" ] } } }, - "description": "The replacement API Token" + "description": "List of webhooks" + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" }, "401": { "$ref": "#/components/responses/SocketUnauthorized" @@ -31244,20 +37781,25 @@ "403": { "$ref": "#/components/responses/SocketForbidden" }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } }, "x-readme": {} - } - }, - "/orgs/{org_slug}/api-tokens/revoke": { + }, "post": { "tags": [ - "API Tokens" + "Webhooks" ], - "summary": "Revoke API Token", - "operationId": "postAPITokensRevoke", + "summary": "Create a webhook", + "externalDocs": { + "description": "Webhooks documentation", + "url": "https://docs.socket.dev/docs/webhooks" + }, + "operationId": "createOrgWebhook", "parameters": [ { "name": "org_slug", @@ -31275,38 +37817,91 @@ "schema": { "type": "object", "additionalProperties": false, - "description": "", "properties": { - "token": { + "name": { "type": "string", - "description": "", + "description": "The name of the webhook", + "default": "" + }, + "url": { + "type": "string", + "description": "The URL where webhook events will be sent", "default": "" + }, + "secret": { + "type": "string", + "description": "The signing key used to sign webhook payloads", + "default": "" + }, + "events": { + "type": "array", + "items": { + "type": "string", + "description": "The event types to subscribe to", + "default": "" + }, + "description": "Array of event names" + }, + "description": { + "type": "string", + "description": "The description of the webhook", + "default": "", + "nullable": true + }, + "headers": { + "type": "object", + "description": "Custom headers to include in webhook requests", + "default": null, + "nullable": true + }, + "filters": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "repositoryIds": { + "type": "array", + "items": { + "type": "string", + "description": "Repository IDs to filter events", + "default": "" + }, + "description": "Array of repository IDs", + "nullable": true + } + }, + "required": [ + "repositoryIds" + ], + "nullable": true } }, "required": [ - "token" + "events", + "name", + "secret", + "url" ] } } }, - "description": "The token to revoke.", "required": false }, "security": [ { "bearerAuth": [ - "api-tokens:revoke" + "webhooks:create" ] }, { "basicAuth": [ - "api-tokens:revoke" + "webhooks:create" ] } ], - "description": "Revoke an API Token\n\nThis endpoint consumes 10 units of your quota.\n\nThis endpoint requires the following org token scopes:\n- api-tokens:revoke", + "description": "Create a new webhook. Returns the created webhook details.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- webhooks:create", "responses": { - "200": { + "201": { "content": { "application/json": { "schema": { @@ -31314,20 +37909,99 @@ "additionalProperties": false, "description": "", "properties": { - "status": { + "id": { + "type": "string", + "description": "The ID of the webhook", + "default": "" + }, + "created_at": { + "type": "string", + "description": "The creation date of the webhook", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "The last update date of the webhook", + "default": "" + }, + "name": { + "type": "string", + "description": "The name of the webhook", + "default": "" + }, + "description": { + "type": "string", + "description": "The description of the webhook", + "default": "", + "nullable": true + }, + "url": { + "type": "string", + "description": "The URL where webhook events will be sent", + "default": "" + }, + "secret": { "type": "string", + "description": "The signing key used to sign webhook payloads", + "default": "", + "nullable": true + }, + "events": { + "type": "array", + "items": { + "type": "string", + "description": "The event types to subscribe to", + "default": "" + }, + "description": "Array of event names" + }, + "headers": { + "type": "object", + "description": "Custom headers to include in webhook requests", + "default": null, + "nullable": true + }, + "filters": { + "type": "object", + "additionalProperties": false, "description": "", - "default": "revoked", - "format": "The status of the token" + "properties": { + "repositoryIds": { + "type": "array", + "items": { + "type": "string", + "description": "Repository IDs to filter events", + "default": "" + }, + "description": "Array of repository IDs", + "nullable": true + } + }, + "required": [ + "repositoryIds" + ], + "nullable": true } }, "required": [ - "status" + "created_at", + "description", + "events", + "filters", + "headers", + "id", + "name", + "secret", + "updated_at", + "url" ] } } }, - "description": "Response body" + "description": "The created webhook" + }, + "400": { + "$ref": "#/components/responses/SocketBadRequest" }, "401": { "$ref": "#/components/responses/SocketUnauthorized" @@ -31335,6 +38009,9 @@ "403": { "$ref": "#/components/responses/SocketForbidden" }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, "429": { "$ref": "#/components/responses/SocketTooManyRequestsResponse" } @@ -31342,15 +38019,17 @@ "x-readme": {} } }, - "/orgs/{org_slug}/supported-files": { + "/orgs/{org_slug}/webhooks/{webhook_id}": { "get": { "tags": [ - "Metadata", - "Full Scans", - "Diff Scans" + "Webhooks" ], - "summary": "Get supported file types", - "operationId": "getSupportedFiles", + "summary": "Get webhook", + "externalDocs": { + "description": "Webhooks documentation", + "url": "https://docs.socket.dev/docs/webhooks" + }, + "operationId": "getOrgWebhook", "parameters": [ { "name": "org_slug", @@ -31360,226 +38039,263 @@ "schema": { "type": "string" } + }, + { + "name": "webhook_id", + "in": "path", + "required": true, + "description": "The ID of the webhook", + "schema": { + "type": "string" + } } ], "security": [ { - "bearerAuth": [] + "bearerAuth": [ + "webhooks:list" + ] }, { - "basicAuth": [] + "basicAuth": [ + "webhooks:list" + ] } ], - "description": "Get a list of supported files for full scan generation.\nFiles are categorized first by environment (e.g. NPM or PyPI), then by name.\n\nFiles whose names match the patterns returned by this endpoint can be uploaded for report generation.\nExamples of supported filenames include `package.json`, `package-lock.json`, and `yarn.lock`.\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", + "description": "Get a webhook for the specified organization.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- webhooks:list", "responses": { "200": { "content": { "application/json": { "schema": { "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { + "additionalProperties": false, + "description": "", + "properties": { + "id": { + "type": "string", + "description": "The ID of the webhook", + "default": "" + }, + "created_at": { + "type": "string", + "description": "The creation date of the webhook", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "The last update date of the webhook", + "default": "" + }, + "name": { + "type": "string", + "description": "The name of the webhook", + "default": "" + }, + "description": { + "type": "string", + "description": "The description of the webhook", + "default": "", + "nullable": true + }, + "url": { + "type": "string", + "description": "The URL where webhook events will be sent", + "default": "" + }, + "secret": { + "type": "string", + "description": "The signing key used to sign webhook payloads", + "default": "", + "nullable": true + }, + "events": { + "type": "array", + "items": { + "type": "string", + "description": "The event types to subscribe to", + "default": "" + }, + "description": "Array of event names" + }, + "headers": { + "type": "object", + "description": "Custom headers to include in webhook requests", + "default": null, + "nullable": true + }, + "filters": { "type": "object", "additionalProperties": false, "description": "", "properties": { - "pattern": { - "type": "string", - "description": "", - "default": "" + "repositoryIds": { + "type": "array", + "items": { + "type": "string", + "description": "Repository IDs to filter events", + "default": "" + }, + "description": "Array of repository IDs", + "nullable": true } }, "required": [ - "pattern" - ] - }, - "properties": {}, - "description": "" + "repositoryIds" + ], + "nullable": true + } }, - "properties": {}, - "description": "" - } - } - }, - "description": "Glob patterns used to match supported files" - }, - "400": { - "$ref": "#/components/responses/SocketBadRequest" - }, - "429": { - "$ref": "#/components/responses/SocketTooManyRequestsResponse" - } - }, - "x-readme": {} - } - }, - "/threat-feed": { - "get": { - "tags": [ - "Deprecated" - ], - "summary": "Get Threat Feed Items (Deprecated)", - "deprecated": true, - "operationId": "getThreatFeedItems", - "parameters": [ - { - "name": "per_page", - "in": "query", - "required": false, - "description": "Number of threats per page", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 30 - } - }, - { - "name": "page", - "in": "query", - "required": false, - "description": "Page token", - "schema": { - "type": "string", - "default": "1" - } - }, - { - "name": "sort", - "in": "query", - "required": false, - "description": "Sort sort the threat feed by ID or createdAt attribute.", - "schema": { - "type": "string", - "enum": [ - "id", - "created_at" - ], - "default": "id" - } - }, - { - "name": "discovery_period", - "in": "query", - "required": false, - "description": "Filter results by discovery period", - "schema": { - "type": "string", - "enum": [ - "1h", - "6h", - "1d", - "7d", - "30d", - "90d", - "365d" - ] - } - }, - { - "name": "direction", - "in": "query", - "required": false, - "description": "Ordering direction of the sort attribute", - "schema": { - "type": "string", - "enum": [ - "desc", - "asc" - ], - "default": "desc" - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "description": "Filter what type of threats to return", - "schema": { - "type": "string", - "enum": [ - "u", - "c", - "fp", - "tp", - "mal", - "vuln", - "anom", - "joke", - "spy", - "typo", - "secret", - "obf" - ], - "default": "mal" - } + "required": [ + "created_at", + "description", + "events", + "filters", + "headers", + "id", + "name", + "secret", + "updated_at", + "url" + ] + } + } + }, + "description": "Webhook details" }, - { - "name": "name", - "in": "query", - "required": false, - "description": "Filter threats by package name", - "schema": { - "type": "string", - "default": "" - } + "400": { + "$ref": "#/components/responses/SocketBadRequest" }, - { - "name": "version", - "in": "query", - "required": false, - "description": "Filter threats by package version", - "schema": { - "type": "string", - "default": "" - } + "401": { + "$ref": "#/components/responses/SocketUnauthorized" + }, + "403": { + "$ref": "#/components/responses/SocketForbidden" }, + "404": { + "$ref": "#/components/responses/SocketNotFoundResponse" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + }, + "put": { + "tags": [ + "Webhooks" + ], + "summary": "Update webhook", + "externalDocs": { + "description": "Webhooks documentation", + "url": "https://docs.socket.dev/docs/webhooks" + }, + "operationId": "updateOrgWebhook", + "parameters": [ { - "name": "is_human_reviewed", - "in": "query", - "required": false, - "description": "Only return threats which have been human-reviewed", + "name": "org_slug", + "in": "path", + "required": true, + "description": "The slug of the organization", "schema": { - "type": "boolean", - "default": false + "type": "string" } }, { - "name": "ecosystem", - "in": "query", - "required": false, - "description": "Filter threats by package ecosystem type", + "name": "webhook_id", + "in": "path", + "required": true, + "description": "The ID of the webhook", "schema": { - "type": "string", - "enum": [ - "github", - "cargo", - "chrome", - "golang", - "huggingface", - "maven", - "npm", - "nuget", - "pypi", - "gem" - ] + "type": "string" } } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "description": "The name of the webhook", + "default": "" + }, + "description": { + "type": "string", + "description": "The description of the webhook", + "default": "", + "nullable": true + }, + "url": { + "type": "string", + "description": "The URL where webhook events will be sent", + "default": "" + }, + "secret": { + "type": "string", + "description": "The signing key used to sign webhook payloads", + "default": "", + "nullable": true + }, + "events": { + "type": "array", + "items": { + "type": "string", + "description": "The event types to subscribe to", + "default": "" + }, + "description": "Array of event names" + }, + "headers": { + "type": "object", + "description": "Custom headers to include in webhook requests", + "default": null, + "nullable": true + }, + "filters": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "repositoryIds": { + "type": "array", + "items": { + "type": "string", + "description": "Repository IDs to filter events", + "default": "" + }, + "description": "Array of repository IDs", + "nullable": true + } + }, + "required": [ + "repositoryIds" + ], + "nullable": true + } + }, + "description": "" + } + } + }, + "required": false + }, "security": [ { "bearerAuth": [ - "threat-feed:list" + "webhooks:update" ] }, { "basicAuth": [ - "threat-feed:list" + "webhooks:update" ] } ], - "description": "**This endpoint is deprecated.** Use the [successor version](https://docs.socket.dev/reference/getorgthreatfeeditems) instead.\n\nPaginated list of threat feed items.\n\nThis 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.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- threat-feed:list", + "description": "Update details of an existing webhook.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- webhooks:update", "responses": { "200": { "content": { @@ -31589,83 +38305,96 @@ "additionalProperties": false, "description": "", "properties": { - "results": { + "id": { + "type": "string", + "description": "The ID of the webhook", + "default": "" + }, + "created_at": { + "type": "string", + "description": "The creation date of the webhook", + "default": "" + }, + "updated_at": { + "type": "string", + "description": "The last update date of the webhook", + "default": "" + }, + "name": { + "type": "string", + "description": "The name of the webhook", + "default": "" + }, + "description": { + "type": "string", + "description": "The description of the webhook", + "default": "", + "nullable": true + }, + "url": { + "type": "string", + "description": "The URL where webhook events will be sent", + "default": "" + }, + "secret": { + "type": "string", + "description": "The signing key used to sign webhook payloads", + "default": "", + "nullable": true + }, + "events": { "type": "array", "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "createdAt": { - "type": "string", - "description": "", - "default": "" - }, - "updatedAt": { - "type": "string", - "description": "", - "default": "" - }, - "description": { - "type": "string", - "description": "", - "default": "" - }, - "id": { - "type": "integer", - "description": "", - "default": 0 - }, - "locationHtmlUrl": { - "type": "string", - "description": "", - "default": "" - }, - "packageHtmlUrl": { - "type": "string", - "description": "", - "default": "" - }, - "purl": { - "type": "string", - "description": "", - "default": "" - }, - "removedAt": { - "type": "string", - "description": "", - "default": "", - "nullable": true - }, - "threatType": { + "type": "string", + "description": "The event types to subscribe to", + "default": "" + }, + "description": "Array of event names" + }, + "headers": { + "type": "object", + "description": "Custom headers to include in webhook requests", + "default": null, + "nullable": true + }, + "filters": { + "type": "object", + "additionalProperties": false, + "description": "", + "properties": { + "repositoryIds": { + "type": "array", + "items": { "type": "string", - "description": "", + "description": "Repository IDs to filter events", "default": "" }, - "needsHumanReview": { - "type": "boolean", - "default": false, - "description": "Whether the threat still is in need of human review by the threat research team" - } - }, - "description": "" + "description": "Array of repository IDs", + "nullable": true + } }, - "description": "" - }, - "nextPage": { - "type": "string", - "description": "", - "default": "", + "required": [ + "repositoryIds" + ], "nullable": true } }, "required": [ - "nextPage", - "results" + "created_at", + "description", + "events", + "filters", + "headers", + "id", + "name", + "secret", + "updated_at", + "url" ] } } }, - "description": "The paginated list of threats in the feed and the next page querystring token." + "description": "Updated webhook details" }, "400": { "$ref": "#/components/responses/SocketBadRequest" @@ -31684,15 +38413,17 @@ } }, "x-readme": {} - } - }, - "/orgs/{org_slug}/threat-feed": { - "get": { + }, + "delete": { "tags": [ - "Threat Feed" + "Webhooks" ], - "summary": "Get Threat Feed Items (Beta)", - "operationId": "getOrgThreatFeedItems", + "summary": "Delete webhook", + "externalDocs": { + "description": "Webhooks documentation", + "url": "https://docs.socket.dev/docs/webhooks" + }, + "operationId": "deleteOrgWebhook", "parameters": [ { "name": "org_slug", @@ -31704,162 +38435,28 @@ } }, { - "name": "per_page", - "in": "query", - "required": false, - "description": "Number of threats per page", - "schema": { - "type": "integer", - "minimum": 1, - "maximum": 100, - "default": 30 - } - }, - { - "name": "page_cursor", - "in": "query", - "required": false, - "description": "Page cursor token. Pass the returned nextPageCursor to this query string to fetch the next page of the threat feed.", - "schema": { - "type": "string" - } - }, - { - "name": "sort", - "in": "query", - "required": false, - "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.", - "schema": { - "type": "string", - "enum": [ - "id", - "created_at", - "updated_at" - ], - "default": "updated_at" - } - }, - { - "name": "updated_after", - "in": "query", - "required": false, - "description": "A Unix timestamp in seconds that filters results to items only updated after the timestamp.", - "schema": { - "type": "string" - } - }, - { - "name": "created_after", - "in": "query", - "required": false, - "description": "A Unix timestamp in seconds that filters results to items only created after the date.", + "name": "webhook_id", + "in": "path", + "required": true, + "description": "The ID of the webhook", "schema": { "type": "string" } - }, - { - "name": "direction", - "in": "query", - "required": false, - "description": "Order direction of the provided sort field.", - "schema": { - "type": "string", - "enum": [ - "desc", - "asc" - ], - "default": "desc" - } - }, - { - "name": "filter", - "in": "query", - "required": false, - "description": "Filter what type of threats to return", - "schema": { - "type": "string", - "enum": [ - "u", - "c", - "fp", - "tp", - "mal", - "vuln", - "anom", - "joke", - "spy", - "typo", - "secret", - "obf" - ], - "default": "mal" - } - }, - { - "name": "name", - "in": "query", - "required": false, - "description": "Filter threats by package name", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "version", - "in": "query", - "required": false, - "description": "Filter threats by package version.", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "is_human_reviewed", - "in": "query", - "required": false, - "description": "Only return threats which have been human-reviewed", - "schema": { - "type": "boolean", - "default": false - } - }, - { - "name": "ecosystem", - "in": "query", - "required": false, - "description": "Filter threats by package ecosystem type", - "schema": { - "type": "string", - "enum": [ - "github", - "cargo", - "chrome", - "golang", - "huggingface", - "maven", - "npm", - "nuget", - "pypi", - "gem" - ] - } } ], "security": [ { "bearerAuth": [ - "threat-feed:list" + "webhooks:delete" ] }, { "basicAuth": [ - "threat-feed:list" + "webhooks:delete" ] } ], - "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.\n\nThis 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.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- threat-feed:list", + "description": "Delete a webhook. This will stop all future webhook deliveries to the webhook URL.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:\n- webhooks:delete", "responses": { "200": { "content": { @@ -31869,83 +38466,19 @@ "additionalProperties": false, "description": "", "properties": { - "results": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": false, - "properties": { - "createdAt": { - "type": "string", - "description": "", - "default": "" - }, - "updatedAt": { - "type": "string", - "description": "", - "default": "" - }, - "description": { - "type": "string", - "description": "", - "default": "" - }, - "id": { - "type": "integer", - "description": "", - "default": 0 - }, - "locationHtmlUrl": { - "type": "string", - "description": "", - "default": "" - }, - "packageHtmlUrl": { - "type": "string", - "description": "", - "default": "" - }, - "purl": { - "type": "string", - "description": "", - "default": "" - }, - "removedAt": { - "type": "string", - "description": "", - "default": "", - "nullable": true - }, - "threatType": { - "type": "string", - "description": "", - "default": "" - }, - "needsHumanReview": { - "type": "boolean", - "default": false, - "description": "Whether the threat still is in need of human review by the threat research team" - } - }, - "description": "" - }, - "description": "" - }, - "nextPageCursor": { + "status": { "type": "string", "description": "", - "default": "", - "nullable": true + "default": "ok" } }, "required": [ - "nextPageCursor", - "results" + "status" ] } } }, - "description": "The paginated list of items in the threat feed and the next page cursor." + "description": "Success" }, "400": { "$ref": "#/components/responses/SocketBadRequest" @@ -32415,6 +38948,29 @@ "x-readme": {} } }, + "/openapi.json": { + "get": { + "tags": [ + "Metadata" + ], + "summary": "Returns the OpenAPI definition", + "operationId": "getOpenAPIJSON", + "security": [], + "description": "Retrieve the API specification in an Openapi JSON format.\n\nThis endpoint consumes 1 unit of your quota.\n\nThis endpoint requires the following org token scopes:", + "responses": { + "200": { + "content": { + "application/json": {} + }, + "description": "OpenAPI specification" + }, + "429": { + "$ref": "#/components/responses/SocketTooManyRequestsResponse" + } + }, + "x-readme": {} + } + }, "/quota": { "get": { "tags": [ @@ -32978,6 +39534,17 @@ "summary": "Create a report", "deprecated": true, "operationId": "createReport", + "parameters": [ + { + "name": "workspace", + "in": "query", + "required": false, + "description": "The workspace of the repository to associate the full-scan with.", + "schema": { + "type": "string" + } + } + ], "requestBody": { "content": { "multipart/form-data": { @@ -33222,6 +39789,11 @@ "default": "", "nullable": true }, + "workspace": { + "type": "string", + "description": "", + "default": "" + }, "latest_project_report": { "type": "object", "additionalProperties": false, @@ -33252,7 +39824,8 @@ "id", "name", "organization_id", - "updated_at" + "updated_at", + "workspace" ] }, "description": "" diff --git a/scripts/check.mjs b/scripts/check.mjs index d885a2e4..410b9354 100755 --- a/scripts/check.mjs +++ b/scripts/check.mjs @@ -17,7 +17,7 @@ function runCommand(command, args = []) { return new Promise((resolve, reject) => { const child = spawn(command, args, { stdio: 'inherit', - shell: process.platform === 'win32', + shell: process.platform === 'win32' }) child.on('exit', code => { @@ -40,7 +40,7 @@ async function main() { '-c', '--aggregate-output', 'check:lint', - 'check:tsc', + 'check:tsc' ]) process.exitCode = exitCode diff --git a/scripts/lint.mjs b/scripts/lint.mjs index 9e8d0e0a..5933e9b9 100755 --- a/scripts/lint.mjs +++ b/scripts/lint.mjs @@ -22,7 +22,7 @@ function parseArgs() { all: args.includes('--all'), help: args.includes('--help') || args.includes('-h'), // Get remaining positional arguments (file paths) - files: args.filter(arg => !arg.startsWith('--') && !arg.startsWith('-')), + files: args.filter(arg => !arg.startsWith('--') && !arg.startsWith('-')) } } @@ -33,7 +33,7 @@ function runCommand(command, args = []) { return new Promise((resolve, reject) => { const child = spawn(command, args, { stdio: 'inherit', - shell: process.platform === 'win32', + shell: process.platform === 'win32' }) child.on('exit', code => { @@ -76,7 +76,7 @@ async function main() { 'oxlint', '-c=.oxlintrc.json', '--ignore-path=.oxlintignore', - '--tsconfig=tsconfig.json', + '--tsconfig=tsconfig.json' ] // Add fix flag if requested @@ -101,7 +101,17 @@ async function main() { const useEnvFile = existsSync('.env.local') let exitCode if (useEnvFile) { - exitCode = await runCommand('pnpm', ['exec', 'dotenvx', '-q', 'run', '-f', '.env.local', '--', 'pnpm', ...oxlintArgs]) + exitCode = await runCommand('pnpm', [ + 'exec', + 'dotenvx', + '-q', + 'run', + '-f', + '.env.local', + '--', + 'pnpm', + ...oxlintArgs + ]) } else { exitCode = await runCommand('pnpm', oxlintArgs) } diff --git a/scripts/publish.mjs b/scripts/publish.mjs index 504e46b4..f6a94d64 100644 --- a/scripts/publish.mjs +++ b/scripts/publish.mjs @@ -16,7 +16,7 @@ function runCommand(command, args = [], options = {}) { const child = spawn(command, args, { stdio: 'inherit', shell: process.platform === 'win32', - ...options, + ...options }) child.on('exit', code => { @@ -35,31 +35,32 @@ async function main() { options: { help: { type: 'boolean', - default: false, + default: false }, 'dry-run': { type: 'boolean', - default: false, + default: false }, 'skip-checks': { type: 'boolean', - default: false, + default: false }, 'skip-build': { type: 'boolean', - default: false, + default: false }, tag: { type: 'string', - default: process.env.DIST_TAG || process.env.NPM_CONFIG_TAG || 'latest', + default: + process.env.DIST_TAG || process.env.NPM_CONFIG_TAG || 'latest' }, access: { type: 'string', - default: 'public', - }, + default: 'public' + } }, allowPositionals: false, - strict: false, + strict: false }) if (values.help) { @@ -69,7 +70,9 @@ async function main() { console.log(' --dry-run Perform a dry-run without publishing') console.log(' --skip-checks Skip pre-publish checks') console.log(' --skip-build Skip build step (not allowed in CI)') - console.log(' --tag npm dist-tag (default: $DIST_TAG or "latest")') + console.log( + ' --tag npm dist-tag (default: $DIST_TAG or "latest")' + ) console.log(' --access Package access level (default: public)') console.log('\nEnvironment Variables:') console.log(' DIST_TAG Default npm dist-tag to use') @@ -121,7 +124,13 @@ async function main() { } // Prepare publish args - const publishArgs = ['publish', '--access', values.access, '--tag', values.tag] + const publishArgs = [ + 'publish', + '--access', + values.access, + '--tag', + values.tag + ] // Add provenance by default (works with trusted publishers in CI) if (!values['dry-run']) { @@ -136,7 +145,7 @@ async function main() { console.log( values['dry-run'] ? 'Running dry-run publish...' - : `Publishing to npm with tag "${values.tag}"...`, + : `Publishing to npm with tag "${values.tag}"...` ) const publishCode = await runCommand('npm', publishArgs) diff --git a/scripts/test.mjs b/scripts/test.mjs index 8b239da9..d094dfff 100755 --- a/scripts/test.mjs +++ b/scripts/test.mjs @@ -26,10 +26,15 @@ function parseArgs() { // Get remaining arguments to pass to vitest extra: args.filter( arg => - !['--all', '--update', '--coverage', '--cover', '--help', '-h'].includes( - arg, - ), - ), + ![ + '--all', + '--update', + '--coverage', + '--cover', + '--help', + '-h' + ].includes(arg) + ) } } @@ -40,7 +45,7 @@ function runCommand(command, args = []) { return new Promise((resolve, reject) => { const child = spawn(command, args, { stdio: 'inherit', - shell: process.platform === 'win32', + shell: process.platform === 'win32' }) child.on('exit', code => { @@ -82,7 +87,13 @@ async function main() { // Step 1: Run checks console.log('Running checks...') - let exitCode = await runCommand('pnpm', ['exec', 'run-p', '-c', '--aggregate-output', 'check:*']) + let exitCode = await runCommand('pnpm', [ + 'exec', + 'run-p', + '-c', + '--aggregate-output', + 'check:*' + ]) if (exitCode !== 0) { console.error('Checks failed') process.exitCode = exitCode @@ -92,7 +103,18 @@ async function main() { // Step 2: Run test:prepare (build) console.log('\nPreparing tests (building)...') if (useEnvFile) { - exitCode = await runCommand('pnpm', ['exec', 'dotenvx', '-q', 'run', '-f', '.env.test', '--', 'pnpm', 'run', 'build']) + exitCode = await runCommand('pnpm', [ + 'exec', + 'dotenvx', + '-q', + 'run', + '-f', + '.env.test', + '--', + 'pnpm', + 'run', + 'build' + ]) } else { exitCode = await runCommand('pnpm', ['run', 'build']) } @@ -122,7 +144,17 @@ async function main() { } if (useEnvFile) { - exitCode = await runCommand('pnpm', ['exec', 'dotenvx', '-q', 'run', '-f', '.env.test', '--', 'pnpm', ...vitestArgs]) + exitCode = await runCommand('pnpm', [ + 'exec', + 'dotenvx', + '-q', + 'run', + '-f', + '.env.test', + '--', + 'pnpm', + ...vitestArgs + ]) } else { exitCode = await runCommand('pnpm', vitestArgs) } diff --git a/src/index.ts b/src/index.ts index d5dd4582..878bc2d0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -297,20 +297,20 @@ const publicPolicy = new Map([ /** * Array of sensitive header names that should be redacted in logs */ -const SENSITIVE_HEADERS = [ +const SENSITIVE_HEADERS = new Set([ 'authorization', 'cookie', 'set-cookie', 'proxy-authorization', 'www-authenticate', - 'proxy-authenticate', -] + 'proxy-authenticate' +]) /** * Sanitize headers for logging by redacting sensitive values. */ function sanitizeHeaders( - headers: Record | readonly string[] | undefined, + headers: Record | readonly string[] | undefined ): Record | undefined { if (!headers) { return undefined @@ -326,7 +326,7 @@ function sanitizeHeaders( // Plain object iteration works for both HeadersRecord and IncomingHttpHeaders for (const [key, value] of Object.entries(headers)) { const keyLower = key.toLowerCase() - if (SENSITIVE_HEADERS.includes(keyLower)) { + if (SENSITIVE_HEADERS.has(keyLower)) { sanitized[key] = '[REDACTED]' } else { // Handle both string and string[] values @@ -365,7 +365,7 @@ async function createDeleteRequest( method, url, headers: sanitizeHeaders((options as HttpsRequestOptions).headers), - timeout: options.timeout, + timeout: options.timeout }) try { @@ -383,7 +383,7 @@ async function createDeleteRequest( duration: Date.now() - startTime, status: response.statusCode, statusText: response.statusMessage, - headers: sanitizeHeaders(response.headers), + headers: sanitizeHeaders(response.headers) }) return response @@ -392,7 +392,7 @@ async function createDeleteRequest( method, url, duration: Date.now() - startTime, - error: error as Error, + error: error as Error }) throw error @@ -413,7 +413,7 @@ async function createGetRequest( method, url, headers: sanitizeHeaders((options as HttpsRequestOptions).headers), - timeout: options.timeout, + timeout: options.timeout }) try { @@ -431,7 +431,7 @@ async function createGetRequest( duration: Date.now() - startTime, status: response.statusCode, statusText: response.statusMessage, - headers: sanitizeHeaders(response.headers), + headers: sanitizeHeaders(response.headers) }) return response @@ -440,7 +440,7 @@ async function createGetRequest( method, url, duration: Date.now() - startTime, - error: error as Error, + error: error as Error }) throw error @@ -461,21 +461,21 @@ async function createPostRequest( const headers = { ...(options as HttpsRequestOptions)?.headers, 'Content-Length': Buffer.byteLength(body, 'utf8'), - 'Content-Type': 'application/json', + 'Content-Type': 'application/json' } hooks?.onRequest?.({ method, url, headers: sanitizeHeaders(headers), - timeout: options.timeout, + timeout: options.timeout }) try { const req = getHttpModule(baseUrl).request(url, { method, ...options, - headers, + headers }) req.write(body) @@ -489,7 +489,7 @@ async function createPostRequest( duration: Date.now() - startTime, status: response.statusCode, statusText: response.statusMessage, - headers: sanitizeHeaders(response.headers), + headers: sanitizeHeaders(response.headers) }) return response @@ -498,7 +498,65 @@ async function createPostRequest( method, url, duration: Date.now() - startTime, - error: error as Error, + error: error as Error + }) + + throw error + } +} + +async function createPutRequest( + baseUrl: string, + urlPath: string, + putJson: any, + options: RequestOptions, + hooks?: SocketSdkOptions['hooks'] +): Promise { + const startTime = Date.now() + const url = `${baseUrl}${urlPath}` + const method = 'PUT' + const body = JSON.stringify(putJson) + const headers = { + ...(options as HttpsRequestOptions)?.headers, + 'Content-Length': Buffer.byteLength(body, 'utf8'), + 'Content-Type': 'application/json' + } + + hooks?.onRequest?.({ + method, + url, + headers: sanitizeHeaders(headers), + timeout: options.timeout + }) + + try { + const req = getHttpModule(baseUrl).request(url, { + method, + ...options, + headers + }) + + req.write(body) + req.end() + + const response = await getResponse(req) + + hooks?.onResponse?.({ + method, + url, + duration: Date.now() - startTime, + status: response.statusCode, + statusText: response.statusMessage, + headers: sanitizeHeaders(response.headers) + }) + + return response + } catch (error) { + hooks?.onResponse?.({ + method, + url, + duration: Date.now() - startTime, + error: error as Error }) throw error @@ -577,19 +635,19 @@ async function createUploadRequest( const method = 'POST' const headers = { ...(options as HttpsRequestOptions)?.headers, - 'Content-Type': `multipart/form-data; boundary=${boundary}`, + 'Content-Type': `multipart/form-data; boundary=${boundary}` } const startTime = Date.now() const req: ClientRequest = getHttpModule(baseUrl).request(url, { method, ...options, - headers, + headers }) hooks?.onRequest?.({ method, url: url.toString(), headers: sanitizeHeaders(headers), - timeout: options.timeout, + timeout: options.timeout }) // Send headers early to prompt server validation (auth, URL, quota, etc.). @@ -604,7 +662,7 @@ async function createUploadRequest( duration: Date.now() - startTime, status: response.statusCode, statusText: response.statusMessage, - headers: sanitizeHeaders(response.headers), + headers: sanitizeHeaders(response.headers) }) pass(response) }, @@ -613,10 +671,10 @@ async function createUploadRequest( method, url: url.toString(), duration: Date.now() - startTime, - error: error as Error, + error: error as Error }) fail(error) - }, + } ) let aborted = false @@ -1217,7 +1275,7 @@ export class SocketSdk { `dependencies/upload?${queryToSearchParams(queryParams)}`, createRequestBodyForFilepaths(absFilepaths, basePath), this.#reqOptions, - this.#hooks, + this.#hooks ) ) return this.#handleApiSuccess<'createDependenciesSnapshot'>(data) @@ -1250,7 +1308,7 @@ export class SocketSdk { `orgs/${encodeURIComponent(orgSlug)}/full-scans?${queryToSearchParams(queryParams)}`, createRequestBodyForFilepaths(absFilepaths, basePath), this.#reqOptions, - this.#hooks, + this.#hooks ) ) return this.#handleApiSuccess<'CreateOrgFullScan'>(data) @@ -1270,7 +1328,7 @@ export class SocketSdk { `orgs/${encodeURIComponent(orgSlug)}/repos`, queryParams, this.#reqOptions, - this.#hooks, + this.#hooks ) ) return this.#handleApiSuccess<'createOrgRepo'>(data) @@ -1300,7 +1358,7 @@ export class SocketSdk { ...this.#reqOptions, method: 'PUT' }, - this.#hooks, + this.#hooks ) return this.#handleApiSuccess<'createReport'>(data) } catch (e) { @@ -1551,7 +1609,7 @@ export class SocketSdk { this.#baseUrl, 'quota', this.#reqOptions, - this.#hooks, + this.#hooks ) ) return this.#handleApiSuccess<'getQuota'>(data) @@ -1709,7 +1767,7 @@ export class SocketSdk { `orgs/${encodeURIComponent(orgSlug)}/upload-manifest-files`, createRequestBodyForFilepaths(absFilepaths, basePath), this.#reqOptions, - this.#hooks, + this.#hooks ) ) return this.#handleApiSuccess( @@ -1721,6 +1779,101 @@ export class SocketSdk { )) as unknown as UploadManifestFilesError } } + + async updateOrgTelemetryConfig( + orgSlug: string, + telemetryData: { enabled?: boolean | undefined } + ): Promise> { + try { + const data = await getResponseJson( + await createPutRequest( + this.#baseUrl, + `orgs/${encodeURIComponent(orgSlug)}/telemetry/config`, + telemetryData, + this.#reqOptions, + this.#hooks + ) + ) + return this.#handleApiSuccess<'updateOrgTelemetryConfig'>(data) + } catch (e) { + return await this.#handleApiError<'updateOrgTelemetryConfig'>(e) + } + } + + async getTelemetryConfig( + orgSlug: string + ): Promise> { + try { + const data = await getResponseJson( + await createGetRequest( + this.#baseUrl, + `orgs/${encodeURIComponent(orgSlug)}/telemetry/config`, + this.#reqOptions, + this.#hooks + ) + ) + return this.#handleApiSuccess<'getOrgTelemetryConfig'>(data) + } catch (e) { + return await this.#handleApiError<'getOrgTelemetryConfig'>(e) + } + } + + async postOrgTelemetry( + orgSlug: string, + telemetryData: Record + ): Promise< + | { success: true; status: 200; data: Record } + | { success: false; status: number; error: string; cause?: string } + > { + try { + const data = await getResponseJson( + await createPostRequest( + this.#baseUrl, + `orgs/${encodeURIComponent(orgSlug)}/telemetry`, + telemetryData, + this.#reqOptions, + this.#hooks + ) + ) + return { + success: true, + status: 200, + data: data as Record + } + } catch (e) { + if (!(e instanceof ResponseError)) { + throw new Error('Unexpected Socket API error', { cause: e }) + } + const { statusCode } = e.response + if (statusCode && statusCode >= 500) { + throw new Error(`Socket API server error (${statusCode})`, { cause: e }) + } + const bodyStr = await getErrorResponseBody(e.response) + let body: string | undefined + try { + const parsed = JSON.parse(bodyStr) + if (typeof parsed?.error?.message === 'string') { + body = parsed.error.message + } + } catch { + body = bodyStr + } + const result: { + success: false + status: number + error: string + cause?: string + } = { + success: false, + status: statusCode ?? 0, + error: e.message ?? 'Unknown error' + } + if (body) { + result.cause = body + } + return result + } + } } export interface SocketSdk { diff --git a/test/main.test.ts b/test/main.test.ts index 21ba840d..c324771c 100644 --- a/test/main.test.ts +++ b/test/main.test.ts @@ -57,4 +57,63 @@ describe('SocketSdk', () => { }) }) }) + + describe('getTelemetryConfig', () => { + it('should get telemetry config', async () => { + nock('https://api.socket.dev') + .get('/v0/orgs/test-org/telemetry/config') + .reply(200, { telemetry: { enabled: false } }) + + const client = new SocketSdk('yetAnotherApiKey') + const res = await client.getTelemetryConfig('test-org') + + expect(res).toEqual({ + success: true, + status: 200, + data: { telemetry: { enabled: false } } + }) + }) + }) + + describe('updateOrgTelemetryConfig', () => { + it('should update telemetry config', async () => { + nock('https://api.socket.dev') + .put('/v0/orgs/test-org/telemetry/config', { enabled: true }) + .reply(200, { telemetry: { enabled: true } }) + + const client = new SocketSdk('yetAnotherApiKey') + const res = await client.updateOrgTelemetryConfig('test-org', { + enabled: true + }) + + expect(res).toEqual({ + success: true, + status: 200, + data: { telemetry: { enabled: true } } + }) + }) + }) + + describe('postOrgTelemetry', () => { + it('should post telemetry data', async () => { + nock('https://api.socket.dev') + .post('/v0/orgs/test-org/telemetry', { + event: 'test-event', + timestamp: 1234567890 + }) + .reply(200, {}) + + const client = new SocketSdk('yetAnotherApiKey') + const res = await client.postOrgTelemetry('test-org', { + event: 'test-event', + timestamp: 1234567890 + }) + + expect(res).toEqual({ + success: true, + status: 200, + data: {} + }) + }) + }) }) diff --git a/test/socket-sdk-logging-hooks.test.ts b/test/socket-sdk-logging-hooks.test.ts index c10e9296..42f925eb 100644 --- a/test/socket-sdk-logging-hooks.test.ts +++ b/test/socket-sdk-logging-hooks.test.ts @@ -13,7 +13,7 @@ describe('SocketSdk - Logging Hooks', () => { const onResponse = vi.fn() const client = new SocketSdk('test-token', { - hooks: { onRequest, onResponse }, + hooks: { onRequest, onResponse } }) // Mock successful quota API call @@ -28,7 +28,7 @@ describe('SocketSdk - Logging Hooks', () => { const requestInfo: RequestInfo = onRequest.mock.calls[0]?.[0]! expect(requestInfo).toMatchObject({ method: 'GET', - url: 'https://api.socket.dev/v0/quota', + url: 'https://api.socket.dev/v0/quota' }) expect(requestInfo.headers).toBeDefined() @@ -38,7 +38,7 @@ describe('SocketSdk - Logging Hooks', () => { expect(responseInfo).toMatchObject({ method: 'GET', url: 'https://api.socket.dev/v0/quota', - status: 200, + status: 200 }) expect(responseInfo.duration).toBeGreaterThanOrEqual(0) expect(responseInfo.headers).toBeDefined() @@ -49,7 +49,7 @@ describe('SocketSdk - Logging Hooks', () => { const onResponse = vi.fn() const client = new SocketSdk('test-token', { - hooks: { onRequest, onResponse }, + hooks: { onRequest, onResponse } }) // Mock network error @@ -67,7 +67,7 @@ describe('SocketSdk - Logging Hooks', () => { const responseInfo: ResponseInfo = onResponse.mock.calls[0]?.[0]! expect(responseInfo).toMatchObject({ method: 'GET', - url: 'https://api.socket.dev/v0/quota', + url: 'https://api.socket.dev/v0/quota' }) expect(responseInfo.error).toBeInstanceOf(Error) expect(responseInfo.duration).toBeGreaterThanOrEqual(0) @@ -78,16 +78,20 @@ describe('SocketSdk - Logging Hooks', () => { const onResponse = vi.fn() const client = new SocketSdk('test-token', { - hooks: { onRequest, onResponse }, + hooks: { onRequest, onResponse } }) // Mock successful API call nock('https://api.socket.dev') .get('/v0/quota') - .reply(200, { quota: { remaining: 100 } }, { - 'set-cookie': 'session=secret123', - 'content-type': 'application/json', - }) + .reply( + 200, + { quota: { remaining: 100 } }, + { + 'set-cookie': 'session=secret123', + 'content-type': 'application/json' + } + ) await client.getQuota() @@ -100,4 +104,4 @@ describe('SocketSdk - Logging Hooks', () => { expect(responseInfo.headers?.['set-cookie']).toBe('[REDACTED]') expect(responseInfo.headers?.['content-type']).toBe('application/json') }) -}) \ No newline at end of file +}) diff --git a/types/api.d.ts b/types/api.d.ts index 077e0d4a..3b43df2a 100644 --- a/types/api.d.ts +++ b/types/api.d.ts @@ -135,6 +135,9 @@ export interface paths { * * The maximum number of files you can upload at a time is 5000 and each file can be no bigger than 67 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: @@ -209,6 +212,34 @@ export interface paths { */ get: operations['GetOrgFullScanDiffGfm'] } + '/orgs/{org_slug}/full-scans/{full_scan_id}/files/tar': { + /** + * 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 + */ + get: operations['downloadOrgFullScanFilesAsTar'] + } + '/orgs/{org_slug}/full-scans/archive': { + /** + * 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 5000 and each extracted file can be no bigger than 67 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}/export/cdx/{id}': { /** * Export CycloneDX SBOM (Beta) @@ -672,7 +703,8 @@ export interface paths { '/orgs/{org_slug}/settings/license-policy/view': { /** * Get License Policy (Beta) - * @description Returns an organization's license policy + * @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. * @@ -897,6 +929,95 @@ export interface paths { */ get: operations['getOrgThreatFeedItems'] } + '/orgs/{org_slug}/fixes': { + /** + * Fetch fixes for vulnerabilities in a repository or scan + * @description Fetches available fixes for vulnerabilities in a repository or scan. + * Requires either repo_slug or full_scan_id 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. + * + * 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 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: + */ + get: operations['getOrgTelemetryConfig'] + /** + * 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 + */ + put: operations['updateOrgTelemetryConfig'] + } + '/orgs/{org_slug}/webhooks': { + /** + * 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 + */ + get: operations['getOrgWebhooksList'] + /** + * 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 + */ + post: operations['createOrgWebhook'] + } + '/orgs/{org_slug}/webhooks/{webhook_id}': { + /** + * 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 + */ + get: operations['getOrgWebhook'] + /** + * 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 + */ + put: operations['updateOrgWebhook'] + /** + * 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 + */ + delete: operations['deleteOrgWebhook'] + } '/license-policy': { /** * License Policy (Beta) @@ -1236,6 +1357,17 @@ export interface paths { */ get: operations['getOpenAPI'] } + '/openapi.json': { + /** + * Returns the OpenAPI definition + * @description 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 quota @@ -1487,6 +1619,11 @@ export interface components { _type: 'purlError' value: components['schemas']['PurlErrorSchema'] } + | { + /** @enum {string} */ + _type: 'summary' + value: components['schemas']['PurlSummarySchema'] + } SocketBatchPURLFetch: { components: Array } @@ -1507,6 +1644,7 @@ export interface components { repositoryType?: string alerts?: Array score?: components['schemas']['SocketScore'] + patch?: components['schemas']['SocketArtifactPatch'] /** * @description Original unmodified PURL input string before normalization * @default @@ -1731,6 +1869,7 @@ export interface components { allow: string[] | null warn: string[] | null monitor: string[] | null + deny: string[] | null options: string[] | null } Capabilities: { @@ -1867,6 +2006,18 @@ export interface components { /** @default */ inputPurl: string } + PurlSummarySchema: { + /** @default 0 */ + purl_input: number + /** @default 0 */ + resolved: number + errors: { + /** @default 0 */ + purl_malformed: number + /** @default 0 */ + package_not_found: number + } + } SocketBatchPURLRequest: { /** @default */ purl: string @@ -1982,11 +2133,41 @@ export interface components { * @default */ 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<{ /** @@ -2865,6 +3046,118 @@ export interface components { 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?: 'licenseSpdxDisj' @@ -3942,69 +4235,200 @@ export interface components { usage?: components['schemas']['SocketUsageRef'] } } - SocketMetricSchema: { - /** @default 0 */ - score: number - components: { - [key: string]: components['schemas']['SocketMetricComponent'] - } - /** @default 0 */ - limit?: number - /** @default */ - limitingMetric?: string - } - /** - * @description Package ecosystem type identifier based on the PURL specification - * @default unknown - * @enum {string} - */ - SocketPURL_Type: - | 'apk' - | 'bitbucket' - | 'cocoapods' - | 'cargo' - | 'chrome' - | 'composer' - | 'conan' - | 'conda' - | 'cran' - | 'deb' - | 'docker' - | 'gem' - | 'generic' - | 'github' - | 'golang' - | 'hackage' - | 'hex' - | 'huggingface' - | 'maven' - | 'mlflow' - | 'npm' - | 'nuget' - | 'qpkg' - | 'oci' - | 'pub' - | 'pypi' - | 'rpm' - | 'swid' - | 'swift' - | 'unknown' - /** - * @default low - * @enum {string} - */ - SocketIssueSeverity: 'low' | 'middle' | 'high' | 'critical' - /** - * @default other - * @enum {string} - */ - SocketCategory: - | 'supplyChainRisk' - | 'quality' - | 'maintenance' - | 'vulnerability' - | 'license' + | { + /** @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 + } + /** + * @description Package ecosystem type identifier based on the PURL specification + * @default unknown + * @enum {string} + */ + SocketPURL_Type: + | 'alpm' + | 'apk' + | 'bitbucket' + | 'cocoapods' + | 'cargo' + | 'chrome' + | 'composer' + | 'conan' + | 'conda' + | 'cran' + | 'deb' + | 'docker' + | 'gem' + | 'generic' + | 'github' + | 'golang' + | 'hackage' + | 'hex' + | 'huggingface' + | 'maven' + | 'mlflow' + | 'npm' + | 'nuget' + | 'qpkg' + | 'oci' + | 'pub' + | 'pypi' + | 'rpm' + | '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: { + /** + * @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 + } ReachabilityResult: { /** * @description Type of reachability analysis performed @@ -4458,6 +4882,10 @@ export interface operations { licensedetails?: boolean /** @description Return errors found with handling PURLs as error objects in the stream. */ purlErrors?: boolean + /** @description Return only cached results, do not attempt to scan new artifacts or rescan stale results. */ + cachedResultsOnly?: boolean + /** @description Include a summary object at the end of the stream with counts of malformed, resolved, and not found PURLs. */ + summary?: boolean } } requestBody?: { @@ -4612,10 +5040,16 @@ export interface operations { 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. */ + /** @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. */ @@ -4664,6 +5098,8 @@ export interface operations { /** @default */ api_url?: string | null /** @default */ + workspace?: string + /** @default */ repo?: string /** @default */ html_report_url?: string @@ -4684,6 +5120,8 @@ export interface operations { */ scan_state?: 'pending' | 'precrawl' | 'resolve' | 'scan' | null }> + /** @default */ + nextPageCursor: string | null /** @default 0 */ nextPage: number | null } @@ -4704,6 +5142,9 @@ export interface operations { * * The maximum number of files you can upload at a time is 5000 and each file can be no bigger than 67 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: @@ -4714,6 +5155,8 @@ export interface operations { 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. */ @@ -4722,7 +5165,7 @@ export interface operations { commit_hash?: string /** @description The pull request number to associate the full-scan with. */ pull_request?: number - /** @description The committers to associate the full-scan with. Set query more than once to set multiple. */ + /** @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' @@ -4734,6 +5177,8 @@ export interface operations { 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 */ @@ -4780,6 +5225,8 @@ export interface operations { /** @default */ api_url?: string | null /** @default */ + workspace?: string + /** @default */ repo?: string /** @default */ html_report_url?: string @@ -4939,6 +5386,8 @@ export interface operations { /** @default */ api_url?: string | null /** @default */ + workspace?: string + /** @default */ repo?: string /** @default */ html_report_url?: string @@ -5102,6 +5551,8 @@ export interface operations { 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 */ @@ -5192,112 +5643,264 @@ export interface operations { } } /** - * 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. + * 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: - * - report:read + * - full-scans:list */ - exportCDX: { + downloadOrgFullScanFilesAsTar: { 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 + /** @description The ID of the full scan */ + full_scan_id: string } } responses: { - /** @description CycloneDX SBOM */ + /** @description Tar archive of full scan files */ 200: { content: { - 'application/json': components['schemas']['CDXManifestSchema'] + 'application/x-tar': unknown } } 400: components['responses']['SocketBadRequest'] 401: components['responses']['SocketUnauthorized'] 403: components['responses']['SocketForbidden'] + 404: components['responses']['SocketNotFoundResponse'] 429: components['responses']['SocketTooManyRequestsResponse'] } } /** - * Export SPDX SBOM (Beta) - * @description Export a Socket SBOM as a SPDX SBOM - * - * Supported ecosystems: + * 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**. * - * - crates - * - go - * - maven - * - npm - * - nuget - * - pypi - * - rubygems - * - spdx - * - cdx + * 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. * - * Unsupported ecosystems are filtered from the export. + * The maximum combined number of files extracted from your upload is 5000 and each extracted file can be no bigger than 67 MB. * * This endpoint consumes 1 unit of your quota. * * This endpoint requires the following org token scopes: - * - report:read + * - full-scans:create */ - exportSPDX: { + CreateOrgFullScanArchive: { 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 + 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' + /** @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 + /** @default */ + integration_branch_url?: string | null + /** @default */ + integration_commit_url?: string | null + /** @default */ + integration_pull_request_url?: string | null + /** + * @description The current processing status of the SBOM + * @default pending + * @enum {string|null} + */ + 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'] + } + } + /** + * 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'] + 429: components['responses']['SocketTooManyRequestsResponse'] + } + } + /** + * 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 } @@ -5566,6 +6169,10 @@ export interface operations { */ 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 @@ -5712,6 +6319,8 @@ export interface operations { 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 */ @@ -6126,6 +6735,32 @@ export interface operations { * @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 name of the repository * @default @@ -6157,6 +6792,11 @@ export interface operations { * @default main */ default_branch?: string | null + /** + * @description The workspace of the repository + * @default + */ + workspace?: string }> /** @default 0 */ nextPage: number | null @@ -6222,6 +6862,11 @@ export interface operations { * @default main */ default_branch?: string | null + /** + * @description The workspace of the repository + * @default + */ + workspace?: string } } } @@ -6255,6 +6900,32 @@ export interface operations { * @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 name of the repository * @default @@ -6286,6 +6957,11 @@ export interface operations { * @default main */ default_branch?: string | null + /** + * @description The workspace of the repository + * @default + */ + workspace?: string } } } @@ -6307,6 +6983,10 @@ export interface operations { */ getOrgRepo: { parameters: { + query?: { + /** @description The workspace of the repository */ + workspace?: string + } path: { /** @description The slug of the organization */ org_slug: string @@ -6344,6 +7024,32 @@ export interface operations { * @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 name of the repository * @default @@ -6375,6 +7081,11 @@ export interface operations { * @default main */ default_branch: string | null + /** + * @description The workspace of the repository + * @default + */ + workspace: string /** * @description The slug of the repository. This typo is intentionally preserved for backwards compatibility reasons. * @default @@ -6401,6 +7112,10 @@ export interface operations { */ updateOrgRepo: { parameters: { + query?: { + /** @description The workspace of the repository */ + workspace?: string + } path: { /** @description The slug of the organization */ org_slug: string @@ -6442,8 +7157,13 @@ export interface operations { * @default main */ default_branch?: string | null - } - } + /** + * @description The workspace of the repository + * @default + */ + workspace?: string + } + } } responses: { /** @description Updated repository details */ @@ -6475,6 +7195,32 @@ export interface operations { * @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 name of the repository * @default @@ -6506,6 +7252,11 @@ export interface operations { * @default main */ default_branch?: string | null + /** + * @description The workspace of the repository + * @default + */ + workspace?: string } } } @@ -6527,6 +7278,10 @@ export interface operations { */ deleteOrgRepo: { parameters: { + query?: { + /** @description The workspace of the repository */ + workspace?: string + } path: { /** @description The slug of the organization */ org_slug: string @@ -7088,6 +7843,55 @@ export interface operations { */ 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' + } licenseSpdxDisj?: { /** * @description The action to take for licenseSpdxDisj issues. @@ -7662,6 +8466,69 @@ export interface operations { */ 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' + } } | null /** * @description The default security policy for the repository label @@ -7855,6 +8722,55 @@ export interface operations { */ 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' + } licenseSpdxDisj?: { /** * @description The action to take for licenseSpdxDisj issues. @@ -8429,6 +9345,69 @@ export interface operations { */ 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 repository label @@ -8776,6 +9755,55 @@ export interface operations { */ 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' + } licenseSpdxDisj?: { /** * @description The action to take for licenseSpdxDisj issues. @@ -9350,43 +10378,106 @@ export interface operations { */ 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 - } - } + 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': { @@ -9536,6 +10627,55 @@ export interface operations { */ 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' + } licenseSpdxDisj?: { /** * @description The action to take for licenseSpdxDisj issues. @@ -10110,6 +11250,69 @@ export interface operations { */ 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 Reset the policy rules to the default. When set to true, do not include any policyRules updates. @@ -10265,6 +11468,55 @@ export interface operations { */ 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' + } licenseSpdxDisj?: { /** * @description The action to take for licenseSpdxDisj issues. @@ -10839,6 +12091,69 @@ export interface operations { */ 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 @@ -10985,7 +12300,8 @@ export interface operations { } /** * Get License Policy (Beta) - * @description Returns an organization's license policy + * @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. * @@ -11040,50 +12356,440 @@ export interface operations { content: { 'application/json': { /** - * @description Run a SAST Scan on your source code as part of the Socket Basics scan + * @description Enable tabular console output * @default false */ - pythonSastEnabled?: boolean + consoleTabularEnabled?: boolean /** - * @description Run a SAST Scan on your source code as part of the Socket Basics scan + * @description Enable JSON console output * @default false */ - golangSastEnabled?: boolean + consoleJsonEnabled?: boolean /** - * @description Run a SAST Scan on your source code as part of the Socket Basics scan + * @description Enable verbose logging * @default false */ - javascriptSastEnabled?: boolean + verbose?: boolean /** - * @description Scan for hardcoded secrets and credentials in your code as part of the Socket Basics scan + * @description Enable all language SAST scanning * @default false */ - secretScanningEnabled?: boolean + allLanguagesEnabled?: boolean /** - * @description Run a vulnerability scan on your Docker images as part of the Socket Basics scan + * @description Run Python SAST scanning * @default false */ - trivyImageEnabled?: boolean + pythonSastEnabled?: boolean /** - * @description Run a vulnerability scan on your Dockerfiles as part of the Socket Basics scan + * @description Run JavaScript SAST scanning * @default false */ - trivyDockerfileEnabled?: boolean + javascriptSastEnabled?: boolean /** - * @description Scan dependencies for security vulnerabilities and issues as part of the Socket Basics scan + * @description Run Go SAST scanning * @default false */ - socketScanningEnabled?: boolean + goSastEnabled?: boolean /** - * @description Enables or disable running a Socket SCA Scan as part of the Socket Basics scan. If you have Socket already enabled via the Github App this is not needed. Socket SCA provides 0 day protection of Open Source Supply Chain packages, CVE Reachability, and operational risk of packages. + * @description Run Golang SAST scanning * @default false */ - socketScaEnabled?: boolean + golangSastEnabled?: boolean /** - * Format: Additional configuration for Socket Basics, includes support for experimental and custom tooling. - * @default + * @description Run Java SAST scanning + * @default false */ - additionalParameters?: string + 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 + /** + * @description Enable Socket Tier 1 reachability analysis + * @default false + */ + socketTier1Enabled?: boolean + /** + * @description Additional parameters for Socket SCA + * @default + */ + socketAdditionalParams?: string + /** + * @description Enable secret scanning + * @default false + */ + secretScanningEnabled?: boolean + /** + * @description Directories to exclude from Trufflehog scanning + * @default + */ + trufflehogExcludeDir?: string + /** + * @description Show unverified secrets in Trufflehog results + * @default false + */ + trufflehogShowUnverified?: boolean + /** + * @description Notification method for Trufflehog + * @default + */ + trufflehogNotificationMethod?: string + /** + * @description Comma-separated list of container images to scan + * @default + */ + containerImagesToScan?: string + /** + * @description Comma-separated list of Dockerfiles to scan + * @default + */ + dockerfiles?: string + /** + * @description Enable Trivy image scanning + * @default false + */ + trivyImageEnabled?: boolean + /** + * @description Enable Trivy Dockerfile scanning + * @default false + */ + trivyDockerfileEnabled?: boolean + /** + * @description Notification method for Trivy + * @default + */ + trivyNotificationMethod?: string + /** + * @description Comma-separated list of disabled Trivy rules + * @default + */ + trivyDisabledRules?: string + /** + * @description Disable Trivy image scanning + * @default false + */ + trivyImageScanningDisabled?: boolean + /** + * @description Slack webhook URL for notifications + * @default + */ + slackWebhookUrl?: string + /** + * @description Generic webhook URL for notifications + * @default + */ + webhookUrl?: string + /** + * @description Microsoft Sentinel workspace ID + * @default + */ + msSentinelWorkspaceId?: string + /** + * @description Microsoft Sentinel key + * @default + */ + msSentinelKey?: string + /** + * @description Sumo Logic endpoint URL + * @default + */ + sumologicEndpoint?: string + /** + * @description Jira server URL + * @default + */ + jiraUrl?: string + /** + * @description Jira project key + * @default + */ + jiraProject?: string + /** + * @description Jira user email + * @default + */ + jiraEmail?: string + /** + * @description Jira API token + * @default + */ + jiraApiToken?: string + /** + * @description GitHub API token + * @default + */ + githubToken?: string + /** + * @description GitHub API URL + * @default + */ + githubApiUrl?: string + /** + * @description Microsoft Teams webhook URL + * @default + */ + msteamsWebhookUrl?: string + /** + * @description Enable S3 upload for scan results + * @default false + */ + s3Enabled?: boolean + /** + * @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 + */ + 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 } } } @@ -11119,9 +12825,13 @@ export interface operations { 'filters.repoSlug'?: string /** @description Comma-separated list of repo slugs that should be excluded */ 'filters.repoSlug.notIn'?: string - /** @description Comma-separated list of repo labels that should be included */ + /** @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 */ + /** @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 alert types (e.g. "usesEval", "unmaintained", etc.) that should be included */ 'filters.alertType'?: string @@ -11139,9 +12849,9 @@ export interface operations { '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 ("fallback", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be included */ + /** @description Comma-separated list of alert action source types ("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 ("fallback", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded */ + /** @description Comma-separated list of alert action source types ("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 fix types ("upgrade", "cve", or "remove") that should be included */ 'filters.alertFixType'?: string @@ -11171,10 +12881,22 @@ export interface operations { '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 Alert priority ("low", "medium", or "high") */ + /** @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 Alert priority ("low", "medium", "high", or "critical") */ 'filters.alertPriority'?: string - /** @description Alert priority ("low", "medium", or "high") */ + /** @description Alert priority ("low", "medium", "high", or "critical") */ 'filters.alertPriority.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 EPSS ("low", "medium", "high", "critical") */ + 'filters.alertEPSS'?: string + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + 'filters.alertEPSS.notIn'?: string /** @description Direct/transitive dependency filter flag */ 'filters.dependencyDirect'?: boolean /** @description Direct/transitive dependency filter flag */ @@ -11201,6 +12923,8 @@ export interface operations { /** @default */ endCursor: string | null items: Array<{ + /** @default */ + repoFullName: string /** @default */ repoId: string | null /** @default */ @@ -11300,7 +13024,9 @@ export interface operations { alertSeverity?: string[] /** @description Comma-separated list of repo slugs that should be excluded */ repoSlug?: string[] - /** @description Comma-separated list of repo labels that should be excluded */ + /** @description Comma-separated list of repo full names that should be excluded */ + repoFullName?: string[] + /** @description Comma-separated list of repo labels that should be excluded. Use "" to filter for repositories with no labels. */ repoLabels?: string[] /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be excluded */ alertType?: string[] @@ -11310,7 +13036,7 @@ export interface operations { artifactType?: string[] /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be excluded */ alertAction?: string[] - /** @description Comma-separated list of alert action source types ("fallback", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded */ + /** @description Comma-separated list of alert action source types ("fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded */ alertActionSourceType?: string[] /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be excluded */ alertFixType?: string[] @@ -11326,8 +13052,14 @@ export interface operations { alertCweName?: 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?: string[] - /** @description Alert priority ("low", "medium", or "high") */ + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be excluded */ + alertReachabilityAnalysisType?: string[] + /** @description Alert priority ("low", "medium", "high", or "critical") */ alertPriority?: string[] + /** @description Alert KEV (Known Exploited Vulnerability) filter flag */ + alertKEV?: boolean[] + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + alertEPSS?: string[] /** @description Direct/transitive dependency filter flag */ dependencyDirect?: boolean[] /** @description Development/production dependency filter flag */ @@ -11361,7 +13093,7 @@ export interface operations { 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,repoLabels,alertType,artifactType,alertAction,alertActionSourceType,alertFixType,alertCategory,alertCveId,alertCveTitle,alertCweId,alertCweName,alertReachabilityType,alertPriority,dependencyDirect,dependencyDev,dependencyDead) */ + /** @description Comma-separated list of fields that should be used for count aggregation (allowed: alertSeverity,repoSlug,repoFullName,repoLabels,alertType,artifactType,alertAction,alertActionSourceType,alertFixType,alertCategory,alertCveId,alertCveTitle,alertCweId,alertCweName,alertReachabilityType,alertReachabilityAnalysisType,alertPriority,alertKEV,alertEPSS,dependencyDirect,dependencyDev,dependencyDead) */ 'aggregation.fields'?: string /** @description Comma-separated list of alert severities ("low", "medium", "high", or "critical") that should be included */ 'filters.alertSeverity'?: string @@ -11371,9 +13103,13 @@ export interface operations { 'filters.repoSlug'?: string /** @description Comma-separated list of repo slugs that should be excluded */ 'filters.repoSlug.notIn'?: string - /** @description Comma-separated list of repo labels that should be included */ + /** @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 */ + /** @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 alert types (e.g. "usesEval", "unmaintained", etc.) that should be included */ 'filters.alertType'?: string @@ -11391,9 +13127,9 @@ export interface operations { '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 ("fallback", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be included */ + /** @description Comma-separated list of alert action source types ("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 ("fallback", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded */ + /** @description Comma-separated list of alert action source types ("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 fix types ("upgrade", "cve", or "remove") that should be included */ 'filters.alertFixType'?: string @@ -11423,10 +13159,22 @@ export interface operations { '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 Alert priority ("low", "medium", or "high") */ + /** @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 Alert priority ("low", "medium", "high", or "critical") */ 'filters.alertPriority'?: string - /** @description Alert priority ("low", "medium", or "high") */ + /** @description Alert priority ("low", "medium", "high", or "critical") */ 'filters.alertPriority.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 EPSS ("low", "medium", "high", "critical") */ + 'filters.alertEPSS'?: string + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + 'filters.alertEPSS.notIn'?: string /** @description Direct/transitive dependency filter flag */ 'filters.dependencyDirect'?: boolean /** @description Direct/transitive dependency filter flag */ @@ -11468,7 +13216,9 @@ export interface operations { alertSeverity?: string[] /** @description Comma-separated list of repo slugs that should be excluded */ repoSlug?: string[] - /** @description Comma-separated list of repo labels that should be excluded */ + /** @description Comma-separated list of repo full names that should be excluded */ + repoFullName?: string[] + /** @description Comma-separated list of repo labels that should be excluded. Use "" to filter for repositories with no labels. */ repoLabels?: string[] /** @description Comma-separated list of alert types (e.g. "usesEval", "unmaintained", etc.) that should be excluded */ alertType?: string[] @@ -11478,7 +13228,7 @@ export interface operations { artifactType?: string[] /** @description Comma-separated list of alert actions ("error", "warn", "monitor", or "ignore) that should be excluded */ alertAction?: string[] - /** @description Comma-separated list of alert action source types ("fallback", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded */ + /** @description Comma-separated list of alert action source types ("fallback", "injected-alert", "org-policy", "reachability", "repo-label-policy", "socket-yml", or "triage") that should be excluded */ alertActionSourceType?: string[] /** @description Comma-separated list of alert fix types ("upgrade", "cve", or "remove") that should be excluded */ alertFixType?: string[] @@ -11494,8 +13244,14 @@ export interface operations { alertCweName?: 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?: string[] - /** @description Alert priority ("low", "medium", or "high") */ + /** @description Comma-separated list of alert CVE reachability analysis types ("full-scan" or "precomputed") that should be excluded */ + alertReachabilityAnalysisType?: string[] + /** @description Alert priority ("low", "medium", "high", or "critical") */ alertPriority?: string[] + /** @description Alert KEV (Known Exploited Vulnerability) filter flag */ + alertKEV?: boolean[] + /** @description Alert EPSS ("low", "medium", "high", "critical") */ + alertEPSS?: string[] /** @description Direct/transitive dependency filter flag */ dependencyDirect?: boolean[] /** @description Development/production dependency filter flag */ @@ -11542,6 +13298,8 @@ export interface operations { 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 */ @@ -11579,6 +13337,8 @@ export interface operations { 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 */ @@ -11861,12 +13621,19 @@ export interface operations { | 'ChangePlanSubscriptionSeats' | 'CreateApiToken' | 'CreateLabel' + | 'CreateWebhook' + | 'DeleteFullScan' | 'DeleteLabel' | 'DeleteLabelSetting' | 'DeleteReport' | 'DeleteRepository' + | 'DeleteWebhook' | 'DisassociateLabel' + | 'DowngradeOrganizationPlan' | 'JoinOrganization' + | 'MemberAdded' + | 'MemberRemoved' + | 'MemberRoleChanged' | 'RemoveLicenseOverlay' | 'RemoveMember' | 'ResetInvitationLink' @@ -11886,7 +13653,9 @@ export interface operations { | 'UpdateAutopatchCurated' | 'UpdateLabel' | 'UpdateLabelSetting' + | 'UpdateLicenseOverlay' | 'UpdateOrganizationSetting' + | 'UpdateWebhook' | 'UpgradeOrganizationPlan' /** @description Number of events per page */ per_page?: number @@ -11979,21 +13748,33 @@ export interface operations { content: { 'application/json': { tokens: Array<{ + /** @description List of committers associated with this API Token */ committers: Array<{ - /** @default */ + /** + * @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' - /** @default */ + /** + * @description Login name on the provider platform + * @default + */ providerLoginName?: string - /** @default */ + /** + * @description User ID on the provider platform + * @default + */ providerUserId?: string }> /** * Format: date + * @description Timestamp when the API Token was created * @default */ created_at: string @@ -12004,16 +13785,21 @@ export interface operations { id: string /** * Format: date + * @description Timestamp when the API Token was last used * @default */ last_used_at: string - /** @default 1000 */ - max_quota: number + /** + * @description Maximum number of API calls allowed per month + * @default 1000 + */ + max_quota: number /** * @description Name for the API Token * @default api token */ name: string | null + /** @description List of scopes granted to the API Token */ scopes: Array< | 'alerts' | 'alerts:list' @@ -12029,6 +13815,8 @@ export interface operations { | 'dependencies' | 'dependencies:list' | 'dependencies:trend' + | 'fixes' + | 'fixes:list' | 'full-scans' | 'full-scans:list' | 'full-scans:create' @@ -12075,11 +13863,18 @@ export interface operations { | 'security-policy:read' | 'socket-basics' | 'socket-basics:read' + | 'telemetry-policy' + | 'telemetry-policy:update' | 'threat-feed' | 'threat-feed:list' | 'triage' | 'triage:alerts-list' | 'triage:alerts-update' + | 'webhooks' + | 'webhooks:create' + | 'webhooks:list' + | 'webhooks:update' + | 'webhooks:delete' > /** * @description The obfuscated token of the API Token @@ -12123,8 +13918,12 @@ export interface operations { requestBody?: { content: { 'application/json': { - /** @default 1000 */ + /** + * @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' @@ -12140,6 +13939,8 @@ export interface operations { | 'dependencies' | 'dependencies:list' | 'dependencies:trend' + | 'fixes' + | 'fixes:list' | 'full-scans' | 'full-scans:list' | 'full-scans:create' @@ -12186,11 +13987,18 @@ export interface operations { | 'security-policy:read' | 'socket-basics' | 'socket-basics:read' + | 'telemetry-policy' + | 'telemetry-policy:update' | 'threat-feed' | 'threat-feed:list' | 'triage' | 'triage:alerts-list' | 'triage:alerts-update' + | 'webhooks' + | 'webhooks:create' + | 'webhooks:list' + | 'webhooks:update' + | 'webhooks:delete' > /** * @description The visibility of the API Token. Warning: this field is deprecated and will be removed in the future. @@ -12198,17 +14006,28 @@ export interface operations { * @enum {string} */ visibility: 'admin' | 'organization' + /** @description Committer information to associate with the API Token */ committer: { - /** @default */ + /** + * @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' - /** @default */ + /** + * @description Login name on the provider platform + * @default + */ providerLoginName?: string - /** @default */ + /** + * @description User ID on the provider platform + * @default + */ providerUserId?: string } /** @@ -12216,6 +14035,24 @@ export interface operations { * @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 + */ + organizationSlug: string + /** + * @description Slug of the repository to grant access to + * @default + */ + repositorySlug: string + /** + * @description Workspace slug containing the specified repo + * @default + */ + workspace?: string + }> } } } @@ -12254,8 +14091,12 @@ export interface operations { requestBody?: { content: { 'application/json': { - /** @default 1000 */ + /** + * @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' @@ -12271,6 +14112,8 @@ export interface operations { | 'dependencies' | 'dependencies:list' | 'dependencies:trend' + | 'fixes' + | 'fixes:list' | 'full-scans' | 'full-scans:list' | 'full-scans:create' @@ -12317,13 +14160,23 @@ export interface operations { | 'security-policy:read' | 'socket-basics' | 'socket-basics:read' + | 'telemetry-policy' + | 'telemetry-policy:update' | 'threat-feed' | 'threat-feed:list' | 'triage' | 'triage:alerts-list' | 'triage:alerts-update' + | 'webhooks' + | 'webhooks:create' + | 'webhooks:list' + | 'webhooks:update' + | 'webhooks:delete' > - /** @default */ + /** + * @description The API token to update + * @default + */ token: string /** * @description The visibility of the API Token. Warning: this field is deprecated and will be removed in the future. @@ -12331,17 +14184,28 @@ export interface operations { * @enum {string} */ visibility: 'admin' | 'organization' + /** @description Committer information to associate with the API Token */ committer: { - /** @default */ + /** + * @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' - /** @default */ + /** + * @description Login name on the provider platform + * @default + */ providerLoginName?: string - /** @default */ + /** + * @description User ID on the provider platform + * @default + */ providerUserId?: string } /** @@ -12438,7 +14302,7 @@ export interface operations { content: { 'application/json': { /** - * Format: The status of the token + * @description The status of the token * @default revoked */ status: string @@ -12529,6 +14393,7 @@ export interface operations { | 'typo' | 'secret' | 'obf' + | 'dual' /** @description Filter threats by package name */ name?: string /** @description Filter threats by package version */ @@ -12545,6 +14410,7 @@ export interface operations { | 'maven' | 'npm' | 'nuget' + | 'vscode' | 'pypi' | 'gem' } @@ -12578,6 +14444,11 @@ export interface operations { * @default false */ needsHumanReview?: boolean + /** + * @description Unique threat instance identifier across artifacts + * @default 0 + */ + threatInstanceId?: number }> /** @default */ nextPage: string | null @@ -12631,6 +14502,7 @@ export interface operations { | 'typo' | 'secret' | 'obf' + | 'dual' /** @description Filter threats by package name */ name?: string /** @description Filter threats by package version. */ @@ -12647,6 +14519,7 @@ export interface operations { | 'maven' | 'npm' | 'nuget' + | 'vscode' | 'pypi' | 'gem' } @@ -12684,6 +14557,11 @@ export interface operations { * @default false */ needsHumanReview?: boolean + /** + * @description Unique threat instance identifier across artifacts + * @default 0 + */ + threatInstanceId?: number }> /** @default */ nextPageCursor: string | null @@ -12697,6 +14575,954 @@ export interface operations { 429: components['responses']['SocketTooManyRequestsResponse'] } } + /** + * Fetch fixes for vulnerabilities in a repository or scan + * @description Fetches available fixes for vulnerabilities in a repository or scan. + * Requires either repo_slug or full_scan_id 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. + * + * 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. 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 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 + } + path: { + /** @description The slug of the organization */ + org_slug: string + } + } + responses: { + /** @description Fix details for requested vulnerabilities */ + 200: { + content: { + 'application/json': { + /** @description Map of vulnerability IDs (GHSA or CVE) to their fix details. Each entry contains information about available fixes, partial fixes, or reasons why fixes are not available. */ + fixDetails: { + [key: string]: + | { + /** @enum {string} */ + type: 'fixFound' + value: { + /** + * @default fixFound + * @enum {string} + */ + type: 'fixFound' + /** @default */ + ghsa: string + /** @default */ + cve: string | null + fixDetails: { + fixes: Array<{ + /** @default The PURL (unique package identifier) of the package to upgrade */ + purl: string + /** @default The version of the package to upgrade to */ + fixedVersion: string + manifestFiles: string[] + /** + * @description The type of version update (patch, minor, major, or unknown if it cannot be determined) + * @default unknown + * @enum {string} + */ + updateType: 'patch' | 'minor' | 'major' | 'unknown' + }> + /** @description The keys are the PURL (unique package identifier) of the direct dependency(ies) responsible for introducing the vulnerability. */ + responsibleDirectDependencies?: { + [key: string]: { + /** + * Format: The current version of the package + * @default + */ + currentVersion: string + nextAvailableVersion?: { + /** + * Format: The next available version of the package + * @default + */ + version: string + /** + * @description The type of version update (patch, minor, major, or unknown if it cannot be determined) + * @default unknown + * @enum {string} + */ + updateType: + | 'patch' + | 'minor' + | 'major' + | 'unknown' + } | null + /** @description The version and update type of the package that is necessary to fix the vulnerability. If the value is null, it means the package does not have to be upgraded to fix the vulnerability */ + fixByUpgradingTo?: { + /** @default */ + version: string + /** + * @description The type of version update (patch, minor, major, or unknown if it cannot be determined) + * @default unknown + * @enum {string} + */ + updateType: + | 'patch' + | 'minor' + | 'major' + | 'unknown' + } | null + } + } | null + } + advisoryDetails: { + /** @default */ + title?: string | null + /** @default */ + description?: string | null + cwes?: string[] + /** + * @description Severity level of the vulnerability + * @default LOW + * @enum {string} + */ + severity?: 'LOW' | 'MODERATE' | 'HIGH' | 'CRITICAL' + /** @default */ + cvssVector?: string | null + /** @default */ + publishedAt?: string + /** + * @description Whether the vulnerability is a Known Exploited Vulnerability + * @default false + */ + kev?: boolean + /** + * @description Exploit Prediction Scoring System score + * @default 0 + */ + epss?: number | null + affectedPurls?: Array<{ + /** + * Format: The PURL (unique package identifier) of the affected package + * @default + */ + purl: string + /** @default The range of vulnerable versions */ + affectedRange: string + }> + } | null + } + } + | { + /** @enum {string} */ + type: 'partialFixFound' + value: { + /** + * @default partialFixFound + * @enum {string} + */ + type: 'partialFixFound' + /** @default */ + ghsa: string + /** @default */ + cve: string | null + fixDetails: { + fixes: Array<{ + /** @default The PURL (unique package identifier) of the package to upgrade */ + purl: string + /** @default The version of the package to upgrade to */ + fixedVersion: string + manifestFiles: string[] + /** + * @description The type of version update (patch, minor, major, or unknown if it cannot be determined) + * @default unknown + * @enum {string} + */ + updateType: 'patch' | 'minor' | 'major' | 'unknown' + }> + unfixablePurls: Array<{ + /** @default The PURL (unique package identifier) of the package that cannot be upgraded */ + purl: string + manifestFiles: string[] + }> + /** @description The keys are the PURL (unique package identifier) of the direct dependency(ies) responsible for introducing the vulnerability. */ + responsibleDirectDependencies?: { + [key: string]: { + /** + * Format: The current version of the package + * @default + */ + currentVersion: string + nextAvailableVersion?: { + /** + * Format: The next available version of the package + * @default + */ + version: string + /** + * @description The type of version update (patch, minor, major, or unknown if it cannot be determined) + * @default unknown + * @enum {string} + */ + updateType: + | 'patch' + | 'minor' + | 'major' + | 'unknown' + } | null + /** @description The version and update type of the package that is necessary to fix the vulnerability. If the value is null, it means the package does not have to be upgraded to fix the vulnerability */ + fixByUpgradingTo?: { + /** @default */ + version: string + /** + * @description The type of version update (patch, minor, major, or unknown if it cannot be determined) + * @default unknown + * @enum {string} + */ + updateType: + | 'patch' + | 'minor' + | 'major' + | 'unknown' + } | null + } + } | null + } + advisoryDetails: { + /** @default */ + title?: string | null + /** @default */ + description?: string | null + cwes?: string[] + /** + * @description Severity level of the vulnerability + * @default LOW + * @enum {string} + */ + severity?: 'LOW' | 'MODERATE' | 'HIGH' | 'CRITICAL' + /** @default */ + cvssVector?: string | null + /** @default */ + publishedAt?: string + /** + * @description Whether the vulnerability is a Known Exploited Vulnerability + * @default false + */ + kev?: boolean + /** + * @description Exploit Prediction Scoring System score + * @default 0 + */ + epss?: number | null + affectedPurls?: Array<{ + /** + * Format: The PURL (unique package identifier) of the affected package + * @default + */ + purl: string + /** @default The range of vulnerable versions */ + affectedRange: string + }> + } | null + } + } + | { + /** @enum {string} */ + type: 'errorComputingFix' + value: { + /** + * @default errorComputingFix + * @enum {string} + */ + type: 'errorComputingFix' + /** @default */ + ghsa: string | null + /** @default */ + cve: string | null + /** @default */ + message: string + advisoryDetails: { + /** @default */ + title?: string | null + /** @default */ + description?: string | null + cwes?: string[] + /** + * @description Severity level of the vulnerability + * @default LOW + * @enum {string} + */ + severity?: 'LOW' | 'MODERATE' | 'HIGH' | 'CRITICAL' + /** @default */ + cvssVector?: string | null + /** @default */ + publishedAt?: string + /** + * @description Whether the vulnerability is a Known Exploited Vulnerability + * @default false + */ + kev?: boolean + /** + * @description Exploit Prediction Scoring System score + * @default 0 + */ + epss?: number | null + affectedPurls?: Array<{ + /** + * Format: The PURL (unique package identifier) of the affected package + * @default + */ + purl: string + /** @default The range of vulnerable versions */ + affectedRange: string + }> + } | null + } + } + | { + /** @enum {string} */ + type: 'noFixAvailable' + value: { + /** + * @default noFixAvailable + * @enum {string} + */ + type: 'noFixAvailable' + /** @default */ + ghsa: string + /** @default */ + cve: string | null + advisoryDetails: { + /** @default */ + title?: string | null + /** @default */ + description?: string | null + cwes?: string[] + /** + * @description Severity level of the vulnerability + * @default LOW + * @enum {string} + */ + severity?: 'LOW' | 'MODERATE' | 'HIGH' | 'CRITICAL' + /** @default */ + cvssVector?: string | null + /** @default */ + publishedAt?: string + /** + * @description Whether the vulnerability is a Known Exploited Vulnerability + * @default false + */ + kev?: boolean + /** + * @description Exploit Prediction Scoring System score + * @default 0 + */ + epss?: number | null + affectedPurls?: Array<{ + /** + * Format: The PURL (unique package identifier) of the affected package + * @default + */ + purl: string + /** @default The range of vulnerable versions */ + affectedRange: string + }> + } | null + } + } + | { + /** @enum {string} */ + type: 'fixNotApplicable' + value: { + /** + * @default fixNotApplicable + * @enum {string} + */ + type: 'fixNotApplicable' + /** @default */ + ghsa: string + /** @default */ + cve: string | null + advisoryDetails: { + /** @default */ + title?: string | null + /** @default */ + description?: string | null + cwes?: string[] + /** + * @description Severity level of the vulnerability + * @default LOW + * @enum {string} + */ + severity?: 'LOW' | 'MODERATE' | 'HIGH' | 'CRITICAL' + /** @default */ + cvssVector?: string | null + /** @default */ + publishedAt?: string + /** + * @description Whether the vulnerability is a Known Exploited Vulnerability + * @default false + */ + kev?: boolean + /** + * @description Exploit Prediction Scoring System score + * @default 0 + */ + epss?: number | null + affectedPurls?: Array<{ + /** + * Format: The PURL (unique package identifier) of the affected package + * @default + */ + purl: string + /** @default The range of vulnerable versions */ + affectedRange: string + }> + } | null + } + } + } + } + } + } + 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<{ + /** + * @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 + }> + /** @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'] + } + } /** * 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, @@ -13155,6 +15981,25 @@ export interface operations { 429: components['responses']['SocketTooManyRequestsResponse'] } } + /** + * Returns the OpenAPI definition + * @description 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: { + /** @description OpenAPI specification */ + 200: { + content: { + 'application/json': unknown + } + } + 429: components['responses']['SocketTooManyRequestsResponse'] + } + } /** * Get quota * @description Get your current API quota. You can use this endpoint to prevent doing requests that might spend all your quota. @@ -13416,6 +16261,12 @@ export interface operations { * - report:write */ createReport: { + parameters: { + query?: { + /** @description The workspace of the repository to associate the full-scan with. */ + workspace?: string + } + } requestBody?: { content: { 'multipart/form-data': { @@ -13517,6 +16368,8 @@ export interface operations { github_full_name: string /** @default */ organization_id: string | null + /** @default */ + workspace: string latest_project_report?: { /** @default */ id: string