@socketsecurity/sdk 3.4.0 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/README.md +1 -1
- package/dist/constants.d.ts +3 -1
- package/dist/http-client.d.ts +1 -36
- package/dist/index.d.ts +1 -1
- package/dist/index.js +262 -152
- package/dist/socket-sdk-class.d.ts +35 -31
- package/dist/types.d.ts +28 -8
- package/package.json +9 -6
- package/types/api.d.ts +162 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ArtifactPatches, BatchPackageFetchResultType, BatchPackageStreamOptions, CreateDependenciesSnapshotOptions, Entitlement, GetOptions, PatchViewResponse, PostOrgTelemetryPayload, PostOrgTelemetryResponse, QueryParams, SendOptions, SocketSdkGenericResult, SocketSdkOptions, SocketSdkResult, StreamOrgFullScanOptions, UploadManifestFilesError, UploadManifestFilesOptions, UploadManifestFilesReturnType } from './types';
|
|
1
|
+
import type { ArtifactPatches, BatchPackageFetchResultType, BatchPackageStreamOptions, CreateDependenciesSnapshotOptions, Entitlement, GetOptions, MalwareCheckResult, PatchViewResponse, PostOrgTelemetryPayload, PostOrgTelemetryResponse, QueryParams, SendOptions, SocketSdkGenericResult, SocketSdkOptions, SocketSdkResult, StreamOrgFullScanOptions, UploadManifestFilesError, UploadManifestFilesOptions, UploadManifestFilesReturnType } from './types';
|
|
2
2
|
import type { CreateFullScanOptions, DeleteRepositoryLabelResult, DeleteResult, FullScanListResult, FullScanResult, GetRepositoryOptions, ListFullScansOptions, ListRepositoriesOptions, OrganizationsResult, RepositoriesListResult, RepositoryLabelResult, RepositoryLabelsListResult, RepositoryResult, StrictErrorResult } from './types-strict';
|
|
3
3
|
import type { IncomingMessage } from 'node:http';
|
|
4
4
|
/**
|
|
@@ -73,6 +73,23 @@ export declare class SocketSdk {
|
|
|
73
73
|
purl: string;
|
|
74
74
|
}>;
|
|
75
75
|
}, options?: BatchPackageStreamOptions | undefined): AsyncGenerator<BatchPackageFetchResultType>;
|
|
76
|
+
/**
|
|
77
|
+
* Check packages for malware and security alerts.
|
|
78
|
+
*
|
|
79
|
+
* For small sets (≤ MAX_FIREWALL_COMPONENTS), uses parallel firewall API
|
|
80
|
+
* requests which return full artifact data including score and alert details.
|
|
81
|
+
*
|
|
82
|
+
* For larger sets, uses the batch PURL API for efficiency.
|
|
83
|
+
*
|
|
84
|
+
* Both paths normalize alerts through publicPolicy and only return
|
|
85
|
+
* malware-relevant results.
|
|
86
|
+
*
|
|
87
|
+
* @param components - Array of package URLs to check
|
|
88
|
+
* @returns Normalized results with policy-filtered alerts per package
|
|
89
|
+
*/
|
|
90
|
+
checkMalware(components: Array<{
|
|
91
|
+
purl: string;
|
|
92
|
+
}>): Promise<SocketSdkGenericResult<MalwareCheckResult>>;
|
|
76
93
|
/**
|
|
77
94
|
* Create a snapshot of project dependencies by uploading manifest files.
|
|
78
95
|
* Analyzes dependency files to generate a comprehensive security report.
|
|
@@ -368,29 +385,16 @@ export declare class SocketSdk {
|
|
|
368
385
|
*/
|
|
369
386
|
deleteRepositoryLabel(orgSlug: string, labelId: string): Promise<DeleteRepositoryLabelResult | StrictErrorResult>;
|
|
370
387
|
/**
|
|
371
|
-
*
|
|
372
|
-
|
|
373
|
-
/**
|
|
374
|
-
* Download patch file content by hash.
|
|
388
|
+
* Download full scan files as a tar archive.
|
|
375
389
|
*
|
|
376
|
-
*
|
|
377
|
-
*
|
|
378
|
-
* No authentication is required as patch blobs are publicly accessible.
|
|
379
|
-
*
|
|
380
|
-
* @param hash - The blob hash in SSRI (sha256-base64) or hex format
|
|
381
|
-
* @param options - Optional configuration
|
|
382
|
-
* @param options.baseUrl - Override blob store URL (for testing)
|
|
383
|
-
* @returns Promise<string> - The patch file content as UTF-8 string
|
|
384
|
-
* @throws Error if blob not found (404) or download fails
|
|
390
|
+
* Streams the full scan file contents to the specified output path as a tar file.
|
|
391
|
+
* Includes size limit enforcement to prevent excessive disk usage.
|
|
385
392
|
*
|
|
386
|
-
* @
|
|
387
|
-
*
|
|
388
|
-
*
|
|
389
|
-
*
|
|
390
|
-
*
|
|
391
|
-
* // Then download the actual patched file
|
|
392
|
-
* const fileContent = await sdk.downloadPatch(patch.files['index.js'].socketBlob)
|
|
393
|
-
* ```
|
|
393
|
+
* @param orgSlug - Organization identifier
|
|
394
|
+
* @param fullScanId - Full scan identifier
|
|
395
|
+
* @param outputPath - Local file path to write the tar archive
|
|
396
|
+
* @returns Download result with success/error status
|
|
397
|
+
* @throws {Error} When server returns 5xx status codes
|
|
394
398
|
*/
|
|
395
399
|
downloadOrgFullScanFilesAsTar(orgSlug: string, fullScanId: string, outputPath: string): Promise<SocketSdkResult<'downloadOrgFullScanFilesAsTar'>>;
|
|
396
400
|
/**
|
|
@@ -526,7 +530,7 @@ export declare class SocketSdk {
|
|
|
526
530
|
/**
|
|
527
531
|
* Retrieve the enabled entitlements for an organization.
|
|
528
532
|
*
|
|
529
|
-
* This method fetches the organization's entitlements and filters for only
|
|
533
|
+
* This method fetches the organization's entitlements and filters for only the enabled ones, returning their keys. Entitlements represent Socket
|
|
530
534
|
* Products that the organization has access to use.
|
|
531
535
|
*/
|
|
532
536
|
getEnabledEntitlements(orgSlug: string): Promise<string[]>;
|
|
@@ -713,13 +717,15 @@ export declare class SocketSdk {
|
|
|
713
717
|
vulnerability_ids: string;
|
|
714
718
|
}): Promise<SocketSdkResult<'fetch-fixes'>>;
|
|
715
719
|
/**
|
|
716
|
-
* Get organization's license policy configuration
|
|
720
|
+
* Get organization's license policy configuration.
|
|
721
|
+
* Returns allowed, restricted, and monitored license types.
|
|
717
722
|
*
|
|
718
723
|
* @throws {Error} When server returns 5xx status codes
|
|
719
724
|
*/
|
|
720
725
|
getOrgLicensePolicy(orgSlug: string): Promise<SocketSdkResult<'getOrgLicensePolicy'>>;
|
|
721
726
|
/**
|
|
722
|
-
* Get organization's security policy configuration
|
|
727
|
+
* Get organization's security policy configuration.
|
|
728
|
+
* Returns alert rules, severity thresholds, and enforcement settings.
|
|
723
729
|
*
|
|
724
730
|
* @throws {Error} When server returns 5xx status codes
|
|
725
731
|
*/
|
|
@@ -782,10 +788,6 @@ export declare class SocketSdk {
|
|
|
782
788
|
* @throws {Error} When server returns 5xx status codes
|
|
783
789
|
*/
|
|
784
790
|
getRepoAnalytics(repo: string, time: string): Promise<SocketSdkResult<'getRepoAnalytics'>>;
|
|
785
|
-
/**
|
|
786
|
-
* Get detailed results for a legacy scan report.
|
|
787
|
-
/**
|
|
788
|
-
|
|
789
791
|
/**
|
|
790
792
|
* Get details for a specific repository.
|
|
791
793
|
*
|
|
@@ -1156,13 +1158,15 @@ export declare class SocketSdk {
|
|
|
1156
1158
|
*/
|
|
1157
1159
|
updateOrgAlertTriage(orgSlug: string, alertId: string, triageData: QueryParams): Promise<SocketSdkResult<'updateOrgAlertTriage'>>;
|
|
1158
1160
|
/**
|
|
1159
|
-
* Update organization's license policy configuration
|
|
1161
|
+
* Update organization's license policy configuration.
|
|
1162
|
+
* Modifies allowed, restricted, and monitored license types.
|
|
1160
1163
|
*
|
|
1161
1164
|
* @throws {Error} When server returns 5xx status codes
|
|
1162
1165
|
*/
|
|
1163
1166
|
updateOrgLicensePolicy(orgSlug: string, policyData: QueryParams, queryParams?: QueryParams | undefined): Promise<SocketSdkResult<'updateOrgLicensePolicy'>>;
|
|
1164
1167
|
/**
|
|
1165
|
-
* Update organization's security policy configuration
|
|
1168
|
+
* Update organization's security policy configuration.
|
|
1169
|
+
* Modifies alert rules, severity thresholds, and enforcement settings.
|
|
1166
1170
|
*
|
|
1167
1171
|
* @throws {Error} When server returns 5xx status codes
|
|
1168
1172
|
*/
|
package/dist/types.d.ts
CHANGED
|
@@ -171,6 +171,34 @@ export type SocketSdkGenericResult<T> = {
|
|
|
171
171
|
success: false;
|
|
172
172
|
url?: string | undefined;
|
|
173
173
|
};
|
|
174
|
+
export type MalwareCheckAlert = {
|
|
175
|
+
category?: string | undefined;
|
|
176
|
+
fix?: {
|
|
177
|
+
description: string;
|
|
178
|
+
type: string;
|
|
179
|
+
} | undefined;
|
|
180
|
+
key: string;
|
|
181
|
+
props?: Record<string, unknown> | undefined;
|
|
182
|
+
severity?: string | undefined;
|
|
183
|
+
type: ALERT_TYPE;
|
|
184
|
+
};
|
|
185
|
+
export type MalwareCheckPackage = {
|
|
186
|
+
alerts: MalwareCheckAlert[];
|
|
187
|
+
name?: string | undefined;
|
|
188
|
+
namespace?: string | undefined;
|
|
189
|
+
score?: MalwareCheckScore | undefined;
|
|
190
|
+
type: string;
|
|
191
|
+
version?: string | undefined;
|
|
192
|
+
};
|
|
193
|
+
export type MalwareCheckResult = MalwareCheckPackage[];
|
|
194
|
+
export type MalwareCheckScore = {
|
|
195
|
+
license: number;
|
|
196
|
+
maintenance: number;
|
|
197
|
+
overall: number;
|
|
198
|
+
quality: number;
|
|
199
|
+
supplyChain: number;
|
|
200
|
+
vulnerability: number;
|
|
201
|
+
};
|
|
174
202
|
/**
|
|
175
203
|
* Result from file validation callback.
|
|
176
204
|
* Allows consumers to customize error handling and logging.
|
|
@@ -312,14 +340,6 @@ export type CreateDependenciesSnapshotOptions = {
|
|
|
312
340
|
pathsRelativeTo?: string | undefined;
|
|
313
341
|
queryParams?: QueryParams | undefined;
|
|
314
342
|
};
|
|
315
|
-
export type CreateOrgFullScanOptions = {
|
|
316
|
-
pathsRelativeTo?: string | undefined;
|
|
317
|
-
queryParams?: QueryParams | undefined;
|
|
318
|
-
};
|
|
319
|
-
export type CreateScanFromFilepathsOptions = {
|
|
320
|
-
issueRules?: Record<string, boolean> | undefined;
|
|
321
|
-
pathsRelativeTo?: string | undefined;
|
|
322
|
-
};
|
|
323
343
|
export type StreamOrgFullScanOptions = {
|
|
324
344
|
output?: boolean | string | undefined;
|
|
325
345
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socketsecurity/sdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"description": "SDK for the Socket API client",
|
|
5
5
|
"homepage": "https://github.com/SocketDev/socket-sdk-js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -59,16 +59,18 @@
|
|
|
59
59
|
"publish": "node scripts/publish.mjs",
|
|
60
60
|
"publish:ci": "node scripts/publish.mjs --tag ${DIST_TAG:-latest}",
|
|
61
61
|
"claude": "node scripts/claude.mjs",
|
|
62
|
+
"security": "agentshield scan && { command -v zizmor >/dev/null && zizmor .github/ || echo 'zizmor not installed — run pnpm run setup to install'; }",
|
|
62
63
|
"test": "node scripts/test.mjs",
|
|
63
64
|
"type": "tsgo --noEmit -p .config/tsconfig.check.json",
|
|
64
65
|
"update": "node scripts/update.mjs"
|
|
65
66
|
},
|
|
66
67
|
"dependencies": {
|
|
67
|
-
"@socketregistry/packageurl-js": "1.
|
|
68
|
-
"@socketsecurity/lib": "5.
|
|
68
|
+
"@socketregistry/packageurl-js": "1.4.1",
|
|
69
|
+
"@socketsecurity/lib": "5.11.4",
|
|
69
70
|
"form-data": "4.0.5"
|
|
70
71
|
},
|
|
71
72
|
"devDependencies": {
|
|
73
|
+
"@anthropic-ai/claude-code": "2.1.89",
|
|
72
74
|
"@babel/generator": "7.28.5",
|
|
73
75
|
"@babel/parser": "7.26.3",
|
|
74
76
|
"@babel/traverse": "7.26.4",
|
|
@@ -83,6 +85,7 @@
|
|
|
83
85
|
"acorn": "8.15.0",
|
|
84
86
|
"del": "8.0.1",
|
|
85
87
|
"dev-null-cli": "2.0.0",
|
|
88
|
+
"ecc-agentshield": "1.4.0",
|
|
86
89
|
"esbuild": "0.25.11",
|
|
87
90
|
"fast-glob": "3.3.3",
|
|
88
91
|
"http2-wrapper": "2.2.1",
|
|
@@ -109,10 +112,10 @@
|
|
|
109
112
|
"strict": true
|
|
110
113
|
},
|
|
111
114
|
"engines": {
|
|
112
|
-
"node": ">=18",
|
|
113
|
-
"pnpm": ">=10.
|
|
115
|
+
"node": ">=18.20.8",
|
|
116
|
+
"pnpm": ">=10.33.0"
|
|
114
117
|
},
|
|
115
|
-
"packageManager": "pnpm@10.
|
|
118
|
+
"packageManager": "pnpm@10.33.0",
|
|
116
119
|
"pnpm": {
|
|
117
120
|
"ignoredBuiltDependencies": [
|
|
118
121
|
"esbuild",
|
package/types/api.d.ts
CHANGED
|
@@ -466,7 +466,7 @@ export interface paths {
|
|
|
466
466
|
'/orgs/{org_slug}/triage/alerts': {
|
|
467
467
|
/**
|
|
468
468
|
* List Org Alert Triage
|
|
469
|
-
* @description
|
|
469
|
+
* @description List triage actions for an organization. Results are paginated and can be sorted by created_at or updated_at.
|
|
470
470
|
*
|
|
471
471
|
* This endpoint consumes 1 unit of your quota.
|
|
472
472
|
*
|
|
@@ -475,8 +475,8 @@ export interface paths {
|
|
|
475
475
|
*/
|
|
476
476
|
get: operations['getOrgTriage']
|
|
477
477
|
/**
|
|
478
|
-
* Update Org Alert Triage
|
|
479
|
-
* @description
|
|
478
|
+
* Create/Update Org Alert Triage
|
|
479
|
+
* @description Create or update triage actions on organization alerts. Accepts a batch of triage entries. Omit `uuid` to create a new entry; provide an existing `uuid` to update it. Use `?force=true` for broad triages that lack a specific `alertKey` or granular package information.
|
|
480
480
|
*
|
|
481
481
|
* This endpoint consumes 1 unit of your quota.
|
|
482
482
|
*
|
|
@@ -896,7 +896,7 @@ export interface paths {
|
|
|
896
896
|
/**
|
|
897
897
|
* Start historical data snapshot job (Beta)
|
|
898
898
|
* @description This API endpoint is used to start a historical snapshot job.
|
|
899
|
-
* While snapshots are typically taken
|
|
899
|
+
* While snapshots are typically taken multiple times a day for paid plans and once a day for free plans, this endpoint can be used to start an "on demand" snapshot job to ensure the latest data is collected and stored for historical purposes.
|
|
900
900
|
*
|
|
901
901
|
* An historical snapshot will contain details and raw data for the following resources:
|
|
902
902
|
*
|
|
@@ -1940,6 +1940,27 @@ export interface components {
|
|
|
1940
1940
|
licenseDetails?: components['schemas']['LicenseDetails']
|
|
1941
1941
|
licenseAttrib?: components['schemas']['SAttrib1_N']
|
|
1942
1942
|
}
|
|
1943
|
+
/** @description Mapping of supply chain risk alert types to their computed score contributions and formulas used for calculation. This allows for detailed breakdowns of how each alert type impacts the overall supply chain security score, with the ability to include custom formulas and components for each alert type. */
|
|
1944
|
+
SocketSBOMScore: {
|
|
1945
|
+
[key: string]: {
|
|
1946
|
+
value: {
|
|
1947
|
+
/**
|
|
1948
|
+
* @description Score from 0.0 to 1.0 for the scanned repository, computed from supply chain risk alerts using weighted exponential decay per direct dependency
|
|
1949
|
+
* @default 0
|
|
1950
|
+
*/
|
|
1951
|
+
result: number
|
|
1952
|
+
/** @description Components used to compute result of the formula */
|
|
1953
|
+
components?: {
|
|
1954
|
+
[key: string]: number
|
|
1955
|
+
}
|
|
1956
|
+
/**
|
|
1957
|
+
* @description Formula used to compute the supply chain security score
|
|
1958
|
+
* @default
|
|
1959
|
+
*/
|
|
1960
|
+
formula?: string
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1943
1964
|
SocketDiffArtifact: components['schemas']['SocketPURL'] & {
|
|
1944
1965
|
diffType: components['schemas']['SocketDiffArtifactType']
|
|
1945
1966
|
id?: components['schemas']['SocketId']
|
|
@@ -4331,6 +4352,23 @@ export interface components {
|
|
|
4331
4352
|
usage?: components['schemas']['SocketUsageRef']
|
|
4332
4353
|
}
|
|
4333
4354
|
}
|
|
4355
|
+
| {
|
|
4356
|
+
/** @enum {string} */
|
|
4357
|
+
type?: 'skillPreExecution'
|
|
4358
|
+
value?: components['schemas']['SocketIssueBasics'] & {
|
|
4359
|
+
/** @default */
|
|
4360
|
+
description: string
|
|
4361
|
+
props: {
|
|
4362
|
+
/** @default */
|
|
4363
|
+
notes: string
|
|
4364
|
+
/** @default 0 */
|
|
4365
|
+
confidence: number
|
|
4366
|
+
/** @default 0 */
|
|
4367
|
+
severity: number
|
|
4368
|
+
}
|
|
4369
|
+
usage?: components['schemas']['SocketUsageRef']
|
|
4370
|
+
}
|
|
4371
|
+
}
|
|
4334
4372
|
| {
|
|
4335
4373
|
/** @enum {string} */
|
|
4336
4374
|
type?: 'skillPromptInjection'
|
|
@@ -5522,6 +5560,8 @@ export interface operations {
|
|
|
5522
5560
|
cachedResultsOnly?: boolean
|
|
5523
5561
|
/** @description Include a summary object at the end of the stream with counts of malformed, resolved, and not found PURLs. */
|
|
5524
5562
|
summary?: boolean
|
|
5563
|
+
/** @description Maximum time in seconds to wait for scan results. PURLs that have not completed processing when the timeout is reached will be returned as errors (when purlErrors is enabled). Omit for no timeout. */
|
|
5564
|
+
timeoutSec?: number
|
|
5525
5565
|
}
|
|
5526
5566
|
}
|
|
5527
5567
|
requestBody?: {
|
|
@@ -5598,6 +5638,8 @@ export interface operations {
|
|
|
5598
5638
|
version?: string
|
|
5599
5639
|
/** @default */
|
|
5600
5640
|
release?: string
|
|
5641
|
+
/** @default */
|
|
5642
|
+
workspace?: string
|
|
5601
5643
|
}>
|
|
5602
5644
|
}
|
|
5603
5645
|
}
|
|
@@ -5924,6 +5966,10 @@ export interface operations {
|
|
|
5924
5966
|
include_alert_priority_details?:
|
|
5925
5967
|
| boolean
|
|
5926
5968
|
| Array<'component' | 'formula'>
|
|
5969
|
+
/** @description Include scores event in the response. include_scores_details implies this flag */
|
|
5970
|
+
include_scores: boolean
|
|
5971
|
+
/** @description Control which score detail fields to include in the scores event. Set to "true" to include all fields, "false" to exclude all fields, or specify individual fields like "components,formula" to include only those fields. */
|
|
5972
|
+
include_scores_details?: boolean | Array<'components' | 'formula'>
|
|
5927
5973
|
/** @description Include license details in the response. This can increase the response size significantly. */
|
|
5928
5974
|
include_license_details: boolean
|
|
5929
5975
|
/** @description Return cached immutable scan results. When enabled and results are cached, returns the pre-computed scan. When results are not yet cached, returns 202 Accepted and enqueues a background job. */
|
|
@@ -5937,10 +5983,16 @@ export interface operations {
|
|
|
5937
5983
|
}
|
|
5938
5984
|
}
|
|
5939
5985
|
responses: {
|
|
5940
|
-
/** @description Socket issue lists and scores for all packages */
|
|
5986
|
+
/** @description Socket issue lists and scores for all packages, followed by a final scores event */
|
|
5941
5987
|
200: {
|
|
5942
5988
|
content: {
|
|
5943
|
-
'application/x-ndjson':
|
|
5989
|
+
'application/x-ndjson':
|
|
5990
|
+
| components['schemas']['SocketArtifact']
|
|
5991
|
+
| {
|
|
5992
|
+
/** @enum {string} */
|
|
5993
|
+
_type: 'scores'
|
|
5994
|
+
value: components['schemas']['SocketSBOMScore']
|
|
5995
|
+
}
|
|
5944
5996
|
}
|
|
5945
5997
|
}
|
|
5946
5998
|
/** @description Scan is being processed. Poll again later to retrieve results. */
|
|
@@ -7477,7 +7529,7 @@ export interface operations {
|
|
|
7477
7529
|
}
|
|
7478
7530
|
/**
|
|
7479
7531
|
* List Org Alert Triage
|
|
7480
|
-
* @description
|
|
7532
|
+
* @description List triage actions for an organization. Results are paginated and can be sorted by created_at or updated_at.
|
|
7481
7533
|
*
|
|
7482
7534
|
* This endpoint consumes 1 unit of your quota.
|
|
7483
7535
|
*
|
|
@@ -7487,9 +7539,13 @@ export interface operations {
|
|
|
7487
7539
|
getOrgTriage: {
|
|
7488
7540
|
parameters: {
|
|
7489
7541
|
query?: {
|
|
7542
|
+
/** @description Field to sort by. One of: created_at, updated_at. */
|
|
7490
7543
|
sort?: string
|
|
7544
|
+
/** @description Sort direction. One of: asc, desc. */
|
|
7491
7545
|
direction?: string
|
|
7546
|
+
/** @description Number of results per page (1–100, default 30). */
|
|
7492
7547
|
per_page?: number
|
|
7548
|
+
/** @description Page number (1-based). */
|
|
7493
7549
|
page?: number
|
|
7494
7550
|
}
|
|
7495
7551
|
path: {
|
|
@@ -7612,8 +7668,8 @@ export interface operations {
|
|
|
7612
7668
|
}
|
|
7613
7669
|
}
|
|
7614
7670
|
/**
|
|
7615
|
-
* Update Org Alert Triage
|
|
7616
|
-
* @description
|
|
7671
|
+
* Create/Update Org Alert Triage
|
|
7672
|
+
* @description Create or update triage actions on organization alerts. Accepts a batch of triage entries. Omit `uuid` to create a new entry; provide an existing `uuid` to update it. Use `?force=true` for broad triages that lack a specific `alertKey` or granular package information.
|
|
7617
7673
|
*
|
|
7618
7674
|
* This endpoint consumes 1 unit of your quota.
|
|
7619
7675
|
*
|
|
@@ -7635,19 +7691,40 @@ export interface operations {
|
|
|
7635
7691
|
content: {
|
|
7636
7692
|
'application/json': {
|
|
7637
7693
|
alertTriage: Array<{
|
|
7638
|
-
/**
|
|
7694
|
+
/**
|
|
7695
|
+
* @description The UUID of the triage entry. Omit to create a new entry; provide to update an existing one.
|
|
7696
|
+
* @default
|
|
7697
|
+
*/
|
|
7639
7698
|
uuid?: string | null
|
|
7640
|
-
/**
|
|
7699
|
+
/**
|
|
7700
|
+
* @description The package ecosystem type (e.g., npm, pypi). Use null or "*" for wildcard.
|
|
7701
|
+
* @default
|
|
7702
|
+
*/
|
|
7641
7703
|
packageType?: string | null
|
|
7642
|
-
/**
|
|
7704
|
+
/**
|
|
7705
|
+
* @description The package namespace or scope. Use null or "*" for wildcard.
|
|
7706
|
+
* @default
|
|
7707
|
+
*/
|
|
7643
7708
|
packageNamespace?: string | null
|
|
7644
|
-
/**
|
|
7709
|
+
/**
|
|
7710
|
+
* @description The package name. Use null or "*" for wildcard.
|
|
7711
|
+
* @default
|
|
7712
|
+
*/
|
|
7645
7713
|
packageName?: string | null
|
|
7646
|
-
/**
|
|
7714
|
+
/**
|
|
7715
|
+
* @description The package version. Supports a "*" suffix for wildcard prefix matching. Use null for any version.
|
|
7716
|
+
* @default
|
|
7717
|
+
*/
|
|
7647
7718
|
packageVersion?: string | null
|
|
7648
|
-
/**
|
|
7719
|
+
/**
|
|
7720
|
+
* @description The specific alert key to target.
|
|
7721
|
+
* @default
|
|
7722
|
+
*/
|
|
7649
7723
|
alertKey?: string | null
|
|
7650
|
-
/**
|
|
7724
|
+
/**
|
|
7725
|
+
* @description The alert type (e.g., criticalCVE, highCVE).
|
|
7726
|
+
* @default
|
|
7727
|
+
*/
|
|
7651
7728
|
alertType?: string | null
|
|
7652
7729
|
/**
|
|
7653
7730
|
* @description Whether a fix is available, unavailable, or * for any
|
|
@@ -7664,16 +7741,25 @@ export interface operations {
|
|
|
7664
7741
|
* @enum {string}
|
|
7665
7742
|
*/
|
|
7666
7743
|
kevs?: 'exist' | 'none' | '*'
|
|
7667
|
-
/**
|
|
7744
|
+
/**
|
|
7745
|
+
* @description CVE or GHSA ID to match against.
|
|
7746
|
+
* @default
|
|
7747
|
+
*/
|
|
7668
7748
|
cveOrGhsaId?: string | null
|
|
7669
7749
|
/**
|
|
7670
7750
|
* @description The reachability of the alert, can be reachable, unreachable, other, or * for any
|
|
7671
7751
|
* @enum {string}
|
|
7672
7752
|
*/
|
|
7673
7753
|
reachability?: 'reachable' | 'unreachable' | 'other' | '*'
|
|
7674
|
-
/**
|
|
7754
|
+
/**
|
|
7755
|
+
* @description CVSS score comparison operator and value (e.g., >=7.5, >5.0, ==8.0).
|
|
7756
|
+
* @default
|
|
7757
|
+
*/
|
|
7675
7758
|
cvssScoreCmp?: string | null
|
|
7676
|
-
/**
|
|
7759
|
+
/**
|
|
7760
|
+
* @description A note or comment for the triage action.
|
|
7761
|
+
* @default
|
|
7762
|
+
*/
|
|
7677
7763
|
note?: string
|
|
7678
7764
|
/**
|
|
7679
7765
|
* @description The triage state of the alert
|
|
@@ -9377,6 +9463,13 @@ export interface operations {
|
|
|
9377
9463
|
*/
|
|
9378
9464
|
action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore'
|
|
9379
9465
|
}
|
|
9466
|
+
skillPreExecution?: {
|
|
9467
|
+
/**
|
|
9468
|
+
* @description The action to take for skillPreExecution issues.
|
|
9469
|
+
* @enum {string}
|
|
9470
|
+
*/
|
|
9471
|
+
action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore'
|
|
9472
|
+
}
|
|
9380
9473
|
skillPromptInjection?: {
|
|
9381
9474
|
/**
|
|
9382
9475
|
* @description The action to take for skillPromptInjection issues.
|
|
@@ -10354,6 +10447,13 @@ export interface operations {
|
|
|
10354
10447
|
*/
|
|
10355
10448
|
action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore'
|
|
10356
10449
|
}
|
|
10450
|
+
skillPreExecution?: {
|
|
10451
|
+
/**
|
|
10452
|
+
* @description The action to take for skillPreExecution issues.
|
|
10453
|
+
* @enum {string}
|
|
10454
|
+
*/
|
|
10455
|
+
action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore'
|
|
10456
|
+
}
|
|
10357
10457
|
skillPromptInjection?: {
|
|
10358
10458
|
/**
|
|
10359
10459
|
* @description The action to take for skillPromptInjection issues.
|
|
@@ -11485,6 +11585,13 @@ export interface operations {
|
|
|
11485
11585
|
*/
|
|
11486
11586
|
action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore'
|
|
11487
11587
|
}
|
|
11588
|
+
skillPreExecution?: {
|
|
11589
|
+
/**
|
|
11590
|
+
* @description The action to take for skillPreExecution issues.
|
|
11591
|
+
* @enum {string}
|
|
11592
|
+
*/
|
|
11593
|
+
action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore'
|
|
11594
|
+
}
|
|
11488
11595
|
skillPromptInjection?: {
|
|
11489
11596
|
/**
|
|
11490
11597
|
* @description The action to take for skillPromptInjection issues.
|
|
@@ -12455,6 +12562,13 @@ export interface operations {
|
|
|
12455
12562
|
*/
|
|
12456
12563
|
action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore'
|
|
12457
12564
|
}
|
|
12565
|
+
skillPreExecution?: {
|
|
12566
|
+
/**
|
|
12567
|
+
* @description The action to take for skillPreExecution issues.
|
|
12568
|
+
* @enum {string}
|
|
12569
|
+
*/
|
|
12570
|
+
action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore'
|
|
12571
|
+
}
|
|
12458
12572
|
skillPromptInjection?: {
|
|
12459
12573
|
/**
|
|
12460
12574
|
* @description The action to take for skillPromptInjection issues.
|
|
@@ -13394,6 +13508,13 @@ export interface operations {
|
|
|
13394
13508
|
*/
|
|
13395
13509
|
action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore'
|
|
13396
13510
|
}
|
|
13511
|
+
skillPreExecution?: {
|
|
13512
|
+
/**
|
|
13513
|
+
* @description The action to take for skillPreExecution issues.
|
|
13514
|
+
* @enum {string}
|
|
13515
|
+
*/
|
|
13516
|
+
action: 'defer' | 'error' | 'warn' | 'monitor' | 'ignore'
|
|
13517
|
+
}
|
|
13397
13518
|
skillPromptInjection?: {
|
|
13398
13519
|
/**
|
|
13399
13520
|
* @description The action to take for skillPromptInjection issues.
|
|
@@ -15209,7 +15330,7 @@ export interface operations {
|
|
|
15209
15330
|
/**
|
|
15210
15331
|
* Start historical data snapshot job (Beta)
|
|
15211
15332
|
* @description This API endpoint is used to start a historical snapshot job.
|
|
15212
|
-
* While snapshots are typically taken
|
|
15333
|
+
* While snapshots are typically taken multiple times a day for paid plans and once a day for free plans, this endpoint can be used to start an "on demand" snapshot job to ensure the latest data is collected and stored for historical purposes.
|
|
15213
15334
|
*
|
|
15214
15335
|
* An historical snapshot will contain details and raw data for the following resources:
|
|
15215
15336
|
*
|
|
@@ -15279,6 +15400,7 @@ export interface operations {
|
|
|
15279
15400
|
| 'CreateOauthRefreshToken'
|
|
15280
15401
|
| 'CreateRepoAccessRule'
|
|
15281
15402
|
| 'CreateWebhook'
|
|
15403
|
+
| 'CreateTicket'
|
|
15282
15404
|
| 'DeleteAlertTriage'
|
|
15283
15405
|
| 'DeleteApiToken'
|
|
15284
15406
|
| 'DeleteFullScan'
|
|
@@ -15289,8 +15411,10 @@ export interface operations {
|
|
|
15289
15411
|
| 'DeleteRepository'
|
|
15290
15412
|
| 'DeleteWebhook'
|
|
15291
15413
|
| 'DisassociateLabel'
|
|
15414
|
+
| 'DisconnectJiraIntegration'
|
|
15292
15415
|
| 'DowngradeOrganizationPlan'
|
|
15293
15416
|
| 'JoinOrganization'
|
|
15417
|
+
| 'JiraIntegrationConnected'
|
|
15294
15418
|
| 'MemberAdded'
|
|
15295
15419
|
| 'MemberRemoved'
|
|
15296
15420
|
| 'MemberRoleChanged'
|
|
@@ -15485,6 +15609,11 @@ export interface operations {
|
|
|
15485
15609
|
| 'alerts'
|
|
15486
15610
|
| 'alerts:list'
|
|
15487
15611
|
| 'alerts:trend'
|
|
15612
|
+
| 'alert-resolution'
|
|
15613
|
+
| 'alert-resolution:list'
|
|
15614
|
+
| 'alert-resolution:create'
|
|
15615
|
+
| 'alert-resolution:read'
|
|
15616
|
+
| 'alert-resolution:delete'
|
|
15488
15617
|
| 'api-tokens'
|
|
15489
15618
|
| 'api-tokens:create'
|
|
15490
15619
|
| 'api-tokens:update'
|
|
@@ -15615,6 +15744,11 @@ export interface operations {
|
|
|
15615
15744
|
| 'alerts'
|
|
15616
15745
|
| 'alerts:list'
|
|
15617
15746
|
| 'alerts:trend'
|
|
15747
|
+
| 'alert-resolution'
|
|
15748
|
+
| 'alert-resolution:list'
|
|
15749
|
+
| 'alert-resolution:create'
|
|
15750
|
+
| 'alert-resolution:read'
|
|
15751
|
+
| 'alert-resolution:delete'
|
|
15618
15752
|
| 'api-tokens'
|
|
15619
15753
|
| 'api-tokens:create'
|
|
15620
15754
|
| 'api-tokens:update'
|
|
@@ -15808,6 +15942,11 @@ export interface operations {
|
|
|
15808
15942
|
| 'alerts'
|
|
15809
15943
|
| 'alerts:list'
|
|
15810
15944
|
| 'alerts:trend'
|
|
15945
|
+
| 'alert-resolution'
|
|
15946
|
+
| 'alert-resolution:list'
|
|
15947
|
+
| 'alert-resolution:create'
|
|
15948
|
+
| 'alert-resolution:read'
|
|
15949
|
+
| 'alert-resolution:delete'
|
|
15811
15950
|
| 'api-tokens'
|
|
15812
15951
|
| 'api-tokens:create'
|
|
15813
15952
|
| 'api-tokens:update'
|
|
@@ -16543,6 +16682,8 @@ export interface operations {
|
|
|
16543
16682
|
cachedResultsOnly?: boolean
|
|
16544
16683
|
/** @description Include a summary object at the end of the stream with counts of malformed, resolved, and not found PURLs. */
|
|
16545
16684
|
summary?: boolean
|
|
16685
|
+
/** @description Maximum time in seconds to wait for scan results. PURLs that have not completed processing when the timeout is reached will be returned as errors (when purlErrors is enabled). Omit for no timeout, unless a default timeout is configured for the organization. */
|
|
16686
|
+
timeoutSec?: number
|
|
16546
16687
|
}
|
|
16547
16688
|
path: {
|
|
16548
16689
|
/** @description The slug of the organization */
|
|
@@ -16633,7 +16774,7 @@ export interface operations {
|
|
|
16633
16774
|
'fetch-fixes': {
|
|
16634
16775
|
parameters: {
|
|
16635
16776
|
query: {
|
|
16636
|
-
/** @description The slug of the repository to fetch fixes for. Computes fixes based on the latest scan on the default branch */
|
|
16777
|
+
/** @description The slug of the repository to fetch fixes for (e.g. "my-repo" or "my-org/my-repo"). Use the full org/repo path to disambiguate when multiple GitHub orgs share the same repo name. Computes fixes based on the latest scan on the default branch */
|
|
16637
16778
|
repo_slug?: string
|
|
16638
16779
|
/** @description The ID of the scan to fetch fixes for */
|
|
16639
16780
|
full_scan_id?: string
|