@sikkuumiii/defuse 0.0.0-stage → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (236) hide show
  1. package/LICENSE +235 -0
  2. package/README.md +561 -2
  3. package/dist/src/cli.d.ts +20 -0
  4. package/dist/src/cli.js +619 -0
  5. package/dist/src/cli.js.map +1 -0
  6. package/dist/src/core/analyze.d.ts +178 -0
  7. package/dist/src/core/analyze.js +834 -0
  8. package/dist/src/core/analyze.js.map +1 -0
  9. package/dist/src/core/coverage.d.ts +87 -0
  10. package/dist/src/core/coverage.js +181 -0
  11. package/dist/src/core/coverage.js.map +1 -0
  12. package/dist/src/core/finding.d.ts +196 -0
  13. package/dist/src/core/finding.js +178 -0
  14. package/dist/src/core/finding.js.map +1 -0
  15. package/dist/src/core/licence.d.ts +50 -0
  16. package/dist/src/core/licence.js +56 -0
  17. package/dist/src/core/licence.js.map +1 -0
  18. package/dist/src/core/paths.d.ts +21 -0
  19. package/dist/src/core/paths.js +58 -0
  20. package/dist/src/core/paths.js.map +1 -0
  21. package/dist/src/core/score.d.ts +137 -0
  22. package/dist/src/core/score.js +232 -0
  23. package/dist/src/core/score.js.map +1 -0
  24. package/dist/src/dast/targets.d.ts +30 -0
  25. package/dist/src/dast/targets.js +79 -0
  26. package/dist/src/dast/targets.js.map +1 -0
  27. package/dist/src/dast/zap.d.ts +42 -0
  28. package/dist/src/dast/zap.js +184 -0
  29. package/dist/src/dast/zap.js.map +1 -0
  30. package/dist/src/engine/scan.d.ts +80 -0
  31. package/dist/src/engine/scan.js +129 -0
  32. package/dist/src/engine/scan.js.map +1 -0
  33. package/dist/src/engine/shapes.d.ts +47 -0
  34. package/dist/src/engine/shapes.js +328 -0
  35. package/dist/src/engine/shapes.js.map +1 -0
  36. package/dist/src/engine/walk.d.ts +60 -0
  37. package/dist/src/engine/walk.js +156 -0
  38. package/dist/src/engine/walk.js.map +1 -0
  39. package/dist/src/parse/astDump.d.ts +31 -0
  40. package/dist/src/parse/astDump.js +66 -0
  41. package/dist/src/parse/astDump.js.map +1 -0
  42. package/dist/src/parse/languages.d.ts +70 -0
  43. package/dist/src/parse/languages.js +174 -0
  44. package/dist/src/parse/languages.js.map +1 -0
  45. package/dist/src/parse/location.d.ts +17 -0
  46. package/dist/src/parse/location.js +38 -0
  47. package/dist/src/parse/location.js.map +1 -0
  48. package/dist/src/parse/node-grammars.d.ts +12 -0
  49. package/dist/src/parse/node-grammars.js +35 -0
  50. package/dist/src/parse/node-grammars.js.map +1 -0
  51. package/dist/src/parse/parser.d.ts +126 -0
  52. package/dist/src/parse/parser.js +202 -0
  53. package/dist/src/parse/parser.js.map +1 -0
  54. package/dist/src/parse/tree-store.d.ts +139 -0
  55. package/dist/src/parse/tree-store.js +236 -0
  56. package/dist/src/parse/tree-store.js.map +1 -0
  57. package/dist/src/platform/dependency-rule.d.ts +27 -0
  58. package/dist/src/platform/dependency-rule.js +21 -0
  59. package/dist/src/platform/dependency-rule.js.map +1 -0
  60. package/dist/src/platform/deps.d.ts +86 -0
  61. package/dist/src/platform/deps.js +304 -0
  62. package/dist/src/platform/deps.js.map +1 -0
  63. package/dist/src/platform/php-facts.d.ts +49 -0
  64. package/dist/src/platform/php-facts.js +67 -0
  65. package/dist/src/platform/php-facts.js.map +1 -0
  66. package/dist/src/platform/runtime-version.d.ts +78 -0
  67. package/dist/src/platform/runtime-version.js +573 -0
  68. package/dist/src/platform/runtime-version.js.map +1 -0
  69. package/dist/src/report/colors.d.ts +50 -0
  70. package/dist/src/report/colors.js +97 -0
  71. package/dist/src/report/colors.js.map +1 -0
  72. package/dist/src/report/coverage-table.d.ts +90 -0
  73. package/dist/src/report/coverage-table.js +291 -0
  74. package/dist/src/report/coverage-table.js.map +1 -0
  75. package/dist/src/report/html-report.d.ts +66 -0
  76. package/dist/src/report/html-report.js +489 -0
  77. package/dist/src/report/html-report.js.map +1 -0
  78. package/dist/src/report/human.d.ts +44 -0
  79. package/dist/src/report/human.js +575 -0
  80. package/dist/src/report/human.js.map +1 -0
  81. package/dist/src/report/json.d.ts +24 -0
  82. package/dist/src/report/json.js +178 -0
  83. package/dist/src/report/json.js.map +1 -0
  84. package/dist/src/report/mark.d.ts +17 -0
  85. package/dist/src/report/mark.js +39 -0
  86. package/dist/src/report/mark.js.map +1 -0
  87. package/dist/src/report/pricing.d.ts +33 -0
  88. package/dist/src/report/pricing.js +343 -0
  89. package/dist/src/report/pricing.js.map +1 -0
  90. package/dist/src/report/sarif.d.ts +39 -0
  91. package/dist/src/report/sarif.js +219 -0
  92. package/dist/src/report/sarif.js.map +1 -0
  93. package/dist/src/report/site.d.ts +87 -0
  94. package/dist/src/report/site.js +742 -0
  95. package/dist/src/report/site.js.map +1 -0
  96. package/dist/src/rules/code-injection.d.ts +47 -0
  97. package/dist/src/rules/code-injection.js +326 -0
  98. package/dist/src/rules/code-injection.js.map +1 -0
  99. package/dist/src/rules/command-injection.d.ts +30 -0
  100. package/dist/src/rules/command-injection.js +286 -0
  101. package/dist/src/rules/command-injection.js.map +1 -0
  102. package/dist/src/rules/contract.d.ts +198 -0
  103. package/dist/src/rules/contract.js +39 -0
  104. package/dist/src/rules/contract.js.map +1 -0
  105. package/dist/src/rules/format-string.d.ts +46 -0
  106. package/dist/src/rules/format-string.js +146 -0
  107. package/dist/src/rules/format-string.js.map +1 -0
  108. package/dist/src/rules/hardcoded-secret.d.ts +38 -0
  109. package/dist/src/rules/hardcoded-secret.js +440 -0
  110. package/dist/src/rules/hardcoded-secret.js.map +1 -0
  111. package/dist/src/rules/lib/guards.d.ts +168 -0
  112. package/dist/src/rules/lib/guards.js +1179 -0
  113. package/dist/src/rules/lib/guards.js.map +1 -0
  114. package/dist/src/rules/lib/html-safety.d.ts +75 -0
  115. package/dist/src/rules/lib/html-safety.js +755 -0
  116. package/dist/src/rules/lib/html-safety.js.map +1 -0
  117. package/dist/src/rules/lib/local-build.d.ts +59 -0
  118. package/dist/src/rules/lib/local-build.js +320 -0
  119. package/dist/src/rules/lib/local-build.js.map +1 -0
  120. package/dist/src/rules/lib/strings.d.ts +208 -0
  121. package/dist/src/rules/lib/strings.js +1970 -0
  122. package/dist/src/rules/lib/strings.js.map +1 -0
  123. package/dist/src/rules/path-traversal.d.ts +33 -0
  124. package/dist/src/rules/path-traversal.js +96 -0
  125. package/dist/src/rules/path-traversal.js.map +1 -0
  126. package/dist/src/rules/registry.d.ts +19 -0
  127. package/dist/src/rules/registry.js +77 -0
  128. package/dist/src/rules/registry.js.map +1 -0
  129. package/dist/src/rules/sql-injection.d.ts +36 -0
  130. package/dist/src/rules/sql-injection.js +299 -0
  131. package/dist/src/rules/sql-injection.js.map +1 -0
  132. package/dist/src/rules/ssrf.d.ts +39 -0
  133. package/dist/src/rules/ssrf.js +111 -0
  134. package/dist/src/rules/ssrf.js.map +1 -0
  135. package/dist/src/rules/unbounded-copy.d.ts +37 -0
  136. package/dist/src/rules/unbounded-copy.js +147 -0
  137. package/dist/src/rules/unbounded-copy.js.map +1 -0
  138. package/dist/src/rules/unsafe-deserialization.d.ts +43 -0
  139. package/dist/src/rules/unsafe-deserialization.js +276 -0
  140. package/dist/src/rules/unsafe-deserialization.js.map +1 -0
  141. package/dist/src/rules/weak-hash.d.ts +37 -0
  142. package/dist/src/rules/weak-hash.js +197 -0
  143. package/dist/src/rules/weak-hash.js.map +1 -0
  144. package/dist/src/rules/xss.d.ts +38 -0
  145. package/dist/src/rules/xss.js +527 -0
  146. package/dist/src/rules/xss.js.map +1 -0
  147. package/dist/src/taint/content-type.d.ts +19 -0
  148. package/dist/src/taint/content-type.js +20 -0
  149. package/dist/src/taint/content-type.js.map +1 -0
  150. package/dist/src/taint/dictionaries.d.ts +23 -0
  151. package/dist/src/taint/dictionaries.js +1778 -0
  152. package/dist/src/taint/dictionaries.js.map +1 -0
  153. package/dist/src/taint/fold.d.ts +59 -0
  154. package/dist/src/taint/fold.js +1177 -0
  155. package/dist/src/taint/fold.js.map +1 -0
  156. package/dist/src/taint/java-scope.d.ts +61 -0
  157. package/dist/src/taint/java-scope.js +212 -0
  158. package/dist/src/taint/java-scope.js.map +1 -0
  159. package/dist/src/taint/local-map.d.ts +79 -0
  160. package/dist/src/taint/local-map.js +603 -0
  161. package/dist/src/taint/local-map.js.map +1 -0
  162. package/dist/src/taint/project.d.ts +172 -0
  163. package/dist/src/taint/project.js +617 -0
  164. package/dist/src/taint/project.js.map +1 -0
  165. package/dist/src/taint/tracer.d.ts +265 -0
  166. package/dist/src/taint/tracer.js +3817 -0
  167. package/dist/src/taint/tracer.js.map +1 -0
  168. package/dist/src/taint/types.d.ts +484 -0
  169. package/dist/src/taint/types.js +47 -0
  170. package/dist/src/taint/types.js.map +1 -0
  171. package/dist/src/taint/visibility.d.ts +25 -0
  172. package/dist/src/taint/visibility.js +96 -0
  173. package/dist/src/taint/visibility.js.map +1 -0
  174. package/docs/examples/defuse.json +20 -0
  175. package/docs/examples/dvwa-urls.json +14 -0
  176. package/docs/examples/github-code-scanning.yml +54 -0
  177. package/docs/examples/tiny.js +4 -0
  178. package/package.json +73 -4
  179. package/src/cli.ts +747 -0
  180. package/src/core/analyze.ts +1072 -0
  181. package/src/core/coverage.ts +269 -0
  182. package/src/core/finding.ts +311 -0
  183. package/src/core/licence.ts +61 -0
  184. package/src/core/paths.ts +59 -0
  185. package/src/core/score.ts +353 -0
  186. package/src/dast/targets.ts +121 -0
  187. package/src/dast/zap.ts +246 -0
  188. package/src/engine/scan.ts +200 -0
  189. package/src/engine/shapes.ts +348 -0
  190. package/src/engine/walk.ts +196 -0
  191. package/src/parse/astDump.ts +85 -0
  192. package/src/parse/languages.ts +232 -0
  193. package/src/parse/location.ts +44 -0
  194. package/src/parse/node-grammars.ts +41 -0
  195. package/src/parse/parser.ts +262 -0
  196. package/src/parse/tree-store.ts +301 -0
  197. package/src/platform/dependency-rule.ts +33 -0
  198. package/src/platform/deps.ts +374 -0
  199. package/src/platform/php-facts.ts +85 -0
  200. package/src/platform/runtime-version.ts +710 -0
  201. package/src/report/colors.ts +107 -0
  202. package/src/report/coverage-table.ts +359 -0
  203. package/src/report/html-report.ts +601 -0
  204. package/src/report/human.ts +811 -0
  205. package/src/report/json.ts +189 -0
  206. package/src/report/mark.ts +47 -0
  207. package/src/report/pricing.ts +374 -0
  208. package/src/report/sarif.ts +235 -0
  209. package/src/report/site.ts +760 -0
  210. package/src/rules/code-injection.ts +346 -0
  211. package/src/rules/command-injection.ts +296 -0
  212. package/src/rules/contract.ts +220 -0
  213. package/src/rules/format-string.ts +158 -0
  214. package/src/rules/hardcoded-secret.ts +485 -0
  215. package/src/rules/lib/guards.ts +1235 -0
  216. package/src/rules/lib/html-safety.ts +793 -0
  217. package/src/rules/lib/local-build.ts +329 -0
  218. package/src/rules/lib/strings.ts +2034 -0
  219. package/src/rules/path-traversal.ts +101 -0
  220. package/src/rules/registry.ts +90 -0
  221. package/src/rules/sql-injection.ts +311 -0
  222. package/src/rules/ssrf.ts +118 -0
  223. package/src/rules/unbounded-copy.ts +162 -0
  224. package/src/rules/unsafe-deserialization.ts +291 -0
  225. package/src/rules/weak-hash.ts +226 -0
  226. package/src/rules/xss.ts +572 -0
  227. package/src/taint/content-type.ts +20 -0
  228. package/src/taint/dictionaries.ts +1855 -0
  229. package/src/taint/fold.ts +1206 -0
  230. package/src/taint/java-scope.ts +200 -0
  231. package/src/taint/local-map.ts +594 -0
  232. package/src/taint/project.ts +774 -0
  233. package/src/taint/tracer.ts +4298 -0
  234. package/src/taint/types.ts +511 -0
  235. package/src/taint/visibility.ts +100 -0
  236. package/tsconfig.json +61 -0
