@veltrosecurity/sdk 0.35.4 → 0.37.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  # @veltrosecurity/sdk
2
2
 
3
3
  TypeScript client for the [Veltro](https://github.com/veltrosecurity/veltro)
4
- security operations suite: **VectorFlow** (telemetry pipelines), **CHAD**
4
+ security operations suite: **VectorFlow** (telemetry pipelines), **Sigmatic**
5
5
  (detection) and **Warden** (SOAR / cases).
6
6
 
7
7
  - No runtime dependencies — the transport is `fetch` (Node ≥ 22, Bun, Deno,
@@ -29,10 +29,12 @@ const cases = await suite.warden.cases.list({ params: { limit: 25, status: "open
29
29
  const pipelines = await suite.vectorflow.pipelines.list();
30
30
  ```
31
31
 
32
- The gateway serves CHAD at `/chad`, Warden at `/warden` and VectorFlow at
32
+ The gateway serves Sigmatic at `/sigmatic`, Warden at `/warden` and VectorFlow at
33
33
  `/vectorflow`, and exchanges the identity session cookie for a short-lived
34
34
  request assertion toward each product — one login reaches all three.
35
35
 
36
+ The published SDK still uses `ChadClient` and `suite.chad` for Sigmatic.
37
+
36
38
  VectorFlow's REST v1 accepts **only** an environment-scoped service-account key;
37
39
  a suite client built without one throws `MissingCredentialError` at the call
38
40
  site instead of sending a credential VectorFlow will reject.
@@ -41,13 +43,13 @@ site instead of sending a credential VectorFlow will reject.
41
43
 
42
44
  Create a personal access token (`vmcp_…`) in the suite and send it as a bearer
43
45
  to the product's gateway prefix. Identity turns it into the request assertion
44
- the product checks, so the same token works for CHAD and Warden:
46
+ the product checks, so the same token works for Sigmatic and Warden:
45
47
 
46
48
  ```ts
47
49
  import { ChadClient, WardenClient, BearerToken } from "@veltrosecurity/sdk";
48
50
 
49
- const chad = new ChadClient("https://soc.example.com/chad", { auth: new BearerToken(pat) });
50
- await chad.rules.list();
51
+ const sigmatic = new ChadClient("https://soc.example.com/sigmatic", { auth: new BearerToken(pat) });
52
+ await sigmatic.rules.list();
51
53
 
52
54
  const warden = new WardenClient("https://soc.example.com/warden", {
53
55
  auth: new BearerToken(pat),
@@ -60,7 +62,7 @@ VectorFlow's `/api/v1` still wants its service-account key, so pass
60
62
 
61
63
  ## Example
62
64
 
63
- [`examples/triage.ts`](examples/triage.ts) lists open Warden cases and new critical or high CHAD alerts
65
+ [`examples/triage.ts`](examples/triage.ts) lists open Warden cases and new critical or high Sigmatic alerts
64
66
  with a personal access token from `VELTRO_TOKEN`. It's read-only and isn't
65
67
  part of the published package.
66
68
 
@@ -113,7 +115,7 @@ attributes the identity authority set are all honoured.
113
115
 
114
116
  | Product | Resources | Operations | Generated from |
115
117
  | --- | --- | --- | --- |
116
- | CHAD | 52 | 365 | CHAD 0.43.2 OpenAPI |
118
+ | Sigmatic | 52 | 365 | CHAD 0.43.2 OpenAPI |
117
119
  | Warden | 27 | 123 | Warden 0.11.7 OpenAPI |
118
120
  | VectorFlow | 9 | 41 | VectorFlow REST API 2.0.0 |
119
121
 
package/dist/index.cjs CHANGED
@@ -31,6 +31,7 @@ __export(index_exports, {
31
31
  Resource: () => Resource,
32
32
  SESSION_COOKIE_PREFIX: () => SESSION_COOKIE_PREFIX,
33
33
  SUITE_PREFIXES: () => SUITE_PREFIXES,
34
+ SigmaticClient: () => SigmaticClient,
34
35
  SuiteSession: () => SuiteSession,
35
36
  Transport: () => Transport,
36
37
  VERSION: () => VERSION,
@@ -53,7 +54,7 @@ var DEFAULT_MAX_RESPONSE_BYTES = 32 * 1024 * 1024;
53
54
  var DEFAULT_RETRIES = 2;
54
55
  var RETRY_STATUSES = /* @__PURE__ */ new Set([429, 502, 503, 504]);
55
56
  var RETRY_METHODS = /* @__PURE__ */ new Set(["GET", "HEAD", "OPTIONS", "PUT", "DELETE"]);
56
- var USER_AGENT = "veltro-sdk/0.35.4 (+https://github.com/veltrosecurity/veltro)";
57
+ var USER_AGENT = "veltro-sdk/0.37.4 (+https://github.com/veltrosecurity/veltro)";
57
58
  var VeltroError = class extends Error {
58
59
  constructor(message) {
59
60
  super(message);
@@ -1340,6 +1341,10 @@ var ChadHealth = class extends Resource {
1340
1341
  listIndex(options = {}) {
1341
1342
  return this.request("GET", "/api/health/indices", options);
1342
1343
  }
1344
+ /** GET /api/health/ready — Strict dependency readiness. */
1345
+ readiness(options = {}) {
1346
+ return this.request("GET", "/api/health/ready", options);
1347
+ }
1343
1348
  /** POST /api/health/test/{service_type} — Test Service Health. */
1344
1349
  testService(serviceType, options = {}) {
1345
1350
  return this.request("POST", `/api/health/test/${quoteSegment(serviceType)}`, options);
@@ -2872,9 +2877,9 @@ var WardenDiagnostics = class extends Resource {
2872
2877
  }
2873
2878
  };
2874
2879
  var WardenEvents = class extends Resource {
2875
- /** POST /api/events/chad — Accept one CHAD alert-delivery envelope. */
2876
- chad(options = {}) {
2877
- return this.request("POST", "/api/events/chad", options);
2880
+ /** POST /api/events/sigmatic — Accept one Sigmatic alert-delivery envelope. */
2881
+ sigmatic(options = {}) {
2882
+ return this.request("POST", "/api/events/sigmatic", options);
2878
2883
  }
2879
2884
  };
2880
2885
  var WardenIntakeRules = class extends Resource {
@@ -3419,6 +3424,7 @@ var WardenResources = class {
3419
3424
  // src/client.ts
3420
3425
  var SUITE_PREFIXES = {
3421
3426
  chad: "/chad",
3427
+ sigmatic: "/sigmatic",
3422
3428
  warden: "/warden",
3423
3429
  vectorflow: "/vectorflow"
3424
3430
  };
@@ -3442,6 +3448,8 @@ var ChadClient = class extends ChadResources {
3442
3448
  this.baseUrl = transport.baseUrl;
3443
3449
  }
3444
3450
  };
3451
+ var SigmaticClient = class extends ChadClient {
3452
+ };
3445
3453
  var WardenClient = class extends WardenResources {
3446
3454
  baseUrl;
3447
3455
  constructor(baseUrl, options = {}) {
@@ -3487,6 +3495,7 @@ var VeltroClient = class _VeltroClient {
3487
3495
  baseUrl;
3488
3496
  session;
3489
3497
  chad;
3498
+ sigmatic;
3490
3499
  warden;
3491
3500
  vectorflow;
3492
3501
  constructor(baseUrl, options = {}) {
@@ -3494,6 +3503,7 @@ var VeltroClient = class _VeltroClient {
3494
3503
  this.baseUrl = baseUrl.replace(/\/+$/, "");
3495
3504
  this.session = options.session;
3496
3505
  const chadAuth = options.chadAuth ?? options.session;
3506
+ const sigmaticAuth = options.sigmaticAuth ?? options.session;
3497
3507
  const wardenAuth = options.wardenAuth ?? options.session;
3498
3508
  const vectorflowAuth = options.vectorflowAuth ?? (options.vectorflowKey ? new BearerToken(options.vectorflowKey) : void 0);
3499
3509
  const shared = {
@@ -3508,6 +3518,13 @@ var VeltroClient = class _VeltroClient {
3508
3518
  "chad",
3509
3519
  "no credential: pass a suite session (VeltroClient.login) or chadAuth: new BearerToken(<personal access token>)"
3510
3520
  );
3521
+ this.sigmatic = sigmaticAuth ? new SigmaticClient(`${this.baseUrl}${SUITE_PREFIXES.sigmatic}`, {
3522
+ auth: sigmaticAuth,
3523
+ ...shared
3524
+ }) : unavailable(
3525
+ "sigmatic",
3526
+ "no credential: pass a suite session (VeltroClient.login) or sigmaticAuth: new BearerToken(<personal access token>)"
3527
+ );
3511
3528
  this.warden = wardenAuth ? new WardenClient(`${this.baseUrl}${SUITE_PREFIXES.warden}`, {
3512
3529
  auth: wardenAuth,
3513
3530
  ...shared
@@ -3535,7 +3552,7 @@ var VeltroClient = class _VeltroClient {
3535
3552
  };
3536
3553
 
3537
3554
  // src/index.ts
3538
- var VERSION = "0.35.4";
3555
+ var VERSION = "0.37.4";
3539
3556
  // Annotate the CommonJS export names for ESM import in node:
3540
3557
  0 && (module.exports = {
3541
3558
  BearerToken,
@@ -3549,6 +3566,7 @@ var VERSION = "0.35.4";
3549
3566
  Resource,
3550
3567
  SESSION_COOKIE_PREFIX,
3551
3568
  SUITE_PREFIXES,
3569
+ SigmaticClient,
3552
3570
  SuiteSession,
3553
3571
  Transport,
3554
3572
  VERSION,