@censys/platform-sdk 0.10.2 → 0.10.4
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/README.md +21 -2
- package/docs/sdks/adversaryinvestigation/README.md +625 -0
- package/docs/sdks/threathunting/README.md +8 -8
- package/funcs/threatHuntingCreateCenseyeJob.d.ts +1 -1
- package/funcs/threatHuntingCreateCenseyeJob.js +1 -1
- package/funcs/threatHuntingCreateTrackedScan.d.ts +1 -1
- package/funcs/threatHuntingCreateTrackedScan.js +1 -1
- package/funcs/threatHuntingGetCenseyeJob.d.ts +1 -1
- package/funcs/threatHuntingGetCenseyeJob.js +1 -1
- package/funcs/threatHuntingGetCenseyeJobResults.d.ts +1 -1
- package/funcs/threatHuntingGetCenseyeJobResults.js +1 -1
- package/funcs/threatHuntingGetHostObservationsWithCertificate.d.ts +1 -1
- package/funcs/threatHuntingGetHostObservationsWithCertificate.js +1 -1
- package/funcs/threatHuntingListThreats.d.ts +1 -1
- package/funcs/threatHuntingListThreats.js +1 -1
- package/funcs/threatHuntingValueCounts.d.ts +1 -1
- package/funcs/threatHuntingValueCounts.js +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/config.js.map +1 -1
- package/lib/security.d.ts +1 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +19 -8
- package/lib/security.js.map +1 -1
- package/models/components/socks.d.ts +1 -0
- package/models/components/socks.d.ts.map +1 -1
- package/models/components/socks.js +2 -0
- package/models/components/socks.js.map +1 -1
- package/package.json +1 -1
- package/sdk/adversaryinvestigation.d.ts +54 -0
- package/sdk/adversaryinvestigation.d.ts.map +1 -0
- package/sdk/adversaryinvestigation.js +82 -0
- package/sdk/adversaryinvestigation.js.map +1 -0
- package/sdk/sdk.d.ts +3 -0
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +4 -0
- package/sdk/sdk.js.map +1 -1
- package/sdk/threathunting.d.ts +7 -7
- package/sdk/threathunting.js +7 -7
- package/src/funcs/threatHuntingCreateCenseyeJob.ts +1 -1
- package/src/funcs/threatHuntingCreateTrackedScan.ts +1 -1
- package/src/funcs/threatHuntingGetCenseyeJob.ts +1 -1
- package/src/funcs/threatHuntingGetCenseyeJobResults.ts +1 -1
- package/src/funcs/threatHuntingGetHostObservationsWithCertificate.ts +1 -1
- package/src/funcs/threatHuntingListThreats.ts +1 -1
- package/src/funcs/threatHuntingValueCounts.ts +1 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/security.ts +14 -2
- package/src/models/components/socks.ts +3 -0
- package/src/sdk/adversaryinvestigation.ts +138 -0
- package/src/sdk/sdk.ts +8 -0
- package/src/sdk/threathunting.ts +7 -7
package/sdk/sdk.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ClientSDK } from "../lib/sdks.js";
|
|
2
2
|
import { AccountManagement } from "./accountmanagement.js";
|
|
3
|
+
import { AdversaryInvestigation } from "./adversaryinvestigation.js";
|
|
3
4
|
import { Collections } from "./collections.js";
|
|
4
5
|
import { GlobalData } from "./globaldata.js";
|
|
5
6
|
import { ThreatHunting } from "./threathunting.js";
|
|
@@ -12,5 +13,7 @@ export declare class SDK extends ClientSDK {
|
|
|
12
13
|
get globalData(): GlobalData;
|
|
13
14
|
private _threatHunting?;
|
|
14
15
|
get threatHunting(): ThreatHunting;
|
|
16
|
+
private _adversaryInvestigation?;
|
|
17
|
+
get adversaryInvestigation(): AdversaryInvestigation;
|
|
15
18
|
}
|
|
16
19
|
//# sourceMappingURL=sdk.d.ts.map
|
package/sdk/sdk.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,qBAAa,GAAI,SAAQ,SAAS;IAChC,OAAO,CAAC,kBAAkB,CAAC,CAAoB;IAC/C,IAAI,iBAAiB,IAAI,iBAAiB,CAEzC;IAED,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,IAAI,UAAU,IAAI,UAAU,CAE3B;IAED,OAAO,CAAC,cAAc,CAAC,CAAgB;IACvC,IAAI,aAAa,IAAI,aAAa,CAEjC;CACF"}
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,qBAAa,GAAI,SAAQ,SAAS;IAChC,OAAO,CAAC,kBAAkB,CAAC,CAAoB;IAC/C,IAAI,iBAAiB,IAAI,iBAAiB,CAEzC;IAED,OAAO,CAAC,YAAY,CAAC,CAAc;IACnC,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED,OAAO,CAAC,WAAW,CAAC,CAAa;IACjC,IAAI,UAAU,IAAI,UAAU,CAE3B;IAED,OAAO,CAAC,cAAc,CAAC,CAAgB;IACvC,IAAI,aAAa,IAAI,aAAa,CAEjC;IAED,OAAO,CAAC,uBAAuB,CAAC,CAAyB;IACzD,IAAI,sBAAsB,IAAI,sBAAsB,CAInD;CACF"}
|
package/sdk/sdk.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.SDK = void 0;
|
|
7
7
|
const sdks_js_1 = require("../lib/sdks.js");
|
|
8
8
|
const accountmanagement_js_1 = require("./accountmanagement.js");
|
|
9
|
+
const adversaryinvestigation_js_1 = require("./adversaryinvestigation.js");
|
|
9
10
|
const collections_js_1 = require("./collections.js");
|
|
10
11
|
const globaldata_js_1 = require("./globaldata.js");
|
|
11
12
|
const threathunting_js_1 = require("./threathunting.js");
|
|
@@ -22,6 +23,9 @@ class SDK extends sdks_js_1.ClientSDK {
|
|
|
22
23
|
get threatHunting() {
|
|
23
24
|
return (this._threatHunting ?? (this._threatHunting = new threathunting_js_1.ThreatHunting(this._options)));
|
|
24
25
|
}
|
|
26
|
+
get adversaryInvestigation() {
|
|
27
|
+
return (this._adversaryInvestigation ?? (this._adversaryInvestigation = new adversaryinvestigation_js_1.AdversaryInvestigation(this._options)));
|
|
28
|
+
}
|
|
25
29
|
}
|
|
26
30
|
exports.SDK = SDK;
|
|
27
31
|
//# sourceMappingURL=sdk.js.map
|
package/sdk/sdk.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,iEAA2D;AAC3D,qDAA+C;AAC/C,mDAA6C;AAC7C,yDAAmD;AAEnD,MAAa,GAAI,SAAQ,mBAAS;IAEhC,IAAI,iBAAiB;QACnB,OAAO,CAAC,IAAI,CAAC,kBAAkB,KAAvB,IAAI,CAAC,kBAAkB,GAAK,IAAI,wCAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC5E,CAAC;IAGD,IAAI,WAAW;QACb,OAAO,CAAC,IAAI,CAAC,YAAY,KAAjB,IAAI,CAAC,YAAY,GAAK,IAAI,4BAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAChE,CAAC;IAGD,IAAI,UAAU;QACZ,OAAO,CAAC,IAAI,CAAC,WAAW,KAAhB,IAAI,CAAC,WAAW,GAAK,IAAI,0BAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC9D,CAAC;IAGD,IAAI,aAAa;QACf,OAAO,CAAC,IAAI,CAAC,cAAc,KAAnB,IAAI,CAAC,cAAc,GAAK,IAAI,gCAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpE,CAAC;CACF;
|
|
1
|
+
{"version":3,"file":"sdk.js","sourceRoot":"","sources":["../src/sdk/sdk.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4CAA2C;AAC3C,iEAA2D;AAC3D,2EAAqE;AACrE,qDAA+C;AAC/C,mDAA6C;AAC7C,yDAAmD;AAEnD,MAAa,GAAI,SAAQ,mBAAS;IAEhC,IAAI,iBAAiB;QACnB,OAAO,CAAC,IAAI,CAAC,kBAAkB,KAAvB,IAAI,CAAC,kBAAkB,GAAK,IAAI,wCAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC5E,CAAC;IAGD,IAAI,WAAW;QACb,OAAO,CAAC,IAAI,CAAC,YAAY,KAAjB,IAAI,CAAC,YAAY,GAAK,IAAI,4BAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAChE,CAAC;IAGD,IAAI,UAAU;QACZ,OAAO,CAAC,IAAI,CAAC,WAAW,KAAhB,IAAI,CAAC,WAAW,GAAK,IAAI,0BAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IAC9D,CAAC;IAGD,IAAI,aAAa;QACf,OAAO,CAAC,IAAI,CAAC,cAAc,KAAnB,IAAI,CAAC,cAAc,GAAK,IAAI,gCAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAC,CAAC;IACpE,CAAC;IAGD,IAAI,sBAAsB;QACxB,OAAO,CAAC,IAAI,CAAC,uBAAuB,KAA5B,IAAI,CAAC,uBAAuB,GAAK,IAAI,kDAAsB,CACjE,IAAI,CAAC,QAAQ,CACd,EAAC,CAAC;IACL,CAAC;CACF;AA3BD,kBA2BC"}
|
package/sdk/threathunting.d.ts
CHANGED
|
@@ -5,35 +5,35 @@ export declare class ThreatHunting extends ClientSDK {
|
|
|
5
5
|
* CensEye: Create a pivot analysis job
|
|
6
6
|
*
|
|
7
7
|
* @remarks
|
|
8
|
-
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts
|
|
8
|
+
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
9
9
|
*/
|
|
10
10
|
createCenseyeJob(request: operations.V3ThreathuntingCenseyeJobsCreateRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingCenseyeJobsCreateResponse>;
|
|
11
11
|
/**
|
|
12
12
|
* CensEye: Get job status
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the
|
|
15
|
+
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
16
16
|
*/
|
|
17
17
|
getCenseyeJob(request: operations.V3ThreathuntingCenseyeJobsGetRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingCenseyeJobsGetResponse>;
|
|
18
18
|
/**
|
|
19
19
|
* CensEye: Get job results
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
|
-
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the
|
|
22
|
+
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
23
23
|
*/
|
|
24
24
|
getCenseyeJobResults(request: operations.V3ThreathuntingCenseyeJobResultsRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingCenseyeJobResultsResponse>;
|
|
25
25
|
/**
|
|
26
26
|
* Get host history for a certificate
|
|
27
27
|
*
|
|
28
28
|
* @remarks
|
|
29
|
-
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to
|
|
29
|
+
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Adversary Investigation users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 5 credits per page of results.
|
|
30
30
|
*/
|
|
31
31
|
getHostObservationsWithCertificate(request: operations.V3ThreathuntingGetHostObservationsWithCertificateRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingGetHostObservationsWithCertificateResponse>;
|
|
32
32
|
/**
|
|
33
33
|
* Live Discovery: Initiate a new scan
|
|
34
34
|
*
|
|
35
35
|
* @remarks
|
|
36
|
-
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the
|
|
36
|
+
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 15 credits to execute this endpoint.
|
|
37
37
|
*/
|
|
38
38
|
createTrackedScan(request: operations.V3ThreathuntingScansDiscoveryRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingScansDiscoveryResponse>;
|
|
39
39
|
/**
|
|
@@ -47,14 +47,14 @@ export declare class ThreatHunting extends ClientSDK {
|
|
|
47
47
|
* List active threats
|
|
48
48
|
*
|
|
49
49
|
* @remarks
|
|
50
|
-
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the
|
|
50
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module.
|
|
51
51
|
*/
|
|
52
52
|
listThreats(request: operations.V3ThreathuntingThreatsListRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingThreatsListResponse>;
|
|
53
53
|
/**
|
|
54
54
|
* CensEye: Retrieve value counts to discover pivots
|
|
55
55
|
*
|
|
56
56
|
* @remarks
|
|
57
|
-
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the
|
|
57
|
+
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
|
|
58
58
|
*/
|
|
59
59
|
valueCounts(request: operations.V3ThreathuntingValueCountsRequest, options?: RequestOptions): Promise<operations.V3ThreathuntingValueCountsResponse>;
|
|
60
60
|
}
|
package/sdk/threathunting.js
CHANGED
|
@@ -19,7 +19,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
|
|
|
19
19
|
* CensEye: Create a pivot analysis job
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
|
-
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts
|
|
22
|
+
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
23
23
|
*/
|
|
24
24
|
async createCenseyeJob(request, options) {
|
|
25
25
|
return (0, fp_js_1.unwrapAsync)((0, threatHuntingCreateCenseyeJob_js_1.threatHuntingCreateCenseyeJob)(this, request, options));
|
|
@@ -28,7 +28,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
|
|
|
28
28
|
* CensEye: Get job status
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the
|
|
31
|
+
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
32
32
|
*/
|
|
33
33
|
async getCenseyeJob(request, options) {
|
|
34
34
|
return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetCenseyeJob_js_1.threatHuntingGetCenseyeJob)(this, request, options));
|
|
@@ -37,7 +37,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
|
|
|
37
37
|
* CensEye: Get job results
|
|
38
38
|
*
|
|
39
39
|
* @remarks
|
|
40
|
-
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the
|
|
40
|
+
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
41
41
|
*/
|
|
42
42
|
async getCenseyeJobResults(request, options) {
|
|
43
43
|
return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetCenseyeJobResults_js_1.threatHuntingGetCenseyeJobResults)(this, request, options));
|
|
@@ -46,7 +46,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
|
|
|
46
46
|
* Get host history for a certificate
|
|
47
47
|
*
|
|
48
48
|
* @remarks
|
|
49
|
-
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to
|
|
49
|
+
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Adversary Investigation users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 5 credits per page of results.
|
|
50
50
|
*/
|
|
51
51
|
async getHostObservationsWithCertificate(request, options) {
|
|
52
52
|
return (0, fp_js_1.unwrapAsync)((0, threatHuntingGetHostObservationsWithCertificate_js_1.threatHuntingGetHostObservationsWithCertificate)(this, request, options));
|
|
@@ -55,7 +55,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
|
|
|
55
55
|
* Live Discovery: Initiate a new scan
|
|
56
56
|
*
|
|
57
57
|
* @remarks
|
|
58
|
-
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the
|
|
58
|
+
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 15 credits to execute this endpoint.
|
|
59
59
|
*/
|
|
60
60
|
async createTrackedScan(request, options) {
|
|
61
61
|
return (0, fp_js_1.unwrapAsync)((0, threatHuntingCreateTrackedScan_js_1.threatHuntingCreateTrackedScan)(this, request, options));
|
|
@@ -73,7 +73,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
|
|
|
73
73
|
* List active threats
|
|
74
74
|
*
|
|
75
75
|
* @remarks
|
|
76
|
-
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the
|
|
76
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module.
|
|
77
77
|
*/
|
|
78
78
|
async listThreats(request, options) {
|
|
79
79
|
return (0, fp_js_1.unwrapAsync)((0, threatHuntingListThreats_js_1.threatHuntingListThreats)(this, request, options));
|
|
@@ -82,7 +82,7 @@ class ThreatHunting extends sdks_js_1.ClientSDK {
|
|
|
82
82
|
* CensEye: Retrieve value counts to discover pivots
|
|
83
83
|
*
|
|
84
84
|
* @remarks
|
|
85
|
-
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the
|
|
85
|
+
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
|
|
86
86
|
*/
|
|
87
87
|
async valueCounts(request, options) {
|
|
88
88
|
return (0, fp_js_1.unwrapAsync)((0, threatHuntingValueCounts_js_1.threatHuntingValueCounts)(this, request, options));
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* CensEye: Create a pivot analysis job
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts
|
|
32
|
+
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
33
33
|
*/
|
|
34
34
|
export function threatHuntingCreateCenseyeJob(
|
|
35
35
|
client: SDKCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Live Discovery: Initiate a new scan
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the
|
|
32
|
+
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 15 credits to execute this endpoint.
|
|
33
33
|
*/
|
|
34
34
|
export function threatHuntingCreateTrackedScan(
|
|
35
35
|
client: SDKCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* CensEye: Get job status
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the
|
|
32
|
+
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
33
33
|
*/
|
|
34
34
|
export function threatHuntingGetCenseyeJob(
|
|
35
35
|
client: SDKCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* CensEye: Get job results
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the
|
|
32
|
+
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
33
33
|
*/
|
|
34
34
|
export function threatHuntingGetCenseyeJobResults(
|
|
35
35
|
client: SDKCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* Get host history for a certificate
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to
|
|
32
|
+
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Adversary Investigation users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 5 credits per page of results.
|
|
33
33
|
*/
|
|
34
34
|
export function threatHuntingGetHostObservationsWithCertificate(
|
|
35
35
|
client: SDKCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* List active threats
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the
|
|
32
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module.
|
|
33
33
|
*/
|
|
34
34
|
export function threatHuntingListThreats(
|
|
35
35
|
client: SDKCore,
|
|
@@ -29,7 +29,7 @@ import { Result } from "../types/fp.js";
|
|
|
29
29
|
* CensEye: Retrieve value counts to discover pivots
|
|
30
30
|
*
|
|
31
31
|
* @remarks
|
|
32
|
-
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the
|
|
32
|
+
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
|
|
33
33
|
*/
|
|
34
34
|
export function threatHuntingValueCounts(
|
|
35
35
|
client: SDKCore,
|
package/src/lib/config.ts
CHANGED
|
@@ -65,9 +65,9 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
|
|
66
66
|
export const SDK_METADATA = {
|
|
67
67
|
language: "typescript",
|
|
68
|
-
openapiDocVersion: "1.0.
|
|
69
|
-
sdkVersion: "0.10.
|
|
70
|
-
genVersion: "2.
|
|
68
|
+
openapiDocVersion: "1.0.89",
|
|
69
|
+
sdkVersion: "0.10.4",
|
|
70
|
+
genVersion: "2.879.1",
|
|
71
71
|
userAgent:
|
|
72
|
-
"speakeasy-sdk/typescript 0.10.
|
|
72
|
+
"speakeasy-sdk/typescript 0.10.4 2.879.1 1.0.89 @censys/platform-sdk",
|
|
73
73
|
} as const;
|
package/src/lib/security.ts
CHANGED
|
@@ -239,8 +239,9 @@ function applyBearer(
|
|
|
239
239
|
|
|
240
240
|
export function resolveGlobalSecurity(
|
|
241
241
|
security: Partial<components.Security> | null | undefined,
|
|
242
|
+
allowedFields?: number[],
|
|
242
243
|
): SecurityState | null {
|
|
243
|
-
|
|
244
|
+
let inputs: SecurityInput[][] = [
|
|
244
245
|
[
|
|
245
246
|
{
|
|
246
247
|
fieldName: "Authorization",
|
|
@@ -248,7 +249,18 @@ export function resolveGlobalSecurity(
|
|
|
248
249
|
value: security?.personalAccessToken,
|
|
249
250
|
},
|
|
250
251
|
],
|
|
251
|
-
|
|
252
|
+
];
|
|
253
|
+
|
|
254
|
+
if (allowedFields) {
|
|
255
|
+
inputs = allowedFields.map((i) => {
|
|
256
|
+
if (i < 0 || i >= inputs.length) {
|
|
257
|
+
throw new RangeError(`invalid allowedFields index ${i}`);
|
|
258
|
+
}
|
|
259
|
+
return inputs[i]!;
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
return resolveSecurity(...inputs);
|
|
252
264
|
}
|
|
253
265
|
|
|
254
266
|
export async function extractSecurity<
|
|
@@ -13,6 +13,7 @@ export type Socks = {
|
|
|
13
13
|
preferredAuthentication?: string | undefined;
|
|
14
14
|
preferredAuthenticationValue?: number | undefined;
|
|
15
15
|
socksVersion?: number | undefined;
|
|
16
|
+
supportedVersions?: Array<number> | null | undefined;
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
/** @internal */
|
|
@@ -22,12 +23,14 @@ export const Socks$inboundSchema: z.ZodType<Socks, z.ZodTypeDef, unknown> = z
|
|
|
22
23
|
preferred_authentication: z.string().optional(),
|
|
23
24
|
preferred_authentication_value: z.number().int().optional(),
|
|
24
25
|
socks_version: z.number().int().optional(),
|
|
26
|
+
supported_versions: z.nullable(z.array(z.number().int())).optional(),
|
|
25
27
|
}).transform((v) => {
|
|
26
28
|
return remap$(v, {
|
|
27
29
|
"no_authentication_required": "noAuthenticationRequired",
|
|
28
30
|
"preferred_authentication": "preferredAuthentication",
|
|
29
31
|
"preferred_authentication_value": "preferredAuthenticationValue",
|
|
30
32
|
"socks_version": "socksVersion",
|
|
33
|
+
"supported_versions": "supportedVersions",
|
|
31
34
|
});
|
|
32
35
|
});
|
|
33
36
|
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { threatHuntingCreateCenseyeJob } from "../funcs/threatHuntingCreateCenseyeJob.js";
|
|
6
|
+
import { threatHuntingCreateTrackedScan } from "../funcs/threatHuntingCreateTrackedScan.js";
|
|
7
|
+
import { threatHuntingGetCenseyeJob } from "../funcs/threatHuntingGetCenseyeJob.js";
|
|
8
|
+
import { threatHuntingGetCenseyeJobResults } from "../funcs/threatHuntingGetCenseyeJobResults.js";
|
|
9
|
+
import { threatHuntingGetHostObservationsWithCertificate } from "../funcs/threatHuntingGetHostObservationsWithCertificate.js";
|
|
10
|
+
import { threatHuntingListThreats } from "../funcs/threatHuntingListThreats.js";
|
|
11
|
+
import { threatHuntingValueCounts } from "../funcs/threatHuntingValueCounts.js";
|
|
12
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
13
|
+
import * as operations from "../models/operations/index.js";
|
|
14
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
15
|
+
|
|
16
|
+
export class AdversaryInvestigation extends ClientSDK {
|
|
17
|
+
/**
|
|
18
|
+
* CensEye: Create a pivot analysis job
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
22
|
+
*/
|
|
23
|
+
async createCenseyeJob(
|
|
24
|
+
request: operations.V3ThreathuntingCenseyeJobsCreateRequest,
|
|
25
|
+
options?: RequestOptions,
|
|
26
|
+
): Promise<operations.V3ThreathuntingCenseyeJobsCreateResponse> {
|
|
27
|
+
return unwrapAsync(threatHuntingCreateCenseyeJob(
|
|
28
|
+
this,
|
|
29
|
+
request,
|
|
30
|
+
options,
|
|
31
|
+
));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* CensEye: Get job status
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
39
|
+
*/
|
|
40
|
+
async getCenseyeJob(
|
|
41
|
+
request: operations.V3ThreathuntingCenseyeJobsGetRequest,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): Promise<operations.V3ThreathuntingCenseyeJobsGetResponse> {
|
|
44
|
+
return unwrapAsync(threatHuntingGetCenseyeJob(
|
|
45
|
+
this,
|
|
46
|
+
request,
|
|
47
|
+
options,
|
|
48
|
+
));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* CensEye: Get job results
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
56
|
+
*/
|
|
57
|
+
async getCenseyeJobResults(
|
|
58
|
+
request: operations.V3ThreathuntingCenseyeJobResultsRequest,
|
|
59
|
+
options?: RequestOptions,
|
|
60
|
+
): Promise<operations.V3ThreathuntingCenseyeJobResultsResponse> {
|
|
61
|
+
return unwrapAsync(threatHuntingGetCenseyeJobResults(
|
|
62
|
+
this,
|
|
63
|
+
request,
|
|
64
|
+
options,
|
|
65
|
+
));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Get host history for a certificate
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Adversary Investigation users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 5 credits per page of results.
|
|
73
|
+
*/
|
|
74
|
+
async getHostObservationsWithCertificate(
|
|
75
|
+
request:
|
|
76
|
+
operations.V3ThreathuntingGetHostObservationsWithCertificateRequest,
|
|
77
|
+
options?: RequestOptions,
|
|
78
|
+
): Promise<
|
|
79
|
+
operations.V3ThreathuntingGetHostObservationsWithCertificateResponse
|
|
80
|
+
> {
|
|
81
|
+
return unwrapAsync(threatHuntingGetHostObservationsWithCertificate(
|
|
82
|
+
this,
|
|
83
|
+
request,
|
|
84
|
+
options,
|
|
85
|
+
));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Live Discovery: Initiate a new scan
|
|
90
|
+
*
|
|
91
|
+
* @remarks
|
|
92
|
+
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 15 credits to execute this endpoint.
|
|
93
|
+
*/
|
|
94
|
+
async createTrackedScan(
|
|
95
|
+
request: operations.V3ThreathuntingScansDiscoveryRequest,
|
|
96
|
+
options?: RequestOptions,
|
|
97
|
+
): Promise<operations.V3ThreathuntingScansDiscoveryResponse> {
|
|
98
|
+
return unwrapAsync(threatHuntingCreateTrackedScan(
|
|
99
|
+
this,
|
|
100
|
+
request,
|
|
101
|
+
options,
|
|
102
|
+
));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* List active threats
|
|
107
|
+
*
|
|
108
|
+
* @remarks
|
|
109
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module.
|
|
110
|
+
*/
|
|
111
|
+
async listThreats(
|
|
112
|
+
request: operations.V3ThreathuntingThreatsListRequest,
|
|
113
|
+
options?: RequestOptions,
|
|
114
|
+
): Promise<operations.V3ThreathuntingThreatsListResponse> {
|
|
115
|
+
return unwrapAsync(threatHuntingListThreats(
|
|
116
|
+
this,
|
|
117
|
+
request,
|
|
118
|
+
options,
|
|
119
|
+
));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* CensEye: Retrieve value counts to discover pivots
|
|
124
|
+
*
|
|
125
|
+
* @remarks
|
|
126
|
+
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
|
|
127
|
+
*/
|
|
128
|
+
async valueCounts(
|
|
129
|
+
request: operations.V3ThreathuntingValueCountsRequest,
|
|
130
|
+
options?: RequestOptions,
|
|
131
|
+
): Promise<operations.V3ThreathuntingValueCountsResponse> {
|
|
132
|
+
return unwrapAsync(threatHuntingValueCounts(
|
|
133
|
+
this,
|
|
134
|
+
request,
|
|
135
|
+
options,
|
|
136
|
+
));
|
|
137
|
+
}
|
|
138
|
+
}
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { ClientSDK } from "../lib/sdks.js";
|
|
6
6
|
import { AccountManagement } from "./accountmanagement.js";
|
|
7
|
+
import { AdversaryInvestigation } from "./adversaryinvestigation.js";
|
|
7
8
|
import { Collections } from "./collections.js";
|
|
8
9
|
import { GlobalData } from "./globaldata.js";
|
|
9
10
|
import { ThreatHunting } from "./threathunting.js";
|
|
@@ -28,4 +29,11 @@ export class SDK extends ClientSDK {
|
|
|
28
29
|
get threatHunting(): ThreatHunting {
|
|
29
30
|
return (this._threatHunting ??= new ThreatHunting(this._options));
|
|
30
31
|
}
|
|
32
|
+
|
|
33
|
+
private _adversaryInvestigation?: AdversaryInvestigation;
|
|
34
|
+
get adversaryInvestigation(): AdversaryInvestigation {
|
|
35
|
+
return (this._adversaryInvestigation ??= new AdversaryInvestigation(
|
|
36
|
+
this._options,
|
|
37
|
+
));
|
|
38
|
+
}
|
|
31
39
|
}
|
package/src/sdk/threathunting.ts
CHANGED
|
@@ -19,7 +19,7 @@ export class ThreatHunting extends ClientSDK {
|
|
|
19
19
|
* CensEye: Create a pivot analysis job
|
|
20
20
|
*
|
|
21
21
|
* @remarks
|
|
22
|
-
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts
|
|
22
|
+
* Create an asynchronous CensEye pivot analysis job for a host, web property, or certificate. The job extracts default pivot fields from the target asset and counts matching documents for each field-value pair. Poll the job status endpoint to track progress, then retrieve results when complete.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
23
23
|
*/
|
|
24
24
|
async createCenseyeJob(
|
|
25
25
|
request: operations.V3ThreathuntingCenseyeJobsCreateRequest,
|
|
@@ -36,7 +36,7 @@ export class ThreatHunting extends ClientSDK {
|
|
|
36
36
|
* CensEye: Get job status
|
|
37
37
|
*
|
|
38
38
|
* @remarks
|
|
39
|
-
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the
|
|
39
|
+
* Retrieve the current status of a CensEye pivot analysis job. Use this to poll for completion before fetching results.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
40
40
|
*/
|
|
41
41
|
async getCenseyeJob(
|
|
42
42
|
request: operations.V3ThreathuntingCenseyeJobsGetRequest,
|
|
@@ -53,7 +53,7 @@ export class ThreatHunting extends ClientSDK {
|
|
|
53
53
|
* CensEye: Get job results
|
|
54
54
|
*
|
|
55
55
|
* @remarks
|
|
56
|
-
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the
|
|
56
|
+
* Retrieve the results of a completed CensEye pivot analysis job. Each result contains a count and the field-value pairs that were analyzed. Results may be empty if the job is still running.<br><br>Results are paginated. Use the `next_page_token` from the response to fetch subsequent pages.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module.
|
|
57
57
|
*/
|
|
58
58
|
async getCenseyeJobResults(
|
|
59
59
|
request: operations.V3ThreathuntingCenseyeJobResultsRequest,
|
|
@@ -70,7 +70,7 @@ export class ThreatHunting extends ClientSDK {
|
|
|
70
70
|
* Get host history for a certificate
|
|
71
71
|
*
|
|
72
72
|
* @remarks
|
|
73
|
-
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to
|
|
73
|
+
* Retrieve the historical observations of hosts associated with a certificate. This is useful for threat hunting, detection engineering, and timeline generation. Certificate history is also visible to Adversary Investigation users in the Platform UI on the [certificate timeline](https://docs.censys.com/docs/platform-threat-hunting-use-cert-history-to-build-better-detections#/).<br><br>You can define a specific time frame of interest. If you do not specify a time frame, this endpoint will search the historical dataset that is available to your account. You may also filter results by port and transport protocol.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 5 credits per page of results.
|
|
74
74
|
*/
|
|
75
75
|
async getHostObservationsWithCertificate(
|
|
76
76
|
request:
|
|
@@ -90,7 +90,7 @@ export class ThreatHunting extends ClientSDK {
|
|
|
90
90
|
* Live Discovery: Initiate a new scan
|
|
91
91
|
*
|
|
92
92
|
* @remarks
|
|
93
|
-
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the
|
|
93
|
+
* Initiate a scan to look for a currently unobserved service at a specific IP and port (`ip:port`) or hostname and port (`hostname:port`). This is equivalent to the [Live Discovery](https://docs.censys.com/docs/platform-threat-hunting-use-live-scan-and-rescan-to-validate-infrastructure#/) feature available in the UI, but you can also target web properties in addition to hosts.<br><br>The scan may take several minutes to complete. The response will contain a scan ID that you can use to [monitor the scan's status](https://docs.censys.com/reference/v3-threathunting-scans-get#/). After the scan completes, perform a lookup on the target asset to retrieve detailed scan information.<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module. It costs 15 credits to execute this endpoint.
|
|
94
94
|
*/
|
|
95
95
|
async createTrackedScan(
|
|
96
96
|
request: operations.V3ThreathuntingScansDiscoveryRequest,
|
|
@@ -124,7 +124,7 @@ export class ThreatHunting extends ClientSDK {
|
|
|
124
124
|
* List active threats
|
|
125
125
|
*
|
|
126
126
|
* @remarks
|
|
127
|
-
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the
|
|
127
|
+
* Retrieve a list of active threats observed by Censys by aggregating threat IDs across hosts and web properties. Threats are active if their fingerprint has been identified on hosts or web properties by Censys scans. This information is also available on the [Explore Threats page in the Platform web UI](https://platform.censys.io/threats).<br><br>This endpoint is available to organizations that have access to the Adversary Investigation module.
|
|
128
128
|
*/
|
|
129
129
|
async listThreats(
|
|
130
130
|
request: operations.V3ThreathuntingThreatsListRequest,
|
|
@@ -141,7 +141,7 @@ export class ThreatHunting extends ClientSDK {
|
|
|
141
141
|
* CensEye: Retrieve value counts to discover pivots
|
|
142
142
|
*
|
|
143
143
|
* @remarks
|
|
144
|
-
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the
|
|
144
|
+
* Get counts of web assets for specific field-value pairs and combinations of field-value pairs. This is similar to the [CensEye functionality](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#/) available in the Platform web UI, but it allows you to define specific fields of interest rather than the [default fields](https://docs.censys.com/docs/platform-threat-hunting-use-censeye-to-build-detections#default-pivot-fields) leveraged by the tool in the UI.<br><br>Each array can only target fields within the same nested object and may contain at most 5 field-value pairs. For example, you can combine `host.services.port=80` and `host.services.protocol=SSH` in the same array, but you cannot combine `host.services.port=80` and `host.location.country="United States"` in the same array. You can input multiple arrays of objects in each API call.<br><br>To use this endpoint, your organization must have access to the Adversary Investigation module. This endpoint costs 1 credit per count condition (array of objects) included in the API call.
|
|
145
145
|
*/
|
|
146
146
|
async valueCounts(
|
|
147
147
|
request: operations.V3ThreathuntingValueCountsRequest,
|