@pensar/apex 2.4.0 → 2.5.0-canary.0af37eb0
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-2edb792c.js +12 -0
- package/build/agent-317v8mmz.js +12 -0
- package/build/agent-vzqc5vtn.js +14 -0
- package/build/{agent-5ejt5vpz.js → agent-y85zsera.js} +42 -42
- package/build/{apps-17wvz1d7.js → apps-qf8jww9t.js} +74 -43
- package/build/{auth-z3h9859n.js → auth-wf1r533f.js} +57 -61
- package/build/blackboxAgent-cb4na30e.js +12 -0
- package/build/blackboxPentest-bf7b9m36.js +58 -0
- package/build/{cli-9rhzhgx2.js → cli-079enner.js} +5 -5
- package/build/cli-4ptm7wgt.js +12188 -0
- package/build/{cli-tznv8pf1.js → cli-6hrf9z35.js} +4 -4
- package/build/{cli-mavved45.js → cli-80mx747a.js} +89 -96
- package/build/cli-8w8k4dph.js +15 -0
- package/build/{cli-2cbwdk78.js → cli-a4v5vwfw.js} +4 -4
- package/build/cli-ag6jtndp.js +32 -0
- package/build/cli-bb02pjt0.js +1485 -0
- package/build/{cli-k71t434r.js → cli-ec2hwkv3.js} +34 -76
- package/build/{cli-k8kc47pq.js → cli-f3sg3e9x.js} +118 -115
- package/build/{cli-bc05qbss.js → cli-h6y3bt60.js} +13 -21
- package/build/{cli-xshasbwe.js → cli-jzcsaygf.js} +31 -52
- package/build/{cli-vnynf0js.js → cli-k8hgxz61.js} +11 -5
- package/build/{cli-32z0017y.js → cli-kn55pk78.js} +36 -60
- package/build/{cli-tkc598ey.js → cli-q8pr0zqg.js} +10042 -7665
- package/build/{cli-j54qa6tm.js → cli-qktcyj48.js} +1 -1
- package/build/cli-retw3rw5.js +12 -0
- package/build/{cli-b1adytsy.js → cli-s2y86fd5.js} +67 -39
- package/build/{cli-vq52kp7j.js → cli-t6mngnwd.js} +150 -128
- package/build/cli-tjm77pmx.js +12075 -0
- package/build/{cli-dm0fc0bm.js → cli-v1sarr4y.js} +5 -9
- package/build/cli-wpmm960k.js +22 -0
- package/build/{cli-5k33webc.js → cli-x069hfr2.js} +355 -332
- package/build/{cli-ee3axgts.js → cli-xbhr5khz.js} +1 -1
- package/build/{cli-repbyhkk.js → cli-y212s0r8.js} +26315 -25555
- package/build/cli-z82n3qk1.js +6 -0
- package/build/{cli-gq40s5b3.js → cli-zky875st.js} +33 -46
- package/build/cli.js +696 -132
- package/build/{config-f1mj4nhd.js → config-g93k0986.js} +29 -29
- package/build/{doctor-ekneewa3.js → doctor-4fcx7g0h.js} +4 -9
- package/build/{fastStrike-8zka43xs.js → fastStrike-af31ggmt.js} +26 -28
- package/build/{fixes-b89s5haw.js → fixes-6kxes4g7.js} +22 -27
- package/build/getMachineId-bsd-zr67nd9p.js +36 -0
- package/build/getMachineId-darwin-fd1d562d.js +36 -0
- package/build/getMachineId-linux-kjmg243j.js +29 -0
- package/build/getMachineId-unsupported-n4r58vke.js +19 -0
- package/build/getMachineId-win-yzgpfsrb.js +38 -0
- package/build/{index-sf16jm0m.js → index-3dpcjj6e.js} +137 -162
- package/build/index-4b9nc9e8.js +36 -0
- package/build/index-9f0xagac.js +22 -0
- package/build/index-9y2bjhh2.js +100 -0
- package/build/index-a1bg29j1.js +1559 -0
- package/build/{index-cbwn03kz.js → index-a2xycbjs.js} +12 -31
- package/build/index-k1mb1edx.js +12 -0
- package/build/{index-psqjpw5m.js → index-nweqptgs.js} +7 -7
- package/build/{index-6d22pyxt.js → index-r8554acn.js} +3000 -2435
- package/build/index-rjmmakbh.js +17 -0
- package/build/index-yfcbhfc1.js +9 -0
- package/build/{issues-xx5bs4md.js → issues-vgfdw93j.js} +81 -35
- package/build/{logs-qtxe51w2.js → logs-czxxx0n0.js} +20 -25
- package/build/{multipart-parser-g2xxkezz.js → multipart-parser-vjjdbpd1.js} +10 -10
- package/build/{offesecAgent-b9e2xm6v.js → offesecAgent-jwnbnsqm.js} +6 -13
- package/build/{parse-rtccymzn.js → parse-cqecqrc5.js} +0 -4
- package/build/pentest-hbwbfw9w.js +21 -0
- package/build/{pentests-6ks3szc4.js → pentests-6pp1j1w5.js} +23 -28
- package/build/{targetedPentest-s1ptvq8e.js → targetedPentest-34zhke7a.js} +16 -20
- package/build/{targets-sxygyj87.js → targets-yvh0d0fr.js} +22 -27
- package/build/threatModel-r96hed1d.js +19 -0
- package/build/{token-3bbp59y6.js → token-n0tmq8n5.js} +2 -2
- package/build/{token-util-6xjme11b.js → token-util-bv80pj47.js} +1 -2
- package/build/{uninstall-tvsh81v8.js → uninstall-qdzsynrt.js} +7 -4
- package/build/{upload-7wdyyqmr.js → upload-twg8pvy7.js} +7 -13
- package/build/{utils-7fwdkqk6.js → utils-cnv9jj0h.js} +7 -29
- package/package.json +8 -2
- package/build/agent-mvpgvgks.js +0 -19
- package/build/agent-nhs1w5w0.js +0 -29
- package/build/authentication-3s97cpk4.js +0 -19
- package/build/blackboxAgent-gw0a1ca4.js +0 -19
- package/build/blackboxPentest-44333zss.js +0 -37
- package/build/cli-0n4r54hq.js +0 -414
- package/build/cli-72cvcqhg.js +0 -22
- package/build/cli-qqt4gj1w.js +0 -53
- package/build/cli-swpbx60z.js +0 -24441
- package/build/index-4ad3sdwk.js +0 -39
- package/build/index-ghwf5z3v.js +0 -12
- package/build/index-hqjdg6fg.js +0 -205
- package/build/index-mtq7kmxz.js +0 -12856
- package/build/index-rbzhk712.js +0 -33
- package/build/index-y5w6n3tb.js +0 -19
- package/build/main-mmjp338j.js +0 -324
- package/build/pentest-xtc1sjdw.js +0 -29
- package/build/threatModel-xsm6fwk5.js +0 -27
- /package/build/{cli-c8131c4q.js → cli-0wsh8j2t.js} +0 -0
- /package/build/{cli-e08r86zk.js → cli-b3dvxjgk.js} +0 -0
- /package/build/{cli-fw5r7pfj.js → cli-q126f6ef.js} +0 -0
- /package/build/{cli-9fsre5pt.js → cli-qba2x69h.js} +0 -0
|
@@ -1,28 +1,30 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
OffensiveSecurityAgent,
|
|
5
|
-
SKILL_TOOL_NAMES,
|
|
6
|
-
apiRequest,
|
|
7
|
-
buildBaseSystemPrompt
|
|
8
|
-
} from "./cli-repbyhkk.js";
|
|
9
|
-
import {
|
|
2
|
+
init_zod,
|
|
3
|
+
stepCountIs2,
|
|
10
4
|
init_dist,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
init_constants,
|
|
6
|
+
init_ai,
|
|
7
|
+
sessions2,
|
|
8
|
+
init_session
|
|
9
|
+
} from "./cli-q8pr0zqg.js";
|
|
15
10
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
buildBaseSystemPrompt,
|
|
12
|
+
ASK_USER_QUESTIONS_TOOL_NAME,
|
|
13
|
+
apiRequest,
|
|
14
|
+
ALL_TOOL_NAMES2,
|
|
15
|
+
SKILL_TOOL_NAMES2,
|
|
16
|
+
OffensiveSecurityAgent
|
|
17
|
+
} from "./cli-y212s0r8.js";
|
|
18
18
|
import {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
string,
|
|
20
|
+
array,
|
|
21
|
+
object,
|
|
22
|
+
_enum
|
|
23
|
+
} from "./cli-tjm77pmx.js";
|
|
22
24
|
import {
|
|
23
25
|
__commonJS,
|
|
24
26
|
__require
|
|
25
|
-
} from "./cli-
|
|
27
|
+
} from "./cli-h6y3bt60.js";
|
|
26
28
|
|
|
27
29
|
// node_modules/yaml/dist/nodes/identity.js
|
|
28
30
|
var require_identity = __commonJS(function(exports) {
|
|
@@ -505,8 +507,8 @@ var require_toJS = __commonJS(function(exports) {
|
|
|
505
507
|
return value.toJSON(arg, ctx);
|
|
506
508
|
const data = { aliasCount: 0, count: 1, res: undefined };
|
|
507
509
|
ctx.anchors.set(value, data);
|
|
508
|
-
ctx.onCreate = (
|
|
509
|
-
data.res =
|
|
510
|
+
ctx.onCreate = (res) => {
|
|
511
|
+
data.res = res;
|
|
510
512
|
delete ctx.onCreate;
|
|
511
513
|
};
|
|
512
514
|
const res = value.toJSON(arg, ctx);
|
|
@@ -550,8 +552,8 @@ var require_Node = __commonJS(function(exports) {
|
|
|
550
552
|
};
|
|
551
553
|
const res = toJS.toJS(this, "", ctx);
|
|
552
554
|
if (typeof onAnchor === "function")
|
|
553
|
-
for (const { count, res
|
|
554
|
-
onAnchor(
|
|
555
|
+
for (const { count, res } of ctx.anchors.values())
|
|
556
|
+
onAnchor(res, count);
|
|
555
557
|
return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
|
|
556
558
|
}
|
|
557
559
|
}
|
|
@@ -605,16 +607,16 @@ var require_Alias = __commonJS(function(exports) {
|
|
|
605
607
|
toJSON(_arg, ctx) {
|
|
606
608
|
if (!ctx)
|
|
607
609
|
return { source: this.source };
|
|
608
|
-
const { anchors
|
|
610
|
+
const { anchors, doc, maxAliasCount } = ctx;
|
|
609
611
|
const source = this.resolve(doc, ctx);
|
|
610
612
|
if (!source) {
|
|
611
613
|
const msg = `Unresolved alias (the anchor must be set before the alias): ${this.source}`;
|
|
612
614
|
throw new ReferenceError(msg);
|
|
613
615
|
}
|
|
614
|
-
let data =
|
|
616
|
+
let data = anchors.get(source);
|
|
615
617
|
if (!data) {
|
|
616
618
|
toJS.toJS(source, null, ctx);
|
|
617
|
-
data =
|
|
619
|
+
data = anchors.get(source);
|
|
618
620
|
}
|
|
619
621
|
if (data?.res === undefined) {
|
|
620
622
|
const msg = "This should not happen: Alias anchor was not resolved?";
|
|
@@ -623,7 +625,7 @@ var require_Alias = __commonJS(function(exports) {
|
|
|
623
625
|
if (maxAliasCount >= 0) {
|
|
624
626
|
data.count += 1;
|
|
625
627
|
if (data.aliasCount === 0)
|
|
626
|
-
data.aliasCount = getAliasCount(doc, source,
|
|
628
|
+
data.aliasCount = getAliasCount(doc, source, anchors);
|
|
627
629
|
if (data.count * data.aliasCount > maxAliasCount) {
|
|
628
630
|
const msg = "Excessive alias count indicates a resource exhaustion attack";
|
|
629
631
|
throw new ReferenceError(msg);
|
|
@@ -645,22 +647,22 @@ var require_Alias = __commonJS(function(exports) {
|
|
|
645
647
|
return src;
|
|
646
648
|
}
|
|
647
649
|
}
|
|
648
|
-
function getAliasCount(doc, node,
|
|
650
|
+
function getAliasCount(doc, node, anchors) {
|
|
649
651
|
if (identity.isAlias(node)) {
|
|
650
652
|
const source = node.resolve(doc);
|
|
651
|
-
const anchor =
|
|
653
|
+
const anchor = anchors && source && anchors.get(source);
|
|
652
654
|
return anchor ? anchor.count * anchor.aliasCount : 0;
|
|
653
655
|
} else if (identity.isCollection(node)) {
|
|
654
656
|
let count = 0;
|
|
655
657
|
for (const item of node.items) {
|
|
656
|
-
const c = getAliasCount(doc, item,
|
|
658
|
+
const c = getAliasCount(doc, item, anchors);
|
|
657
659
|
if (c > count)
|
|
658
660
|
count = c;
|
|
659
661
|
}
|
|
660
662
|
return count;
|
|
661
663
|
} else if (identity.isPair(node)) {
|
|
662
|
-
const kc = getAliasCount(doc, node.key,
|
|
663
|
-
const vc = getAliasCount(doc, node.value,
|
|
664
|
+
const kc = getAliasCount(doc, node.key, anchors);
|
|
665
|
+
const vc = getAliasCount(doc, node.value, anchors);
|
|
664
666
|
return Math.max(kc, vc);
|
|
665
667
|
}
|
|
666
668
|
return 1;
|
|
@@ -745,10 +747,10 @@ var require_createNode = __commonJS(function(exports) {
|
|
|
745
747
|
value = value.toJSON();
|
|
746
748
|
}
|
|
747
749
|
if (!value || typeof value !== "object") {
|
|
748
|
-
const
|
|
750
|
+
const node = new Scalar.Scalar(value);
|
|
749
751
|
if (ref)
|
|
750
|
-
ref.node =
|
|
751
|
-
return
|
|
752
|
+
ref.node = node;
|
|
753
|
+
return node;
|
|
752
754
|
}
|
|
753
755
|
tagObj = value instanceof Map ? schema[identity.MAP] : (Symbol.iterator in Object(value)) ? schema[identity.SEQ] : schema[identity.MAP];
|
|
754
756
|
}
|
|
@@ -997,17 +999,17 @@ var require_foldFlowLines = __commonJS(function(exports) {
|
|
|
997
999
|
if (onFold)
|
|
998
1000
|
onFold();
|
|
999
1001
|
let res = text.slice(0, folds[0]);
|
|
1000
|
-
for (let
|
|
1001
|
-
const fold = folds[
|
|
1002
|
-
const
|
|
1002
|
+
for (let i = 0;i < folds.length; ++i) {
|
|
1003
|
+
const fold = folds[i];
|
|
1004
|
+
const end = folds[i + 1] || text.length;
|
|
1003
1005
|
if (fold === 0)
|
|
1004
1006
|
res = `
|
|
1005
|
-
${indent}${text.slice(0,
|
|
1007
|
+
${indent}${text.slice(0, end)}`;
|
|
1006
1008
|
else {
|
|
1007
1009
|
if (mode === FOLD_QUOTED && escapedFolds[fold])
|
|
1008
1010
|
res += `${text[fold]}\\`;
|
|
1009
1011
|
res += `
|
|
1010
|
-
${indent}${text.slice(fold + 1,
|
|
1012
|
+
${indent}${text.slice(fold + 1, end)}`;
|
|
1011
1013
|
}
|
|
1012
1014
|
}
|
|
1013
1015
|
return res;
|
|
@@ -1643,15 +1645,15 @@ var require_merge = __commonJS(function(exports) {
|
|
|
1643
1645
|
if (!identity.isMap(source))
|
|
1644
1646
|
throw new Error("Merge sources must be maps or map aliases");
|
|
1645
1647
|
const srcMap = source.toJSON(null, ctx, Map);
|
|
1646
|
-
for (const [key,
|
|
1648
|
+
for (const [key, value] of srcMap) {
|
|
1647
1649
|
if (map instanceof Map) {
|
|
1648
1650
|
if (!map.has(key))
|
|
1649
|
-
map.set(key,
|
|
1651
|
+
map.set(key, value);
|
|
1650
1652
|
} else if (map instanceof Set) {
|
|
1651
1653
|
map.add(key);
|
|
1652
1654
|
} else if (!Object.prototype.hasOwnProperty.call(map, key)) {
|
|
1653
1655
|
Object.defineProperty(map, key, {
|
|
1654
|
-
value
|
|
1656
|
+
value,
|
|
1655
1657
|
writable: true,
|
|
1656
1658
|
enumerable: true,
|
|
1657
1659
|
configurable: true
|
|
@@ -1774,8 +1776,8 @@ var require_stringifyCollection = __commonJS(function(exports) {
|
|
|
1774
1776
|
var stringifyComment = require_stringifyComment();
|
|
1775
1777
|
function stringifyCollection(collection, ctx, options) {
|
|
1776
1778
|
const flow = ctx.inFlow ?? collection.flow;
|
|
1777
|
-
const
|
|
1778
|
-
return
|
|
1779
|
+
const stringify = flow ? stringifyFlowCollection : stringifyBlockCollection;
|
|
1780
|
+
return stringify(collection, ctx, options);
|
|
1779
1781
|
}
|
|
1780
1782
|
function stringifyBlockCollection({ comment, items }, ctx, { blockItemPrefix, flowChars, itemIndent, onChompKeep, onComment }) {
|
|
1781
1783
|
const { indent, options: { commentString } } = ctx;
|
|
@@ -1784,13 +1786,13 @@ var require_stringifyCollection = __commonJS(function(exports) {
|
|
|
1784
1786
|
const lines = [];
|
|
1785
1787
|
for (let i = 0;i < items.length; ++i) {
|
|
1786
1788
|
const item = items[i];
|
|
1787
|
-
let
|
|
1789
|
+
let comment = null;
|
|
1788
1790
|
if (identity.isNode(item)) {
|
|
1789
1791
|
if (!chompKeep && item.spaceBefore)
|
|
1790
1792
|
lines.push("");
|
|
1791
1793
|
addCommentBefore(ctx, lines, item.commentBefore, chompKeep);
|
|
1792
1794
|
if (item.comment)
|
|
1793
|
-
|
|
1795
|
+
comment = item.comment;
|
|
1794
1796
|
} else if (identity.isPair(item)) {
|
|
1795
1797
|
const ik = identity.isNode(item.key) ? item.key : null;
|
|
1796
1798
|
if (ik) {
|
|
@@ -1800,12 +1802,12 @@ var require_stringifyCollection = __commonJS(function(exports) {
|
|
|
1800
1802
|
}
|
|
1801
1803
|
}
|
|
1802
1804
|
chompKeep = false;
|
|
1803
|
-
let
|
|
1804
|
-
if (
|
|
1805
|
-
|
|
1806
|
-
if (chompKeep &&
|
|
1805
|
+
let str = stringify.stringify(item, itemCtx, () => comment = null, () => chompKeep = true);
|
|
1806
|
+
if (comment)
|
|
1807
|
+
str += stringifyComment.lineComment(str, itemIndent, commentString(comment));
|
|
1808
|
+
if (chompKeep && comment)
|
|
1807
1809
|
chompKeep = false;
|
|
1808
|
-
lines.push(blockItemPrefix +
|
|
1810
|
+
lines.push(blockItemPrefix + str);
|
|
1809
1811
|
}
|
|
1810
1812
|
let str;
|
|
1811
1813
|
if (lines.length === 0) {
|
|
@@ -2055,10 +2057,10 @@ var require_map = __commonJS(function(exports) {
|
|
|
2055
2057
|
default: true,
|
|
2056
2058
|
nodeClass: YAMLMap.YAMLMap,
|
|
2057
2059
|
tag: "tag:yaml.org,2002:map",
|
|
2058
|
-
resolve(
|
|
2059
|
-
if (!identity.isMap(
|
|
2060
|
+
resolve(map, onError) {
|
|
2061
|
+
if (!identity.isMap(map))
|
|
2060
2062
|
onError("Expected a mapping for this tag");
|
|
2061
|
-
return
|
|
2063
|
+
return map;
|
|
2062
2064
|
},
|
|
2063
2065
|
createNode: (schema, obj, ctx) => YAMLMap.YAMLMap.from(schema, obj, ctx)
|
|
2064
2066
|
};
|
|
@@ -2167,10 +2169,10 @@ var require_seq = __commonJS(function(exports) {
|
|
|
2167
2169
|
default: true,
|
|
2168
2170
|
nodeClass: YAMLSeq.YAMLSeq,
|
|
2169
2171
|
tag: "tag:yaml.org,2002:seq",
|
|
2170
|
-
resolve(
|
|
2171
|
-
if (!identity.isSeq(
|
|
2172
|
+
resolve(seq, onError) {
|
|
2173
|
+
if (!identity.isSeq(seq))
|
|
2172
2174
|
onError("Expected a sequence for this tag");
|
|
2173
|
-
return
|
|
2175
|
+
return seq;
|
|
2174
2176
|
},
|
|
2175
2177
|
createNode: (schema, obj, ctx) => YAMLSeq.YAMLSeq.from(schema, obj, ctx)
|
|
2176
2178
|
};
|
|
@@ -2516,8 +2518,8 @@ ${cn.comment}` : item.comment;
|
|
|
2516
2518
|
}
|
|
2517
2519
|
function createPairs(schema, iterable, ctx) {
|
|
2518
2520
|
const { replacer } = ctx;
|
|
2519
|
-
const
|
|
2520
|
-
|
|
2521
|
+
const pairs = new YAMLSeq.YAMLSeq(schema);
|
|
2522
|
+
pairs.tag = "tag:yaml.org,2002:pairs";
|
|
2521
2523
|
let i = 0;
|
|
2522
2524
|
if (iterable && Symbol.iterator in Object(iterable))
|
|
2523
2525
|
for (let it of iterable) {
|
|
@@ -2541,9 +2543,9 @@ ${cn.comment}` : item.comment;
|
|
|
2541
2543
|
} else {
|
|
2542
2544
|
key = it;
|
|
2543
2545
|
}
|
|
2544
|
-
|
|
2546
|
+
pairs.items.push(Pair.createPair(key, value, ctx));
|
|
2545
2547
|
}
|
|
2546
|
-
return
|
|
2548
|
+
return pairs;
|
|
2547
2549
|
}
|
|
2548
2550
|
var pairs = {
|
|
2549
2551
|
collection: "seq",
|
|
@@ -2597,9 +2599,9 @@ var require_omap = __commonJS(function(exports) {
|
|
|
2597
2599
|
}
|
|
2598
2600
|
static from(schema, iterable, ctx) {
|
|
2599
2601
|
const pairs$1 = pairs.createPairs(schema, iterable, ctx);
|
|
2600
|
-
const
|
|
2601
|
-
|
|
2602
|
-
return
|
|
2602
|
+
const omap = new this;
|
|
2603
|
+
omap.items = pairs$1.items;
|
|
2604
|
+
return omap;
|
|
2603
2605
|
}
|
|
2604
2606
|
}
|
|
2605
2607
|
YAMLOMap.tag = "tag:yaml.org,2002:omap";
|
|
@@ -2725,8 +2727,8 @@ var require_int2 = __commonJS(function(exports) {
|
|
|
2725
2727
|
str = `0x${str}`;
|
|
2726
2728
|
break;
|
|
2727
2729
|
}
|
|
2728
|
-
const
|
|
2729
|
-
return sign === "-" ? BigInt(-1) *
|
|
2730
|
+
const n = BigInt(str);
|
|
2731
|
+
return sign === "-" ? BigInt(-1) * n : n;
|
|
2730
2732
|
}
|
|
2731
2733
|
const n = parseInt(str, radix);
|
|
2732
2734
|
return sign === "-" ? -1 * n : n;
|
|
@@ -2830,14 +2832,14 @@ var require_set = __commonJS(function(exports) {
|
|
|
2830
2832
|
}
|
|
2831
2833
|
static from(schema, iterable, ctx) {
|
|
2832
2834
|
const { replacer } = ctx;
|
|
2833
|
-
const
|
|
2835
|
+
const set = new this(schema);
|
|
2834
2836
|
if (iterable && Symbol.iterator in Object(iterable))
|
|
2835
2837
|
for (let value of iterable) {
|
|
2836
2838
|
if (typeof replacer === "function")
|
|
2837
2839
|
value = replacer.call(iterable, value, value);
|
|
2838
|
-
|
|
2840
|
+
set.items.push(Pair.createPair(value, null, ctx));
|
|
2839
2841
|
}
|
|
2840
|
-
return
|
|
2842
|
+
return set;
|
|
2841
2843
|
}
|
|
2842
2844
|
}
|
|
2843
2845
|
YAMLSet.tag = "tag:yaml.org,2002:set";
|
|
@@ -2870,7 +2872,7 @@ var require_timestamp = __commonJS(function(exports) {
|
|
|
2870
2872
|
const sign = str[0];
|
|
2871
2873
|
const parts = sign === "-" || sign === "+" ? str.substring(1) : str;
|
|
2872
2874
|
const num = (n) => asBigInt ? BigInt(n) : Number(n);
|
|
2873
|
-
const res = parts.replace(/_/g, "").split(":").reduce((
|
|
2875
|
+
const res = parts.replace(/_/g, "").split(":").reduce((res, p) => res * num(60) + num(p), num(0));
|
|
2874
2876
|
return sign === "-" ? num(-1) * res : res;
|
|
2875
2877
|
}
|
|
2876
2878
|
function stringifySexagesimal(node) {
|
|
@@ -3061,16 +3063,16 @@ var require_tags = __commonJS(function(exports) {
|
|
|
3061
3063
|
}
|
|
3062
3064
|
if (addMergeTag)
|
|
3063
3065
|
tags = tags.concat(merge.merge);
|
|
3064
|
-
return tags.reduce((
|
|
3066
|
+
return tags.reduce((tags, tag) => {
|
|
3065
3067
|
const tagObj = typeof tag === "string" ? tagsByName[tag] : tag;
|
|
3066
3068
|
if (!tagObj) {
|
|
3067
3069
|
const tagName = JSON.stringify(tag);
|
|
3068
3070
|
const keys = Object.keys(tagsByName).map((key) => JSON.stringify(key)).join(", ");
|
|
3069
3071
|
throw new Error(`Unknown custom tag ${tagName}; use one of ${keys}`);
|
|
3070
3072
|
}
|
|
3071
|
-
if (!
|
|
3072
|
-
|
|
3073
|
-
return
|
|
3073
|
+
if (!tags.includes(tagObj))
|
|
3074
|
+
tags.push(tagObj);
|
|
3075
|
+
return tags;
|
|
3074
3076
|
}, []);
|
|
3075
3077
|
}
|
|
3076
3078
|
exports.coreKnownTags = coreKnownTags;
|
|
@@ -3397,8 +3399,8 @@ var require_Document = __commonJS(function(exports) {
|
|
|
3397
3399
|
};
|
|
3398
3400
|
const res = toJS.toJS(this.contents, jsonArg ?? "", ctx);
|
|
3399
3401
|
if (typeof onAnchor === "function")
|
|
3400
|
-
for (const { count, res
|
|
3401
|
-
onAnchor(
|
|
3402
|
+
for (const { count, res } of ctx.anchors.values())
|
|
3403
|
+
onAnchor(res, count);
|
|
3402
3404
|
return typeof reviver === "function" ? applyReviver.applyReviver(reviver, { "": res }, "", res) : res;
|
|
3403
3405
|
}
|
|
3404
3406
|
toJSON(jsonArg, onAnchor) {
|
|
@@ -4152,12 +4154,12 @@ var require_resolve_block_scalar = __commonJS(function(exports) {
|
|
|
4152
4154
|
break;
|
|
4153
4155
|
}
|
|
4154
4156
|
if (chompStart === 0) {
|
|
4155
|
-
const
|
|
4157
|
+
const value = header.chomp === "+" && lines.length > 0 ? `
|
|
4156
4158
|
`.repeat(Math.max(1, lines.length - 1)) : "";
|
|
4157
|
-
let
|
|
4159
|
+
let end = start + header.length;
|
|
4158
4160
|
if (scalar.source)
|
|
4159
|
-
|
|
4160
|
-
return { value
|
|
4161
|
+
end += scalar.source.length;
|
|
4162
|
+
return { value, type, comment: header.comment, range: [start, end, end] };
|
|
4161
4163
|
}
|
|
4162
4164
|
let trimIndent = scalar.indent + header.indent;
|
|
4163
4165
|
let offset = scalar.offset + header.length;
|
|
@@ -4606,9 +4608,9 @@ var require_compose_scalar = __commonJS(function(exports) {
|
|
|
4606
4608
|
return schema[identity.SCALAR];
|
|
4607
4609
|
}
|
|
4608
4610
|
function findScalarTagByTest({ atKey, directives, schema }, value, token, onError) {
|
|
4609
|
-
const tag = schema.tags.find((
|
|
4611
|
+
const tag = schema.tags.find((tag) => (tag.default === true || atKey && tag.default === "key") && tag.test?.test(value)) || schema[identity.SCALAR];
|
|
4610
4612
|
if (schema.compat) {
|
|
4611
|
-
const compat = schema.compat.find((
|
|
4613
|
+
const compat = schema.compat.find((tag) => tag.default && tag.test?.test(value)) ?? schema[identity.SCALAR];
|
|
4612
4614
|
if (tag.tag !== compat.tag) {
|
|
4613
4615
|
const ts = directives.tagString(tag.tag);
|
|
4614
4616
|
const cs = directives.tagString(compat.tag);
|
|
@@ -5764,18 +5766,18 @@ var require_lexer = __commonJS(function(exports) {
|
|
|
5764
5766
|
let indent = 0;
|
|
5765
5767
|
let ch;
|
|
5766
5768
|
loop:
|
|
5767
|
-
for (let
|
|
5769
|
+
for (let i = this.pos;ch = this.buffer[i]; ++i) {
|
|
5768
5770
|
switch (ch) {
|
|
5769
5771
|
case " ":
|
|
5770
5772
|
indent += 1;
|
|
5771
5773
|
break;
|
|
5772
5774
|
case `
|
|
5773
5775
|
`:
|
|
5774
|
-
nl =
|
|
5776
|
+
nl = i;
|
|
5775
5777
|
indent = 0;
|
|
5776
5778
|
break;
|
|
5777
5779
|
case "\r": {
|
|
5778
|
-
const next = this.buffer[
|
|
5780
|
+
const next = this.buffer[i + 1];
|
|
5779
5781
|
if (!next && !this.atEnd)
|
|
5780
5782
|
return this.setNext("block-scalar");
|
|
5781
5783
|
if (next === `
|
|
@@ -5818,16 +5820,16 @@ var require_lexer = __commonJS(function(exports) {
|
|
|
5818
5820
|
nl = i - 1;
|
|
5819
5821
|
} else if (!this.blockScalarKeep) {
|
|
5820
5822
|
do {
|
|
5821
|
-
let
|
|
5822
|
-
let
|
|
5823
|
-
if (
|
|
5824
|
-
|
|
5825
|
-
const lastChar =
|
|
5826
|
-
while (
|
|
5827
|
-
|
|
5828
|
-
if (
|
|
5829
|
-
` &&
|
|
5830
|
-
nl =
|
|
5823
|
+
let i = nl - 1;
|
|
5824
|
+
let ch = this.buffer[i];
|
|
5825
|
+
if (ch === "\r")
|
|
5826
|
+
ch = this.buffer[--i];
|
|
5827
|
+
const lastChar = i;
|
|
5828
|
+
while (ch === " ")
|
|
5829
|
+
ch = this.buffer[--i];
|
|
5830
|
+
if (ch === `
|
|
5831
|
+
` && i >= this.pos && i + 1 + indent > lastChar)
|
|
5832
|
+
nl = i;
|
|
5831
5833
|
else
|
|
5832
5834
|
break;
|
|
5833
5835
|
} while (true);
|
|
@@ -6514,12 +6516,12 @@ var require_parser = __commonJS(function(exports) {
|
|
|
6514
6516
|
if (includesToken(it.start, "newline")) {
|
|
6515
6517
|
Object.assign(it, { key: null, sep: [this.sourceToken] });
|
|
6516
6518
|
} else {
|
|
6517
|
-
const
|
|
6519
|
+
const start = getFirstKeyStartProps(it.start);
|
|
6518
6520
|
this.stack.push({
|
|
6519
6521
|
type: "block-map",
|
|
6520
6522
|
offset: this.offset,
|
|
6521
6523
|
indent: this.indent,
|
|
6522
|
-
items: [{ start
|
|
6524
|
+
items: [{ start, key: null, sep: [this.sourceToken] }]
|
|
6523
6525
|
});
|
|
6524
6526
|
}
|
|
6525
6527
|
} else if (it.value) {
|
|
@@ -6532,7 +6534,7 @@ var require_parser = __commonJS(function(exports) {
|
|
|
6532
6534
|
items: [{ start, key: null, sep: [this.sourceToken] }]
|
|
6533
6535
|
});
|
|
6534
6536
|
} else if (isFlowToken(it.key) && !includesToken(it.sep, "newline")) {
|
|
6535
|
-
const
|
|
6537
|
+
const start = getFirstKeyStartProps(it.start);
|
|
6536
6538
|
const key = it.key;
|
|
6537
6539
|
const sep = it.sep;
|
|
6538
6540
|
sep.push(this.sourceToken);
|
|
@@ -6542,7 +6544,7 @@ var require_parser = __commonJS(function(exports) {
|
|
|
6542
6544
|
type: "block-map",
|
|
6543
6545
|
offset: this.offset,
|
|
6544
6546
|
indent: this.indent,
|
|
6545
|
-
items: [{ start
|
|
6547
|
+
items: [{ start, key, sep }]
|
|
6546
6548
|
});
|
|
6547
6549
|
} else if (start.length > 0) {
|
|
6548
6550
|
it.sep = it.sep.concat(start, this.sourceToken);
|
|
@@ -6886,22 +6888,22 @@ var require_public_api = __commonJS(function(exports) {
|
|
|
6886
6888
|
return { lineCounter: lineCounter$1, prettyErrors };
|
|
6887
6889
|
}
|
|
6888
6890
|
function parseAllDocuments(source, options = {}) {
|
|
6889
|
-
const { lineCounter
|
|
6890
|
-
const parser$1 = new parser.Parser(
|
|
6891
|
+
const { lineCounter, prettyErrors } = parseOptions(options);
|
|
6892
|
+
const parser$1 = new parser.Parser(lineCounter?.addNewLine);
|
|
6891
6893
|
const composer$1 = new composer.Composer(options);
|
|
6892
6894
|
const docs = Array.from(composer$1.compose(parser$1.parse(source)));
|
|
6893
|
-
if (prettyErrors &&
|
|
6895
|
+
if (prettyErrors && lineCounter)
|
|
6894
6896
|
for (const doc of docs) {
|
|
6895
|
-
doc.errors.forEach(errors.prettifyError(source,
|
|
6896
|
-
doc.warnings.forEach(errors.prettifyError(source,
|
|
6897
|
+
doc.errors.forEach(errors.prettifyError(source, lineCounter));
|
|
6898
|
+
doc.warnings.forEach(errors.prettifyError(source, lineCounter));
|
|
6897
6899
|
}
|
|
6898
6900
|
if (docs.length > 0)
|
|
6899
6901
|
return docs;
|
|
6900
6902
|
return Object.assign([], { empty: true }, composer$1.streamInfo());
|
|
6901
6903
|
}
|
|
6902
6904
|
function parseDocument(source, options = {}) {
|
|
6903
|
-
const { lineCounter
|
|
6904
|
-
const parser$1 = new parser.Parser(
|
|
6905
|
+
const { lineCounter, prettyErrors } = parseOptions(options);
|
|
6906
|
+
const parser$1 = new parser.Parser(lineCounter?.addNewLine);
|
|
6905
6907
|
const composer$1 = new composer.Composer(options);
|
|
6906
6908
|
let doc = null;
|
|
6907
6909
|
for (const _doc of composer$1.compose(parser$1.parse(source), true, source.length)) {
|
|
@@ -6912,9 +6914,9 @@ var require_public_api = __commonJS(function(exports) {
|
|
|
6912
6914
|
break;
|
|
6913
6915
|
}
|
|
6914
6916
|
}
|
|
6915
|
-
if (prettyErrors &&
|
|
6916
|
-
doc.errors.forEach(errors.prettifyError(source,
|
|
6917
|
-
doc.warnings.forEach(errors.prettifyError(source,
|
|
6917
|
+
if (prettyErrors && lineCounter) {
|
|
6918
|
+
doc.errors.forEach(errors.prettifyError(source, lineCounter));
|
|
6919
|
+
doc.warnings.forEach(errors.prettifyError(source, lineCounter));
|
|
6918
6920
|
}
|
|
6919
6921
|
return doc;
|
|
6920
6922
|
}
|
|
@@ -6966,6 +6968,12 @@ var require_public_api = __commonJS(function(exports) {
|
|
|
6966
6968
|
});
|
|
6967
6969
|
|
|
6968
6970
|
// src/core/api/issues.ts
|
|
6971
|
+
var CLOSED_DISPOSITIONS = [
|
|
6972
|
+
"resolved",
|
|
6973
|
+
"wont-fix",
|
|
6974
|
+
"out-of-scope",
|
|
6975
|
+
"risk-accepted"
|
|
6976
|
+
];
|
|
6969
6977
|
async function listScans() {
|
|
6970
6978
|
return apiRequest("GET", "/pentests");
|
|
6971
6979
|
}
|
|
@@ -6998,6 +7006,18 @@ async function getIssue(issueId) {
|
|
|
6998
7006
|
async function updateIssue(issueId, data) {
|
|
6999
7007
|
return apiRequest("PATCH", `/issues/${issueId}`, data);
|
|
7000
7008
|
}
|
|
7009
|
+
async function listIssueComments(issueId, options) {
|
|
7010
|
+
const params = new URLSearchParams;
|
|
7011
|
+
if (options?.page)
|
|
7012
|
+
params.set("page", String(options.page));
|
|
7013
|
+
if (options?.pageSize)
|
|
7014
|
+
params.set("pageSize", String(options.pageSize));
|
|
7015
|
+
const qs = params.toString();
|
|
7016
|
+
return apiRequest("GET", `/issues/${issueId}/comments${qs ? `?${qs}` : ""}`);
|
|
7017
|
+
}
|
|
7018
|
+
async function createIssueComment(issueId, body) {
|
|
7019
|
+
return apiRequest("POST", `/issues/${issueId}/comments`, { body });
|
|
7020
|
+
}
|
|
7001
7021
|
async function retestIssue(issueId) {
|
|
7002
7022
|
return apiRequest("POST", `/issues/${issueId}/retest`);
|
|
7003
7023
|
}
|
|
@@ -7043,6 +7063,8 @@ async function listTargetLogs(targetId, opts) {
|
|
|
7043
7063
|
async function searchTargetLogs(targetId, query, opts) {
|
|
7044
7064
|
return apiRequest("POST", `/targets/${targetId}/logs/search`, { query, ...opts });
|
|
7045
7065
|
}
|
|
7066
|
+
// src/core/api/blackboxPentest.ts
|
|
7067
|
+
init_ai();
|
|
7046
7068
|
|
|
7047
7069
|
// src/core/api/index.ts
|
|
7048
7070
|
init_constants();
|
|
@@ -7180,14 +7202,14 @@ var ENVIRONMENT_SYSTEM_PROMPT = buildEnvironmentSystemPrompt();
|
|
|
7180
7202
|
|
|
7181
7203
|
// src/core/agents/specialized/environment/types.ts
|
|
7182
7204
|
init_zod();
|
|
7183
|
-
var EnvironmentResultSchema =
|
|
7184
|
-
url:
|
|
7185
|
-
status:
|
|
7186
|
-
stepsTaken:
|
|
7187
|
-
authenticationDetails:
|
|
7205
|
+
var EnvironmentResultSchema = object({
|
|
7206
|
+
url: string().describe("The URL where the application is accessible"),
|
|
7207
|
+
status: _enum(["ready", "failed"]).describe("The status of the development environment"),
|
|
7208
|
+
stepsTaken: string().describe("The steps taken to start the development environment"),
|
|
7209
|
+
authenticationDetails: string().describe("Details on how to register a user and authenticate within the development environment")
|
|
7188
7210
|
});
|
|
7189
7211
|
// src/core/api/offesecAgent.ts
|
|
7190
|
-
async function
|
|
7212
|
+
async function runOffensiveSecurityAgent2(input) {
|
|
7191
7213
|
const agent = input.session ? new OffensiveSecurityAgent(input) : await OffensiveSecurityAgent.create(input);
|
|
7192
7214
|
input.onSessionReady?.(agent.session);
|
|
7193
7215
|
await agent.consume();
|
|
@@ -7390,13 +7412,13 @@ var PATCHING_SYSTEM_PROMPT = buildSystemPrompt();
|
|
|
7390
7412
|
|
|
7391
7413
|
// src/core/agents/specialized/patching/types.ts
|
|
7392
7414
|
init_zod();
|
|
7393
|
-
var PatchResultSchema =
|
|
7394
|
-
filesChanged:
|
|
7395
|
-
filePath:
|
|
7396
|
-
changesDescription:
|
|
7415
|
+
var PatchResultSchema = object({
|
|
7416
|
+
filesChanged: array(object({
|
|
7417
|
+
filePath: string().describe("Path to the file that was changed"),
|
|
7418
|
+
changesDescription: string().describe("Detailed description of the changes made to the file")
|
|
7397
7419
|
})),
|
|
7398
|
-
prTitle:
|
|
7399
|
-
prDescription:
|
|
7420
|
+
prTitle: string().describe("Title for the pull request"),
|
|
7421
|
+
prDescription: string().describe("Description for the pull request")
|
|
7400
7422
|
});
|
|
7401
7423
|
// src/core/workflows/threatModel.ts
|
|
7402
7424
|
init_dist();
|
|
@@ -8169,8 +8191,8 @@ function createSkillsRegistry() {
|
|
|
8169
8191
|
}
|
|
8170
8192
|
|
|
8171
8193
|
// src/core/workflows/threatModel.ts
|
|
8172
|
-
var HEADLESS_TOOL_NAMES =
|
|
8173
|
-
async function
|
|
8194
|
+
var HEADLESS_TOOL_NAMES = ALL_TOOL_NAMES2.filter((name) => name !== ASK_USER_QUESTIONS_TOOL_NAME);
|
|
8195
|
+
async function runThreatModelWorkflow2(input) {
|
|
8174
8196
|
const model = input.model ?? "claude-sonnet-4-5";
|
|
8175
8197
|
const registry = createSkillsRegistry();
|
|
8176
8198
|
await registry.load({ projectRoot: input.codebasePath });
|
|
@@ -8180,7 +8202,7 @@ async function runThreatModelWorkflow(input) {
|
|
|
8180
8202
|
codebasePath: input.codebasePath,
|
|
8181
8203
|
skillContent: content
|
|
8182
8204
|
});
|
|
8183
|
-
const session = input.session ?? await
|
|
8205
|
+
const session = input.session ?? await sessions2.create({
|
|
8184
8206
|
name: "Threat Model",
|
|
8185
8207
|
targets: [input.codebasePath],
|
|
8186
8208
|
config: { mode: "operator", agentCwd: input.codebasePath }
|
|
@@ -8191,18 +8213,18 @@ async function runThreatModelWorkflow(input) {
|
|
|
8191
8213
|
|
|
8192
8214
|
You are generating an application-centric threat model from source code analysis.
|
|
8193
8215
|
Working directory: ${input.codebasePath}`;
|
|
8194
|
-
await
|
|
8216
|
+
await runOffensiveSecurityAgent2({
|
|
8195
8217
|
system,
|
|
8196
8218
|
prompt,
|
|
8197
8219
|
model,
|
|
8198
8220
|
session,
|
|
8199
|
-
activeTools: [...HEADLESS_TOOL_NAMES, ...
|
|
8221
|
+
activeTools: [...HEADLESS_TOOL_NAMES, ...SKILL_TOOL_NAMES2],
|
|
8200
8222
|
authConfig: input.authConfig,
|
|
8201
8223
|
abortSignal: input.abortSignal,
|
|
8202
8224
|
skillsRegistry: registry,
|
|
8203
8225
|
eventBus: input.eventBus,
|
|
8204
|
-
stopWhen:
|
|
8226
|
+
stopWhen: stepCountIs2(1e4)
|
|
8205
8227
|
});
|
|
8206
8228
|
return { session, outputPath: input.outputPath };
|
|
8207
8229
|
}
|
|
8208
|
-
export { listScans, getScan, listPentestTargets, dispatchPentest, listIssues, getIssue, updateIssue, retestIssue, linkPullRequest, listIssuePullRequests, listFixes, getFix, listAgentLogs, searchAgentLogs, listTargetLogs, searchTargetLogs,
|
|
8230
|
+
export { CLOSED_DISPOSITIONS, listScans, getScan, listPentestTargets, dispatchPentest, listIssues, getIssue, updateIssue, listIssueComments, createIssueComment, retestIssue, linkPullRequest, listIssuePullRequests, listFixes, getFix, listAgentLogs, searchAgentLogs, listTargetLogs, searchTargetLogs, runOffensiveSecurityAgent2, buildPentestPrompt, buildThreatModelPrompt, createSkillsRegistry, runThreatModelWorkflow2 };
|