@pensar/apex 2.5.0-canary.dc18c30d → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/agent-13rrhp8d.js +20 -0
- package/build/{agent-3g5qbz7d.js → agent-m30a62kh.js} +7 -7
- package/build/{agent-738z02m7.js → agent-zbj2331s.js} +9 -9
- package/build/{apps-s69dj8c7.js → apps-x4ef2gpc.js} +16 -16
- package/build/{auth-xs07jrb0.js → auth-7ay8qgxm.js} +16 -16
- package/build/authentication-f4j3w5vs.js +20 -0
- package/build/blackboxAgent-v2vx9ws4.js +20 -0
- package/build/{blackboxPentest-st70s9kr.js → blackboxPentest-w5nwzpvk.js} +14 -14
- package/build/{cli-92bftab6.js → cli-3py0a0wg.js} +2 -2
- package/build/{cli-26a655er.js → cli-5wemv37a.js} +1 -1
- package/build/{cli-1mrghzfy.js → cli-73k43t1r.js} +2 -2
- package/build/{cli-a8mnvnzp.js → cli-7s062hr6.js} +1 -1
- package/build/{cli-hyd91r96.js → cli-7vg06q5r.js} +2 -2
- package/build/{cli-wv1gx12x.js → cli-9qbxkhye.js} +1 -1
- package/build/{cli-y66jze9w.js → cli-bw2ddttk.js} +3 -3
- package/build/{cli-a59s1a83.js → cli-g3czc3jz.js} +1 -1
- package/build/{cli-pw0vvjkj.js → cli-kff2bbq7.js} +1 -1
- package/build/{cli-w5jw69y5.js → cli-p4r7q012.js} +26 -5
- package/build/{cli-jd64mnsk.js → cli-sx3jkv7p.js} +19 -14
- package/build/{cli-fw6bvnen.js → cli-vkbzcnw1.js} +2 -2
- package/build/{cli-32tzsffh.js → cli-ww7hbazg.js} +1 -1
- package/build/{cli-9vt9tbzx.js → cli-x92fkt2f.js} +3 -3
- package/build/{cli-tz7zjrgy.js → cli-y3dpm18e.js} +3 -3
- package/build/{cli-2h9b59hz.js → cli-z5c0ypg1.js} +1 -1
- package/build/{cli-20rmgbha.js → cli-zav1yx5k.js} +8 -8
- package/build/cli.js +135 -47
- package/build/{config-g78qzfd3.js → config-4kzh88xz.js} +3 -3
- package/build/{doctor-1fdtbrxy.js → doctor-rz7sx6ev.js} +6 -6
- package/build/{fastStrike-ba8rbefz.js → fastStrike-a54atjc8.js} +9 -9
- package/build/{fixes-fnspmg1q.js → fixes-fv66yn1z.js} +16 -16
- package/build/{index-bp5d5r8a.js → index-18vyy6mj.js} +2 -2
- package/build/{index-2b5d0bpd.js → index-e23zc8g4.js} +9 -9
- package/build/{index-sddxe3hz.js → index-fpwr10qm.js} +123 -56
- package/build/{index-vg7j610z.js → index-hnwhswqj.js} +8 -8
- package/build/{index-v9hcyzb3.js → index-kyd1jm89.js} +6 -6
- package/build/{index-3b4hvxc0.js → index-wkmnr4nm.js} +4 -4
- package/build/{index-x49qc5g5.js → index-ywmfnd30.js} +3 -3
- package/build/{issues-rbjm5qkp.js → issues-019678t0.js} +16 -16
- package/build/{logs-7v9t93a3.js → logs-wzr5176k.js} +16 -16
- package/build/{offesecAgent-hbhcrx3d.js → offesecAgent-c97pqzcn.js} +8 -8
- package/build/pentest-4p5jt7gj.js +30 -0
- package/build/{pentests-6emm8686.js → pentests-v98eg8n3.js} +16 -16
- package/build/{targetedPentest-z511k4et.js → targetedPentest-tdwtgmxm.js} +9 -9
- package/build/{targets-kz6dhxdy.js → targets-763n91t7.js} +16 -16
- package/build/threatModel-81d4rcbk.js +29 -0
- package/build/{uninstall-gtfcwax0.js → uninstall-d33159cz.js} +1 -1
- package/build/{upload-qyq7hjdj.js → upload-9qj1kpt9.js} +6 -6
- package/build/{utils-xa082yn9.js → utils-t7gc2903.js} +5 -5
- package/package.json +1 -1
- package/build/agent-yyf75hsw.js +0 -20
- package/build/authentication-pcvj2jnk.js +0 -20
- package/build/blackboxAgent-edk6v708.js +0 -20
- package/build/pentest-2f1ab2ce.js +0 -30
- package/build/threatModel-br10jtzd.js +0 -29
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-sx3jkv7p.js";
|
|
4
4
|
import {
|
|
5
5
|
detectOSAndEnhancePrompt
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-5wemv37a.js";
|
|
7
7
|
import {
|
|
8
8
|
hasToolCall,
|
|
9
9
|
init_dist,
|
|
10
10
|
stepCountIs
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-p4r7q012.js";
|
|
12
12
|
|
|
13
13
|
// src/core/agents/specialized/attackSurface/blackboxAgent.ts
|
|
14
14
|
init_dist();
|
|
@@ -5,24 +5,24 @@ import {
|
|
|
5
5
|
WHITEBOX_APPS_DISCOVERY_SYSTEM_PROMPT,
|
|
6
6
|
WHITEBOX_DISCOVERY_SYSTEM_PROMPT,
|
|
7
7
|
WHITEBOX_ENDPOINT_DOCUMENTATION_SYSTEM_PROMPT
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-7vg06q5r.js";
|
|
9
9
|
import {
|
|
10
10
|
BlackboxAttackSurfaceAgent
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-y3dpm18e.js";
|
|
12
12
|
import {
|
|
13
13
|
TargetedPentestAgent,
|
|
14
14
|
buildPentestSystemPrompt
|
|
15
|
-
} from "./cli-
|
|
15
|
+
} from "./cli-3py0a0wg.js";
|
|
16
16
|
import {
|
|
17
17
|
REPORT_FILENAME_JSON,
|
|
18
18
|
REPORT_FILENAME_MD,
|
|
19
19
|
buildPentestReport,
|
|
20
20
|
renderJson,
|
|
21
21
|
renderMarkdown
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-vkbzcnw1.js";
|
|
23
23
|
import {
|
|
24
24
|
CodeAgent
|
|
25
|
-
} from "./cli-
|
|
25
|
+
} from "./cli-73k43t1r.js";
|
|
26
26
|
import {
|
|
27
27
|
FindingsRegistry,
|
|
28
28
|
OffensiveSecurityAgent,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
pLimit,
|
|
32
32
|
runWithBoundedConcurrency,
|
|
33
33
|
toGrpcPentestContext
|
|
34
|
-
} from "./cli-
|
|
34
|
+
} from "./cli-sx3jkv7p.js";
|
|
35
35
|
import {
|
|
36
36
|
createThreatModelPrompt
|
|
37
37
|
} from "./cli-fw5r7pfj.js";
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
init_structured,
|
|
46
46
|
newSessionId,
|
|
47
47
|
scopedLogger
|
|
48
|
-
} from "./cli-
|
|
48
|
+
} from "./cli-p4r7q012.js";
|
|
49
49
|
import {
|
|
50
50
|
__require
|
|
51
51
|
} from "./cli-bc05qbss.js";
|
|
@@ -7815,7 +7815,7 @@ async function runPentestSwarm(input) {
|
|
|
7815
7815
|
}
|
|
7816
7816
|
async function runPentestWorkflow(input) {
|
|
7817
7817
|
if (input.fastStrike) {
|
|
7818
|
-
const { runFastStrike } = await import("./fastStrike-
|
|
7818
|
+
const { runFastStrike } = await import("./fastStrike-a54atjc8.js");
|
|
7819
7819
|
return runFastStrike(input);
|
|
7820
7820
|
}
|
|
7821
7821
|
const {
|
package/build/cli.js
CHANGED
|
@@ -16,6 +16,8 @@ import {
|
|
|
16
16
|
import"./cli-c8131c4q.js";
|
|
17
17
|
import {
|
|
18
18
|
buildAuthConfig,
|
|
19
|
+
endAllActiveRootSpans,
|
|
20
|
+
init_active_root_spans,
|
|
19
21
|
init_ai1 as init_ai,
|
|
20
22
|
init_model_history,
|
|
21
23
|
init_models,
|
|
@@ -24,18 +26,18 @@ import {
|
|
|
24
26
|
init_toolset,
|
|
25
27
|
init_utils,
|
|
26
28
|
logger
|
|
27
|
-
} from "./cli-
|
|
28
|
-
import"./cli-
|
|
29
|
+
} from "./cli-p4r7q012.js";
|
|
30
|
+
import"./cli-kff2bbq7.js";
|
|
29
31
|
import"./cli-avmhkjtv.js";
|
|
30
32
|
import"./cli-j54qa6tm.js";
|
|
31
|
-
import"./cli-
|
|
32
|
-
import"./cli-
|
|
33
|
+
import"./cli-7s062hr6.js";
|
|
34
|
+
import"./cli-ww7hbazg.js";
|
|
33
35
|
import {
|
|
34
36
|
init_installation,
|
|
35
37
|
init_package,
|
|
36
38
|
package_default,
|
|
37
39
|
version
|
|
38
|
-
} from "./cli-
|
|
40
|
+
} from "./cli-g3czc3jz.js";
|
|
39
41
|
import {
|
|
40
42
|
require_src
|
|
41
43
|
} from "./cli-knd276ed.js";
|
|
@@ -488,7 +490,7 @@ var package_default2 = {
|
|
|
488
490
|
tsc: "tsc --noEmit"
|
|
489
491
|
},
|
|
490
492
|
type: "module",
|
|
491
|
-
version: "2.5.0
|
|
493
|
+
version: "2.5.0"
|
|
492
494
|
};
|
|
493
495
|
|
|
494
496
|
// src/core/ai/index.ts
|
|
@@ -869,6 +871,7 @@ var ERROR_LOG_PATH = path.join(os.homedir(), ".pensar", "error.log");
|
|
|
869
871
|
|
|
870
872
|
// src/core/observability/runtime.ts
|
|
871
873
|
init_package();
|
|
874
|
+
init_active_root_spans();
|
|
872
875
|
var import_api = __toESM(require_src(), 1);
|
|
873
876
|
var import_context_async_hooks = __toESM(require_src2(), 1);
|
|
874
877
|
var import_exporter_trace_otlp_http = __toESM(require_src6(), 1);
|
|
@@ -878,9 +881,26 @@ var import_otlp_transformer = __toESM(require_src5(), 1);
|
|
|
878
881
|
var import_resources = __toESM(require_src4(), 1);
|
|
879
882
|
var import_sdk_trace_base = __toESM(require_index_shim(), 1);
|
|
880
883
|
import { randomUUID } from "node:crypto";
|
|
884
|
+
var DEFAULT_SHUTDOWN_TIMEOUT_MS = 5000;
|
|
885
|
+
function withTimeout(promise, timeoutMs) {
|
|
886
|
+
return new Promise((resolve) => {
|
|
887
|
+
let settled = false;
|
|
888
|
+
const settle = (result) => {
|
|
889
|
+
if (settled)
|
|
890
|
+
return;
|
|
891
|
+
settled = true;
|
|
892
|
+
clearTimeout(timer);
|
|
893
|
+
resolve(result);
|
|
894
|
+
};
|
|
895
|
+
const timer = setTimeout(() => settle("timed-out"), timeoutMs);
|
|
896
|
+
promise.then(() => settle("completed"), () => settle("completed"));
|
|
897
|
+
});
|
|
898
|
+
}
|
|
881
899
|
var NOOP_RUNTIME = {
|
|
882
900
|
async forceFlush() {},
|
|
883
|
-
async shutdown() {
|
|
901
|
+
async shutdown() {
|
|
902
|
+
return "completed";
|
|
903
|
+
}
|
|
884
904
|
};
|
|
885
905
|
function isOtelSdkDisabled(env) {
|
|
886
906
|
return env.OTEL_SDK_DISABLED === "true";
|
|
@@ -932,37 +952,95 @@ function createTraceExporter(protocol) {
|
|
|
932
952
|
}), import_otlp_transformer.ProtobufTraceSerializer, "otlp_http_span_exporter", import_otlp_transformer.TraceExporterMetricsHelper, undefined));
|
|
933
953
|
}
|
|
934
954
|
var activeRuntime = null;
|
|
935
|
-
function startObservabilityRuntime(env = process.env) {
|
|
955
|
+
function startObservabilityRuntime(env = process.env, opts) {
|
|
936
956
|
if (activeRuntime)
|
|
937
957
|
return activeRuntime;
|
|
938
958
|
if (isOtelSdkDisabled(env))
|
|
939
959
|
return NOOP_RUNTIME;
|
|
940
960
|
if (!resolveTracesEndpoint(env))
|
|
941
961
|
return NOOP_RUNTIME;
|
|
962
|
+
const shutdownTimeoutMs = opts?.shutdownTimeoutMs ?? DEFAULT_SHUTDOWN_TIMEOUT_MS;
|
|
942
963
|
const exporter = createTraceExporter(resolveTracesProtocol(env));
|
|
943
964
|
const provider = new import_sdk_trace_base.BasicTracerProvider({
|
|
944
965
|
resource: buildResource(env),
|
|
945
|
-
spanProcessors: [new import_sdk_trace_base.BatchSpanProcessor(exporter)]
|
|
966
|
+
spanProcessors: opts?.spanProcessors ?? [new import_sdk_trace_base.BatchSpanProcessor(exporter)]
|
|
946
967
|
});
|
|
947
968
|
const contextManager = new import_context_async_hooks.AsyncLocalStorageContextManager;
|
|
948
969
|
contextManager.enable();
|
|
949
970
|
import_api.trace.setGlobalTracerProvider(provider);
|
|
950
971
|
import_api.context.setGlobalContextManager(contextManager);
|
|
972
|
+
let shutdownPromise = null;
|
|
951
973
|
const runtime = {
|
|
952
974
|
async forceFlush() {
|
|
953
975
|
await provider.forceFlush();
|
|
954
976
|
},
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
977
|
+
shutdown() {
|
|
978
|
+
if (!shutdownPromise) {
|
|
979
|
+
const shutdownWork = (async () => {
|
|
980
|
+
endAllActiveRootSpans();
|
|
981
|
+
try {
|
|
982
|
+
await provider.forceFlush();
|
|
983
|
+
} finally {
|
|
984
|
+
await provider.shutdown();
|
|
985
|
+
}
|
|
986
|
+
})();
|
|
987
|
+
shutdownPromise = withTimeout(shutdownWork, shutdownTimeoutMs).then((result) => {
|
|
988
|
+
contextManager.disable();
|
|
989
|
+
import_api.trace.disable();
|
|
990
|
+
import_api.context.disable();
|
|
991
|
+
return result;
|
|
992
|
+
}).finally(() => {
|
|
993
|
+
activeRuntime = null;
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
return shutdownPromise;
|
|
961
997
|
}
|
|
962
998
|
};
|
|
963
999
|
activeRuntime = runtime;
|
|
964
1000
|
return runtime;
|
|
965
1001
|
}
|
|
1002
|
+
function installObservabilityExitHandlers(runtime, opts) {
|
|
1003
|
+
let exitPromise = null;
|
|
1004
|
+
let exitCode = 0;
|
|
1005
|
+
let fatalSeen = false;
|
|
1006
|
+
const reportError = (error, source) => {
|
|
1007
|
+
try {
|
|
1008
|
+
opts?.onError?.(error, source);
|
|
1009
|
+
} catch {}
|
|
1010
|
+
};
|
|
1011
|
+
const exitWith = (code, error, source) => {
|
|
1012
|
+
let pendingReport = null;
|
|
1013
|
+
if (error !== undefined && !fatalSeen) {
|
|
1014
|
+
fatalSeen = true;
|
|
1015
|
+
exitCode = 1;
|
|
1016
|
+
const fatalSource = source ?? "uncaughtException";
|
|
1017
|
+
pendingReport = () => reportError(error, fatalSource);
|
|
1018
|
+
} else if (!fatalSeen && exitCode === 0) {
|
|
1019
|
+
exitCode = code;
|
|
1020
|
+
}
|
|
1021
|
+
if (exitPromise) {
|
|
1022
|
+
pendingReport?.();
|
|
1023
|
+
return exitPromise;
|
|
1024
|
+
}
|
|
1025
|
+
try {
|
|
1026
|
+
opts?.cleanup?.(code);
|
|
1027
|
+
} catch (cleanupError) {
|
|
1028
|
+
if (!fatalSeen) {
|
|
1029
|
+
fatalSeen = true;
|
|
1030
|
+
exitCode = 1;
|
|
1031
|
+
pendingReport = () => reportError(cleanupError, "uncaughtException");
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
pendingReport?.();
|
|
1035
|
+
exitPromise = runtime.shutdown().catch(() => {}).then(() => process.exit(exitCode));
|
|
1036
|
+
return exitPromise;
|
|
1037
|
+
};
|
|
1038
|
+
process.on("SIGINT", () => void exitWith(130));
|
|
1039
|
+
process.on("SIGTERM", () => void exitWith(143));
|
|
1040
|
+
process.on("uncaughtException", (error) => void exitWith(1, error, "uncaughtException"));
|
|
1041
|
+
process.on("unhandledRejection", (reason) => void exitWith(1, reason, "unhandledRejection"));
|
|
1042
|
+
return exitWith;
|
|
1043
|
+
}
|
|
966
1044
|
|
|
967
1045
|
// src/tui/utils/command-flags.ts
|
|
968
1046
|
import { readFileSync } from "node:fs";
|
|
@@ -1049,7 +1127,7 @@ function attachCliAgentStreamListeners(bus) {
|
|
|
1049
1127
|
async function createInstrumentedBus(session) {
|
|
1050
1128
|
const bus = new AgentEventBus;
|
|
1051
1129
|
attachCliAgentStreamListeners(bus);
|
|
1052
|
-
const { attachWandbToEventBus } = await import("./upload-
|
|
1130
|
+
const { attachWandbToEventBus } = await import("./upload-9qj1kpt9.js");
|
|
1053
1131
|
const wandbCleanup = await attachWandbToEventBus(session, bus).catch((e) => {
|
|
1054
1132
|
console.warn("[wandb] Tracing disabled:", e.message);
|
|
1055
1133
|
return null;
|
|
@@ -1066,7 +1144,7 @@ async function resolveCliHeaders() {
|
|
|
1066
1144
|
const { parseHeaderLine: parseHeaderLine2, parseHeadersFromFile, formatParseError: formatParseError2 } = await import("./parse-rtccymzn.js");
|
|
1067
1145
|
const merged = {};
|
|
1068
1146
|
if (!noGlobal) {
|
|
1069
|
-
const { config: appConfig } = await import("./index-
|
|
1147
|
+
const { config: appConfig } = await import("./index-18vyy6mj.js");
|
|
1070
1148
|
const cfg = await appConfig.get();
|
|
1071
1149
|
if (cfg.defaultHeaders) {
|
|
1072
1150
|
Object.assign(merged, cfg.defaultHeaders);
|
|
@@ -1100,8 +1178,8 @@ async function resolveCliModel() {
|
|
|
1100
1178
|
const explicit = getArg("--model");
|
|
1101
1179
|
if (explicit)
|
|
1102
1180
|
return explicit;
|
|
1103
|
-
const { config: appConfig } = await import("./index-
|
|
1104
|
-
const { getDefaultModelForConfig } = await import("./utils-
|
|
1181
|
+
const { config: appConfig } = await import("./index-18vyy6mj.js");
|
|
1182
|
+
const { getDefaultModelForConfig } = await import("./utils-t7gc2903.js");
|
|
1105
1183
|
const pensarConfig = await appConfig.get();
|
|
1106
1184
|
const defaultModel = getDefaultModelForConfig(pensarConfig);
|
|
1107
1185
|
if (!defaultModel) {
|
|
@@ -1188,9 +1266,9 @@ Global options:
|
|
|
1188
1266
|
`);
|
|
1189
1267
|
}
|
|
1190
1268
|
async function runPentest() {
|
|
1191
|
-
const { runPentestAgent } = await import("./blackboxPentest-
|
|
1192
|
-
const { sessions: sessions2 } = await import("./index-
|
|
1193
|
-
const { config: appConfig } = await import("./index-
|
|
1269
|
+
const { runPentestAgent } = await import("./blackboxPentest-w5nwzpvk.js");
|
|
1270
|
+
const { sessions: sessions2 } = await import("./index-kyd1jm89.js");
|
|
1271
|
+
const { config: appConfig } = await import("./index-18vyy6mj.js");
|
|
1194
1272
|
const target = getArgRequired("--target");
|
|
1195
1273
|
const cwd = getArg("--cwd");
|
|
1196
1274
|
const mode = getArg("--mode");
|
|
@@ -1263,9 +1341,9 @@ Report: ${reportPath}` : ""}`);
|
|
|
1263
1341
|
}
|
|
1264
1342
|
}
|
|
1265
1343
|
async function runTargetedPentest() {
|
|
1266
|
-
const { runTargetedPentestAgent } = await import("./targetedPentest-
|
|
1267
|
-
const { sessions: sessions2 } = await import("./index-
|
|
1268
|
-
const { config: appConfig } = await import("./index-
|
|
1344
|
+
const { runTargetedPentestAgent } = await import("./targetedPentest-tdwtgmxm.js");
|
|
1345
|
+
const { sessions: sessions2 } = await import("./index-kyd1jm89.js");
|
|
1346
|
+
const { config: appConfig } = await import("./index-18vyy6mj.js");
|
|
1269
1347
|
const target = getArgRequired("--target");
|
|
1270
1348
|
const objectives = getAllArgs("--objective");
|
|
1271
1349
|
const pensarConfig = await appConfig.get();
|
|
@@ -1314,8 +1392,8 @@ POCs: ${pocsPath}`);
|
|
|
1314
1392
|
}
|
|
1315
1393
|
}
|
|
1316
1394
|
async function runThreatModel() {
|
|
1317
|
-
const { runThreatModelWorkflow } = await import("./threatModel-
|
|
1318
|
-
const { config: appConfig } = await import("./index-
|
|
1395
|
+
const { runThreatModelWorkflow } = await import("./threatModel-81d4rcbk.js");
|
|
1396
|
+
const { config: appConfig } = await import("./index-18vyy6mj.js");
|
|
1319
1397
|
const path2 = await import("path");
|
|
1320
1398
|
const pensarConfig = await appConfig.get();
|
|
1321
1399
|
const model = await resolveCliModel();
|
|
@@ -1349,10 +1427,10 @@ ${sep}
|
|
|
1349
1427
|
Threat model written to: ${resolvedPath}`);
|
|
1350
1428
|
}
|
|
1351
1429
|
async function runOperator() {
|
|
1352
|
-
const { runOffensiveSecurityAgent } = await import("./offesecAgent-
|
|
1353
|
-
const { sessions: sessions2, normalizeMessages, getResumeMessages } = await import("./index-
|
|
1354
|
-
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-
|
|
1355
|
-
const { config: appConfig } = await import("./index-
|
|
1430
|
+
const { runOffensiveSecurityAgent } = await import("./offesecAgent-c97pqzcn.js");
|
|
1431
|
+
const { sessions: sessions2, normalizeMessages, getResumeMessages } = await import("./index-kyd1jm89.js");
|
|
1432
|
+
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-hnwhswqj.js");
|
|
1433
|
+
const { config: appConfig } = await import("./index-18vyy6mj.js");
|
|
1356
1434
|
const { createInterface } = await import("readline");
|
|
1357
1435
|
const { readFileSync: readFileSync2, existsSync } = await import("fs");
|
|
1358
1436
|
const path2 = await import("path");
|
|
@@ -1453,6 +1531,11 @@ ${result.message}`);
|
|
|
1453
1531
|
process.exit(result.success ? 0 : 1);
|
|
1454
1532
|
}
|
|
1455
1533
|
var observabilityRuntime = startObservabilityRuntime();
|
|
1534
|
+
var exitAfterObservabilityShutdown = args.length !== 0 ? installObservabilityExitHandlers(observabilityRuntime, {
|
|
1535
|
+
onError: (error) => {
|
|
1536
|
+
console.error("Uncaught exception:", error);
|
|
1537
|
+
}
|
|
1538
|
+
}) : null;
|
|
1456
1539
|
setCurrentCommand(command);
|
|
1457
1540
|
try {
|
|
1458
1541
|
if (hasFlag("-p") || command === "--prompt") {
|
|
@@ -1469,35 +1552,35 @@ try {
|
|
|
1469
1552
|
await runTargetedPentest();
|
|
1470
1553
|
} else if (command === "login" || command === "auth") {
|
|
1471
1554
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1472
|
-
await import("./auth-
|
|
1555
|
+
await import("./auth-7ay8qgxm.js");
|
|
1473
1556
|
} else if (command === "uninstall") {
|
|
1474
1557
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1475
|
-
await import("./uninstall-
|
|
1558
|
+
await import("./uninstall-d33159cz.js");
|
|
1476
1559
|
} else if (command === "apps") {
|
|
1477
1560
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1478
|
-
await import("./apps-
|
|
1561
|
+
await import("./apps-x4ef2gpc.js");
|
|
1479
1562
|
} else if (command === "pentests") {
|
|
1480
1563
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1481
|
-
await import("./pentests-
|
|
1564
|
+
await import("./pentests-v98eg8n3.js");
|
|
1482
1565
|
} else if (command === "targets") {
|
|
1483
1566
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1484
|
-
await import("./targets-
|
|
1567
|
+
await import("./targets-763n91t7.js");
|
|
1485
1568
|
} else if (command === "issues") {
|
|
1486
1569
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1487
|
-
await import("./issues-
|
|
1570
|
+
await import("./issues-019678t0.js");
|
|
1488
1571
|
} else if (command === "fixes") {
|
|
1489
1572
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1490
|
-
await import("./fixes-
|
|
1573
|
+
await import("./fixes-fv66yn1z.js");
|
|
1491
1574
|
} else if (command === "logs") {
|
|
1492
1575
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1493
|
-
await import("./logs-
|
|
1576
|
+
await import("./logs-wzr5176k.js");
|
|
1494
1577
|
} else if (command === "config") {
|
|
1495
1578
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1496
|
-
await import("./config-
|
|
1579
|
+
await import("./config-4kzh88xz.js");
|
|
1497
1580
|
} else if (command === "threat-model") {
|
|
1498
1581
|
await runThreatModel();
|
|
1499
1582
|
} else if (command === "doctor") {
|
|
1500
|
-
const { runDoctor } = await import("./doctor-
|
|
1583
|
+
const { runDoctor } = await import("./doctor-rz7sx6ev.js");
|
|
1501
1584
|
await runDoctor();
|
|
1502
1585
|
} else if (args.length === 0) {
|
|
1503
1586
|
if (process.env.PENSAR_NO_TUI === "1") {
|
|
@@ -1505,18 +1588,23 @@ try {
|
|
|
1505
1588
|
console.error("All other commands work with Node \u2014 run 'pensar --help'.");
|
|
1506
1589
|
process.exit(1);
|
|
1507
1590
|
}
|
|
1508
|
-
await import("./index-
|
|
1591
|
+
await import("./index-fpwr10qm.js");
|
|
1509
1592
|
} else {
|
|
1510
1593
|
console.error(`Error: Unknown command '${command}'`);
|
|
1511
1594
|
console.error();
|
|
1512
1595
|
console.error("Run 'pensar --help' for usage information");
|
|
1513
1596
|
process.exit(1);
|
|
1514
1597
|
}
|
|
1598
|
+
} catch (error) {
|
|
1599
|
+
if (exitAfterObservabilityShutdown !== null) {
|
|
1600
|
+
await exitAfterObservabilityShutdown(1, error, "uncaughtException");
|
|
1601
|
+
}
|
|
1602
|
+
throw error;
|
|
1515
1603
|
} finally {
|
|
1516
|
-
if (
|
|
1517
|
-
await observabilityRuntime.shutdown().catch(() =>
|
|
1604
|
+
if (exitAfterObservabilityShutdown !== null) {
|
|
1605
|
+
const shutdownResult = await observabilityRuntime.shutdown().catch(() => "completed");
|
|
1606
|
+
if (shutdownResult === "timed-out" || command === "pentest" || command === "targeted-pentest") {
|
|
1607
|
+
await exitAfterObservabilityShutdown(typeof process.exitCode === "number" ? process.exitCode : 0);
|
|
1608
|
+
}
|
|
1518
1609
|
}
|
|
1519
1610
|
}
|
|
1520
|
-
if (command === "pentest" || command === "targeted-pentest") {
|
|
1521
|
-
process.exit(0);
|
|
1522
|
-
}
|
|
@@ -14,9 +14,9 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
config,
|
|
16
16
|
init_config
|
|
17
|
-
} from "./cli-
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
17
|
+
} from "./cli-7s062hr6.js";
|
|
18
|
+
import"./cli-ww7hbazg.js";
|
|
19
|
+
import"./cli-g3czc3jz.js";
|
|
20
20
|
import"./cli-bc05qbss.js";
|
|
21
21
|
|
|
22
22
|
// src/cli/config.ts
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toolExists
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
3
|
+
} from "./cli-5wemv37a.js";
|
|
4
|
+
import"./cli-p4r7q012.js";
|
|
5
|
+
import"./cli-kff2bbq7.js";
|
|
6
6
|
import"./cli-avmhkjtv.js";
|
|
7
7
|
import"./cli-j54qa6tm.js";
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
10
|
-
import"./cli-
|
|
8
|
+
import"./cli-7s062hr6.js";
|
|
9
|
+
import"./cli-ww7hbazg.js";
|
|
10
|
+
import"./cli-g3czc3jz.js";
|
|
11
11
|
import"./cli-knd276ed.js";
|
|
12
12
|
import"./cli-bc05qbss.js";
|
|
13
13
|
|
|
@@ -4,28 +4,28 @@ import {
|
|
|
4
4
|
buildPentestReport,
|
|
5
5
|
renderJson,
|
|
6
6
|
renderMarkdown
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-vkbzcnw1.js";
|
|
8
8
|
import"./cli-9fsre5pt.js";
|
|
9
|
-
import"./cli-
|
|
9
|
+
import"./cli-9qbxkhye.js";
|
|
10
10
|
import {
|
|
11
11
|
FindingsRegistry,
|
|
12
12
|
OffensiveSecurityAgent
|
|
13
|
-
} from "./cli-
|
|
14
|
-
import"./cli-
|
|
13
|
+
} from "./cli-sx3jkv7p.js";
|
|
14
|
+
import"./cli-5wemv37a.js";
|
|
15
15
|
import {
|
|
16
16
|
createThreatModelPrompt
|
|
17
17
|
} from "./cli-fw5r7pfj.js";
|
|
18
18
|
import"./cli-c8131c4q.js";
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
19
|
+
import"./cli-p4r7q012.js";
|
|
20
|
+
import"./cli-kff2bbq7.js";
|
|
21
21
|
import {
|
|
22
22
|
exports_external,
|
|
23
23
|
init_zod
|
|
24
24
|
} from "./cli-avmhkjtv.js";
|
|
25
25
|
import"./cli-j54qa6tm.js";
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
26
|
+
import"./cli-7s062hr6.js";
|
|
27
|
+
import"./cli-ww7hbazg.js";
|
|
28
|
+
import"./cli-g3czc3jz.js";
|
|
29
29
|
import"./cli-knd276ed.js";
|
|
30
30
|
import"./cli-bc05qbss.js";
|
|
31
31
|
|
|
@@ -5,28 +5,28 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
getFix,
|
|
7
7
|
listFixes
|
|
8
|
-
} from "./cli-
|
|
8
|
+
} from "./cli-bw2ddttk.js";
|
|
9
9
|
import"./cli-9pbk8m32.js";
|
|
10
|
-
import"./cli-
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
10
|
+
import"./cli-zav1yx5k.js";
|
|
11
|
+
import"./cli-7vg06q5r.js";
|
|
12
|
+
import"./cli-y3dpm18e.js";
|
|
13
|
+
import"./cli-3py0a0wg.js";
|
|
14
|
+
import"./cli-vkbzcnw1.js";
|
|
15
|
+
import"./cli-x92fkt2f.js";
|
|
16
|
+
import"./cli-73k43t1r.js";
|
|
17
17
|
import"./cli-9fsre5pt.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
20
|
-
import"./cli-
|
|
18
|
+
import"./cli-9qbxkhye.js";
|
|
19
|
+
import"./cli-sx3jkv7p.js";
|
|
20
|
+
import"./cli-5wemv37a.js";
|
|
21
21
|
import"./cli-fw5r7pfj.js";
|
|
22
22
|
import"./cli-c8131c4q.js";
|
|
23
|
-
import"./cli-
|
|
24
|
-
import"./cli-
|
|
23
|
+
import"./cli-p4r7q012.js";
|
|
24
|
+
import"./cli-kff2bbq7.js";
|
|
25
25
|
import"./cli-avmhkjtv.js";
|
|
26
26
|
import"./cli-j54qa6tm.js";
|
|
27
|
-
import"./cli-
|
|
28
|
-
import"./cli-
|
|
29
|
-
import"./cli-
|
|
27
|
+
import"./cli-7s062hr6.js";
|
|
28
|
+
import"./cli-ww7hbazg.js";
|
|
29
|
+
import"./cli-g3czc3jz.js";
|
|
30
30
|
import"./cli-knd276ed.js";
|
|
31
31
|
import"./cli-bc05qbss.js";
|
|
32
32
|
|
|
@@ -7,19 +7,19 @@ import {
|
|
|
7
7
|
WHITEBOX_APPS_DISCOVERY_SYSTEM_PROMPT,
|
|
8
8
|
WHITEBOX_DISCOVERY_SYSTEM_PROMPT,
|
|
9
9
|
WhiteboxAttackSurfaceAgent
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-7vg06q5r.js";
|
|
11
11
|
import"./cli-9fsre5pt.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
14
|
-
import"./cli-
|
|
12
|
+
import"./cli-9qbxkhye.js";
|
|
13
|
+
import"./cli-sx3jkv7p.js";
|
|
14
|
+
import"./cli-5wemv37a.js";
|
|
15
15
|
import"./cli-c8131c4q.js";
|
|
16
|
-
import"./cli-
|
|
17
|
-
import"./cli-
|
|
16
|
+
import"./cli-p4r7q012.js";
|
|
17
|
+
import"./cli-kff2bbq7.js";
|
|
18
18
|
import"./cli-avmhkjtv.js";
|
|
19
19
|
import"./cli-j54qa6tm.js";
|
|
20
|
-
import"./cli-
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
20
|
+
import"./cli-7s062hr6.js";
|
|
21
|
+
import"./cli-ww7hbazg.js";
|
|
22
|
+
import"./cli-g3czc3jz.js";
|
|
23
23
|
import"./cli-knd276ed.js";
|
|
24
24
|
import"./cli-bc05qbss.js";
|
|
25
25
|
export {
|