deployready 0.2.0 → 0.3.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/README.md +37 -5
- package/dist/active/accessControl.js +62 -10
- package/dist/active/accessControl.js.map +1 -1
- package/dist/active/requestPlan.js +52 -26
- package/dist/active/requestPlan.js.map +1 -1
- package/dist/active/runner.js +46 -18
- package/dist/active/runner.js.map +1 -1
- package/dist/active/tamper.js +17 -4
- package/dist/active/tamper.js.map +1 -1
- package/dist/agent/FileEditor.js +91 -17
- package/dist/agent/FileEditor.js.map +1 -1
- package/dist/agent/FixManager.js +104 -3
- package/dist/agent/FixManager.js.map +1 -1
- package/dist/ai/CliHandler.js +80 -0
- package/dist/ai/CliHandler.js.map +1 -0
- package/dist/ai/ModelRouter.js +42 -1
- package/dist/ai/ModelRouter.js.map +1 -1
- package/dist/ai/cli/argv.js +67 -0
- package/dist/ai/cli/argv.js.map +1 -0
- package/dist/ai/cli/env.js +46 -0
- package/dist/ai/cli/env.js.map +1 -0
- package/dist/ai/cli/errors.js +15 -0
- package/dist/ai/cli/errors.js.map +1 -0
- package/dist/ai/cli/parseOutput.js +151 -0
- package/dist/ai/cli/parseOutput.js.map +1 -0
- package/dist/ai/cli/providers.js +30 -0
- package/dist/ai/cli/providers.js.map +1 -0
- package/dist/ai/cli/ready.js +121 -0
- package/dist/ai/cli/ready.js.map +1 -0
- package/dist/ai/cli/resolve.js +108 -0
- package/dist/ai/cli/resolve.js.map +1 -0
- package/dist/ai/cli/runCli.js +265 -0
- package/dist/ai/cli/runCli.js.map +1 -0
- package/dist/ai/parseAiResponse.js +24 -11
- package/dist/ai/parseAiResponse.js.map +1 -1
- package/dist/ai/verifyAiFindings.js +106 -0
- package/dist/ai/verifyAiFindings.js.map +1 -0
- package/dist/analysis/ScoreCalculator.js +22 -2
- package/dist/analysis/ScoreCalculator.js.map +1 -1
- package/dist/analysis/SeverityScorer.js +6 -0
- package/dist/analysis/SeverityScorer.js.map +1 -1
- package/dist/analysis/VulnerabilityDetector.js +15 -7
- package/dist/analysis/VulnerabilityDetector.js.map +1 -1
- package/dist/analysis/rules.js +13 -1
- package/dist/analysis/rules.js.map +1 -1
- package/dist/cli/Commands.js +10 -3
- package/dist/cli/Commands.js.map +1 -1
- package/dist/cli/InteractiveShell.js +72 -22
- package/dist/cli/InteractiveShell.js.map +1 -1
- package/dist/cli/Onboarding.js +13 -1
- package/dist/cli/Onboarding.js.map +1 -1
- package/dist/cli/cliSetup.js +48 -0
- package/dist/cli/cliSetup.js.map +1 -0
- package/dist/config/ConfigManager.js +11 -0
- package/dist/config/ConfigManager.js.map +1 -1
- package/dist/core/CiGate.js +33 -16
- package/dist/core/CiGate.js.map +1 -1
- package/dist/core/Orchestrator.js +154 -19
- package/dist/core/Orchestrator.js.map +1 -1
- package/dist/core/Verifier.js +7 -1
- package/dist/core/Verifier.js.map +1 -1
- package/dist/dynamic/DynamicTester.js +92 -8
- package/dist/dynamic/DynamicTester.js.map +1 -1
- package/dist/dynamic/EndpointMapper.js +54 -24
- package/dist/dynamic/EndpointMapper.js.map +1 -1
- package/dist/dynamic/LocalhostDetector.js +11 -23
- package/dist/dynamic/LocalhostDetector.js.map +1 -1
- package/dist/dynamic/SecurityTester.js +55 -10
- package/dist/dynamic/SecurityTester.js.map +1 -1
- package/dist/dynamic/adminEvidence.js +47 -0
- package/dist/dynamic/adminEvidence.js.map +1 -0
- package/dist/dynamic/advertised.js +293 -0
- package/dist/dynamic/advertised.js.map +1 -0
- package/dist/dynamic/catchAll.js +57 -0
- package/dist/dynamic/catchAll.js.map +1 -0
- package/dist/dynamic/commonPaths/evidence.js +112 -0
- package/dist/dynamic/commonPaths/evidence.js.map +1 -0
- package/dist/dynamic/commonPaths/prober.js +210 -0
- package/dist/dynamic/commonPaths/prober.js.map +1 -0
- package/dist/dynamic/commonPaths/signatures.js +381 -0
- package/dist/dynamic/commonPaths/signatures.js.map +1 -0
- package/dist/parser/CodeParser.js +138 -28
- package/dist/parser/CodeParser.js.map +1 -1
- package/dist/parser/adapters/BabelAdapter.js +558 -27
- package/dist/parser/adapters/BabelAdapter.js.map +1 -1
- package/dist/parser/adapters/PythonAdapter.js +360 -14
- package/dist/parser/adapters/PythonAdapter.js.map +1 -1
- package/dist/parser/adapters/authMiddleware.js +256 -0
- package/dist/parser/adapters/authMiddleware.js.map +1 -0
- package/dist/parser/adapters/nest.js +162 -0
- package/dist/parser/adapters/nest.js.map +1 -0
- package/dist/parser/miniYaml.js +308 -0
- package/dist/parser/miniYaml.js.map +1 -0
- package/dist/parser/nextRoutes.js +204 -0
- package/dist/parser/nextRoutes.js.map +1 -0
- package/dist/parser/openapi.js +180 -0
- package/dist/parser/openapi.js.map +1 -0
- package/dist/parser/pathUtil.js +22 -0
- package/dist/parser/pathUtil.js.map +1 -0
- package/dist/ui/ExportManager.js +61 -3
- package/dist/ui/ExportManager.js.map +1 -1
- package/dist/ui/HtmlReporter.js +47 -5
- package/dist/ui/HtmlReporter.js.map +1 -1
- package/dist/ui/IssuePresenter.js +54 -5
- package/dist/ui/IssuePresenter.js.map +1 -1
- package/dist/ui/commonPathSection.js +42 -0
- package/dist/ui/commonPathSection.js.map +1 -0
- package/dist/utils/FileWalker.js +125 -16
- package/dist/utils/FileWalker.js.map +1 -1
- package/dist/utils/GitIgnore.js +162 -0
- package/dist/utils/GitIgnore.js.map +1 -0
- package/dist/utils/finding.js +5 -0
- package/dist/utils/finding.js.map +1 -1
- package/dist/utils/logger.js +4 -0
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/sanitize.js +30 -0
- package/dist/utils/sanitize.js.map +1 -0
- package/docs/sample-config.json +2 -1
- package/package.json +12 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.DynamicTester = void 0;
|
|
4
|
+
exports.skippedScanNote = skippedScanNote;
|
|
4
5
|
/**
|
|
5
6
|
* Orchestrates the dynamic suite against a confirmed-running local app.
|
|
6
7
|
*
|
|
@@ -8,27 +9,110 @@ exports.DynamicTester = void 0;
|
|
|
8
9
|
* const results = await DynamicTester.run('http://localhost:3000', routes);
|
|
9
10
|
*
|
|
10
11
|
* Safety: target is loopback-validated by the http client; all probes are GET;
|
|
11
|
-
*
|
|
12
|
+
* only routes discovered by static analysis or declared in the project's own API
|
|
13
|
+
* description, plus paths the running app advertised in responses already
|
|
14
|
+
* fetched from them (advertised.ts), are ever requested (no guessed paths, no
|
|
15
|
+
* invented ids); the aggressive rate-limit burst only runs when
|
|
16
|
+
* explicitly enabled.
|
|
12
17
|
*/
|
|
13
18
|
const httpClient_1 = require("./httpClient");
|
|
14
19
|
const EndpointMapper_1 = require("./EndpointMapper");
|
|
15
20
|
const SecurityTester_1 = require("./SecurityTester");
|
|
16
21
|
const PerformanceTester_1 = require("./PerformanceTester");
|
|
17
22
|
const APIAnalyzer_1 = require("./APIAnalyzer");
|
|
23
|
+
const advertised_1 = require("./advertised");
|
|
24
|
+
const finding_1 = require("../utils/finding");
|
|
25
|
+
const logger_1 = require("../utils/logger");
|
|
26
|
+
const MAX_LISTED = 10;
|
|
27
|
+
function groupReasons(skipped) {
|
|
28
|
+
const byReason = new Map();
|
|
29
|
+
for (const s of skipped)
|
|
30
|
+
byReason.set(s.reason, (byReason.get(s.reason) ?? 0) + 1);
|
|
31
|
+
return [...byReason].map(([reason, n]) => `${n} x ${reason}`).join('; ');
|
|
32
|
+
}
|
|
33
|
+
function plural(n, word) {
|
|
34
|
+
return `${n} ${word}${n === 1 ? '' : 's'}`;
|
|
35
|
+
}
|
|
36
|
+
/** Non-scored note for a scan that sent nothing, with the reason. */
|
|
37
|
+
function skippedScanNote(rule, routeCount, skipped) {
|
|
38
|
+
const scan = rule === 'dynamic-skipped' ? 'dynamic' : 'active';
|
|
39
|
+
if (routeCount === 0) {
|
|
40
|
+
return (0, finding_1.makeNote)({
|
|
41
|
+
rule,
|
|
42
|
+
title: `No routes discovered; ${scan} checks skipped`,
|
|
43
|
+
category: 'security',
|
|
44
|
+
source: 'dynamic',
|
|
45
|
+
description: 'Static analysis found no routes in this project (for example, the framework is not supported). DeployReady does not guess routes, so nothing was requested from your running app.',
|
|
46
|
+
recommendation: 'Run DeployReady on a project with a supported framework, or review the live app with another tool.',
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return (0, finding_1.makeNote)({
|
|
50
|
+
rule,
|
|
51
|
+
title: `${plural(routeCount, 'route')} discovered but none could be probed; ${scan} checks skipped`,
|
|
52
|
+
category: 'security',
|
|
53
|
+
source: 'dynamic',
|
|
54
|
+
description: `Routes were found in the code, but none can be requested safely without inventing a path or value. Nothing was requested. Reasons: ${groupReasons(skipped)}.`,
|
|
55
|
+
recommendation: scan === 'dynamic'
|
|
56
|
+
? 'For routes with path parameters, use the authenticated active scan (--token), which fills them from your own token.'
|
|
57
|
+
: 'Provide a token whose claims can fill the path parameters, or review these routes manually.',
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function skippedRoutesNote(skipped, probedCount) {
|
|
61
|
+
const listed = skipped
|
|
62
|
+
.slice(0, MAX_LISTED)
|
|
63
|
+
.map((s) => `${s.method} ${s.path} (${s.reason})`)
|
|
64
|
+
.join('; ');
|
|
65
|
+
const more = skipped.length > MAX_LISTED ? `; and ${skipped.length - MAX_LISTED} more` : '';
|
|
66
|
+
return (0, finding_1.makeNote)({
|
|
67
|
+
rule: 'dynamic-routes-skipped',
|
|
68
|
+
title: `${plural(skipped.length, 'discovered route')} could not be checked dynamically`,
|
|
69
|
+
category: 'security',
|
|
70
|
+
source: 'dynamic',
|
|
71
|
+
description: `${plural(probedCount, 'discovered route')} checked; ${skipped.length} not requested because DeployReady never guesses paths or values: ${listed}${more}.`,
|
|
72
|
+
recommendation: 'Review these routes manually, or use the authenticated active scan (--token) for routes that need a path parameter.',
|
|
73
|
+
});
|
|
74
|
+
}
|
|
18
75
|
class DynamicTester {
|
|
19
76
|
static async run(baseUrl, routes, opts = {}) {
|
|
20
77
|
const client = (0, httpClient_1.createClient)(baseUrl); // throws if non-loopback
|
|
21
|
-
const targets = EndpointMapper_1.EndpointMapper.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
78
|
+
const { targets, skipped } = EndpointMapper_1.EndpointMapper.plan(routes);
|
|
79
|
+
for (const s of skipped)
|
|
80
|
+
logger_1.logger.debug(`[skip] ${s.method} ${s.path}: ${s.reason}`);
|
|
81
|
+
for (const t of targets)
|
|
82
|
+
logger_1.logger.debug(`[probe] ${t.method} ${t.path}: ${t.why.join('; ')}`);
|
|
83
|
+
if (targets.length === 0) {
|
|
84
|
+
// With no targets this sends nothing; it only keeps the "could not verify" rate-limit notes.
|
|
85
|
+
const sec = await SecurityTester_1.SecurityTester.run(client, [], { aggressive: opts.aggressive ?? false, skipped });
|
|
86
|
+
return {
|
|
87
|
+
baseUrl,
|
|
88
|
+
reachable: true,
|
|
89
|
+
endpoints: [],
|
|
90
|
+
probed: [],
|
|
91
|
+
skipped,
|
|
92
|
+
findings: [skippedScanNote('dynamic-skipped', routes.length, skipped), ...sec.findings],
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
logger_1.logger.debug(`[probe] ${plural(targets.length, 'discovered route')} will be requested; each is requested up to 3 times (security, performance and API checks)`);
|
|
96
|
+
const advertised = await (0, advertised_1.discoverAdvertised)(client, baseUrl, targets, opts.projectPath);
|
|
97
|
+
for (const t of advertised.targets)
|
|
98
|
+
logger_1.logger.debug(`[probe] ${t.method} ${t.path}: ${t.why.join('; ')}`);
|
|
99
|
+
const all = [...targets, ...advertised.targets];
|
|
100
|
+
const sec = await SecurityTester_1.SecurityTester.run(client, all, {
|
|
101
|
+
aggressive: opts.aggressive ?? false,
|
|
102
|
+
skipped,
|
|
103
|
+
prefetched: advertised.responses,
|
|
104
|
+
});
|
|
105
|
+
const [perf, api] = await Promise.all([PerformanceTester_1.PerformanceTester.run(client, all), APIAnalyzer_1.APIAnalyzer.run(client, all)]);
|
|
106
|
+
const findings = [...sec.findings, ...perf, ...api];
|
|
107
|
+
if (skipped.length > 0)
|
|
108
|
+
findings.push(skippedRoutesNote(skipped, targets.length));
|
|
27
109
|
return {
|
|
28
110
|
baseUrl,
|
|
29
111
|
reachable: true,
|
|
30
112
|
endpoints: sec.endpoints,
|
|
31
|
-
|
|
113
|
+
probed: all.map(({ method, path, why }) => ({ method, path, why })),
|
|
114
|
+
skipped,
|
|
115
|
+
findings,
|
|
32
116
|
};
|
|
33
117
|
}
|
|
34
118
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicTester.js","sourceRoot":"","sources":["../../src/dynamic/DynamicTester.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"DynamicTester.js","sourceRoot":"","sources":["../../src/dynamic/DynamicTester.ts"],"names":[],"mappings":";;;AA0CA,0CA4BC;AAtED;;;;;;;;;;;;GAYG;AACH,6CAA4C;AAC5C,qDAAkD;AAClD,qDAAkD;AAClD,2DAAwD;AACxD,+CAA4C;AAC5C,6CAAkD;AAClD,8CAA4C;AAC5C,4CAAyC;AASzC,MAAM,UAAU,GAAG,EAAE,CAAC;AAEtB,SAAS,YAAY,CAAC,OAAuB;IAC3C,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC3C,KAAK,MAAM,CAAC,IAAI,OAAO;QAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACnF,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC3E,CAAC;AAED,SAAS,MAA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MAAM,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;QAE1G,MAAM,QAAQ,GAAG,CAAC,GAAG,GAAG,CAAC,QAAQ,EAAE,GAAG,IAAI,EAAE,GAAG,GAAG,CAAC,CAAC;QACpD,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YAAE,QAAQ,CAAC,IAAI,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;QAElF,OAAO;YACL,OAAO;YACP,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;YACnE,OAAO;YACP,QAAQ;SACT,CAAC;IACJ,CAAC;CACF;AAnDD,sCAmDC"}
|
|
@@ -1,39 +1,69 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.EndpointMapper = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
4
|
+
const adminEvidence_1 = require("./adminEvidence");
|
|
5
|
+
const PARAM_RES = [/:([A-Za-z0-9_]+)/, /\{([^{}/]*)\}/, /<([^<>/]*)>/, /\[\[?(?:\.\.\.)?[^[\]/]*\]\]?/];
|
|
6
|
+
const PATTERN_CHARS = /[*()?+[\]\\]/;
|
|
6
7
|
class EndpointMapper {
|
|
7
|
-
static
|
|
8
|
+
static plan(routes) {
|
|
8
9
|
const seen = new Set();
|
|
9
10
|
const targets = [];
|
|
10
|
-
const
|
|
11
|
-
|
|
11
|
+
const skipped = [];
|
|
12
|
+
for (const r of routes) {
|
|
13
|
+
const upper = r.method.toUpperCase();
|
|
14
|
+
const method = upper === 'ALL' ? 'GET' : upper;
|
|
15
|
+
const key = `${method} ${r.path}`;
|
|
12
16
|
if (seen.has(key))
|
|
13
|
-
|
|
17
|
+
continue;
|
|
14
18
|
seen.add(key);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
const skip = (reason) => skipped.push({ method, path: r.path, reason });
|
|
20
|
+
if (method !== 'GET') {
|
|
21
|
+
skip('non-GET route: the scanner never mutates data');
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
const unusable = EndpointMapper.unrequestable(r.path);
|
|
25
|
+
if (unusable) {
|
|
26
|
+
skip(unusable);
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
const evidence = (0, adminEvidence_1.adminEvidence)(r);
|
|
30
|
+
targets.push({
|
|
31
|
+
method,
|
|
32
|
+
path: r.path,
|
|
21
33
|
guarded: r.guarded,
|
|
22
|
-
sensitive:
|
|
34
|
+
sensitive: evidence.length > 0,
|
|
35
|
+
why: [
|
|
36
|
+
r.source === 'openapi'
|
|
37
|
+
? `declared in OpenAPI/Swagger file ${r.file}`
|
|
38
|
+
: `discovered at ${r.file}${r.line ? `:${r.line}` : ''}`,
|
|
39
|
+
...(r.specFiles?.length ? [`also declared in ${r.specFiles.join(', ')}`] : []),
|
|
40
|
+
r.source === 'openapi'
|
|
41
|
+
? r.guarded
|
|
42
|
+
? 'requires auth per the spec'
|
|
43
|
+
: 'no auth required per the spec'
|
|
44
|
+
: r.guarded
|
|
45
|
+
? 'guarded in code'
|
|
46
|
+
: 'unguarded in code',
|
|
47
|
+
...evidence,
|
|
48
|
+
],
|
|
23
49
|
});
|
|
24
50
|
}
|
|
25
|
-
|
|
26
|
-
add({ method: 'GET', path: p, guarded: false, sensitive: false });
|
|
27
|
-
for (const p of SENSITIVE_PATHS)
|
|
28
|
-
add({ method: 'GET', path: p, guarded: true, sensitive: true });
|
|
29
|
-
return targets;
|
|
51
|
+
return { targets, skipped };
|
|
30
52
|
}
|
|
31
|
-
/**
|
|
32
|
-
static
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
.
|
|
53
|
+
/** Reason a discovered path cannot be requested verbatim, or null if it can. */
|
|
54
|
+
static unrequestable(path) {
|
|
55
|
+
if (!path.startsWith('/'))
|
|
56
|
+
return `path "${path}" is not an absolute URL path`;
|
|
57
|
+
for (const re of PARAM_RES) {
|
|
58
|
+
const m = re.exec(path);
|
|
59
|
+
if (m) {
|
|
60
|
+
return `needs a value for path parameter "${m[0]}" that the scan cannot supply (values are never invented)`;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
if (PATTERN_CHARS.test(path)) {
|
|
64
|
+
return 'path is a pattern or wildcard, not a concrete URL (the scan never invents a concrete path)';
|
|
65
|
+
}
|
|
66
|
+
return null;
|
|
37
67
|
}
|
|
38
68
|
}
|
|
39
69
|
exports.EndpointMapper = EndpointMapper;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EndpointMapper.js","sourceRoot":"","sources":["../../src/dynamic/EndpointMapper.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"EndpointMapper.js","sourceRoot":"","sources":["../../src/dynamic/EndpointMapper.ts"],"names":[],"mappings":";;;AAMA,mDAAgD;AAoBhD,MAAM,SAAS,GAAG,CAAC,kBAAkB,EAAE,eAAe,EAAE,aAAa,EAAE,+BAA+B,CAAC,CAAC;AACxG,MAAM,aAAa,GAAG,cAAc,CAAC;AAErC,MAAa,cAAc;IACzB,MAAM,CAAC,IAAI,CAAC,MAAe;QACzB,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;QAC/B,MAAM,OAAO,GAAkB,EAAE,CAAC;QAClC,MAAM,OAAO,GAAmB,EAAE,CAAC;QAEnC,KAAK,MAAM,CAAC,IAAI,MAAM,EAAE,CAAC;YACvB,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;YACrC,MAAM,MAAM,GAAG,KAAK,KAAK,KAAK,CAAC,CA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AC,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC9E,CAAC,CAAC,MAAM,KAAK,SAAS;wBACpB,CAAC,CAAC,CAAC,CAAC,OAAO;4BACT,CAAC,CAAC,4BAA4B;4BAC9B,CAAC,CAAC,+BAA+B;wBACnC,CAAC,CAAC,CAAC,CAAC,OAAO;4BACT,CAAC,CAAC,iBAAiB;4BACnB,CAAC,CAAC,mBAAmB;oBACzB,GAAG,QAAQ;iBACZ;aACF,CAAC,CAAC;QACL,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC9B,CAAC;IAED,gFAAgF;IAChF,MAAM,CAAC,aAAa,CAAC,IAAY;QAC/B,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,OAAO,SAAS,IAAI,+BAA+B,CAAC;QAC/E,KAAK,MAAM,EAAE,IAAI,SAAS,EAAE,CAAC;YAC3B,MAAM,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACxB,IAAI,CAAC,EAAE,CAAC;gBACN,OAAO,qCAAqC,CAAC,CAAC,CAAC,CAAC,2DAA2D,CAAC;YAC9G,CAAC;QACH,CAAC;QACD,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7B,OAAO,4FAA4F,CAAC;QACtG,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA/DD,wCA+DC"}
|
|
@@ -35,37 +35,35 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.LocalhostDetector = void 0;
|
|
37
37
|
/**
|
|
38
|
-
* Detect a
|
|
39
|
-
*
|
|
38
|
+
* Detect a local server listening on common ports by attempting a TCP
|
|
39
|
+
* connection. Liveness is a connect only: no HTTP request is ever sent, because
|
|
40
|
+
* every URL path (even "/") would be one the scan has no evidence exists.
|
|
40
41
|
*
|
|
41
42
|
* Interface contract:
|
|
42
43
|
* const found = await LocalhostDetector.find([3000, 5000, ...]);
|
|
43
44
|
* // -> { port, baseUrl } | null
|
|
44
45
|
*/
|
|
45
46
|
const net = __importStar(require("net"));
|
|
46
|
-
const httpClient_1 = require("./httpClient");
|
|
47
47
|
class LocalhostDetector {
|
|
48
48
|
static async find(ports) {
|
|
49
49
|
for (const port of ports) {
|
|
50
|
-
if (await LocalhostDetector.isPortOpen(port))
|
|
51
|
-
|
|
52
|
-
if (await LocalhostDetector.isHttp(baseUrl)) {
|
|
53
|
-
return { port, baseUrl };
|
|
54
|
-
}
|
|
55
|
-
}
|
|
50
|
+
if (await LocalhostDetector.isPortOpen(port))
|
|
51
|
+
return LocalhostDetector.app(port);
|
|
56
52
|
}
|
|
57
53
|
return null;
|
|
58
54
|
}
|
|
59
|
-
/** All
|
|
55
|
+
/** All ports from the candidate list that accept a TCP connection. */
|
|
60
56
|
static async findAll(ports) {
|
|
61
57
|
const apps = [];
|
|
62
58
|
for (const port of ports) {
|
|
63
|
-
if (
|
|
64
|
-
apps.push(
|
|
65
|
-
}
|
|
59
|
+
if (await LocalhostDetector.isPortOpen(port))
|
|
60
|
+
apps.push(LocalhostDetector.app(port));
|
|
66
61
|
}
|
|
67
62
|
return apps;
|
|
68
63
|
}
|
|
64
|
+
static app(port) {
|
|
65
|
+
return { port, baseUrl: `http://localhost:${port}` };
|
|
66
|
+
}
|
|
69
67
|
static isPortOpen(port, timeoutMs = 400) {
|
|
70
68
|
return new Promise((resolve) => {
|
|
71
69
|
const socket = new net.Socket();
|
|
@@ -80,16 +78,6 @@ class LocalhostDetector {
|
|
|
80
78
|
socket.connect(port, '127.0.0.1');
|
|
81
79
|
});
|
|
82
80
|
}
|
|
83
|
-
static async isHttp(baseUrl) {
|
|
84
|
-
try {
|
|
85
|
-
const client = (0, httpClient_1.createClient)(baseUrl);
|
|
86
|
-
const res = await client.get('/');
|
|
87
|
-
return typeof res.status === 'number';
|
|
88
|
-
}
|
|
89
|
-
catch {
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
81
|
}
|
|
94
82
|
exports.LocalhostDetector = LocalhostDetector;
|
|
95
83
|
//# sourceMappingURL=LocalhostDetector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocalhostDetector.js","sourceRoot":"","sources":["../../src/dynamic/LocalhostDetector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA
|
|
1
|
+
{"version":3,"file":"LocalhostDetector.js","sourceRoot":"","sources":["../../src/dynamic/LocalhostDetector.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;GAQG;AACH,yCAA2B;AAO3B,MAAa,iBAAiB;IAC5B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,KAAe;QAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,MAAM,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC;gBAAE,OAAO,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACnF,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,sEAAsE;IACtE,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAAe;QAClC,MAAM,IAAI,GAAkB,EAAE,CAAC;QAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,IAAI,MAAM,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC;gBAAE,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;QACvF,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,MAAM,CAAC,GAAG,CAAC,IAAY;QAC7B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,IAAI,EAAE,EAAE,CAAC;IACvD,CAAC;IAEO,MAAM,CAAC,UAAU,CAAC,IAAY,EAAE,SAAS,GAAG,GAAG;QACrD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YAChC,MAAM,IAAI,GAAG,CAAC,IAAa,EAAE,EAAE;gBAC7B,MAAM,CAAC,OAAO,EAAE,CAAC;gBACjB,OAAO,CAAC,IAAI,CAAC,CAAC;YAChB,CAAC,CAAC;YACF,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;YAC7B,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;YACzC,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YAC1C,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YACxC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QACpC,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAnCD,8CAmCC"}
|
|
@@ -3,12 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SecurityTester = void 0;
|
|
4
4
|
const finding_1 = require("../utils/finding");
|
|
5
5
|
const redact_1 = require("../utils/redact");
|
|
6
|
+
const catchAll_1 = require("./catchAll");
|
|
6
7
|
const SECURITY_HEADERS = [
|
|
7
8
|
'x-content-type-options',
|
|
8
9
|
'x-frame-options',
|
|
9
10
|
'strict-transport-security',
|
|
10
11
|
'content-security-policy',
|
|
11
12
|
];
|
|
13
|
+
const AUTH_LIKE = /login|auth|signin/i;
|
|
12
14
|
class SecurityTester {
|
|
13
15
|
static async run(client, targets, opts = { aggressive: false }) {
|
|
14
16
|
const findings = [];
|
|
@@ -17,19 +19,35 @@ class SecurityTester {
|
|
|
17
19
|
// CORS and security headers are server-wide config — report them once, not
|
|
18
20
|
// once per endpoint, to keep the report signal high.
|
|
19
21
|
let corsFlagged = false;
|
|
22
|
+
let baseline;
|
|
23
|
+
// Sent at most once, and only when a critical would otherwise be raised.
|
|
24
|
+
const isCatchAllPage = async (t, res) => {
|
|
25
|
+
baseline ??= (0, catchAll_1.probeCatchAll)(client, `GET ${t.path} returned ${res.status} and would otherwise be reported`);
|
|
26
|
+
return (0, catchAll_1.isCatchAll)(await baseline, res);
|
|
27
|
+
};
|
|
28
|
+
const contentTypes = new Map();
|
|
20
29
|
for (const t of targets) {
|
|
21
30
|
if (t.method !== 'GET')
|
|
22
31
|
continue; // safety: never mutate
|
|
23
32
|
let res;
|
|
24
|
-
|
|
25
|
-
res =
|
|
33
|
+
if (opts.prefetched?.has(t.path)) {
|
|
34
|
+
res = opts.prefetched.get(t.path);
|
|
35
|
+
if (!res)
|
|
36
|
+
continue; // the earlier fetch got no response
|
|
26
37
|
}
|
|
27
|
-
|
|
28
|
-
|
|
38
|
+
else {
|
|
39
|
+
try {
|
|
40
|
+
res = await client.get(t.path);
|
|
41
|
+
}
|
|
42
|
+
catch {
|
|
43
|
+
continue; // unreachable path — ignore
|
|
44
|
+
}
|
|
29
45
|
}
|
|
30
46
|
endpoints.push({ method: 'GET', path: t.path, status: res.status });
|
|
47
|
+
contentTypes.set(t.path, String(res.headers['content-type'] ?? ''));
|
|
48
|
+
const reportable = (t.guarded || t.sensitive) && res.status >= 200 && res.status < 300 && !(await isCatchAllPage(t, res));
|
|
31
49
|
// 1. Auth bypass: a guarded route that returns 2xx without credentials.
|
|
32
|
-
if (t.guarded &&
|
|
50
|
+
if (t.guarded && reportable) {
|
|
33
51
|
findings.push((0, finding_1.makeFinding)({
|
|
34
52
|
rule: 'auth-bypass',
|
|
35
53
|
title: 'Protected endpoint reachable without authentication',
|
|
@@ -44,7 +62,7 @@ class SecurityTester {
|
|
|
44
62
|
}));
|
|
45
63
|
}
|
|
46
64
|
// 2. Exposed sensitive/admin route.
|
|
47
|
-
if (t.sensitive &&
|
|
65
|
+
if (t.sensitive && reportable) {
|
|
48
66
|
findings.push((0, finding_1.makeFinding)({
|
|
49
67
|
rule: 'exposed-admin-route',
|
|
50
68
|
title: 'Sensitive route is publicly reachable',
|
|
@@ -117,15 +135,42 @@ class SecurityTester {
|
|
|
117
135
|
}
|
|
118
136
|
// 6. Rate limiting (aggressive — burst a likely-auth endpoint).
|
|
119
137
|
if (opts.aggressive) {
|
|
120
|
-
|
|
138
|
+
// A login PAGE (HTML) says nothing about the login API's throttling, so only
|
|
139
|
+
// non-HTML auth-like GET endpoints are burst.
|
|
140
|
+
const isBurstable = (t) => t.method === 'GET' && AUTH_LIKE.test(t.path) && contentTypes.has(t.path) && !/text\/html/i.test(contentTypes.get(t.path));
|
|
141
|
+
const loginTarget = targets.find(isBurstable);
|
|
142
|
+
const burstPaths = new Set(targets.filter(isBurstable).map((t) => t.path));
|
|
121
143
|
if (loginTarget) {
|
|
122
144
|
const f = await SecurityTester.probeRateLimit(client, loginTarget.path);
|
|
123
145
|
if (f)
|
|
124
146
|
findings.push(f);
|
|
125
147
|
}
|
|
148
|
+
// Auth-like routes we cannot test (non-GET, or only an HTML page): never go
|
|
149
|
+
// silent, but never claim a limiter is missing either.
|
|
150
|
+
const noted = new Set();
|
|
151
|
+
const nonGetSkipped = (opts.skipped ?? []).filter((s) => s.method !== 'GET');
|
|
152
|
+
for (const t of [...targets, ...nonGetSkipped]) {
|
|
153
|
+
if (!AUTH_LIKE.test(t.path) || burstPaths.has(t.path) || noted.has(t.path))
|
|
154
|
+
continue;
|
|
155
|
+
noted.add(t.path);
|
|
156
|
+
findings.push(SecurityTester.unverifiedRateLimitNote(t.path));
|
|
157
|
+
}
|
|
126
158
|
}
|
|
127
159
|
return { findings, endpoints };
|
|
128
160
|
}
|
|
161
|
+
static unverifiedRateLimitNote(path) {
|
|
162
|
+
return (0, finding_1.makeNote)({
|
|
163
|
+
rule: 'missing-rate-limit',
|
|
164
|
+
title: `Rate limiting on ${path} could not be verified`,
|
|
165
|
+
category: 'security',
|
|
166
|
+
source: 'dynamic',
|
|
167
|
+
endpoint: path,
|
|
168
|
+
owasp: 'A07:2025',
|
|
169
|
+
cwe: 'CWE-307',
|
|
170
|
+
description: `${path} looks like an authentication route, but the scanner only sends GET requests, so this route was not tested for rate limiting. This does not mean a limiter is missing.`,
|
|
171
|
+
recommendation: `Check that a rate limiter (e.g. express-rate-limit) is configured on ${path}.`,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
129
174
|
/** Send a small burst; if nothing ever returns 429, flag missing rate limiting. */
|
|
130
175
|
static async probeRateLimit(client, path) {
|
|
131
176
|
const BURST = 20;
|
|
@@ -147,13 +192,13 @@ class SecurityTester {
|
|
|
147
192
|
return (0, finding_1.makeFinding)({
|
|
148
193
|
rule: 'missing-rate-limit',
|
|
149
194
|
title: 'No rate limiting detected on sensitive endpoint',
|
|
150
|
-
severity: '
|
|
195
|
+
severity: 'warning',
|
|
151
196
|
category: 'security',
|
|
152
197
|
source: 'dynamic',
|
|
153
198
|
endpoint: path,
|
|
154
199
|
owasp: 'A07:2025',
|
|
155
200
|
cwe: 'CWE-307',
|
|
156
|
-
description: `Sent ${BURST} rapid requests to ${path} with no 429 throttling response.`,
|
|
201
|
+
description: `Sent ${BURST} rapid GET requests to ${path} with no 429 throttling response. Low confidence: measured with GET requests only; the login POST route itself is not probed.`,
|
|
157
202
|
recommendation: 'Add rate limiting (e.g. express-rate-limit) to auth and other abuse-prone endpoints.',
|
|
158
203
|
});
|
|
159
204
|
}
|
|
@@ -161,7 +206,7 @@ class SecurityTester {
|
|
|
161
206
|
exports.SecurityTester = SecurityTester;
|
|
162
207
|
function safeStringify(data) {
|
|
163
208
|
try {
|
|
164
|
-
return (
|
|
209
|
+
return (JSON.stringify(data) ?? '').slice(0, 100_000);
|
|
165
210
|
}
|
|
166
211
|
catch {
|
|
167
212
|
return '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecurityTester.js","sourceRoot":"","sources":["../../src/dynamic/SecurityTester.ts"],"names":[],"mappings":";;;AAMA,
|
|
1
|
+
{"version":3,"file":"SecurityTester.js","sourceRoot":"","sources":["../../src/dynamic/SecurityTester.ts"],"names":[],"mappings":";;;AAMA,8CAAyD;AACzD,4CAA+C;AAG/C,yCAAyE;AAGzE,MAAM,gBAAgB,GAAG;IACvB,wBAAwB;IACxB,iBAAiB;IACjB,2BAA2B;IAC3B,yBAAyB;CAC1B,CAAC;AAEF,MAAM,SAAS,GAAG,oBAAoB,CAAC;AAOvC,MAAa,cAAc;IACzB,MAAM,CAAC,KAAK,CAAC,GAAG,CACd,MAAqB,EACrB,OAAsB,EACtB,OAAiG,EAAE,UAAU,EAAE,KAAK,EAAE;QAEtH,MAAM,QAAQ,GAAc,EAAE,CAAC;QAC/B,MAAM,SAAS,GAAmB,EAAE,CAAC;QACrC,IAAI,cAAc,GAAG,KAAK,CAAC;QAC3B,2EAA2E;QAC3E,qDAAqD;QACrD,IAAI,WAAW,GAAG,KAAK,CAAC;QACxB,IAAI,QAAiD,CAAC;QACtD,yEAAyE;QACzE,MAAM,cAAc,GAAG,KAAK,EAAE,CAAc,EAAE,GAAsC,EAAoB,EAAE;YACxG,QAAQ,KAAK,IAAA,wBAAa,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,aAAa,GAAG,CAAC,MAAM,kCAAkC,CAAC,CAAC;YAC3G,OAAO,IAAA,qBAAU,EAAC,MAAM,QAAQ,EAAE,GAAG,CAAC,CAAC;QACzC,CAAC,CAAC;QACF,MAAM,YAAY,GAAG,IAAI,GAAG,EAAkB,CAAC;QAE/C,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;YACxB,IAAI,CAAC,CAAC,MAAM,KAAK,KAAK;gBAAE,SAAS,CAAC,uBAAuB;YACzD,IAAI,GAAG,CAAC;YACR,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B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC;YAC/B,IAAI,CAAC;gBACH,MAAM,GAAG,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACnC,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;oBACvB,SAAS,GAAG,IAAI,CAAC;oBACjB,MAAM;gBACR,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,MAAM;YACR,CAAC;QACH,CAAC;QACD,IAAI,SAAS;YAAE,OAAO,IAAI,CAAC;QAC3B,OAAO,IAAA,qBAAW,EAAC;YACjB,IAAI,EAAE,oBAAoB;YAC1B,KAAK,EAAE,iDAAiD;YACxD,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,SAAS;YACjB,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,UAAU;YACjB,GAAG,EAAE,SAAS;YACd,WAAW,EAAE,QAAQ,KAAK,0BAA0B,IAAI,+HAA+H;YACvL,cAAc,EAAE,sFAAsF;SACvG,CAAC,CAAC;IACL,CAAC;CACF;AAlND,wCAkNC;AAED,SAAS,aAAa,CAAC,IAAa;IAClC,IAAI,CAAC;QACH,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.adminEvidence = adminEvidence;
|
|
4
|
+
/**
|
|
5
|
+
* Classify an already-discovered route as admin-like from evidence in its own
|
|
6
|
+
* path and guard names. Never produces a request; whole words only.
|
|
7
|
+
*/
|
|
8
|
+
const authMiddleware_1 = require("../parser/adapters/authMiddleware");
|
|
9
|
+
const ADMIN_VOCABULARY = new Set([
|
|
10
|
+
'admin',
|
|
11
|
+
'admins',
|
|
12
|
+
'administrator',
|
|
13
|
+
'administrators',
|
|
14
|
+
'administration',
|
|
15
|
+
'backoffice',
|
|
16
|
+
'staff',
|
|
17
|
+
'superuser',
|
|
18
|
+
'superadmin',
|
|
19
|
+
'sysadmin',
|
|
20
|
+
'moderator',
|
|
21
|
+
'moderators',
|
|
22
|
+
'management',
|
|
23
|
+
'internal',
|
|
24
|
+
'debug',
|
|
25
|
+
'actuator',
|
|
26
|
+
'console',
|
|
27
|
+
]);
|
|
28
|
+
const PARAM_SEGMENT = /[:{}<>*()?+[\]\\]/;
|
|
29
|
+
function segmentMatches(segment) {
|
|
30
|
+
const collapsed = segment.toLowerCase().replace(/[-_.]/g, '');
|
|
31
|
+
return ADMIN_VOCABULARY.has(collapsed) || (0, authMiddleware_1.splitWords)(segment).some((w) => ADMIN_VOCABULARY.has(w));
|
|
32
|
+
}
|
|
33
|
+
function adminEvidence(route) {
|
|
34
|
+
const evidence = [];
|
|
35
|
+
for (const segment of route.path.split('/')) {
|
|
36
|
+
if (!segment || PARAM_SEGMENT.test(segment))
|
|
37
|
+
continue;
|
|
38
|
+
if (segmentMatches(segment))
|
|
39
|
+
evidence.push(`admin-like: path segment "${segment}"`);
|
|
40
|
+
}
|
|
41
|
+
for (const name of route.guardNames ?? []) {
|
|
42
|
+
if ((0, authMiddleware_1.splitWords)(name).some((w) => ADMIN_VOCABULARY.has(w)))
|
|
43
|
+
evidence.push(`middleware "${name}"`);
|
|
44
|
+
}
|
|
45
|
+
return evidence;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=adminEvidence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adminEvidence.js","sourceRoot":"","sources":["../../src/dynamic/adminEvidence.ts"],"names":[],"mappings":";;AAiCA,sCAUC;AA3CD;;;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