@@ -0,0 +1,575 @@
1
+ /**
2
+ * HUMAN-READABLE REPORT
3
+ *
4
+ * Design brief: someone should be able to skim this in a terminal and know
5
+ * three things without reading carefully -
6
+ * 1. where the problem is,
7
+ * 2. how bad it would be,
8
+ * 3. HOW SURE WE ARE.
9
+ *
10
+ * Point 3 is the one other tools bury. It gets its own column here, on every
11
+ * single line, and it gets a summary block that states the count of unverified
12
+ * findings in plain words. If this report ever looks more confident than the
13
+ * engine is, the report is wrong.
14
+ */
15
+ import { SEVERITY_ORDER } from '../core/finding.js';
16
+ import { scoreAnalysis } from '../core/score.js';
17
+ import { RUNTIME_VERSION_RULE } from '../platform/runtime-version.js';
18
+ import { DEPENDENCY_RULE } from '../platform/dependency-rule.js';
19
+ import { getRule } from '../rules/registry.js';
20
+ import { color, g, wrapText } from './colors.js';
21
+ const WIDTH = 92;
22
+ const SEVERITY_STYLE = {
23
+ critical: (t) => color.bold(color.red(t)),
24
+ high: (t) => color.red(t),
25
+ medium: (t) => color.yellow(t),
26
+ low: (t) => color.blue(t),
27
+ info: (t) => color.gray(t),
28
+ };
29
+ function severityLabel(severity) {
30
+ return SEVERITY_STYLE[severity](severity.toUpperCase().padEnd(8));
31
+ }
32
+ function heading(title) {
33
+ const line = g('rule').repeat(Math.max(0, WIDTH - title.length - 3));
34
+ return color.dim(`\n${g('rule')}${g('rule')} ${color.bold(title)} ${line}`);
35
+ }
36
+ /** Directory names that mean "these findings are probably meant to be here". */
37
+ const FIXTURE_DIRECTORY = /(^|[/\\])(tests?|fixtures?|specs?|__tests__|testdata|examples?)([/\\]|$)/i;
38
+ export function renderHuman(result, options = {}) {
39
+ const out = [];
40
+ const min = options.minSeverity ? SEVERITY_ORDER[options.minSeverity] : -1;
41
+ const shown = result.findings.filter((f) => SEVERITY_ORDER[f.severity] >= min);
42
+ const hiddenBySeverity = result.findings.length - shown.length;
43
+ /* ---------------- header ---------------- */
44
+ out.push('');
45
+ out.push(`${color.bold('Defuse')} ${color.dim(`v${result.coverage.engine.version}`)} ` +
46
+ color.bgYellow(color.bold(` ${result.coverage.engine.analysisLabel} `)));
47
+ out.push(color.dim(` target: ${result.target}`));
48
+ /* ---------------- gauges ----------------
49
+ * Same module the browser calls, so the terminal cannot show a different
50
+ * number from the web page for the same scan. Rendered as bars rather than
51
+ * dials for obvious reasons, but the READING is identical. */
52
+ const score = scoreAnalysis(result, result.stats.filesFound);
53
+ const full = options.full ?? false;
54
+ const present = Object.keys(result.byLanguage).sort();
55
+ out.push(heading('Summary'));
56
+ if (!score.examinedNothing) {
57
+ /*
58
+ * Plain sentences first. The gauges below are exact but a tester read
59
+ * "82%/100%" next to "64%" next to "mean of 2 measured ratios" and could
60
+ * not say what any of them meant. These lines use the same counts and say
61
+ * them in words; --full keeps the arithmetic.
62
+ */
63
+ const flowCount = result.findings.filter((f) => f.confidence === 'flow-verified').length;
64
+ const guessCount = result.findings.length - flowCount;
65
+ out.push(` ${color.red('proven ')} ${color.bold(String(flowCount))} ` +
66
+ color.dim('attacker input was traced into a dangerous call - every step is printed'));
67
+ out.push(` ${color.yellow('possible')} ${color.bold(String(guessCount))} ` +
68
+ color.dim('risky-looking code, but the input was not traced - check these by hand'));
69
+ out.push(` ${'read'.padEnd(8)} ${result.stats.filesParsed} of ` +
70
+ `${result.stats.filesFound || result.stats.filesParsed} file(s)`);
71
+ for (const id of present) {
72
+ const cells = result.coverage.matrix.filter((c) => c.language === id);
73
+ const count = (s) => cells.filter((c) => c.status === s).length;
74
+ const deep = result.coverage.taint.find((t) => t.language === id)?.implemented ?? false;
75
+ out.push(` ${'checked'.padEnd(8)} ${id}: ${count('implemented')} of ${cells.length} bug types fully, ` +
76
+ `${count('partial')} partly, ${count('not-implemented')} not at all` +
77
+ color.dim(deep ? ' - with data-flow tracing' : ' - pattern matching only, no data-flow tracing'));
78
+ }
79
+ }
80
+ if (full && !score.examinedNothing)
81
+ out.push(heading('Readings'));
82
+ if (score.examinedNothing) {
83
+ // Printed INSTEAD of the dials, not above them. Zeroes shown next to this
84
+ // warning would still be read as zeroes.
85
+ out.push(` ${color.yellow(color.bold('NO READING.'))} ` +
86
+ color.dim(wrapText('The files parsed, but not one statement, call or assignment reached a ' +
87
+ 'rule - there was no code here to analyse. Every number below would be ' +
88
+ 'the absence of a result, not a result, so they are withheld. Check you ' +
89
+ 'pointed the scan at the right path.', WIDTH - 4, ' ')));
90
+ }
91
+ else if (full) {
92
+ for (const reading of score.gauges) {
93
+ const filled = Math.round((reading.value / reading.max) * 28);
94
+ const bar = `${g('dotFull').repeat(filled)}${g('dotEmpty').repeat(28 - filled)}`;
95
+ const tone = reading.id === 'verified-exposure'
96
+ ? color.red
97
+ : reading.id === 'unverified-surface'
98
+ ? color.yellow
99
+ : color.green;
100
+ out.push(` ${reading.label.padEnd(20)} ${tone(bar)} ` +
101
+ `${color.bold(String(reading.value) + reading.unit)}${color.dim(`/${reading.max}${reading.unit}`)}` +
102
+ (reading.capped ? color.yellow(` PINNED - real total ${reading.rawTotal}`) : ''));
103
+ out.push(color.dim(` ${' '.repeat(20)} ${reading.working.join(' ' + g('middot') + ' ')}`));
104
+ }
105
+ }
106
+ if (full && !score.examinedNothing) {
107
+ out.push('');
108
+ out.push(color.dim(` ${wrapText('These three are never added together. Severity and confidence are ' +
109
+ 'different questions, and a single blended risk number cannot answer ' +
110
+ 'either one. Coverage tells you how much weight the other two carry.', WIDTH - 4, ' ')}`));
111
+ }
112
+ /*
113
+ * SOURCES RECOGNISED - printed whatever the number, and loudest at zero.
114
+ *
115
+ * A scan that found no sources cannot produce a traced finding no matter how
116
+ * good the tracer is, and "0 flow-verified" reads like a clean bill until you
117
+ * know that. Elasticsearch's 3,999 Java files produced exactly this shape.
118
+ */
119
+ out.push('');
120
+ if (score.sourcesFound === 0 && result.stats.filesParsed >= 25) {
121
+ out.push(color.yellow(` No attacker-controlled sources were recognised in ${result.stats.filesParsed} files.`));
122
+ out.push(color.dim(` Every flow-verified finding starts at a source, so none could be produced here.`));
123
+ out.push(color.dim(` Either this code takes no external input, or it uses a framework we do not`));
124
+ out.push(color.dim(` model - sources are per-framework, and only the ones listed in the coverage`));
125
+ out.push(color.dim(` section are recognised. Read "0 proven" as "could not begin".`));
126
+ }
127
+ else {
128
+ out.push(color.dim(` ${score.sourcesFound} attacker-controlled source(s) recognised - every traced finding starts at one of these.`));
129
+ }
130
+ if (score.blindSpots.length > 0) {
131
+ out.push('');
132
+ out.push(color.dim(` Where this scan stopped early:`));
133
+ for (const spot of score.blindSpots) {
134
+ out.push(color.dim(` ${g('middot')} ${spot.count} ${spot.label}`));
135
+ }
136
+ }
137
+ /* ---------------- findings ---------------- */
138
+ if (shown.length === 0) {
139
+ out.push(heading('Findings'));
140
+ out.push(` ${color.green('No findings from the rules that ran.')}`);
141
+ out.push(color.dim(` ${wrapText('This is NOT a clean bill of health. It means the checks listed under ' +
142
+ '"What this scan did not check" were not triggered. Read that section.', WIDTH - 4, ' ')}`));
143
+ }
144
+ else {
145
+ out.push(heading(`Findings (${shown.length})`));
146
+ let lastFile = '';
147
+ for (const finding of shown) {
148
+ if (finding.location.file !== lastFile) {
149
+ lastFile = finding.location.file;
150
+ out.push(`\n ${color.underline(color.cyan(lastFile))}`);
151
+ }
152
+ out.push(renderFinding(finding, full));
153
+ }
154
+ }
155
+ /* ---------------- the honesty block ----------------
156
+ * The short report states both counts, with their meanings, in the summary
157
+ * at the top; this block is the long form. */
158
+ if (full) {
159
+ out.push(heading('Confidence'));
160
+ const signature = result.findings.filter((f) => f.confidence === 'signature-based').length;
161
+ const flow = result.findings.filter((f) => f.confidence === 'flow-verified').length;
162
+ out.push(` ${color.yellow('signature-based')} ${String(signature).padStart(4)} ` +
163
+ color.dim('pattern matched in the syntax tree; data flow NOT traced'));
164
+ out.push(` ${color.green('flow-verified')} ${String(flow).padStart(4)} ` +
165
+ color.dim('attacker data traced into the sink; every hop shown above'));
166
+ out.push('');
167
+ out.push(` ${wrapText(result.findings.length === 0
168
+ ? score.examinedNothing
169
+ ? 'Both counts are zero because nothing was analysed, not because nothing ' +
170
+ 'was found. A file that parses but contains no code produces exactly this ' +
171
+ 'output, and it means the scan had no subject - not that the subject is clean.'
172
+ : `Nothing matched, out of ${result.stats.shapesExamined} code shape(s) actually ` +
173
+ 'examined. That is a real result rather than an empty one - but it covers only ' +
174
+ 'the rules that ran, listed under "What this scan did not check".'
175
+ : flow > 0
176
+ ? `${flow} finding(s) were confirmed by following the data itself - each one prints the ` +
177
+ 'full path so you can check it. The signature-based ones are pattern matches the ' +
178
+ 'tracer could NOT confirm: it does not resolve imports, so a value arriving from ' +
179
+ 'another file ends the trace, and a real bug can easily sit in that group. ' +
180
+ 'Unconfirmed is not the same as harmless.'
181
+ : 'Every finding above is an unverified pattern match. The data-flow engine ran but ' +
182
+ 'could not confirm any of them - most often because the value arrives from another ' +
183
+ 'file, or from a source the dictionaries do not recognise. Treat them as leads.', WIDTH - 4, ' ')}`);
184
+ /* ---------------- analysis depth, by language ----------------
185
+ * Stated POSITIVELY, and only for languages actually in this scan.
186
+ *
187
+ * Two testers in a row wrote fixtures asserting "Go is signature-only, so a
188
+ * flow-verified Go finding would be an overclaim" - and both were reading a
189
+ * scope note that had been true months earlier. Nothing in the output
190
+ * contradicted them, because the report only ever listed languages where
191
+ * taint is MISSING. With every language implemented that list is empty, so the
192
+ * report said nothing at all and left the reader's stale belief standing.
193
+ *
194
+ * A capability you only mention in the negative is one nobody can confirm.
195
+ * The short report says it per language on the summary's "checked" lines. */
196
+ if (present.length > 0) {
197
+ out.push(heading('Analysis depth in this scan'));
198
+ for (const id of present) {
199
+ const cell = result.coverage.taint.find((t) => t.language === id);
200
+ const deep = cell?.implemented ?? false;
201
+ out.push(` ${id.padEnd(12)} ${deep
202
+ ? color.green('signature + data flow')
203
+ : color.yellow('signature only - no flow verification in this language')} ${color.dim(`${result.byLanguage[id]} file(s)`)}`);
204
+ }
205
+ out.push('');
206
+ out.push(color.dim(` ${wrapText('A flow-verified finding can only come from a language on the "signature + data ' +
207
+ 'flow" line. Where it says signature only, zero verified findings means the ' +
208
+ 'tracer never ran there - not that the code is clean.', WIDTH - 4, ' ')}`));
209
+ }
210
+ /* ---------------- OWASP coverage, all ten ----------------
211
+ * Printed in full, both states, because the previous version printed only
212
+ * the missing ones - and a list of seven gaps invites the reader to assume
213
+ * the other three are handled. None of them is. See the note in coverage.ts. */
214
+ const owasp = result.coverage.owaspCoverage;
215
+ const none = owasp.filter((c) => c.state === 'none');
216
+ out.push(heading(`OWASP Top 10 (2025) - ${none.length} of 10 have no rule at all`));
217
+ out.push(color.dim(` ${wrapText('No category here is comprehensively covered - the three with rules are checked ' +
218
+ 'in part only, and what they leave out is named. Silence in a category with no ' +
219
+ 'rule is not a result: code full of those bugs looks exactly like code without.', WIDTH - 4, ' ')}`));
220
+ out.push('');
221
+ for (const category of owasp) {
222
+ const mark = category.state === 'partial' ? color.yellow('PARTIAL') : color.red('NO RULE');
223
+ out.push(` ${mark} ${color.bold(category.id)} ${category.title}`);
224
+ if (category.weCheck) {
225
+ out.push(color.dim(` we check ${category.weCheck} (${category.rules.join(', ')})`));
226
+ }
227
+ out.push(color.dim(` ${category.state === 'partial' ? 'in scope ' : 'e.g. '}${wrapText(category.examples, WIDTH - 22, ' ')}`));
228
+ if (category.note) {
229
+ out.push(color.dim(` why ${wrapText(category.note, WIDTH - 22, ' ')}`));
230
+ }
231
+ }
232
+ }
233
+ /* ---------------- coverage / gaps ----------------
234
+ * The short form still names every gap - by count, in plain words - so a
235
+ * quiet scan can never read as a clean one. It only leaves out the list. */
236
+ if (full || options.showCoverageMatrix) {
237
+ out.push(renderCoverage(result.coverage, options.showCoverageMatrix ?? false));
238
+ }
239
+ else {
240
+ const owaspNone = result.coverage.owaspCoverage.filter((c) => c.state === 'none').length;
241
+ const here = result.coverage.gaps.filter((c) => present.includes(c.language));
242
+ const partly = here.filter((c) => c.status === 'partial').length;
243
+ const notAtAll = here.length - partly;
244
+ out.push(heading('What this scan did NOT check'));
245
+ out.push(` ${wrapText(`OWASP Top 10: ${owaspNone} of 10 categories have no rule at all, and the other ` +
246
+ `${10 - owaspNone} are checked only in part.` +
247
+ (present.length > 0
248
+ ? ` For the language(s) in this scan, ${notAtAll} rule/language pair(s) are not ` +
249
+ `checked and ${partly} only partly.`
250
+ : '') +
251
+ ` The engine has ${result.coverage.engine.notImplemented.length} known limits. ` +
252
+ 'No findings means these rules found nothing - not that the code is safe.', WIDTH - 4, ' ')}`);
253
+ }
254
+ /* ---------------- scan health ---------------- */
255
+ out.push(heading('Scan'));
256
+ const bySeverity = countBySeverity(result.findings);
257
+ if (options.target) {
258
+ out.push(` target ${color.bold(options.target)}`);
259
+ if (FIXTURE_DIRECTORY.test(options.target)) {
260
+ out.push(color.dim(' NOTE: that path looks like a test, fixture or example folder. Files there are' +
261
+ '\n often deliberately vulnerable, so findings in them are expected rather' +
262
+ "\n than actionable. If you meant to skip them, the flag is attached with an" +
263
+ '\n equals sign and needs a path of its own: scan . --exclude=tests' +
264
+ '\n (via npm, put it after a bare --: npm run scan -- . --exclude=tests)'));
265
+ }
266
+ }
267
+ out.push(` files parsed ${color.bold(String(result.stats.filesParsed))}` +
268
+ ` code shapes examined ${color.bold(String(result.stats.shapesExamined))}` +
269
+ ` time ${color.bold(`${result.stats.durationMs}ms`)}`);
270
+ if (result.crossFile.enabled) {
271
+ out.push(color.dim(` cross-file: ${result.crossFile.importEdges} import edge(s) resolved ${g('middot')} ` +
272
+ `${result.crossFile.resolved} call(s) followed into another file ${g('middot')} ` +
273
+ `${result.crossFile.ambiguous} declined as ambiguous` +
274
+ (result.crossFile.importsUnresolved > 0
275
+ ? ` ${g('middot')} ${result.crossFile.importsUnresolved} import(s) pointed outside the scan`
276
+ : '')));
277
+ /*
278
+ * "NOTHING FOUND" AND "NOWHERE TO LOOK" ARE DIFFERENT ANSWERS.
279
+ *
280
+ * Someone scanned juice-shop's server.ts on its own - one file, 117 import
281
+ * statements, every one of them pointing at a route file that was not in
282
+ * the scan. The tool parsed it, examined 834 shapes, found 8 sources, and
283
+ * reported nothing, which is CORRECT: server.ts is wiring, and the bugs are
284
+ * in the files it imports. Scanning that repository's routes/ directory
285
+ * finds seven, two flow-verified.
286
+ *
287
+ * The evidence was already in the report - `importEdges 0` - and it said
288
+ * nothing about what that meant. A beginner read an empty findings list as
289
+ * a clean bill of health, then as a broken tool. Both readings were the
290
+ * report's fault, not theirs.
291
+ *
292
+ * This project prints what `--exclude` skipped for exactly this reason. An
293
+ * import that led nowhere is the same kind of hole: a place the analysis
294
+ * did not go, which the reader cannot see from the findings list.
295
+ */
296
+ if (result.crossFile.importEdges === 0 && result.crossFile.importsUnresolved >= 3) {
297
+ out.push('');
298
+ out.push(color.yellow(` ${g('warn')} SCOPE WARNING: every one of the ${result.crossFile.importsUnresolved} ` +
299
+ `local import(s) in this scan pointed at a file that was not included.`));
300
+ out.push(color.yellow(' Nothing could be traced across a module boundary, so a quiet result here means'));
301
+ out.push(color.yellow(' "not looked at", not "not vulnerable". Point the scan at the project directory'));
302
+ out.push(color.yellow(' rather than a single file if you meant to analyse the whole thing.'));
303
+ }
304
+ }
305
+ else {
306
+ out.push(color.yellow(` cross-file analysis OFF (${result.crossFile.reason})`));
307
+ }
308
+ /**
309
+ * Say when the scan traded time for memory.
310
+ *
311
+ * A scan that spills gives exactly the same answers, just more slowly - the
312
+ * findings are checked to be byte-identical under a budget small enough to
313
+ * evict almost everything. But "slow" with no explanation is the kind of
314
+ * thing a user blames the tool for and never mentions, so the report says
315
+ * which of the two things happened and what to change.
316
+ */
317
+ if (result.treeMemory.reparses > 0) {
318
+ out.push(color.dim(` memory: project larger than the ${(result.treeMemory.budgetBytes / 1048576).toFixed(0)}MB ` +
319
+ `tree budget, so ${result.treeMemory.reparses} file(s) were parsed more than once. ` +
320
+ `Same answers, slower scan - raise DEFUSE_TREE_BUDGET_MB to trade memory back for speed.`));
321
+ }
322
+ // Cleared lines whose receipt rests on a function Defuse does not model.
323
+ const onTrust = result.verifiedClean.filter((c) => (c.assumes?.length ?? 0) > 0).length;
324
+ if (result.stats.flowsVerified > 0 ||
325
+ result.stats.signaturesRetracted > 0 ||
326
+ result.stats.signaturesProvedConstant > 0 ||
327
+ result.stats.regionsProvedUnreachable > 0 ||
328
+ result.stats.collectionReadsResolved > 0 ||
329
+ result.stats.tracesStoppedAtNewData > 0) {
330
+ out.push(color.dim(` data flow: ${result.stats.flowsVerified} verified ${g('middot')} ` +
331
+ `${result.stats.signaturesUpgraded} guess(es) superseded by a proof ${g('middot')} ` +
332
+ `${result.stats.signaturesRetracted} withdrawn as provably sanitised` +
333
+ (onTrust > 0
334
+ ? ` ${g('middot')} ${onTrust} cleared line(s) rest on a function Defuse does not model, taken to hand back ` +
335
+ `what it was given (listed in --json under verifiedClean[].assumes)`
336
+ : '') +
337
+ (result.stats.signaturesProvedConstant > 0
338
+ ? ` ${g('middot')} ${result.stats.signaturesProvedConstant} withdrawn as provably ` +
339
+ `constant (listed in --json under verifiedClean, with the reason)`
340
+ : '') +
341
+ (result.stats.regionsProvedUnreachable > 0
342
+ ? ` ${g('middot')} ${result.stats.regionsProvedUnreachable} branch(es) or case(s) not ` +
343
+ `followed because a fixed condition means they cannot run (listed in --json under ` +
344
+ `unreachableCodeSkipped)`
345
+ : '') +
346
+ (result.stats.collectionReadsResolved > 0
347
+ ? ` ${g('middot')} ${result.stats.collectionReadsResolved} collection read(s) answered by key or position ` +
348
+ `(listed in --json under collectionReadsResolved)`
349
+ : '') +
350
+ (result.stats.tracesStoppedAtNewData > 0
351
+ ? ` ${g('middot')} ${result.stats.tracesStoppedAtNewData} trace(s) ended at a database or file read, ` +
352
+ `which returns stored data rather than its input - not cleared, just not followed ` +
353
+ `(listed in --json under tracesStoppedAtNewData)`
354
+ : '')));
355
+ }
356
+ const languageSummary = Object.entries(result.byLanguage)
357
+ .map(([lang, count]) => `${lang} ${count}`)
358
+ .join(' ');
359
+ if (languageSummary)
360
+ out.push(color.dim(` languages: ${languageSummary}`));
361
+ /*
362
+ * Which PHP the project declares. Printed even when every declaration is
363
+ * fine, because "no runtime finding" means something only if the reader can
364
+ * see what was read - and printed as a note when nothing could be read.
365
+ */
366
+ const runtime = result.runtimeVersions;
367
+ if (runtime && (runtime.declared.length > 0 || runtime.notes.length > 0)) {
368
+ const shown = runtime.declared.slice(0, 5).map((d) => `${d.file}:${d.line} ${d.status}`);
369
+ const more = runtime.declared.length > shown.length ? ` ${g('middot')} ${runtime.declared.length - shown.length} more in --json` : '';
370
+ out.push(color.dim(` php runtime (facts from php.net, checked ${runtime.factsChecked}): ` +
371
+ (shown.length > 0 ? shown.join(` ${g('middot')} `) + more : 'no version declared')));
372
+ for (const note of runtime.notes)
373
+ out.push(color.dim(` note: ${note}`));
374
+ }
375
+ const deps = result.dependencies;
376
+ out.push(color.dim(deps
377
+ ? ` dependencies (osv.dev, ${deps.checkedAt.slice(0, 10)}): ${deps.checked} package versions from ` +
378
+ `${deps.read.length} lockfile(s)` +
379
+ (deps.notRead.length ? ` ${g('middot')} not read: ${deps.notRead.join(', ')}` : '') +
380
+ (deps.read.some((r) => r.skipped.length) ? ` ${g('middot')} skipped entries in --json` : '')
381
+ : ' dependencies: library versions not checked - add --deps (sends names and versions to osv.dev)'));
382
+ // Build the list FIRST, then decide what to print. The earlier version tried
383
+ // to do both in one expression:
384
+ //
385
+ // ' findings: ' + list.join(' ') || ' findings: none'
386
+ //
387
+ // `+` binds tighter than `||`, so JavaScript read that as
388
+ // (' findings: ' + '') || ' findings: none'. The left side is the non-empty
389
+ // string ' findings: ', which is truthy, so the fallback never ran and a
390
+ // clean scan printed a bare "findings:" with nothing after it.
391
+ const severityLine = ['critical', 'high', 'medium', 'low', 'info']
392
+ .filter((s) => bySeverity[s] > 0)
393
+ .map((s) => SEVERITY_STYLE[s](`${bySeverity[s]} ${s}`))
394
+ .join(' ');
395
+ out.push(` findings: ${severityLine || color.green('none')}`);
396
+ if (hiddenBySeverity > 0) {
397
+ out.push(color.dim(` ${hiddenBySeverity} finding(s) below the --min-severity threshold were hidden ` +
398
+ `(they are still present in --json output)`));
399
+ }
400
+ if (result.parseProblems.length > 0) {
401
+ out.push(color.yellow(` ${result.parseProblems.length} file(s) had parse errors — findings in them may be incomplete:`));
402
+ for (const problem of result.parseProblems.slice(0, 5)) {
403
+ const first = problem.issues[0];
404
+ out.push(color.dim(` ${problem.file}${first ? `:${first.line}` : ''} ${first?.text ?? ''}`));
405
+ }
406
+ if (result.parseProblems.length > 5) {
407
+ out.push(color.dim(` ${g('ellipsis')} and ${result.parseProblems.length - 5} more`));
408
+ }
409
+ }
410
+ if (result.suppressions.length > 0) {
411
+ out.push(color.dim(` ${result.suppressions.length} finding(s) suppressed by defuse:ignore comments` +
412
+ (options.showSuppressed ? ':' : ' (use --show-suppressed to list them)')));
413
+ if (options.showSuppressed) {
414
+ for (const s of result.suppressions) {
415
+ out.push(color.dim(` ${s.file}:${s.line} ${s.ruleId} — ${s.comment}`));
416
+ }
417
+ }
418
+ }
419
+ if (result.excluded.fileCount > 0 || result.excluded.patterns.length > 0) {
420
+ // An exclusion the user asked for is still a blind spot. Print it next to
421
+ // the results rather than letting a smaller number look like better news.
422
+ const directories = result.excluded.directories;
423
+ out.push(color.dim(` --exclude (${result.excluded.patterns.join(', ')}) skipped ` +
424
+ `${result.excluded.fileCount} file(s)` +
425
+ (directories.length > 0
426
+ ? ` and ${directories.length} whole director(ies): ${directories.slice(0, 6).join(', ')}` +
427
+ (directories.length > 6 ? ` ${g('ellipsis')} +${directories.length - 6} more` : '')
428
+ : '') +
429
+ ' - not scanned, not counted'));
430
+ }
431
+ if (result.oversizedFiles.length > 0) {
432
+ out.push(color.dim(` ${result.oversizedFiles.length} file(s) skipped for size (>2MB)`));
433
+ }
434
+ if (!full) {
435
+ out.push('');
436
+ out.push(color.dim(' Short report. --full adds the reasoning and limits on each finding, the OWASP table\n' +
437
+ ' and every gap by name; --report=report.html writes all of it to one file.'));
438
+ }
439
+ out.push('');
440
+ return out.join('\n');
441
+ }
442
+ /* Small helpers kept below the main function so the flow above reads in order. */
443
+ function countBySeverity(findings) {
444
+ const counts = { critical: 0, high: 0, medium: 0, low: 0, info: 0 };
445
+ for (const finding of findings)
446
+ counts[finding.severity]++;
447
+ return counts;
448
+ }
449
+ function renderFinding(finding, full) {
450
+ const rule = getRule(finding.ruleId) ?? [RUNTIME_VERSION_RULE, DEPENDENCY_RULE].find((r) => r.id === finding.ruleId);
451
+ const indent = ' ';
452
+ const lines = [];
453
+ // Pad BEFORE colouring: ANSI escape codes are invisible but count towards
454
+ // String.length, so padding a coloured string misaligns every column.
455
+ const position = color.dim(`${finding.location.startLine}:${finding.location.startColumn}`.padEnd(12));
456
+ const confidenceTag = finding.confidence === 'signature-based'
457
+ ? color.yellow('[signature-based]')
458
+ : color.green('[flow-verified]');
459
+ lines.push(` ${severityLabel(finding.severity)} ${position} ${color.bold(finding.message)}`);
460
+ lines.push(` ${color.dim(finding.ruleId)} ${color.dim(g('middot'))} ${color.dim(finding.cwe)} ` +
461
+ `${color.dim(g('middot'))} ${color.dim(finding.owasp)} ${confidenceTag}`);
462
+ lines.push(` ${color.dim('code')} ${color.gray(finding.location.snippet)}`);
463
+ if (full) {
464
+ lines.push(` ${color.dim('node')} ${color.gray(finding.location.astNodePath)}`);
465
+ }
466
+ if (rule)
467
+ lines.push(` ${color.cyan('what')} ${wrapText(rule.summary, WIDTH - 18, indent)}`);
468
+ // A pattern match has no path to show, so its reasoning IS the evidence and
469
+ // stays in the short report; a traced finding's evidence is the path itself.
470
+ if (full || !finding.flowPath) {
471
+ lines.push(` ${color.cyan('why')} ${wrapText(finding.reasoning, WIDTH - 18, indent)}`);
472
+ }
473
+ if (finding.flowPath)
474
+ lines.push(renderFlowPath(finding.flowPath));
475
+ if (rule)
476
+ lines.push(` ${color.green('fix')} ${wrapText(rule.fix, WIDTH - 18, indent)}`);
477
+ if (full) {
478
+ lines.push(` ${color.yellow('gap')} ${color.dim(wrapText(finding.limitations, WIDTH - 18, indent))}`);
479
+ }
480
+ else if (!finding.flowPath) {
481
+ lines.push(` ${color.yellow('note')} ${color.dim('not traced - this may be a false positive; --full says what was not checked')}`);
482
+ }
483
+ return lines.join('\n');
484
+ }
485
+ /**
486
+ * The receipt. A flow-verified finding is only worth more than a guess if you
487
+ * can CHECK it, so every hop is printed with its own line number: where the
488
+ * data came from, everything that happened to it, and where it ended up.
489
+ * If any hop looks wrong to you, the finding is wrong - and that is the point.
490
+ */
491
+ function renderFlowPath(path) {
492
+ const style = {
493
+ source: (t) => color.magenta(t),
494
+ propagation: (t) => color.dim(t),
495
+ sanitizer: (t) => color.green(t),
496
+ sink: (t) => color.red(t),
497
+ };
498
+ const lines = [` ${color.magenta('flow')} ${color.dim(`traced source ${g('arrow')} sink:`)}`];
499
+ // `a + b + c` is two concatenation hops on one line, and printing the same
500
+ // sentence twice read as a glitch. Same line, kind and words -> one row, xN.
501
+ // Display only: --json, SARIF and the HTML report keep every hop.
502
+ const rows = [];
503
+ for (const step of path) {
504
+ const last = rows[rows.length - 1];
505
+ if (last &&
506
+ last.step.kind === step.kind &&
507
+ last.step.location.startLine === step.location.startLine &&
508
+ last.step.description === step.description) {
509
+ last.times++;
510
+ }
511
+ else {
512
+ rows.push({ step, times: 1 });
513
+ }
514
+ }
515
+ rows.forEach(({ step, times }, index) => {
516
+ const marker = index === 0 ? g('cornerTop') : index === rows.length - 1 ? g('cornerBottom') : g('vertical');
517
+ const where = `${step.location.startLine}`.padStart(4);
518
+ const kind = style[step.kind](step.kind.padEnd(11));
519
+ lines.push(` ${color.dim(marker)} ${color.dim(`L${where}`)} ${kind} ` +
520
+ wrapText(step.description + (times > 1 ? ` (x${times})` : ''), WIDTH - 36, ' '));
521
+ });
522
+ return lines.join('\n');
523
+ }
524
+ function renderCoverage(coverage, showMatrix) {
525
+ const out = [];
526
+ out.push(heading('What this scan did NOT check'));
527
+ out.push(color.dim(' Engine limits:'));
528
+ for (const item of coverage.engine.notImplemented) {
529
+ out.push(` ${color.red(g('cross'))} ${item}`);
530
+ }
531
+ const missingTaint = coverage.taint.filter((t) => !t.implemented);
532
+ if (missingTaint.length > 0) {
533
+ out.push('');
534
+ out.push(color.dim(' Languages with NO data-flow verification (signature matching only):'));
535
+ for (const cell of missingTaint) {
536
+ out.push(` ${color.red(g('cross'))} ${cell.language.padEnd(12)} ${wrapText(cell.note, WIDTH - 20, ' ')}`);
537
+ }
538
+ }
539
+ const partial = coverage.gaps.filter((c) => c.status === 'partial');
540
+ const missing = coverage.gaps.filter((c) => c.status === 'not-implemented');
541
+ if (partial.length > 0) {
542
+ out.push('');
543
+ out.push(color.dim(` Rules with partial language coverage (${partial.length}):`));
544
+ for (const cell of partial) {
545
+ out.push(` ${color.yellow(g('dotHalf'))} ${color.bold(cell.ruleId)}/${cell.language}: ` +
546
+ wrapText(cell.note, WIDTH - 12, ' '));
547
+ }
548
+ }
549
+ if (missing.length > 0) {
550
+ out.push('');
551
+ out.push(color.dim(` Rule/language combinations not implemented at all (${missing.length}): ` +
552
+ missing.map((c) => `${c.ruleId}/${c.language}`).join(', ')));
553
+ }
554
+ if (coverage.unscannedExtensions.length > 0) {
555
+ out.push('');
556
+ out.push(color.dim(` File types present but not scanned: ${coverage.unscannedExtensions.join(', ')}`));
557
+ }
558
+ out.push('');
559
+ out.push(color.dim(` Coverage: ${coverage.counts.implemented} implemented ${g('middot')} ` +
560
+ `${coverage.counts.partial} partial ${g('middot')} ${coverage.counts.notImplemented} ` +
561
+ `not implemented (of ${coverage.counts.rules} rules x ${coverage.counts.languages} languages)`));
562
+ if (showMatrix) {
563
+ out.push('');
564
+ for (const cell of coverage.matrix) {
565
+ const mark = cell.status === 'implemented'
566
+ ? color.green(g('dotFull'))
567
+ : cell.status === 'partial'
568
+ ? color.yellow(g('dotHalf'))
569
+ : color.gray(g('dotEmpty'));
570
+ out.push(` ${mark} ${cell.ruleId.padEnd(20)} ${cell.language.padEnd(12)} ${color.dim(cell.status)}`);
571
+ }
572
+ }
573
+ return out.join('\n');
574
+ }
575
+ //# sourceMappingURL=human.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"human.js","sourceRoot":"","sources":["../../../src/report/human.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,cAAc,EAA8C,MAAM,oBAAoB,CAAC;AAEhG,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,gCAA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