@pensar/apex 2.1.2 → 2.1.3-canary.9978c1ae
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-brysbb20.js +19 -0
- package/build/{agent-737mxp3v.js → agent-gf41p56q.js} +8 -8
- package/build/{agent-vdrtakz4.js → agent-yz2ygex0.js} +10 -10
- package/build/{apps-j0bwey0w.js → apps-yzmjmpf9.js} +16 -16
- package/build/{auth-5stxpmga.js → auth-p29y3nzn.js} +16 -16
- package/build/authentication-mh5ymtgy.js +19 -0
- package/build/blackboxAgent-3z0r12m0.js +19 -0
- package/build/{blackboxPentest-2edr9rj3.js → blackboxPentest-dg3b1t6b.js} +14 -14
- package/build/{cli-v1aqbv58.js → cli-1xx6s4nh.js} +24882 -26968
- package/build/{cli-9z6vwf30.js → cli-24mzbewx.js} +1 -1
- package/build/{cli-f7d23ded.js → cli-29yqhrjq.js} +936 -1775
- package/build/{cli-gbkj2has.js → cli-366c64xy.js} +3 -3
- package/build/{cli-0gk2x2sc.js → cli-704tt332.js} +3 -3
- package/build/{cli-xnnkeg5p.js → cli-80jkzpct.js} +1 -1
- package/build/{cli-yjbkaqvy.js → cli-bpcymyg8.js} +43 -13
- package/build/{cli-tw3fe8bj.js → cli-d4bn60j7.js} +2 -2
- package/build/{cli-ks60cc3h.js → cli-dgyyj1b0.js} +30 -30
- package/build/{cli-6vs0mtsb.js → cli-ecp92fqe.js} +2 -2
- package/build/{cli-6wwpk9d9.js → cli-fex1cvdc.js} +1 -1
- package/build/{cli-35czfv00.js → cli-hty9x6e3.js} +68109 -77017
- package/build/{cli-jd0c0b91.js → cli-j313zw46.js} +1 -1
- package/build/{cli-dqkdnd3c.js → cli-mmc95pfp.js} +88 -49
- package/build/{cli-9vzc18m5.js → cli-qnqppth7.js} +8 -8
- package/build/{cli-hj3t87r2.js → cli-twhj2d1q.js} +1 -1
- package/build/{cli-whtdyc0e.js → cli-zbwmbxpd.js} +3 -3
- package/build/cli.js +68 -68
- package/build/{config-s5ryv5ez.js → config-t3ny5d68.js} +3 -3
- package/build/{doctor-f08gegwc.js → doctor-atj45rne.js} +7 -7
- package/build/{fixes-qf4s92z2.js → fixes-pqgk5v9z.js} +16 -16
- package/build/{index-gakk2t5q.js → index-7cw66451.js} +18 -18
- package/build/{index-x4xefngs.js → index-9j3fxkcg.js} +3 -3
- package/build/{index-s8gw83d6.js → index-cm74qg8e.js} +17 -9
- package/build/{index-sqjve2bm.js → index-ehk56y92.js} +2 -2
- package/build/{index-5h1hjhzw.js → index-eyt8y7cq.js} +10 -10
- package/build/{index-mgng15va.js → index-n1yh9e86.js} +909 -456
- package/build/{index-c6qz0gve.js → index-n22g9ytc.js} +7 -7
- package/build/{index-exvkbve0.js → index-s03jmg2x.js} +4 -4
- package/build/{issues-5anqrh2j.js → issues-6gyfhe2j.js} +16 -16
- package/build/{logs-q6ankt6m.js → logs-5ga7w81s.js} +16 -16
- package/build/{main-3zneyg7p.js → main-3d7dfdvs.js} +17 -93
- package/build/{offesecAgent-hsej0pfc.js → offesecAgent-zvj9q4yc.js} +9 -9
- package/build/pentest-90d9gtrs.js +28 -0
- package/build/{pentests-hyx3c3qa.js → pentests-887d85z1.js} +16 -16
- package/build/{targetedPentest-ws0a7frk.js → targetedPentest-56fzgqyw.js} +10 -10
- package/build/{targets-9cqrshet.js → targets-63cs73s2.js} +16 -16
- package/build/threatModel-gznjwpk9.js +26 -0
- package/build/{uninstall-1j469qj7.js → uninstall-6hc47s0e.js} +1 -1
- package/build/{upload-ymvhkyq5.js → upload-8kv9v08h.js} +7 -7
- package/build/{utils-d1ed6jzf.js → utils-etpb7d2y.js} +6 -6
- package/package.json +30 -30
- package/build/agent-8w9h3tnw.js +0 -19
- package/build/authentication-qswvctj4.js +0 -19
- package/build/blackboxAgent-vwm9t3h4.js +0 -19
- package/build/pentest-1e30q7rs.js +0 -28
- package/build/threatModel-z9b213x8.js +0 -26
|
@@ -4,27 +4,27 @@ import {
|
|
|
4
4
|
OffensiveSecurityAgent,
|
|
5
5
|
SKILL_TOOL_NAMES,
|
|
6
6
|
buildBaseSystemPrompt
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-hty9x6e3.js";
|
|
8
8
|
import {
|
|
9
9
|
init_dist,
|
|
10
10
|
init_session,
|
|
11
11
|
sessions,
|
|
12
12
|
stepCountIs
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-1xx6s4nh.js";
|
|
14
14
|
import {
|
|
15
15
|
ensureValidToken,
|
|
16
16
|
getPensarApiUrl,
|
|
17
17
|
init_auth,
|
|
18
18
|
init_constants
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-twhj2d1q.js";
|
|
20
20
|
import {
|
|
21
21
|
exports_external,
|
|
22
22
|
init_zod
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-29yqhrjq.js";
|
|
24
24
|
import {
|
|
25
25
|
config,
|
|
26
26
|
init_config
|
|
27
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-24mzbewx.js";
|
|
28
28
|
import {
|
|
29
29
|
__commonJS,
|
|
30
30
|
__require
|
|
@@ -583,6 +583,8 @@ var require_Alias = __commonJS((exports) => {
|
|
|
583
583
|
});
|
|
584
584
|
}
|
|
585
585
|
resolve(doc, ctx) {
|
|
586
|
+
if (ctx?.maxAliasCount === 0)
|
|
587
|
+
throw new ReferenceError("Alias resolution is disabled");
|
|
586
588
|
let nodes;
|
|
587
589
|
if (ctx?.aliasResolveCache) {
|
|
588
590
|
nodes = ctx.aliasResolveCache;
|
|
@@ -1362,6 +1364,7 @@ var require_stringify = __commonJS((exports) => {
|
|
|
1362
1364
|
nullStr: "null",
|
|
1363
1365
|
simpleKeys: false,
|
|
1364
1366
|
singleQuote: null,
|
|
1367
|
+
trailingComma: false,
|
|
1365
1368
|
trueStr: "true",
|
|
1366
1369
|
verifyAliasOrder: true
|
|
1367
1370
|
}, doc.schema.toStringOptions, options);
|
|
@@ -1631,18 +1634,18 @@ var require_merge = __commonJS((exports) => {
|
|
|
1631
1634
|
};
|
|
1632
1635
|
var isMergeKey = (ctx, key) => (merge.identify(key) || identity.isScalar(key) && (!key.type || key.type === Scalar.Scalar.PLAIN) && merge.identify(key.value)) && ctx?.doc.schema.tags.some((tag) => tag.tag === merge.tag && tag.default);
|
|
1633
1636
|
function addMergeToJSMap(ctx, map, value) {
|
|
1634
|
-
|
|
1635
|
-
if (identity.isSeq(
|
|
1636
|
-
for (const it of
|
|
1637
|
+
const source = resolveAliasValue(ctx, value);
|
|
1638
|
+
if (identity.isSeq(source))
|
|
1639
|
+
for (const it of source.items)
|
|
1637
1640
|
mergeValue(ctx, map, it);
|
|
1638
|
-
else if (Array.isArray(
|
|
1639
|
-
for (const it of
|
|
1641
|
+
else if (Array.isArray(source))
|
|
1642
|
+
for (const it of source)
|
|
1640
1643
|
mergeValue(ctx, map, it);
|
|
1641
1644
|
else
|
|
1642
|
-
mergeValue(ctx, map,
|
|
1645
|
+
mergeValue(ctx, map, source);
|
|
1643
1646
|
}
|
|
1644
1647
|
function mergeValue(ctx, map, value) {
|
|
1645
|
-
const source = ctx
|
|
1648
|
+
const source = resolveAliasValue(ctx, value);
|
|
1646
1649
|
if (!identity.isMap(source))
|
|
1647
1650
|
throw new Error("Merge sources must be maps or map aliases");
|
|
1648
1651
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
@@ -1663,6 +1666,9 @@ var require_merge = __commonJS((exports) => {
|
|
|
1663
1666
|
}
|
|
1664
1667
|
return map;
|
|
1665
1668
|
}
|
|
1669
|
+
function resolveAliasValue(ctx, value) {
|
|
1670
|
+
return ctx && identity.isAlias(value) ? value.resolve(ctx.doc, ctx) : value;
|
|
1671
|
+
}
|
|
1666
1672
|
exports.addMergeToJSMap = addMergeToJSMap;
|
|
1667
1673
|
exports.isMergeKey = isMergeKey;
|
|
1668
1674
|
exports.merge = merge;
|
|
@@ -1870,13 +1876,20 @@ ${indent}${line}` : `
|
|
|
1870
1876
|
if (comment)
|
|
1871
1877
|
reqNewline = true;
|
|
1872
1878
|
let str = stringify.stringify(item, itemCtx, () => comment = null);
|
|
1873
|
-
|
|
1879
|
+
reqNewline || (reqNewline = lines.length > linesAtValue || str.includes(`
|
|
1880
|
+
`));
|
|
1881
|
+
if (i < items.length - 1) {
|
|
1874
1882
|
str += ",";
|
|
1883
|
+
} else if (ctx.options.trailingComma) {
|
|
1884
|
+
if (ctx.options.lineWidth > 0) {
|
|
1885
|
+
reqNewline || (reqNewline = lines.reduce((sum, line) => sum + line.length + 2, 2) + (str.length + 2) > ctx.options.lineWidth);
|
|
1886
|
+
}
|
|
1887
|
+
if (reqNewline) {
|
|
1888
|
+
str += ",";
|
|
1889
|
+
}
|
|
1890
|
+
}
|
|
1875
1891
|
if (comment)
|
|
1876
1892
|
str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
|
|
1877
|
-
if (!reqNewline && (lines.length > linesAtValue || str.includes(`
|
|
1878
|
-
`)))
|
|
1879
|
-
reqNewline = true;
|
|
1880
1893
|
lines.push(str);
|
|
1881
1894
|
linesAtValue = lines.length;
|
|
1882
1895
|
}
|
|
@@ -2231,7 +2244,7 @@ var require_stringifyNumber = __commonJS((exports) => {
|
|
|
2231
2244
|
if (!isFinite(num))
|
|
2232
2245
|
return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf";
|
|
2233
2246
|
let n = Object.is(value, -0) ? "-0" : JSON.stringify(value);
|
|
2234
|
-
if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") &&
|
|
2247
|
+
if (!format && minFractionDigits && (!tag || tag === "tag:yaml.org,2002:float") && /^-?\d/.test(n) && !n.includes("e")) {
|
|
2235
2248
|
let i = n.indexOf(".");
|
|
2236
2249
|
if (i < 0) {
|
|
2237
2250
|
i = n.length;
|
|
@@ -4456,7 +4469,7 @@ var require_resolve_flow_scalar = __commonJS((exports) => {
|
|
|
4456
4469
|
while (next === " " || next === "\t")
|
|
4457
4470
|
next = source[++i + 1];
|
|
4458
4471
|
} else if (next === "x" || next === "u" || next === "U") {
|
|
4459
|
-
const length =
|
|
4472
|
+
const length = next === "x" ? 2 : next === "u" ? 4 : 8;
|
|
4460
4473
|
res += parseCharCode(source, i + 1, length, onError);
|
|
4461
4474
|
i += length;
|
|
4462
4475
|
} else {
|
|
@@ -4525,12 +4538,13 @@ var require_resolve_flow_scalar = __commonJS((exports) => {
|
|
|
4525
4538
|
const cc = source.substr(offset, length);
|
|
4526
4539
|
const ok = cc.length === length && /^[0-9a-fA-F]+$/.test(cc);
|
|
4527
4540
|
const code = ok ? parseInt(cc, 16) : NaN;
|
|
4528
|
-
|
|
4541
|
+
try {
|
|
4542
|
+
return String.fromCodePoint(code);
|
|
4543
|
+
} catch {
|
|
4529
4544
|
const raw = source.substr(offset - 2, length + 2);
|
|
4530
4545
|
onError(offset - 2, "BAD_DQ_ESCAPE", `Invalid escape sequence ${raw}`);
|
|
4531
4546
|
return raw;
|
|
4532
4547
|
}
|
|
4533
|
-
return String.fromCodePoint(code);
|
|
4534
4548
|
}
|
|
4535
4549
|
exports.resolveFlowScalar = resolveFlowScalar;
|
|
4536
4550
|
});
|
|
@@ -4671,17 +4685,22 @@ var require_compose_node = __commonJS((exports) => {
|
|
|
4671
4685
|
case "block-map":
|
|
4672
4686
|
case "block-seq":
|
|
4673
4687
|
case "flow-collection":
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4688
|
+
try {
|
|
4689
|
+
node = composeCollection.composeCollection(CN, ctx, token, props, onError);
|
|
4690
|
+
if (anchor)
|
|
4691
|
+
node.anchor = anchor.source.substring(1);
|
|
4692
|
+
} catch (error) {
|
|
4693
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
4694
|
+
onError(token, "RESOURCE_EXHAUSTION", message);
|
|
4695
|
+
}
|
|
4677
4696
|
break;
|
|
4678
4697
|
default: {
|
|
4679
4698
|
const message = token.type === "error" ? token.message : `Unsupported token (type: ${token.type})`;
|
|
4680
4699
|
onError(token, "UNEXPECTED_TOKEN", message);
|
|
4681
|
-
node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError);
|
|
4682
4700
|
isSrcToken = false;
|
|
4683
4701
|
}
|
|
4684
4702
|
}
|
|
4703
|
+
node ?? (node = composeEmptyNode(ctx, token.offset, undefined, null, props, onError));
|
|
4685
4704
|
if (anchor && node.anchor === "")
|
|
4686
4705
|
onError(anchor, "BAD_ALIAS", "Anchor cannot be an empty string");
|
|
4687
4706
|
if (atKey && ctx.options.stringKeys && (!identity.isScalar(node) || typeof node.value !== "string" || node.tag && node.tag !== "tag:yaml.org,2002:str")) {
|
|
@@ -4864,8 +4883,10 @@ ${cb}` : comment;
|
|
|
4864
4883
|
}
|
|
4865
4884
|
}
|
|
4866
4885
|
if (afterDoc) {
|
|
4867
|
-
|
|
4868
|
-
|
|
4886
|
+
for (let i = 0;i < this.errors.length; ++i)
|
|
4887
|
+
doc.errors.push(this.errors[i]);
|
|
4888
|
+
for (let i = 0;i < this.warnings.length; ++i)
|
|
4889
|
+
doc.warnings.push(this.warnings[i]);
|
|
4869
4890
|
} else {
|
|
4870
4891
|
doc.errors = this.errors;
|
|
4871
4892
|
doc.warnings = this.warnings;
|
|
@@ -5577,7 +5598,7 @@ var require_lexer = __commonJS((exports) => {
|
|
|
5577
5598
|
const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
|
|
5578
5599
|
this.indentNext = this.indentValue + 1;
|
|
5579
5600
|
this.indentValue += n;
|
|
5580
|
-
return
|
|
5601
|
+
return "block-start";
|
|
5581
5602
|
}
|
|
5582
5603
|
return "doc";
|
|
5583
5604
|
}
|
|
@@ -5884,26 +5905,37 @@ var require_lexer = __commonJS((exports) => {
|
|
|
5884
5905
|
return 0;
|
|
5885
5906
|
}
|
|
5886
5907
|
*pushIndicators() {
|
|
5887
|
-
|
|
5888
|
-
|
|
5889
|
-
|
|
5890
|
-
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5908
|
+
let n = 0;
|
|
5909
|
+
loop:
|
|
5910
|
+
while (true) {
|
|
5911
|
+
switch (this.charAt(0)) {
|
|
5912
|
+
case "!":
|
|
5913
|
+
n += yield* this.pushTag();
|
|
5914
|
+
n += yield* this.pushSpaces(true);
|
|
5915
|
+
continue loop;
|
|
5916
|
+
case "&":
|
|
5917
|
+
n += yield* this.pushUntil(isNotAnchorChar);
|
|
5918
|
+
n += yield* this.pushSpaces(true);
|
|
5919
|
+
continue loop;
|
|
5920
|
+
case "-":
|
|
5921
|
+
case "?":
|
|
5922
|
+
case ":": {
|
|
5923
|
+
const inFlow = this.flowLevel > 0;
|
|
5924
|
+
const ch1 = this.charAt(1);
|
|
5925
|
+
if (isEmpty(ch1) || inFlow && flowIndicatorChars.has(ch1)) {
|
|
5926
|
+
if (!inFlow)
|
|
5927
|
+
this.indentNext = this.indentValue + 1;
|
|
5928
|
+
else if (this.flowKey)
|
|
5929
|
+
this.flowKey = false;
|
|
5930
|
+
n += yield* this.pushCount(1);
|
|
5931
|
+
n += yield* this.pushSpaces(true);
|
|
5932
|
+
continue loop;
|
|
5933
|
+
}
|
|
5934
|
+
}
|
|
5903
5935
|
}
|
|
5936
|
+
break loop;
|
|
5904
5937
|
}
|
|
5905
|
-
|
|
5906
|
-
return 0;
|
|
5938
|
+
return n;
|
|
5907
5939
|
}
|
|
5908
5940
|
*pushTag() {
|
|
5909
5941
|
if (this.charAt(1) === "<") {
|
|
@@ -6057,6 +6089,13 @@ var require_parser = __commonJS((exports) => {
|
|
|
6057
6089
|
while (prev[++i]?.type === "space") {}
|
|
6058
6090
|
return prev.splice(i, prev.length);
|
|
6059
6091
|
}
|
|
6092
|
+
function arrayPushArray(target, source) {
|
|
6093
|
+
if (source.length < 1e5)
|
|
6094
|
+
Array.prototype.push.apply(target, source);
|
|
6095
|
+
else
|
|
6096
|
+
for (let i = 0;i < source.length; ++i)
|
|
6097
|
+
target.push(source[i]);
|
|
6098
|
+
}
|
|
6060
6099
|
function fixFlowSeqItems(fc) {
|
|
6061
6100
|
if (fc.start.type === "flow-seq-start") {
|
|
6062
6101
|
for (const it of fc.items) {
|
|
@@ -6066,11 +6105,11 @@ var require_parser = __commonJS((exports) => {
|
|
|
6066
6105
|
delete it.key;
|
|
6067
6106
|
if (isFlowToken(it.value)) {
|
|
6068
6107
|
if (it.value.end)
|
|
6069
|
-
|
|
6108
|
+
arrayPushArray(it.value.end, it.sep);
|
|
6070
6109
|
else
|
|
6071
6110
|
it.value.end = it.sep;
|
|
6072
6111
|
} else
|
|
6073
|
-
|
|
6112
|
+
arrayPushArray(it.start, it.sep);
|
|
6074
6113
|
delete it.sep;
|
|
6075
6114
|
}
|
|
6076
6115
|
}
|
|
@@ -6410,7 +6449,7 @@ var require_parser = __commonJS((exports) => {
|
|
|
6410
6449
|
const prev = map.items[map.items.length - 2];
|
|
6411
6450
|
const end = prev?.value?.end;
|
|
6412
6451
|
if (Array.isArray(end)) {
|
|
6413
|
-
|
|
6452
|
+
arrayPushArray(end, it.start);
|
|
6414
6453
|
end.push(this.sourceToken);
|
|
6415
6454
|
map.items.pop();
|
|
6416
6455
|
return;
|
|
@@ -6598,7 +6637,7 @@ var require_parser = __commonJS((exports) => {
|
|
|
6598
6637
|
const prev = seq.items[seq.items.length - 2];
|
|
6599
6638
|
const end = prev?.value?.end;
|
|
6600
6639
|
if (Array.isArray(end)) {
|
|
6601
|
-
|
|
6640
|
+
arrayPushArray(end, it.start);
|
|
6602
6641
|
end.push(this.sourceToken);
|
|
6603
6642
|
seq.items.pop();
|
|
6604
6643
|
return;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
BlackboxAttackSurfaceAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-zbwmbxpd.js";
|
|
4
4
|
import {
|
|
5
5
|
TargetedPentestAgent,
|
|
6
6
|
buildPentestSystemPrompt
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-bpcymyg8.js";
|
|
8
8
|
import {
|
|
9
9
|
CodeAgent
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-ecp92fqe.js";
|
|
11
11
|
import {
|
|
12
12
|
AppsDiscoveryResultSchema,
|
|
13
13
|
DiscoverySummarySchema,
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
WHITEBOX_APPS_DISCOVERY_SYSTEM_PROMPT,
|
|
16
16
|
WHITEBOX_DISCOVERY_SYSTEM_PROMPT,
|
|
17
17
|
WHITEBOX_ENDPOINT_DOCUMENTATION_SYSTEM_PROMPT
|
|
18
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-366c64xy.js";
|
|
19
19
|
import {
|
|
20
20
|
EvidenceFileEntrySchema
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-d4bn60j7.js";
|
|
22
22
|
import {
|
|
23
23
|
CweEntrySchema,
|
|
24
24
|
FindingsRegistry,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
ValidatedCweEntrySchema,
|
|
28
28
|
hasCanonicalName,
|
|
29
29
|
runWithBoundedConcurrency
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-hty9x6e3.js";
|
|
31
31
|
import {
|
|
32
32
|
createThreatModelPrompt
|
|
33
33
|
} from "./cli-fw5r7pfj.js";
|
|
@@ -38,11 +38,11 @@ import {
|
|
|
38
38
|
init_lazyLogger,
|
|
39
39
|
init_structured,
|
|
40
40
|
scopedLogger
|
|
41
|
-
} from "./cli-
|
|
41
|
+
} from "./cli-1xx6s4nh.js";
|
|
42
42
|
import {
|
|
43
43
|
exports_external,
|
|
44
44
|
init_zod
|
|
45
|
-
} from "./cli-
|
|
45
|
+
} from "./cli-29yqhrjq.js";
|
|
46
46
|
|
|
47
47
|
// src/core/workflows/pentest.ts
|
|
48
48
|
init_dist();
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
OffensiveSecurityAgent
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-hty9x6e3.js";
|
|
4
4
|
import {
|
|
5
5
|
detectOSAndEnhancePrompt
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-fex1cvdc.js";
|
|
7
7
|
import {
|
|
8
8
|
hasToolCall,
|
|
9
9
|
init_dist,
|
|
10
10
|
stepCountIs
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-1xx6s4nh.js";
|
|
12
12
|
|
|
13
13
|
// src/core/agents/specialized/attackSurface/blackboxAgent.ts
|
|
14
14
|
init_dist();
|
package/build/cli.js
CHANGED
|
@@ -14,16 +14,16 @@ import {
|
|
|
14
14
|
init_toolset,
|
|
15
15
|
init_utils,
|
|
16
16
|
logger
|
|
17
|
-
} from "./cli-
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
17
|
+
} from "./cli-1xx6s4nh.js";
|
|
18
|
+
import"./cli-twhj2d1q.js";
|
|
19
|
+
import"./cli-29yqhrjq.js";
|
|
20
20
|
import"./cli-gpnb45ck.js";
|
|
21
|
-
import"./cli-
|
|
22
|
-
import"./cli-
|
|
21
|
+
import"./cli-24mzbewx.js";
|
|
22
|
+
import"./cli-80jkzpct.js";
|
|
23
23
|
import {
|
|
24
24
|
init_package,
|
|
25
25
|
package_default
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-dgyyj1b0.js";
|
|
27
27
|
import {
|
|
28
28
|
__require,
|
|
29
29
|
__toESM
|
|
@@ -35,50 +35,50 @@ var package_default2 = {
|
|
|
35
35
|
pensar: "./bin/pensar.js"
|
|
36
36
|
},
|
|
37
37
|
dependencies: {
|
|
38
|
-
"@ai-sdk/amazon-bedrock": "^4.0.
|
|
39
|
-
"@ai-sdk/anthropic": "^3.0.
|
|
40
|
-
"@ai-sdk/google": "^3.0.
|
|
38
|
+
"@ai-sdk/amazon-bedrock": "^4.0.119",
|
|
39
|
+
"@ai-sdk/anthropic": "^3.0.85",
|
|
40
|
+
"@ai-sdk/google": "^3.0.83",
|
|
41
41
|
"@ai-sdk/openai": "3.0.46",
|
|
42
|
-
"@ai-sdk/openai-compatible": "^2.0.
|
|
43
|
-
"@ai-sdk/provider": "^3.0.
|
|
44
|
-
"@daytonaio/sdk": "^0.112.
|
|
45
|
-
"@googleapis/gmail": "^16.1.
|
|
42
|
+
"@ai-sdk/openai-compatible": "^2.0.51",
|
|
43
|
+
"@ai-sdk/provider": "^3.0.10",
|
|
44
|
+
"@daytonaio/sdk": "^0.112.3",
|
|
45
|
+
"@googleapis/gmail": "^16.1.2",
|
|
46
46
|
"@microsoft/microsoft-graph-client": "^3.0.7",
|
|
47
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
48
|
-
"@openrouter/ai-sdk-provider": "^2.
|
|
49
|
-
"@opentelemetry/api": "^1.9.
|
|
47
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
48
|
+
"@openrouter/ai-sdk-provider": "^2.9.1",
|
|
49
|
+
"@opentelemetry/api": "^1.9.1",
|
|
50
50
|
"@opentui/core": "^0.1.107",
|
|
51
51
|
"@opentui/react": "^0.1.107",
|
|
52
52
|
"@pensar/surface": "0.2.2",
|
|
53
53
|
"@playwright/mcp": "^0.0.54",
|
|
54
|
-
ai: "^6.0.
|
|
54
|
+
ai: "^6.0.208",
|
|
55
55
|
"camoufox-js": "^0.11.1",
|
|
56
|
-
glob: "^13.0.
|
|
56
|
+
glob: "^13.0.6",
|
|
57
57
|
"highlight.js": "^11.11.1",
|
|
58
|
-
imapflow: "^1.2
|
|
59
|
-
mailparser: "^3.9.
|
|
60
|
-
marked: "^16.4.
|
|
58
|
+
imapflow: "^1.4.2",
|
|
59
|
+
mailparser: "^3.9.11",
|
|
60
|
+
marked: "^16.4.2",
|
|
61
61
|
"mime-types": "^3.0.2",
|
|
62
|
-
nodemailer: "^8.0.
|
|
63
|
-
"p-limit": "^7.
|
|
64
|
-
react: "^19.2.
|
|
65
|
-
sharp: "^0.34.
|
|
66
|
-
tldts: "^7.
|
|
67
|
-
yaml: "^2.
|
|
68
|
-
zod: "^4.
|
|
62
|
+
nodemailer: "^8.0.11",
|
|
63
|
+
"p-limit": "^7.3.0",
|
|
64
|
+
react: "^19.2.7",
|
|
65
|
+
sharp: "^0.34.5",
|
|
66
|
+
tldts: "^7.4.3",
|
|
67
|
+
yaml: "^2.9.0",
|
|
68
|
+
zod: "^4.4.3"
|
|
69
69
|
},
|
|
70
70
|
description: "AI-powered penetration testing CLI tool with terminal UI",
|
|
71
71
|
devDependencies: {
|
|
72
72
|
"@biomejs/biome": "2.4.14",
|
|
73
|
-
"@types/bun": "^1.3.
|
|
73
|
+
"@types/bun": "^1.3.14",
|
|
74
74
|
"@types/mailparser": "^3.4.6",
|
|
75
75
|
"@types/mime-types": "^3.0.1",
|
|
76
|
-
"@types/nodemailer": "^8.0.
|
|
77
|
-
"@types/react": "^19.2.
|
|
78
|
-
dotenv: "^17.2
|
|
79
|
-
knip: "^6.
|
|
80
|
-
prettier: "^3.8.
|
|
81
|
-
vitest: "^2.1.
|
|
76
|
+
"@types/nodemailer": "^8.0.1",
|
|
77
|
+
"@types/react": "^19.2.17",
|
|
78
|
+
dotenv: "^17.4.2",
|
|
79
|
+
knip: "^6.17.1",
|
|
80
|
+
prettier: "^3.8.4",
|
|
81
|
+
vitest: "^2.1.9"
|
|
82
82
|
},
|
|
83
83
|
engines: {
|
|
84
84
|
bun: ">=1.0.0",
|
|
@@ -144,7 +144,7 @@ var package_default2 = {
|
|
|
144
144
|
tsc: "tsc --noEmit"
|
|
145
145
|
},
|
|
146
146
|
type: "module",
|
|
147
|
-
version: "2.1.
|
|
147
|
+
version: "2.1.3-canary.9978c1ae"
|
|
148
148
|
};
|
|
149
149
|
|
|
150
150
|
// src/core/ai/index.ts
|
|
@@ -565,7 +565,7 @@ function attachCliAgentStreamListeners(bus) {
|
|
|
565
565
|
async function createInstrumentedBus(session) {
|
|
566
566
|
const bus = new AgentEventBus;
|
|
567
567
|
attachCliAgentStreamListeners(bus);
|
|
568
|
-
const { attachWandbToEventBus } = await import("./upload-
|
|
568
|
+
const { attachWandbToEventBus } = await import("./upload-8kv9v08h.js");
|
|
569
569
|
const wandbCleanup = await attachWandbToEventBus(session, bus).catch((e) => {
|
|
570
570
|
console.warn("[wandb] Tracing disabled:", e.message);
|
|
571
571
|
return null;
|
|
@@ -582,7 +582,7 @@ async function resolveCliHeaders() {
|
|
|
582
582
|
const { parseHeaderLine: parseHeaderLine2, parseHeadersFromFile, formatParseError: formatParseError2 } = await import("./parse-7djk9jyf.js");
|
|
583
583
|
const merged = {};
|
|
584
584
|
if (!noGlobal) {
|
|
585
|
-
const { config: appConfig } = await import("./index-
|
|
585
|
+
const { config: appConfig } = await import("./index-ehk56y92.js");
|
|
586
586
|
const cfg = await appConfig.get();
|
|
587
587
|
if (cfg.defaultHeaders) {
|
|
588
588
|
Object.assign(merged, cfg.defaultHeaders);
|
|
@@ -616,8 +616,8 @@ async function resolveCliModel() {
|
|
|
616
616
|
const explicit = getArg("--model");
|
|
617
617
|
if (explicit)
|
|
618
618
|
return explicit;
|
|
619
|
-
const { config: appConfig } = await import("./index-
|
|
620
|
-
const { getDefaultModelForConfig } = await import("./utils-
|
|
619
|
+
const { config: appConfig } = await import("./index-ehk56y92.js");
|
|
620
|
+
const { getDefaultModelForConfig } = await import("./utils-etpb7d2y.js");
|
|
621
621
|
const pensarConfig = await appConfig.get();
|
|
622
622
|
const defaultModel = getDefaultModelForConfig(pensarConfig);
|
|
623
623
|
if (!defaultModel) {
|
|
@@ -701,11 +701,11 @@ Global options:
|
|
|
701
701
|
`);
|
|
702
702
|
}
|
|
703
703
|
async function runPentest() {
|
|
704
|
-
const { config } = await import("./main-
|
|
704
|
+
const { config } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
|
|
705
705
|
config();
|
|
706
|
-
const { runPentestAgent } = await import("./blackboxPentest-
|
|
707
|
-
const { sessions: sessions2 } = await import("./index-
|
|
708
|
-
const { config: appConfig } = await import("./index-
|
|
706
|
+
const { runPentestAgent } = await import("./blackboxPentest-dg3b1t6b.js");
|
|
707
|
+
const { sessions: sessions2 } = await import("./index-n22g9ytc.js");
|
|
708
|
+
const { config: appConfig } = await import("./index-ehk56y92.js");
|
|
709
709
|
const target = getArgRequired("--target");
|
|
710
710
|
const cwd = getArg("--cwd");
|
|
711
711
|
const mode = getArg("--mode");
|
|
@@ -773,11 +773,11 @@ Report: ${reportPath}` : ""}`);
|
|
|
773
773
|
process.exit(0);
|
|
774
774
|
}
|
|
775
775
|
async function runTargetedPentest() {
|
|
776
|
-
const { config } = await import("./main-
|
|
776
|
+
const { config } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
|
|
777
777
|
config();
|
|
778
|
-
const { runTargetedPentestAgent } = await import("./targetedPentest-
|
|
779
|
-
const { sessions: sessions2 } = await import("./index-
|
|
780
|
-
const { config: appConfig } = await import("./index-
|
|
778
|
+
const { runTargetedPentestAgent } = await import("./targetedPentest-56fzgqyw.js");
|
|
779
|
+
const { sessions: sessions2 } = await import("./index-n22g9ytc.js");
|
|
780
|
+
const { config: appConfig } = await import("./index-ehk56y92.js");
|
|
781
781
|
const target = getArgRequired("--target");
|
|
782
782
|
const objectives = getAllArgs("--objective");
|
|
783
783
|
const pensarConfig = await appConfig.get();
|
|
@@ -827,10 +827,10 @@ POCs: ${pocsPath}`);
|
|
|
827
827
|
process.exit(0);
|
|
828
828
|
}
|
|
829
829
|
async function runThreatModel() {
|
|
830
|
-
const { config } = await import("./main-
|
|
830
|
+
const { config } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
|
|
831
831
|
config();
|
|
832
|
-
const { runThreatModelWorkflow } = await import("./threatModel-
|
|
833
|
-
const { config: appConfig } = await import("./index-
|
|
832
|
+
const { runThreatModelWorkflow } = await import("./threatModel-gznjwpk9.js");
|
|
833
|
+
const { config: appConfig } = await import("./index-ehk56y92.js");
|
|
834
834
|
const path2 = await import("path");
|
|
835
835
|
const pensarConfig = await appConfig.get();
|
|
836
836
|
const model = await resolveCliModel();
|
|
@@ -864,16 +864,16 @@ ${sep}
|
|
|
864
864
|
Threat model written to: ${resolvedPath}`);
|
|
865
865
|
}
|
|
866
866
|
async function runOperator() {
|
|
867
|
-
const { config } = await import("./main-
|
|
867
|
+
const { config } = await import("./main-3d7dfdvs.js").then((m)=>__toESM(m.default,1));
|
|
868
868
|
config();
|
|
869
|
-
const { runOffensiveSecurityAgent } = await import("./offesecAgent-
|
|
870
|
-
const { sessions: sessions2, normalizeMessages, getResumeMessages } = await import("./index-
|
|
871
|
-
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-
|
|
872
|
-
const { config: appConfig } = await import("./index-
|
|
869
|
+
const { runOffensiveSecurityAgent } = await import("./offesecAgent-zvj9q4yc.js");
|
|
870
|
+
const { sessions: sessions2, normalizeMessages, getResumeMessages } = await import("./index-n22g9ytc.js");
|
|
871
|
+
const { ALL_TOOL_NAMES, SKILL_TOOL_NAMES } = await import("./index-cm74qg8e.js");
|
|
872
|
+
const { config: appConfig } = await import("./index-ehk56y92.js");
|
|
873
873
|
const { createInterface } = await import("readline");
|
|
874
874
|
const { readFileSync: readFileSync2, existsSync } = await import("fs");
|
|
875
875
|
const path2 = await import("path");
|
|
876
|
-
const { stepCountIs } = await import("./index-
|
|
876
|
+
const { stepCountIs } = await import("./index-n1yh9e86.js");
|
|
877
877
|
const promptRaw = getArg("-p") ?? getArg("--prompt");
|
|
878
878
|
if (!promptRaw) {
|
|
879
879
|
console.error("Error: -p <prompt> is required");
|
|
@@ -983,35 +983,35 @@ if (hasFlag("-p") || command === "--prompt") {
|
|
|
983
983
|
await runTargetedPentest();
|
|
984
984
|
} else if (command === "login" || command === "auth") {
|
|
985
985
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
986
|
-
await import("./auth-
|
|
986
|
+
await import("./auth-p29y3nzn.js");
|
|
987
987
|
} else if (command === "uninstall") {
|
|
988
988
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
989
|
-
await import("./uninstall-
|
|
989
|
+
await import("./uninstall-6hc47s0e.js");
|
|
990
990
|
} else if (command === "apps") {
|
|
991
991
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
992
|
-
await import("./apps-
|
|
992
|
+
await import("./apps-yzmjmpf9.js");
|
|
993
993
|
} else if (command === "pentests") {
|
|
994
994
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
995
|
-
await import("./pentests-
|
|
995
|
+
await import("./pentests-887d85z1.js");
|
|
996
996
|
} else if (command === "targets") {
|
|
997
997
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
998
|
-
await import("./targets-
|
|
998
|
+
await import("./targets-63cs73s2.js");
|
|
999
999
|
} else if (command === "issues") {
|
|
1000
1000
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1001
|
-
await import("./issues-
|
|
1001
|
+
await import("./issues-6gyfhe2j.js");
|
|
1002
1002
|
} else if (command === "fixes") {
|
|
1003
1003
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1004
|
-
await import("./fixes-
|
|
1004
|
+
await import("./fixes-pqgk5v9z.js");
|
|
1005
1005
|
} else if (command === "logs") {
|
|
1006
1006
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1007
|
-
await import("./logs-
|
|
1007
|
+
await import("./logs-5ga7w81s.js");
|
|
1008
1008
|
} else if (command === "config") {
|
|
1009
1009
|
process.argv = [process.argv[0], process.argv[1], ...args.slice(1)];
|
|
1010
|
-
await import("./config-
|
|
1010
|
+
await import("./config-t3ny5d68.js");
|
|
1011
1011
|
} else if (command === "threat-model") {
|
|
1012
1012
|
await runThreatModel();
|
|
1013
1013
|
} else if (command === "doctor") {
|
|
1014
|
-
const { runDoctor } = await import("./doctor-
|
|
1014
|
+
const { runDoctor } = await import("./doctor-atj45rne.js");
|
|
1015
1015
|
await runDoctor();
|
|
1016
1016
|
} else if (args.length === 0) {
|
|
1017
1017
|
if (process.env.PENSAR_NO_TUI === "1") {
|
|
@@ -1019,7 +1019,7 @@ if (hasFlag("-p") || command === "--prompt") {
|
|
|
1019
1019
|
console.error("All other commands work with Node \u2014 run 'pensar --help'.");
|
|
1020
1020
|
process.exit(1);
|
|
1021
1021
|
}
|
|
1022
|
-
await import("./index-
|
|
1022
|
+
await import("./index-7cw66451.js");
|
|
1023
1023
|
} else {
|
|
1024
1024
|
console.error(`Error: Unknown command '${command}'`);
|
|
1025
1025
|
console.error();
|
|
@@ -11,9 +11,9 @@ import {
|
|
|
11
11
|
import {
|
|
12
12
|
config,
|
|
13
13
|
init_config
|
|
14
|
-
} from "./cli-
|
|
15
|
-
import"./cli-
|
|
16
|
-
import"./cli-
|
|
14
|
+
} from "./cli-24mzbewx.js";
|
|
15
|
+
import"./cli-80jkzpct.js";
|
|
16
|
+
import"./cli-dgyyj1b0.js";
|
|
17
17
|
import"./cli-8rxa073f.js";
|
|
18
18
|
|
|
19
19
|
// src/cli/config.ts
|