@akasecurity/cli 0.9.14 → 0.9.15
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/dist/cli.js +762 -267
- package/extension/manifest.json +1 -1
- package/native-host/content-retention.js +184 -55
- package/native-host/history-sync.js +190 -61
- package/native-host/host.js +469 -120
- package/native-host/scan-worker.js +241 -34
- package/native-host/sync.js +91 -36
- package/package.json +9 -9
- package/web-ui/package.json +6 -6
- package/web-ui/packages/dashboard-ui/package.json +1 -1
- package/web-ui/packages/plugin-sdk/package.json +1 -1
- package/web-ui/packages/schema/package.json +2 -2
- package/web-ui/web-ui/.next/BUILD_ID +1 -1
- package/web-ui/web-ui/.next/app-build-manifest.json +254 -254
- package/web-ui/web-ui/.next/app-path-routes-manifest.json +7 -7
- package/web-ui/web-ui/.next/build-manifest.json +14 -14
- package/web-ui/web-ui/.next/prerender-manifest.json +14 -14
- package/web-ui/web-ui/.next/required-server-files.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/activity/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/activity/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/activity/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/data-shares/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/data-shares/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/detections/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/detections/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/detections/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/[id]/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/new/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/exceptions/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/findings/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/findings/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/findings/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/inventory/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/inventory/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/policies/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/policies/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/policies/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/scan/page.js +3 -3
- package/web-ui/web-ui/.next/server/app/(app)/scan/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/scan/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/security/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/security/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/security/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/settings/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/settings/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/settings/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/updates/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/updates/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/updates/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/vault/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/(app)/vault/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/(app)/vault/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/_not-found/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app/_not-found.html +1 -1
- package/web-ui/web-ui/.next/server/app/_not-found.rsc +10 -10
- package/web-ui/web-ui/.next/server/app/icon.svg/route.js +1 -1
- package/web-ui/web-ui/.next/server/app/icon.svg/route.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/index.html +1 -1
- package/web-ui/web-ui/.next/server/app/index.rsc +10 -10
- package/web-ui/web-ui/.next/server/app/page.js +2 -2
- package/web-ui/web-ui/.next/server/app/page.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/app/page_client-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/app-paths-manifest.json +7 -7
- package/web-ui/web-ui/.next/server/chunks/184.js +1039 -0
- package/web-ui/web-ui/.next/server/chunks/245.js +11 -0
- package/web-ui/web-ui/.next/server/chunks/{670.js → 250.js} +1 -1
- package/web-ui/web-ui/.next/server/chunks/491.js +1 -0
- package/web-ui/web-ui/.next/server/chunks/51.js +1 -0
- package/web-ui/web-ui/.next/server/chunks/511.js +66 -0
- package/web-ui/web-ui/.next/server/chunks/537.js +1 -0
- package/web-ui/web-ui/.next/server/chunks/{74.js → 586.js} +55 -38
- package/web-ui/web-ui/.next/server/chunks/643.js +6 -0
- package/web-ui/web-ui/.next/server/chunks/660.js +109 -0
- package/web-ui/web-ui/.next/server/chunks/662.js +1 -0
- package/web-ui/web-ui/.next/server/chunks/749.js +22 -0
- package/web-ui/web-ui/.next/server/chunks/756.js +6 -0
- package/web-ui/web-ui/.next/server/chunks/774.js +12 -0
- package/web-ui/web-ui/.next/server/functions-config-manifest.json +5 -5
- package/web-ui/web-ui/.next/server/middleware-build-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/middleware-manifest.json +5 -5
- package/web-ui/web-ui/.next/server/middleware.js +2 -2
- package/web-ui/web-ui/.next/server/pages/404.html +1 -1
- package/web-ui/web-ui/.next/server/pages/500.html +1 -1
- package/web-ui/web-ui/.next/server/pages/_app.js +1 -1
- package/web-ui/web-ui/.next/server/pages/_app.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/pages/_document.js +1 -1
- package/web-ui/web-ui/.next/server/pages/_document.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/pages/_error.js +3 -3
- package/web-ui/web-ui/.next/server/pages/_error.js.nft.json +1 -1
- package/web-ui/web-ui/.next/server/server-reference-manifest.js +1 -1
- package/web-ui/web-ui/.next/server/server-reference-manifest.json +1 -1
- package/web-ui/web-ui/.next/static/chunks/394-310a18b4e4df5baf.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/458-51313fc93031a722.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/784-4ea191865f1d4d08.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/800-5a959d56ff462fa5.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/982-d4c17097640bdc58.js +55 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-6a2b4ce7f62aa2ba.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-3032d8c5d83ed0ae.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-541933106e3fbbd5.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/error-8db18c71ebeb633c.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-b2913fd29067c1aa.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-d71ddfb1b6a8508a.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-db4102808bb1d7ba.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-8fc32e776e5c8f17.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-5136fa903953a1f1.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-0a38af585fc577fa.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/page-7b0a5b76d199ec55.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-dd238c793fc58e5b.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/security/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/security/page-27448935d7ce4168.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-e8f75d1d2a05a860.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-34525856979b2faf.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/loading-1c2f7a583c03a3ac.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/page-90ff82a26647fc29.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/_not-found/page-688942265deca357.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/layout-66e4db4cb3e3b073.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/app/page-64c3ee82a8af8ca6.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/fc2b9f2a-dbaa334f7301101d.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/{framework-4a8a69f5ce633b25.js → framework-f6112ebf12822e8c.js} +1 -1
- package/web-ui/web-ui/.next/static/chunks/main-app-9c9fe8121a92e5d6.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/main-b1c87d0ac6039542.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/pages/_app-3a76cb93bbdd6993.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/pages/_error-690c2fcfe129b529.js +1 -0
- package/web-ui/web-ui/.next/static/chunks/{webpack-c0fb35a40828243e.js → webpack-27570aabc530cb21.js} +1 -1
- package/web-ui/web-ui/.next/static/css/010b6061327092dd.css +2 -0
- package/web-ui/web-ui/.next/static/{5Pl1KmhN7uMqXkPkq0ZmS → zCQxcf2ZbK52vQeWXgBgs}/_buildManifest.js +1 -1
- package/web-ui/web-ui/dist/scan-worker.js +241 -34
- package/web-ui/web-ui/package.json +3 -3
- package/web-ui/web-ui/.next/server/chunks/167.js +0 -11
- package/web-ui/web-ui/.next/server/chunks/197.js +0 -12
- package/web-ui/web-ui/.next/server/chunks/247.js +0 -66
- package/web-ui/web-ui/.next/server/chunks/259.js +0 -22
- package/web-ui/web-ui/.next/server/chunks/285.js +0 -1
- package/web-ui/web-ui/.next/server/chunks/293.js +0 -1022
- package/web-ui/web-ui/.next/server/chunks/498.js +0 -1
- package/web-ui/web-ui/.next/server/chunks/524.js +0 -109
- package/web-ui/web-ui/.next/server/chunks/618.js +0 -1
- package/web-ui/web-ui/.next/server/chunks/807.js +0 -6
- package/web-ui/web-ui/.next/server/chunks/811.js +0 -6
- package/web-ui/web-ui/.next/server/chunks/97.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/333-837ec42ac57bd0f5.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/423b6282-fc44d01f7ffd176d.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/539-ca04468e745ed73a.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/614-2c96a5e95ce63862.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/639-6f64a434dce13266.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/826-e806952dd7b636f8.js +0 -55
- package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/activity/page-5fc18420d8d5bf62.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/data-shares/page-fe72214e54d52a14.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/detections/page-47e4dd015f24c04d.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/error-be2032a4770a35bf.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/[id]/page-f90fbb03406e4383.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/new/page-0a1d6a3557b99750.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/exceptions/page-dbf32c5303140e8c.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/findings/page-cb1934547acde891.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/inventory/page-6688bc58741c7c7d.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/layout-d357a1d54c653d14.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/policies/page-bc95c7097cca0dfc.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/scan/page-5bebd818c1bb3a79.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/security/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/security/page-42845dce0b734eeb.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/settings/page-d3ce8a503e8ce592.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/updates/page-802942c0a06fbe31.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/loading-dd5849a39c269cf4.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/(app)/vault/page-52c8cd3a2a09a067.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/_not-found/page-260d84f0d7697773.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/layout-c64d57251ee073d5.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/app/page-b7ea78b4203d219b.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/main-89a5d50418a9a7e3.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/main-app-4a18e3117ef3af1e.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/pages/_app-671d04cd06b05cac.js +0 -1
- package/web-ui/web-ui/.next/static/chunks/pages/_error-ae172b6a97f64258.js +0 -1
- package/web-ui/web-ui/.next/static/css/616a1cc3e0d40480.css +0 -2
- /package/web-ui/web-ui/.next/static/{5Pl1KmhN7uMqXkPkq0ZmS → zCQxcf2ZbK52vQeWXgBgs}/_ssgManifest.js +0 -0
|
@@ -32,9 +32,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
mod
|
|
33
33
|
));
|
|
34
34
|
|
|
35
|
-
// ../../node_modules/.pnpm/ignore@7.0.
|
|
35
|
+
// ../../node_modules/.pnpm/ignore@7.0.10/node_modules/ignore/index.js
|
|
36
36
|
var require_ignore = __commonJS({
|
|
37
|
-
"../../node_modules/.pnpm/ignore@7.0.
|
|
37
|
+
"../../node_modules/.pnpm/ignore@7.0.10/node_modules/ignore/index.js"(exports, module) {
|
|
38
38
|
"use strict";
|
|
39
39
|
function makeArray(subject) {
|
|
40
40
|
return Array.isArray(subject) ? subject : [subject];
|
|
@@ -429,6 +429,13 @@ var require_ignore = __commonJS({
|
|
|
429
429
|
}
|
|
430
430
|
};
|
|
431
431
|
var WILDCARD = "[^\\/]*";
|
|
432
|
+
var separatorAfter = (run, at) => {
|
|
433
|
+
let separator = EMPTY;
|
|
434
|
+
for (let index = at + 1; index < run.length && !run[index].wildcard; index++) {
|
|
435
|
+
separator += run[index].single;
|
|
436
|
+
}
|
|
437
|
+
return separator;
|
|
438
|
+
};
|
|
432
439
|
var pinWildcards = (source) => {
|
|
433
440
|
if (source.indexOf(WILDCARD) < 0) {
|
|
434
441
|
return source;
|
|
@@ -498,7 +505,7 @@ var require_ignore = __commonJS({
|
|
|
498
505
|
out += token.single;
|
|
499
506
|
return;
|
|
500
507
|
}
|
|
501
|
-
out += at === lastWildcard ? WILDCARD : `(?:(?!${run
|
|
508
|
+
out += at === lastWildcard ? WILDCARD : `(?:(?!${separatorAfter(run, at)})[^\\/])*`;
|
|
502
509
|
});
|
|
503
510
|
run = [];
|
|
504
511
|
};
|
|
@@ -675,13 +682,13 @@ var require_ignore = __commonJS({
|
|
|
675
682
|
const rules = this._rules;
|
|
676
683
|
const { length } = rules;
|
|
677
684
|
const shortcut = this._basenameCount * 2 >= length;
|
|
678
|
-
const
|
|
685
|
+
const basename7 = shortcut ? basenameOf(path) : path;
|
|
679
686
|
for (let index = 0; index < length; index++) {
|
|
680
687
|
const rule = rules[index];
|
|
681
688
|
const { negative } = rule;
|
|
682
689
|
const skip = unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored;
|
|
683
690
|
if (!skip && rule[mode].test(
|
|
684
|
-
shortcut && rule._basenameOnly ?
|
|
691
|
+
shortcut && rule._basenameOnly ? basename7 : path
|
|
685
692
|
)) {
|
|
686
693
|
ignored = !negative;
|
|
687
694
|
unignored = negative;
|
|
@@ -997,6 +1004,10 @@ var SQLITE_MIGRATIONS = [
|
|
|
997
1004
|
{
|
|
998
1005
|
tag: "0035_share_destination_provider_id",
|
|
999
1006
|
sql: "ALTER TABLE `share_destination` ADD `provider_id` text;"
|
|
1007
|
+
},
|
|
1008
|
+
{
|
|
1009
|
+
tag: "0036_secret_vault_identity_fingerprint",
|
|
1010
|
+
sql: "ALTER TABLE `secret_vault` ADD `value_identity_fingerprint` text DEFAULT '' NOT NULL;--> statement-breakpoint\nUPDATE `secret_vault` SET `value_identity_fingerprint` = `value_fingerprint`;\n"
|
|
1000
1011
|
}
|
|
1001
1012
|
];
|
|
1002
1013
|
|
|
@@ -6032,7 +6043,7 @@ var recursive = /* @__PURE__ */ new WeakMap();
|
|
|
6032
6043
|
var NONE = 0;
|
|
6033
6044
|
var ASSUMED = 1;
|
|
6034
6045
|
var PROVEN = 2;
|
|
6035
|
-
function isRecursive(inst, stack,
|
|
6046
|
+
function isRecursive(inst, stack, resolve3) {
|
|
6036
6047
|
const cached2 = recursive.get(inst);
|
|
6037
6048
|
if (cached2 !== void 0)
|
|
6038
6049
|
return cached2 ? PROVEN : NONE;
|
|
@@ -6042,7 +6053,7 @@ function isRecursive(inst, stack, resolve2) {
|
|
|
6042
6053
|
let result = NONE;
|
|
6043
6054
|
const check2 = (child) => {
|
|
6044
6055
|
if (result !== PROVEN && child?._zod) {
|
|
6045
|
-
const answer = isRecursive(child, stack,
|
|
6056
|
+
const answer = isRecursive(child, stack, resolve3);
|
|
6046
6057
|
if (answer > result)
|
|
6047
6058
|
result = answer;
|
|
6048
6059
|
}
|
|
@@ -6053,7 +6064,7 @@ function isRecursive(inst, stack, resolve2) {
|
|
|
6053
6064
|
const desc = Object.getOwnPropertyDescriptor(sh, key);
|
|
6054
6065
|
if (spread && !desc.enumerable)
|
|
6055
6066
|
continue;
|
|
6056
|
-
const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack,
|
|
6067
|
+
const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve3) : NONE;
|
|
6057
6068
|
if (child > answer)
|
|
6058
6069
|
answer = child;
|
|
6059
6070
|
}
|
|
@@ -6117,7 +6128,7 @@ function isRecursive(inst, stack, resolve2) {
|
|
|
6117
6128
|
break;
|
|
6118
6129
|
// `$ZodLazy` caches its inner on the def, so a resolved edge is followed exactly
|
|
6119
6130
|
case "lazy": {
|
|
6120
|
-
const inner = def._cachedInner ?? (
|
|
6131
|
+
const inner = def._cachedInner ?? (resolve3 ? inst._zod.innerType : void 0);
|
|
6121
6132
|
merge2(inner ? isRecursive(inner, stack, false) : ASSUMED);
|
|
6122
6133
|
break;
|
|
6123
6134
|
}
|
|
@@ -23398,7 +23409,29 @@ var StorePosturePlugin = external_exports.object({
|
|
|
23398
23409
|
*/
|
|
23399
23410
|
policyBundleVersion: external_exports.string().max(200).nullable(),
|
|
23400
23411
|
/** Epoch millis, on the CLIENT clock, of that fetch. */
|
|
23401
|
-
policyFetchedAt: external_exports.number().int().min(0).max(MAX_DATE_MS).nullable()
|
|
23412
|
+
policyFetchedAt: external_exports.number().int().min(0).max(MAX_DATE_MS).nullable(),
|
|
23413
|
+
/**
|
|
23414
|
+
* The newest version the host's own install record holds for this plugin —
|
|
23415
|
+
* what is on disk. After an update it leads `version` (the running copy) by
|
|
23416
|
+
* one launch. Null when no usable version can be read: no install record
|
|
23417
|
+
* (a plugin run from a checkout), no entry with a valid version, or every
|
|
23418
|
+
* such entry names an `installPath` that no longer exists; OPTIONAL, not
|
|
23419
|
+
* required, so a build that predates the member keeps getting its 200.
|
|
23420
|
+
* Bounded like `version`.
|
|
23421
|
+
*/
|
|
23422
|
+
installedVersion: external_exports.string().max(64).nullable().optional(),
|
|
23423
|
+
/**
|
|
23424
|
+
* The local-store schema version this running build migrates a store to:
|
|
23425
|
+
* the number of store migrations it carries, the count it stamps into
|
|
23426
|
+
* `PRAGMA user_version`. A snapshot whose `schemaVersion` is above it
|
|
23427
|
+
* usually describes a store a newer build migrated. It is a hint, not a
|
|
23428
|
+
* verdict: the stamp is write-only, so a store whose count ran past this
|
|
23429
|
+
* build's while this build knows every migration in its ledger reads above
|
|
23430
|
+
* it too, which is why describeStoreSkew decides skew on ledger tags and
|
|
23431
|
+
* never on the count. OPTIONAL for the same reason as `installedVersion`;
|
|
23432
|
+
* bounded like `schemaVersion`.
|
|
23433
|
+
*/
|
|
23434
|
+
buildSchemaVersion: external_exports.number().int().min(0).max(MAX_INT4).optional()
|
|
23402
23435
|
}).meta({ id: "StorePosturePlugin" });
|
|
23403
23436
|
var StorePostureSnapshot = external_exports.object({
|
|
23404
23437
|
deviceId: external_exports.guid(),
|
|
@@ -24954,10 +24987,15 @@ var ParsedPointer = external_exports.object({
|
|
|
24954
24987
|
});
|
|
24955
24988
|
var VaultEntry = external_exports.object({
|
|
24956
24989
|
pointerId: external_exports.string(),
|
|
24957
|
-
// The keyed HMAC of the raw
|
|
24958
|
-
// derived under.
|
|
24959
|
-
// independently of the vault encryption
|
|
24990
|
+
// The keyed HMAC of the EXACT raw bytes under `exception.key`, and the epoch it
|
|
24991
|
+
// was derived under. The vault's own dedupe key: a value and its invisibly
|
|
24992
|
+
// padded twin are two rows. It rotates independently of the vault encryption
|
|
24993
|
+
// key below. Never matched against an exception or grant.
|
|
24960
24994
|
valueFingerprint: external_exports.string().regex(/^[0-9a-f]{64}$/),
|
|
24995
|
+
// The same HMAC over the raw with invisible padding removed: the identity a
|
|
24996
|
+
// reveal-to-model grant and every exception match on. Shared by a value and
|
|
24997
|
+
// its padded twin.
|
|
24998
|
+
valueIdentityFingerprint: external_exports.string().regex(/^[0-9a-f]{64}$/),
|
|
24961
24999
|
fingerprintKeyVersion: external_exports.number().int().positive(),
|
|
24962
25000
|
// The vault-key epoch this row's ciphertext was sealed under.
|
|
24963
25001
|
keyVersion: external_exports.number().int().positive(),
|
|
@@ -25535,10 +25573,18 @@ var SeveritySummaryItem = external_exports.object({
|
|
|
25535
25573
|
count: external_exports.number().int().nonnegative(),
|
|
25536
25574
|
// Resolution-aware breakdown (optional, additive). Populated once findings
|
|
25537
25575
|
// carry lifecycle state: `caught` = handled in-flight (enforced); `openAtRest`
|
|
25538
|
-
// = still open with no in-flight enforcement (needs remediation)
|
|
25539
|
-
//
|
|
25576
|
+
// = still open with no in-flight enforcement (needs remediation); `dismissed`
|
|
25577
|
+
// = closed by a human judgement rather than a fix — visible, but not counted as
|
|
25578
|
+
// needing remediation. The three are disjoint. Absent on the legacy count-only
|
|
25579
|
+
// response until the resolution feature lands.
|
|
25540
25580
|
caught: external_exports.number().int().nonnegative().optional(),
|
|
25541
|
-
openAtRest: external_exports.number().int().nonnegative().optional()
|
|
25581
|
+
openAtRest: external_exports.number().int().nonnegative().optional(),
|
|
25582
|
+
dismissed: external_exports.number().int().nonnegative().optional(),
|
|
25583
|
+
// The two halves of `caught`, for a reader that wants them apart: `handled` =
|
|
25584
|
+
// in-flight findings an enforcement action already contained; `resolved` =
|
|
25585
|
+
// at-rest findings closed out by fixing them. `handled + resolved === caught`.
|
|
25586
|
+
handled: external_exports.number().int().nonnegative().optional(),
|
|
25587
|
+
resolved: external_exports.number().int().nonnegative().optional()
|
|
25542
25588
|
}).meta({ id: "SeveritySummaryItem" });
|
|
25543
25589
|
var SeveritySummaryResponse = external_exports.object({
|
|
25544
25590
|
// Sum of bySeverity[].count.
|
|
@@ -25546,6 +25592,9 @@ var SeveritySummaryResponse = external_exports.object({
|
|
|
25546
25592
|
// Findings still open at rest (sum of bySeverity[].openAtRest). Optional and
|
|
25547
25593
|
// additive — absent on the legacy response until the resolution feature lands.
|
|
25548
25594
|
needsRemediation: external_exports.number().int().nonnegative().optional(),
|
|
25595
|
+
// Findings a user dismissed (sum of bySeverity[].dismissed). Excluded from
|
|
25596
|
+
// needsRemediation, and kept visible here so an accepted risk is not erased.
|
|
25597
|
+
dismissed: external_exports.number().int().nonnegative().optional(),
|
|
25549
25598
|
// All four severity levels are always present (count may be 0).
|
|
25550
25599
|
bySeverity: external_exports.array(SeveritySummaryItem)
|
|
25551
25600
|
}).meta({ id: "SeveritySummaryResponse" });
|
|
@@ -26106,11 +26155,11 @@ function repairOrRefuseMode(file2) {
|
|
|
26106
26155
|
const link = lstatSync2(file2, { throwIfNoEntry: false });
|
|
26107
26156
|
if (link === void 0) return "absent";
|
|
26108
26157
|
if (link.isSymbolicLink()) return "untrusted";
|
|
26109
|
-
const
|
|
26110
|
-
if (
|
|
26158
|
+
const stat2 = statSync(file2, { throwIfNoEntry: false });
|
|
26159
|
+
if (stat2 === void 0) return "absent";
|
|
26111
26160
|
const uid = process.getuid?.();
|
|
26112
|
-
if (uid !== void 0 &&
|
|
26113
|
-
if (process.platform !== "win32" && (
|
|
26161
|
+
if (uid !== void 0 && stat2.uid !== uid) return "untrusted";
|
|
26162
|
+
if (process.platform !== "win32" && (stat2.mode & 511) !== DATA_FILE_MODE) {
|
|
26114
26163
|
try {
|
|
26115
26164
|
chmodSync2(file2, DATA_FILE_MODE);
|
|
26116
26165
|
} catch {
|
|
@@ -32230,7 +32279,10 @@ var SqliteResolutionsRepository = class {
|
|
|
32230
32279
|
* Insert many dispositions as ONE transaction — all of them or none.
|
|
32231
32280
|
*
|
|
32232
32281
|
* A dashboard dismissal closes every open finding of a rule, which is one
|
|
32233
|
-
* write per key
|
|
32282
|
+
* write per key. It reaches this through
|
|
32283
|
+
* `LocalDatabase.dismissOpenFindingsForRule`, which calls it inside the
|
|
32284
|
+
* transaction that selected the keys, so there it runs as a SAVEPOINT of
|
|
32285
|
+
* that transaction. Run loose, a fault partway leaves half a rule closed with
|
|
32234
32286
|
* nothing recording that the other half was meant to be. The caller then has
|
|
32235
32287
|
* no way to tell a partial run from a complete one, because the card it
|
|
32236
32288
|
* refreshes into just shows a smaller number either way.
|
|
@@ -32450,6 +32502,7 @@ function toSighting(row) {
|
|
|
32450
32502
|
var SELECT_COLUMNS = `
|
|
32451
32503
|
pointer_id AS pointerId,
|
|
32452
32504
|
value_fingerprint AS valueFingerprint,
|
|
32505
|
+
value_identity_fingerprint AS valueIdentityFingerprint,
|
|
32453
32506
|
fingerprint_key_version AS fingerprintKeyVersion,
|
|
32454
32507
|
key_version AS keyVersion,
|
|
32455
32508
|
format_version AS formatVersion,
|
|
@@ -32474,13 +32527,13 @@ var SqliteSecretVaultRepository = class {
|
|
|
32474
32527
|
this.db = db;
|
|
32475
32528
|
this.insertStmt = db.prepare(
|
|
32476
32529
|
`INSERT INTO secret_vault (
|
|
32477
|
-
pointer_id, value_fingerprint,
|
|
32478
|
-
format_version, category, rule_id, masked_match, provider,
|
|
32530
|
+
pointer_id, value_fingerprint, value_identity_fingerprint,
|
|
32531
|
+
fingerprint_key_version, key_version, format_version, category, rule_id, masked_match, provider,
|
|
32479
32532
|
ciphertext, nonce, auth_tag,
|
|
32480
32533
|
user_authorized, occurrence_count, first_seen, last_seen
|
|
32481
32534
|
) VALUES (
|
|
32482
|
-
:pointerId, :valueFingerprint, :
|
|
32483
|
-
:formatVersion, :category, :ruleId, :maskedMatch, :provider,
|
|
32535
|
+
:pointerId, :valueFingerprint, :valueIdentityFingerprint,
|
|
32536
|
+
:fingerprintKeyVersion, :keyVersion, :formatVersion, :category, :ruleId, :maskedMatch, :provider,
|
|
32484
32537
|
:ciphertext, :nonce, :authTag,
|
|
32485
32538
|
:userAuthorized, 1, :now, :now
|
|
32486
32539
|
)`
|
|
@@ -32505,7 +32558,13 @@ var SqliteSecretVaultRepository = class {
|
|
|
32505
32558
|
);
|
|
32506
32559
|
this.refreshFingerprintStmt = db.prepare(
|
|
32507
32560
|
`UPDATE secret_vault
|
|
32508
|
-
SET value_fingerprint = :valueFingerprint,
|
|
32561
|
+
SET value_fingerprint = :valueFingerprint,
|
|
32562
|
+
value_identity_fingerprint = :valueIdentityFingerprint,
|
|
32563
|
+
fingerprint_key_version = :fingerprintKeyVersion
|
|
32564
|
+
WHERE pointer_id = :pointerId`
|
|
32565
|
+
);
|
|
32566
|
+
this.setIdentityStmt = db.prepare(
|
|
32567
|
+
`UPDATE secret_vault SET value_identity_fingerprint = :valueIdentityFingerprint
|
|
32509
32568
|
WHERE pointer_id = :pointerId`
|
|
32510
32569
|
);
|
|
32511
32570
|
this.deleteByPointerStmt = db.prepare(`DELETE FROM secret_vault WHERE pointer_id = :pointerId`);
|
|
@@ -32522,6 +32581,7 @@ var SqliteSecretVaultRepository = class {
|
|
|
32522
32581
|
listStmt;
|
|
32523
32582
|
replaceCiphertextStmt;
|
|
32524
32583
|
refreshFingerprintStmt;
|
|
32584
|
+
setIdentityStmt;
|
|
32525
32585
|
deleteByPointerStmt;
|
|
32526
32586
|
derefStmt;
|
|
32527
32587
|
/**
|
|
@@ -32552,6 +32612,7 @@ var SqliteSecretVaultRepository = class {
|
|
|
32552
32612
|
bindParams({
|
|
32553
32613
|
pointerId: input2.pointerId,
|
|
32554
32614
|
valueFingerprint: input2.valueFingerprint,
|
|
32615
|
+
valueIdentityFingerprint: input2.valueIdentityFingerprint,
|
|
32555
32616
|
fingerprintKeyVersion: input2.fingerprintKeyVersion,
|
|
32556
32617
|
keyVersion: input2.keyVersion,
|
|
32557
32618
|
formatVersion: input2.formatVersion ?? POINTER_FORMAT_VERSION,
|
|
@@ -32613,7 +32674,15 @@ var SqliteSecretVaultRepository = class {
|
|
|
32613
32674
|
replaceCiphertext(pointerId, next) {
|
|
32614
32675
|
this.replaceCiphertextStmt.run({ pointerId, ...next });
|
|
32615
32676
|
}
|
|
32616
|
-
/**
|
|
32677
|
+
/**
|
|
32678
|
+
* Correct an entry's identity fingerprint in place, leaving its exact
|
|
32679
|
+
* fingerprint and key epoch alone. For a row whose identity column still holds
|
|
32680
|
+
* the exact value copied in by the migration that added it.
|
|
32681
|
+
*/
|
|
32682
|
+
setIdentityFingerprint(pointerId, valueIdentityFingerprint) {
|
|
32683
|
+
this.setIdentityStmt.run({ pointerId, valueIdentityFingerprint });
|
|
32684
|
+
}
|
|
32685
|
+
/** Re-derive an entry's fingerprints under a new fingerprint-key epoch. */
|
|
32617
32686
|
refreshFingerprint(pointerId, next) {
|
|
32618
32687
|
this.refreshFingerprintStmt.run({ pointerId, ...next });
|
|
32619
32688
|
}
|
|
@@ -32744,7 +32813,7 @@ var SqliteSecretVaultRepository = class {
|
|
|
32744
32813
|
`SELECT ${INVENTORY_COLUMNS},
|
|
32745
32814
|
(SELECT e.id FROM exceptions e
|
|
32746
32815
|
WHERE e.rule_id = v.rule_id
|
|
32747
|
-
AND e.value_fingerprint = v.
|
|
32816
|
+
AND e.value_fingerprint = v.value_identity_fingerprint
|
|
32748
32817
|
AND e.key_version = v.fingerprint_key_version
|
|
32749
32818
|
AND ${ACTIVE_REVEAL_GRANT_PREDICATE}
|
|
32750
32819
|
LIMIT 1) AS grant_id
|
|
@@ -32787,7 +32856,7 @@ var SqliteSecretVaultRepository = class {
|
|
|
32787
32856
|
`SELECT ${INVENTORY_COLUMNS},
|
|
32788
32857
|
(SELECT e.id FROM exceptions e
|
|
32789
32858
|
WHERE e.rule_id = v.rule_id
|
|
32790
|
-
AND e.value_fingerprint = v.
|
|
32859
|
+
AND e.value_fingerprint = v.value_identity_fingerprint
|
|
32791
32860
|
AND e.key_version = v.fingerprint_key_version
|
|
32792
32861
|
AND ${ACTIVE_REVEAL_GRANT_PREDICATE}
|
|
32793
32862
|
LIMIT 1) AS grant_id
|
|
@@ -32891,6 +32960,18 @@ var OPEN_AT_REST_FINDINGS_SQL = `FROM inspection_findings f
|
|
|
32891
32960
|
OR latest.status IS NULL
|
|
32892
32961
|
OR latest.status NOT IN ('resolved', 'dismissed')
|
|
32893
32962
|
)`;
|
|
32963
|
+
function selectOpenFindingKeysForRule(db, ruleId) {
|
|
32964
|
+
const rows = allRows(
|
|
32965
|
+
db.prepare(
|
|
32966
|
+
`SELECT DISTINCT f.finding_key AS finding_key
|
|
32967
|
+
${OPEN_AT_REST_FINDINGS_SQL}
|
|
32968
|
+
AND d.rule_id = :ruleId
|
|
32969
|
+
AND f.finding_key IS NOT NULL`
|
|
32970
|
+
),
|
|
32971
|
+
{ ruleId }
|
|
32972
|
+
);
|
|
32973
|
+
return rows.map((r) => r.finding_key);
|
|
32974
|
+
}
|
|
32894
32975
|
var SEVERITIES = ["critical", "high", "medium", "low"];
|
|
32895
32976
|
var ACTION_TO_KIND = {
|
|
32896
32977
|
block: "blocked",
|
|
@@ -32947,16 +33028,16 @@ var SqliteSecurityRepository = class {
|
|
|
32947
33028
|
// findings are caught only once their latest disposition is resolved,
|
|
32948
33029
|
// otherwise they are open-at-rest.
|
|
32949
33030
|
//
|
|
32950
|
-
//
|
|
32951
|
-
//
|
|
32952
|
-
//
|
|
32953
|
-
//
|
|
32954
|
-
// be bucketed as caught
|
|
33031
|
+
// Only latest status 'resolved' counts as caught above. 'dismissed' is its
|
|
33032
|
+
// own bucket: a judgement rather than a fix, so it is neither caught nor
|
|
33033
|
+
// needing remediation, and stays countable. A further manual disposition
|
|
33034
|
+
// (acknowledged, false-positive) must be placed deliberately — 'acknowledged'
|
|
33035
|
+
// is accepted risk, not a fix, and must NOT be bucketed as caught.
|
|
32955
33036
|
//
|
|
32956
33037
|
// Legacy at-rest findings from pre-branch scans carry finding_key = NULL —
|
|
32957
33038
|
// the resolution lifecycle is keyed by finding_key, so it can never attach a
|
|
32958
33039
|
// disposition to (or clear) one of these on re-scan. They are excluded from
|
|
32959
|
-
//
|
|
33040
|
+
// all three buckets (untracked, not "needs remediation forever"),
|
|
32960
33041
|
// but still counted in total/count below — this keeps this predicate
|
|
32961
33042
|
// consistent with SqliteResolutionsRepository.openAtRestKeysForPath, which
|
|
32962
33043
|
// already filters `finding_key IS NOT NULL`.
|
|
@@ -32979,12 +33060,25 @@ var SqliteSecurityRepository = class {
|
|
|
32979
33060
|
WHEN latest.status = 'resolved' THEN 1
|
|
32980
33061
|
ELSE 0
|
|
32981
33062
|
END) AS caught,
|
|
33063
|
+
SUM(CASE WHEN e.event_type != 'code_change' THEN 1 ELSE 0 END) AS handled,
|
|
32982
33064
|
SUM(CASE
|
|
32983
33065
|
WHEN e.event_type = 'code_change'
|
|
32984
33066
|
AND f.finding_key IS NOT NULL
|
|
32985
|
-
AND
|
|
33067
|
+
AND latest.status = 'resolved' THEN 1
|
|
32986
33068
|
ELSE 0
|
|
32987
|
-
END) AS
|
|
33069
|
+
END) AS resolved,
|
|
33070
|
+
SUM(CASE
|
|
33071
|
+
WHEN e.event_type = 'code_change'
|
|
33072
|
+
AND f.finding_key IS NOT NULL
|
|
33073
|
+
AND (latest.status IS NULL
|
|
33074
|
+
OR latest.status NOT IN ('resolved', 'dismissed')) THEN 1
|
|
33075
|
+
ELSE 0
|
|
33076
|
+
END) AS open_at_rest,
|
|
33077
|
+
SUM(CASE
|
|
33078
|
+
WHEN e.event_type = 'code_change'
|
|
33079
|
+
AND latest.status = 'dismissed' THEN 1
|
|
33080
|
+
ELSE 0
|
|
33081
|
+
END) AS dismissed
|
|
32988
33082
|
FROM inspection_findings f
|
|
32989
33083
|
JOIN audit_events e INDEXED BY idx_audit_capture_rollup ON e.id = f.audit_event_id
|
|
32990
33084
|
JOIN inspection_definitions d ON d.id = f.inspection_definition_id
|
|
@@ -32999,11 +33093,15 @@ var SqliteSecurityRepository = class {
|
|
|
32999
33093
|
severity,
|
|
33000
33094
|
count: byRow.get(severity)?.count ?? 0,
|
|
33001
33095
|
caught: byRow.get(severity)?.caught ?? 0,
|
|
33002
|
-
|
|
33096
|
+
handled: byRow.get(severity)?.handled ?? 0,
|
|
33097
|
+
resolved: byRow.get(severity)?.resolved ?? 0,
|
|
33098
|
+
openAtRest: byRow.get(severity)?.open_at_rest ?? 0,
|
|
33099
|
+
dismissed: byRow.get(severity)?.dismissed ?? 0
|
|
33003
33100
|
}));
|
|
33004
33101
|
const total = bySeverity.reduce((sum, s) => sum + s.count, 0);
|
|
33005
33102
|
const needsRemediation = bySeverity.reduce((sum, s) => sum + s.openAtRest, 0);
|
|
33006
|
-
|
|
33103
|
+
const dismissed = bySeverity.reduce((sum, s) => sum + s.dismissed, 0);
|
|
33104
|
+
return Promise.resolve({ total, needsRemediation, dismissed, bySeverity });
|
|
33007
33105
|
}
|
|
33008
33106
|
// Range is echoed but does not change the result today — coverage is a constant
|
|
33009
33107
|
// business fact (see SCAN_COVERAGE), not a measured per-window metric. Order
|
|
@@ -33320,10 +33418,10 @@ var SqliteSecurityRepository = class {
|
|
|
33320
33418
|
* machine, and the second reported "no recommendations" over live exposure.
|
|
33321
33419
|
*
|
|
33322
33420
|
* `open` mirrors `deriveFindingStatus` — at-rest, minus resolved and dismissed —
|
|
33323
|
-
* so a row's count is exactly what `?status=open&type=<rule>` returns.
|
|
33324
|
-
*
|
|
33325
|
-
*
|
|
33326
|
-
*
|
|
33421
|
+
* so a row's count is exactly what `?status=open&type=<rule>` returns. It
|
|
33422
|
+
* differs from `severitySummary`'s `openAtRest` only in including untracked
|
|
33423
|
+
* legacy rows, which that bucket leaves out; dismissed is excluded from both.
|
|
33424
|
+
* Only this one has to match a link.
|
|
33327
33425
|
*
|
|
33328
33426
|
* Aggregated in SQL: the result is O(distinct rule × category × severity), so a
|
|
33329
33427
|
* whole-store scope costs a grouped scan rather than a row per finding.
|
|
@@ -33351,6 +33449,8 @@ var SqliteSecurityRepository = class {
|
|
|
33351
33449
|
/**
|
|
33352
33450
|
* The distinct `finding_key`s behind ONE rule's {@link recommendationInputs}
|
|
33353
33451
|
* tally — what a dashboard dismissal of that row writes a disposition for.
|
|
33452
|
+
* The dismissal itself does not call this: it reads the same set through
|
|
33453
|
+
* {@link selectOpenFindingKeysForRule}, inside its own write transaction.
|
|
33354
33454
|
*
|
|
33355
33455
|
* It shares {@link OPEN_AT_REST_FINDINGS_SQL} with the count rather than
|
|
33356
33456
|
* restating the predicate, because a dismissal has to act on exactly the set
|
|
@@ -33367,16 +33467,7 @@ var SqliteSecurityRepository = class {
|
|
|
33367
33467
|
* this set SMALLER than the tally, never larger.
|
|
33368
33468
|
*/
|
|
33369
33469
|
openFindingKeysForRule(ruleId) {
|
|
33370
|
-
|
|
33371
|
-
this.db.prepare(
|
|
33372
|
-
`SELECT DISTINCT f.finding_key AS finding_key
|
|
33373
|
-
${OPEN_AT_REST_FINDINGS_SQL}
|
|
33374
|
-
AND d.rule_id = :ruleId
|
|
33375
|
-
AND f.finding_key IS NOT NULL`
|
|
33376
|
-
),
|
|
33377
|
-
{ ruleId }
|
|
33378
|
-
);
|
|
33379
|
-
return Promise.resolve(rows.map((r) => r.finding_key));
|
|
33470
|
+
return Promise.resolve(selectOpenFindingKeysForRule(this.db, ruleId));
|
|
33380
33471
|
}
|
|
33381
33472
|
// Findings whose parent event occurred in [fromMs, toMs), with the parent's
|
|
33382
33473
|
// epoch-millis timestamp. started_at is an INTEGER column, so the bounds stay
|
|
@@ -34422,6 +34513,31 @@ function openLocalDatabase(dir, options = {}) {
|
|
|
34422
34513
|
);
|
|
34423
34514
|
});
|
|
34424
34515
|
}
|
|
34516
|
+
function dismissOpenFindingsForRule(ruleId, disposition) {
|
|
34517
|
+
let dismissed = 0;
|
|
34518
|
+
withTransaction(
|
|
34519
|
+
db,
|
|
34520
|
+
() => {
|
|
34521
|
+
const keys = selectOpenFindingKeysForRule(db, ruleId);
|
|
34522
|
+
resolutions.insertResolutions(
|
|
34523
|
+
keys.map((findingKey) => ({
|
|
34524
|
+
findingKey,
|
|
34525
|
+
status: "dismissed",
|
|
34526
|
+
method: disposition.method,
|
|
34527
|
+
resolvedAt: disposition.resolvedAt,
|
|
34528
|
+
evidence: disposition.evidence
|
|
34529
|
+
}))
|
|
34530
|
+
);
|
|
34531
|
+
dismissed = keys.length;
|
|
34532
|
+
},
|
|
34533
|
+
// IMMEDIATE takes the write lock at BEGIN, before the select, which is
|
|
34534
|
+
// what keeps a concurrent resolve out of the gap. It also makes waiting
|
|
34535
|
+
// on a busy writer an ordinary busy_timeout wait rather than a
|
|
34536
|
+
// read-to-write upgrade SQLite refuses to retry.
|
|
34537
|
+
"IMMEDIATE"
|
|
34538
|
+
);
|
|
34539
|
+
return dismissed;
|
|
34540
|
+
}
|
|
34425
34541
|
function recordCapture(event, detected) {
|
|
34426
34542
|
failOpenTransaction(db, () => {
|
|
34427
34543
|
const sessionId = event.metadata?.sessionId;
|
|
@@ -34605,6 +34721,7 @@ function openLocalDatabase(dir, options = {}) {
|
|
|
34605
34721
|
inspectionDefinitions,
|
|
34606
34722
|
inspectionFindings,
|
|
34607
34723
|
recordCapture,
|
|
34724
|
+
dismissOpenFindingsForRule,
|
|
34608
34725
|
markCaptureDelivered,
|
|
34609
34726
|
markCaptureOwed,
|
|
34610
34727
|
markAuditEventsDelivered,
|
|
@@ -34859,7 +34976,7 @@ async function send(options) {
|
|
|
34859
34976
|
}
|
|
34860
34977
|
}
|
|
34861
34978
|
};
|
|
34862
|
-
return new Promise((
|
|
34979
|
+
return new Promise((resolve3, reject) => {
|
|
34863
34980
|
let settled = false;
|
|
34864
34981
|
const fail = (reason, status) => {
|
|
34865
34982
|
if (settled) return;
|
|
@@ -34885,7 +35002,7 @@ async function send(options) {
|
|
|
34885
35002
|
res.on("end", () => {
|
|
34886
35003
|
if (settled) return;
|
|
34887
35004
|
settled = true;
|
|
34888
|
-
|
|
35005
|
+
resolve3({
|
|
34889
35006
|
status: res.statusCode ?? 0,
|
|
34890
35007
|
headers: res.headers,
|
|
34891
35008
|
body: Buffer.concat(chunks).toString("utf8")
|
|
@@ -35074,6 +35191,9 @@ function createRemoteClient(options) {
|
|
|
35074
35191
|
};
|
|
35075
35192
|
}
|
|
35076
35193
|
|
|
35194
|
+
// ../../packages/plugin-runtime/src/attached/with-timeout.ts
|
|
35195
|
+
var REQUEST_TIMEOUT_MS = 2e3;
|
|
35196
|
+
|
|
35077
35197
|
// ../../packages/plugin-runtime/src/attached/forward-drops.ts
|
|
35078
35198
|
import { readFileSync as readFileSync10 } from "fs";
|
|
35079
35199
|
import { join as join16 } from "path";
|
|
@@ -35706,6 +35826,10 @@ function escapeRegExp2(value) {
|
|
|
35706
35826
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
35707
35827
|
}
|
|
35708
35828
|
|
|
35829
|
+
// ../../packages/detections/src/format-chars.ts
|
|
35830
|
+
var HAS_FORMAT_CHAR = new RegExp("\\p{Cf}", "u");
|
|
35831
|
+
var FORMAT_CHAR_GLOBAL = new RegExp("\\p{Cf}", "gu");
|
|
35832
|
+
|
|
35709
35833
|
// ../../packages/detections/src/regex-cache.ts
|
|
35710
35834
|
var singles = /* @__PURE__ */ new WeakMap();
|
|
35711
35835
|
var keywordLists = /* @__PURE__ */ new WeakMap();
|
|
@@ -36726,13 +36850,18 @@ import { spawn } from "child_process";
|
|
|
36726
36850
|
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
36727
36851
|
var HISTORY_SYNC_THROTTLE_MS = 5 * 60 * 1e3;
|
|
36728
36852
|
|
|
36853
|
+
// ../../packages/plugin-runtime/src/attached/install-record.ts
|
|
36854
|
+
import { readFile as readFile2, stat } from "fs/promises";
|
|
36855
|
+
import { basename as basename6, dirname as dirname6, join as join28, resolve as resolve2 } from "path";
|
|
36856
|
+
|
|
36729
36857
|
// ../../packages/plugin-runtime/src/attached/plugin-block.ts
|
|
36730
36858
|
import { readFileSync as readFileSync18 } from "fs";
|
|
36859
|
+
var INSTALL_RECORD_READ_TIMEOUT_MS = REQUEST_TIMEOUT_MS / 2;
|
|
36731
36860
|
|
|
36732
36861
|
// ../../packages/plugin-runtime/src/attached/policy-store.ts
|
|
36733
36862
|
import { randomUUID as randomUUID16 } from "crypto";
|
|
36734
|
-
import { readFile as
|
|
36735
|
-
import { join as
|
|
36863
|
+
import { readFile as readFile3, rm, writeFile as writeFile2 } from "fs/promises";
|
|
36864
|
+
import { join as join29 } from "path";
|
|
36736
36865
|
|
|
36737
36866
|
// ../../packages/plugin-runtime/src/attached/atomic-publish.ts
|
|
36738
36867
|
import { rename as rename2 } from "fs/promises";
|
|
@@ -36742,7 +36871,7 @@ var ATTEMPTS = 1 + IMMEDIATE_RETRIES + TIMED_RETRIES;
|
|
|
36742
36871
|
|
|
36743
36872
|
// ../../packages/plugin-runtime/src/attached/posture-report-state.ts
|
|
36744
36873
|
import { readFileSync as readFileSync19 } from "fs";
|
|
36745
|
-
import { join as
|
|
36874
|
+
import { join as join30 } from "path";
|
|
36746
36875
|
var OUTCOME_KEYS = {
|
|
36747
36876
|
ok: true,
|
|
36748
36877
|
unauthorized: true,
|
|
@@ -36764,12 +36893,12 @@ import { DatabaseSync as DatabaseSync4 } from "node:sqlite";
|
|
|
36764
36893
|
|
|
36765
36894
|
// ../../packages/plugin-runtime/src/attached/posture-store.ts
|
|
36766
36895
|
import { randomUUID as randomUUID17 } from "crypto";
|
|
36767
|
-
import { readFile as
|
|
36768
|
-
import { join as
|
|
36896
|
+
import { readFile as readFile4, rm as rm2, writeFile as writeFile3 } from "fs/promises";
|
|
36897
|
+
import { join as join31 } from "path";
|
|
36769
36898
|
|
|
36770
36899
|
// ../../packages/plugin-runtime/src/attached/sync-state.ts
|
|
36771
36900
|
import { readFileSync as readFileSync20 } from "fs";
|
|
36772
|
-
import { join as
|
|
36901
|
+
import { join as join32 } from "path";
|
|
36773
36902
|
|
|
36774
36903
|
// ../../packages/plugin-runtime/src/attached/status.ts
|
|
36775
36904
|
var REFUSAL_LINES = {
|