{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D16","name":"Bus Factor","shortDescription":{"text":"Bus Factor"},"helpUri":"https://codehealth.canine.dev/dimensions/D16"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D19","name":"Documentation Quality","shortDescription":{"text":"Documentation Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D19"},{"id":"D24","name":"Comment Value","shortDescription":{"text":"Comment Value"},"helpUri":"https://codehealth.canine.dev/dimensions/D24"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D27","name":"Navigability","shortDescription":{"text":"Navigability"},"helpUri":"https://codehealth.canine.dev/dimensions/D27"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D36","name":"Supply-chain Provenance \u0026 Signing","shortDescription":{"text":"Supply-chain Provenance \u0026 Signing"},"helpUri":"https://codehealth.canine.dev/dimensions/D36","relationships":[{"target":{"id":"CWE-1357","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-494","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1357","CWE-494"],"owasp":"A03:2025"}},{"id":"D37","name":"Vulnerability-disclosure Policy","shortDescription":{"text":"Vulnerability-disclosure Policy"},"helpUri":"https://codehealth.canine.dev/dimensions/D37","relationships":[{"target":{"id":"CWE-1059","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A02:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1059"],"owasp":"A02:2025"}},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX6","name":"Interface segregation","shortDescription":{"text":"Interface segregation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX6"},{"id":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"GD1","name":"Unfinished \u0026 placeholder code","shortDescription":{"text":"Unfinished \u0026 placeholder code"},"helpUri":"https://codehealth.canine.dev/dimensions/GD1"},{"id":"IC1","name":"Incompleteness \u0026 stubs","shortDescription":{"text":"Incompleteness \u0026 stubs"},"helpUri":"https://codehealth.canine.dev/dimensions/IC1"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P12","name":"CI test-gate honesty","shortDescription":{"text":"CI test-gate honesty"},"helpUri":"https://codehealth.canine.dev/dimensions/P12"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P4","name":"Deployment \u0026 Rollback","shortDescription":{"text":"Deployment \u0026 Rollback"},"helpUri":"https://codehealth.canine.dev/dimensions/P4"},{"id":"P5","name":"DR \u0026 Backup","shortDescription":{"text":"DR \u0026 Backup"},"helpUri":"https://codehealth.canine.dev/dimensions/P5"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"R1","name":"Type Safety","shortDescription":{"text":"Type Safety"},"helpUri":"https://codehealth.canine.dev/dimensions/R1"},{"id":"R10","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/R10"},{"id":"R2","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/R2"},{"id":"R3","name":"Large Files","shortDescription":{"text":"Large Files"},"helpUri":"https://codehealth.canine.dev/dimensions/R3"},{"id":"R4","name":"Test Coverage","shortDescription":{"text":"Test Coverage"},"helpUri":"https://codehealth.canine.dev/dimensions/R4"},{"id":"R5","name":"Dependency Freshness","shortDescription":{"text":"Dependency Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/R5"},{"id":"R6","name":"Tooling","shortDescription":{"text":"Tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/R6"},{"id":"R7","name":"Dead Code","shortDescription":{"text":"Dead Code"},"helpUri":"https://codehealth.canine.dev/dimensions/R7"},{"id":"R8","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/R8"},{"id":"R9","name":"Circular Imports","shortDescription":{"text":"Circular Imports"},"helpUri":"https://codehealth.canine.dev/dimensions/R9"},{"id":"SC1","name":"Supply-chain hygiene","shortDescription":{"text":"Supply-chain hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/SC1"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X16","name":"Unfloored truncation loop","shortDescription":{"text":"Unfloored truncation loop"},"helpUri":"https://codehealth.canine.dev/dimensions/X16"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X18","name":"Disposal-pattern correctness","shortDescription":{"text":"Disposal-pattern correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X18"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X29","name":"Per-element action decided by a fixed element","shortDescription":{"text":"Per-element action decided by a fixed element"},"helpUri":"https://codehealth.canine.dev/dimensions/X29"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X5","name":"Nullable reference types","shortDescription":{"text":"Nullable reference types"},"helpUri":"https://codehealth.canine.dev/dimensions/X5"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"purify.createDOMPurify::_parseConfig (cyclomatic 58): purify.createDOMPurify::_parseConfig has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 6 other methods here (purify.createDOMPurify, purify.createDOMPurify::_initDocument, purify.createDOMPurify::_isUnsafeNode, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"479d14814c2ccd212bea1066266a0b3d304b5bfaa456a383c12f594db7b0738b"}},{"ruleId":"D1","level":"warning","message":{"text":"purify.createDOMPurify::_isValidAttribute (cyclomatic 30): purify.createDOMPurify::_isValidAttribute has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 6 other methods here (purify.createDOMPurify, purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_initDocument, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2150}}}],"partialFingerprints":{"codehealthFindingId/v1":"6d999a17dc1d777fcc106b01887ca59e88d44c9649d7bc5ce272213309db14c4"}},{"ruleId":"D1","level":"warning","message":{"text":"purify.createDOMPurify (cyclomatic 29): purify.createDOMPurify has cyclomatic complexity 29 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 6 other methods here (purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_initDocument, purify.createDOMPurify::_isUnsafeNode, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9b5b54d6bb658a672110d3790d64f622e0e99f86093eabfbb50b1c315d7d116"}},{"ruleId":"D1","level":"warning","message":{"text":"purify.createDOMPurify::_sanitizeElements (cyclomatic 20): purify.createDOMPurify::_sanitizeElements has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 6 other methods here (purify.createDOMPurify, purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_initDocument, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2025}}}],"partialFingerprints":{"codehealthFindingId/v1":"51c49231f8ede8725a0ff98f0fbdc26cdc39220679671a5e0a99cf2b04ab8bea"}},{"ruleId":"D1","level":"warning","message":{"text":"purify.createDOMPurify::_sanitizeAttributes (cyclomatic 20): purify.createDOMPurify::_sanitizeAttributes has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This shape REPEATS in the file: 6 other methods here (purify.createDOMPurify, purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_initDocument, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2404}}}],"partialFingerprints":{"codehealthFindingId/v1":"3fc48c5ce8841a9abd569c7b8873acb66f38024765b19e7dd41c9d20cd58f514"}},{"ruleId":"D1","level":"warning","message":{"text":"purify.createDOMPurify::_initDocument (cyclomatic 19): purify.createDOMPurify::_initDocument has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 6 other methods here (purify.createDOMPurify, purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_isUnsafeNode, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1585}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ae638cb3baa782c90a79c30c6c22919e867d74286520837b16e2b48adfd3b03"}},{"ruleId":"D1","level":"warning","message":{"text":"purify.createDOMPurify::_isUnsafeNode (cyclomatic 18): purify.createDOMPurify::_isUnsafeNode has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 6 other methods here (purify.createDOMPurify, purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_initDocument, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 7 times rather than 7 independent problems. Splitting this body alone leaves the other 6 exactly as they are. Where these are variations on one operation, the change that clears all 7 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1831}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e3857024335bbbff5e19bc139c3b47d07dab708e99fc36d2b258b51ddeeac67"}},{"ruleId":"D2","level":"warning","message":{"text":"purify.createDOMPurify::_parseConfig (cognitive 68): purify.createDOMPurify::_parseConfig has cognitive complexity 68 (threshold 15). Drivers by points: if/else 32 (48 pts), boolean chains 18, error handling 1 (2 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (purify.createDOMPurify, purify.createDOMPurify::_removeAttribute, purify.createDOMPurify::_initDocument, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"a04513d5828a6b57298d25cc4cb0f84611089669ffbd823495bc0a14b2cf3a95"}},{"ruleId":"D2","level":"warning","message":{"text":"purify.createDOMPurify::_sanitizeAttributes (cognitive 29): purify.createDOMPurify::_sanitizeAttributes has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (21 pts), boolean chains 5, ternaries 1 (2 pts), loops 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (purify.createDOMPurify, purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_removeAttribute, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2404}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e825ba5a441fb14d887a33e740a129bdfbab32b9b4e13b55e318c51a015fa57"}},{"ruleId":"D2","level":"warning","message":{"text":"purify.createDOMPurify::_sanitizeAttachedShadowRoots (cognitive 26): purify.createDOMPurify::_sanitizeAttachedShadowRoots has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (18 pts), loops 2 (4 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (purify.createDOMPurify, purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_removeAttribute, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2611}}}],"partialFingerprints":{"codehealthFindingId/v1":"164aa140270b40544abe2f5994e8363987e4473573fa735ae3dcde7fd8e69b73"}},{"ruleId":"D2","level":"warning","message":{"text":"purify.createDOMPurify (cognitive 25): purify.createDOMPurify has cognitive complexity 25 (threshold 15). Drivers by points: if/else 155 (217 pts), boolean chains 110, error handling 15 (28 pts), ternaries 17 (24 pts), loops 11 (17 pts), match/switch 1 (2 pts) (nesting depth added 89). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_removeAttribute, purify.createDOMPurify::_initDocument, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"e068b9998366055daefd7b7c11acdfd40783ec8451bca1ff005f8d3dbc2aebbe"}},{"ruleId":"D2","level":"warning","message":{"text":"purify.createDOMPurify::_isValidAttribute (cognitive 23): purify.createDOMPurify::_isValidAttribute has cognitive complexity 23 (threshold 15). Drivers by points: boolean chains 13, if/else 10. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators. This shape REPEATS in the file: 7 other methods here (purify.createDOMPurify, purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_removeAttribute, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2150}}}],"partialFingerprints":{"codehealthFindingId/v1":"5e952a4903dcca630087c6857b7d54f688f490ee7440ff30e5b4428f3abaee77"}},{"ruleId":"D2","level":"warning","message":{"text":"purify.createDOMPurify::_sanitizeElements (cognitive 22): purify.createDOMPurify::_sanitizeElements has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (purify.createDOMPurify, purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_removeAttribute, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2025}}}],"partialFingerprints":{"codehealthFindingId/v1":"38953a35321f4718ff80cc3546f2c6bb3d5b95a117727e9231dcddc8dfd8545a"}},{"ruleId":"D2","level":"warning","message":{"text":"purify.createDOMPurify::_initDocument (cognitive 21): purify.createDOMPurify::_initDocument has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7, boolean chains 6, error handling 2 (4 pts), ternaries 3 (4 pts) (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth \u2014 many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This shape REPEATS in the file: 7 other methods here (purify.createDOMPurify, purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_removeAttribute, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1585}}}],"partialFingerprints":{"codehealthFindingId/v1":"099323be5bb0546208b97c927f255d7126a2fa09e96f70e9c11898cf6ebefe58"}},{"ruleId":"D2","level":"warning","message":{"text":"purify.createDOMPurify::_removeAttribute (cognitive 19): purify.createDOMPurify::_removeAttribute has cognitive complexity 19 (threshold 15). Drivers by points: error handling 4 (10 pts), if/else 6 (7 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body. This shape REPEATS in the file: 7 other methods here (purify.createDOMPurify, purify.createDOMPurify::_parseConfig, purify.createDOMPurify::_initDocument, \u2026) have the same decision points, in the same order, at the same nesting depths \u2014 so this is one pattern written 8 times rather than 8 independent problems. Splitting this body alone leaves the other 7 exactly as they are. Where these are variations on one operation, the change that clears all 8 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1211}}}],"partialFingerprints":{"codehealthFindingId/v1":"63a642018118dece240caa43cf34134b490f9405632c1991e0ccb9d8883bc64e"}},{"ruleId":"D3","level":"warning","message":{"text":"FunctionTooLong: purify.createDOMPurify: FunctionTooLong \u2014 createDOMPurify runs 1347 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1247 over it, 13.47\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"76e288811d7ff35f449700b39754369617a235c5148932b80e536ea3148d61eb"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: src/purify.ts: FileTooLong \u2014 1474 significant lines (blank, comment-only and punctuation-only lines excluded), about 91% of them inside a single declaration: createDOMPurify (198-2989). The bar is 500 significant lines; this is 974 over it, 2.95\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"3909316db5ac8f7bb4b48cc4ee41344c112d8c1edb9c45941b62e1221a1e6c0a"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: src/purify.ts: src/purify.ts changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 402 in purify.createDOMPurify at line 198. 10 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2026-08-16..2026-11-14, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272026-08-16 15:06:11 \u002B01:00\u0027 --until=\u00272026-11-14 15:06:11 \u002B01:00\u0027 --full-history --no-merges -- src/purify.ts\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"2f47850fb4fc8141fc07658c7d9005e64e535fe26c384dd30c1a818eaabe4bc9"}},{"ruleId":"D16","level":"note","message":{"text":"Off-boarding risk: anonymized user #1: If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: src/types.ts. Pair on, review, or document these before any departure."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"e8c003d95a91ab214929790a57ab501d18517c996b52381347f395a0dc073f57"}},{"ruleId":"D24","level":"note","message":{"text":"redundant comment: \u0022Is \u0060value\u0060 valid for this attribute?\u0022 repeats the code it sits on: 3 of its 3 words (value, valid, attribute) are already in \u0060if (!_isValidAttribute(lcTag, lcName, value))\u0060. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2514}}}],"partialFingerprints":{"codehealthFindingId/v1":"1e7b78bd99caa09fbc2446b6c5d6d7c893a531f60ddab46932b909af89f88966"}},{"ruleId":"D24","level":"note","message":{"text":"redundant comment: \u0022A trusted element widens onerror for its own call.\u0022 repeats the code it sits on: 5 of its 5 words (trusted, element, widens, onerror, call) are already in \u0060assert.ok(\u0060. Delete it, or replace it with what the code cannot say (why it is done here, a constraint, or a consequence)."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test/test-suite.js"},"region":{"startLine":5309}}}],"partialFingerprints":{"codehealthFindingId/v1":"2258a3f0efdd60534468995cdba0537e74f2cddfc8cc8f24c9519f23b1479950"}},{"ruleId":"D29","level":"error","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"d5b8f11381d61a58459ffc7c595fd52d09c03c711894a63a9578043d2338412b"},"taxa":[{"id":"CWE-829","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D29","level":"warning","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"11666e46951d1baf4919d49cf5233be4c4a4c6cf5ddbeb3f1b111c69d42b140b"},"taxa":[{"id":"CWE-319","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},{"id":"A04:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}}]},{"ruleId":"D30","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"1714134738236b7af7344e0945aaedf0b8858a75e3efc31aba72b0181165b8ec"}},{"ruleId":"D30","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"6169b0e5c646778d853e7677e20f8c0f46c8daf29e69773a46f0451e9329e212"}},{"ruleId":"D30","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"9cc4a44859532bdaa348197f37b91df746604e78ce37b554883dc3b20c277191"}},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"eb00976a698a5d68999b7ee6d27206fd374e916853e7ff1ead5eed42386f043f"},"taxa":[{"id":"CICD-SEC-9","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"D36","level":"note","message":{"text":"A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."},"partialFingerprints":{"codehealthFindingId/v1":"c593d4dbd23724f337bfb8d2c1653812f143ae255bd9b59d4b3e9c37779fa6f4"},"taxa":[{"id":"CICD-SEC-3","toolComponent":{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35"}}]},{"ruleId":"AX6","level":"note","message":{"text":"Fat interface: DOMPurify (21 required operations): \u0060DOMPurify\u0060 declares 21 required operations under just 9 distinct name(s): \u0060(call)\u0060, \u0060setConfig\u0060, \u0060clearConfig\u0060, \u0060sanitize\u0060, \u0060sanitize\u0060, \u0060sanitize\u0060, \u0060sanitize\u0060, \u0060sanitize\u0060, \u0060isValidAttribute\u0060, \u0060addHook\u0060, \u0060addHook\u0060, \u0060addHook\u0060, \u0060addHook\u0060, \u0060addHook\u0060, \u0060removeHook\u0060, \u0060removeHook\u0060, \u0060removeHook\u0060, \u0060removeHook\u0060, \u0060removeHook\u0060, \u0060removeHooks\u0060, \u0060removeAllHooks\u0060. Counted over its REQUIRED operations \u2014 a method signature or a function-typed property with no \u0060?\u0060, once per signature; optional members and data properties are not counted, because no implementer is forced to write them. That is an OVERLOAD SET, not 21 separate responsibilities: a caller binds to 9 operation(s) and uses the overload it selected, so the Interface-Segregation harm does NOT apply on the caller\u0027s side and splitting this into role-interfaces would scatter one operation without relieving anything. The burden that does remain is the IMPLEMENTER\u0027s \u2014 all 21 signatures must be written and kept in step. Reduce it by collapsing overloads (optional or default parameters, or an options object) rather than by segregating the interface."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/types.ts"},"region":{"startLine":7}}}],"partialFingerprints":{"codehealthFindingId/v1":"6dfe6e269de1dc0c5ffb80a6b489cb9fe4f6296ae7e49dbdfcbdd10a7d1befc8"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"M2","level":"note","message":{"text":"No architecture diagram/doc: No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named \u0060architecture\u0060 or \u0060design\u0060 in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape \u2014 no \u0060## Architecture\u0060 heading, no \u0022architecture overview\u0022/\u0022high-level design\u0022 phrasing, no \u0022the architecture is \u2026\u0022 introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document \u2014 not evidence that nobody wrote the shape down."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"0c190e7c159d1850ee706c3ac4486e151e8a4fe169de4bf61436b9f399654f06"}},{"ruleId":"P12","level":"warning","message":{"text":"Pull-request path filter skips the test gate for source changes: \u0060paths-ignore: demos/**\u0060 matches compiled source (\u0060demos/lib/Mental.js\u0060) \u2014 a pull request that changes only those files merges without running the tests. Ignore only documentation and other files no build reads."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":".github/workflows/build-and-test.yml"},"region":{"startLine":40}}}],"partialFingerprints":{"codehealthFindingId/v1":"a367acff98ab59d093b1fb0d06e49fdd8d3642fdf72626858c8509133b3beb59"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}},{"ruleId":"R1","level":"warning","message":{"text":"Type Safety: 15 typed \u00B7 16 plain JS \u2014 the untyped files are scripts/fix-types.js, test/bootstrap-test-suite.js, test/browser.spec.js, test/browser/entry.js, test/browser/legacy-runner.js, test/browser/server.js (\u002B10 more)."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d00ee7953f55325a823d27e5db9657c80ca9b9861c0c0abf8fe487cd3fa586d3"}},{"ruleId":"R10","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2 locations): src/purify.ts:857 \u00B7 src/purify.ts:869 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":857}}}],"partialFingerprints":{"codehealthFindingId/v1":"f0359e2f6bb5db0e2d4af13d0dcc25db16f5270dcd470d58519fe2622a9380c3"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _parseConfig (cyclomatic 58, cognitive 75): _parseConfig has cyclomatic complexity 58 and cognitive complexity 75; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":662}}}],"partialFingerprints":{"codehealthFindingId/v1":"bfd4c88389a8423ee18fed4676915b3f27ba31ea142be41d4247c9f2be638b35"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function sanitize (cyclomatic 50, cognitive 67): sanitize has cyclomatic complexity 50 and cognitive complexity 67; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2664}}}],"partialFingerprints":{"codehealthFindingId/v1":"8769b5562588479ccdbbd6f384d4b9dedc674847007171cad76bc78724513406"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _isValidAttribute (cyclomatic 30, cognitive 26): _isValidAttribute has cyclomatic complexity 30 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2150}}}],"partialFingerprints":{"codehealthFindingId/v1":"874dacc19ff31cd80ab062c415795f6a7e4ab3841092eb0ca1b41c7757a9f801"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _sanitizeAttributes (cyclomatic 20, cognitive 30): _sanitizeAttributes has cyclomatic complexity 20 and cognitive complexity 30; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2404}}}],"partialFingerprints":{"codehealthFindingId/v1":"de72cc918200cf7b125debbba907a804e2c2902572d8e8e03092c5503f1a012a"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _sanitizeElements (cyclomatic 20, cognitive 21): _sanitizeElements has cyclomatic complexity 20 and cognitive complexity 21; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2025}}}],"partialFingerprints":{"codehealthFindingId/v1":"ee8133335991fc794d113d983f36920a29b4bcf57b2d4856deaaaeb614b5b764"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _initDocument (cyclomatic 19, cognitive 23): _initDocument has cyclomatic complexity 19 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1585}}}],"partialFingerprints":{"codehealthFindingId/v1":"910e7619c94daa0fc9862c3413f53f223419d6b8512ec2baa7ba73f7d36812f4"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _isUnsafeNode (cyclomatic 18, cognitive 10): _isUnsafeNode has cyclomatic complexity 18 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1831}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2c315358820f1eda80f25d814c737c4745bd48927eae4c6aa6ac782d5e07b82"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function createDOMPurify (cyclomatic 17, cognitive 14): createDOMPurify has cyclomatic complexity 17 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":198}}}],"partialFingerprints":{"codehealthFindingId/v1":"60cb7c21065d6aa47cbcedc7274bfb6b11ff6442d3fac85870eab497b47d7529"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function visit (cyclomatic 16, cognitive 23): visit has cyclomatic complexity 16 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test/test-suite.js"},"region":{"startLine":7827}}}],"partialFingerprints":{"codehealthFindingId/v1":"944dd574d7dcd681b8f3ff5ebf54b8545bbcbb6b9f33b3834a4bde45c8eee7d6"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _isClobbered (cyclomatic 16, cognitive 13): _isClobbered has cyclomatic complexity 16 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1745}}}],"partialFingerprints":{"codehealthFindingId/v1":"61aef3c9d508168cd0a0cea4f5a6ed0dad4f3ad2fd7287e605c64957e7e2a58b"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function stringifyValue (cyclomatic 14, cognitive 12): stringifyValue has cyclomatic complexity 14 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth \u2014 arms side by side rather than stacked \u2014 and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/utils.ts"},"region":{"startLine":224}}}],"partialFingerprints":{"codehealthFindingId/v1":"e2bd7fc1714f8b6094c4818b5f3dbaf8de4ba69acd156258206beef47bd47f80"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _sanitizeAttachedShadowRoots (cyclomatic 12, cognitive 26): _sanitizeAttachedShadowRoots has cyclomatic complexity 12 and cognitive complexity 26; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":2611}}}],"partialFingerprints":{"codehealthFindingId/v1":"62f1ddce631e6a3e35b45dc655b83449382439bc524f1f282686d0fa407bb7ef"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function runSuite (cyclomatic 12, cognitive 17): runSuite has cyclomatic complexity 12 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"test/browser/legacy-runner.js"},"region":{"startLine":99}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e80bb913181d9f174a7f2f5234c302e9ccb31046eba2bbe941e81403cc4f119"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function (anonymous) (cyclomatic 12, cognitive 14): (anonymous) has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1536}}}],"partialFingerprints":{"codehealthFindingId/v1":"531491ef68e21115b395b30868f9764c1f5972a751019e75f5a230a2b257e0af"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _removeAttribute (cyclomatic 11, cognitive 19): _removeAttribute has cyclomatic complexity 11 and cognitive complexity 19; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1211}}}],"partialFingerprints":{"codehealthFindingId/v1":"4c27497dd2e70057ee03b28b33d1bd13d81fb601ba29f3104bbab11dee91b147"}},{"ruleId":"R2","level":"warning","message":{"text":"Complex function _sanitizeDisallowedNode (cyclomatic 11, cognitive 14): _sanitizeDisallowedNode has cyclomatic complexity 11 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side \u2014 extracting each decision into its own named function is the change that pays. Measured by this repository\u0027s own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1921}}}],"partialFingerprints":{"codehealthFindingId/v1":"86ecb913af757af158fb6adadc55ee9adf4b5dfaaf5e8e26f4578080e05c9325"}},{"ruleId":"R3","level":"warning","message":{"text":"src/purify.ts: 2639 lines of code: src/purify.ts has 2639 significant lines (blank lines excluded), over the 400-line bar, and contains logic \u2014 a file this long is usually several responsibilities in one module."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"7ec368bce20593a0670c8f70a88a7d825226cf439e5ff023395b098b1f4232b6"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/commonjs-typescript-4.4/index.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8817ae5a28b4ff7e9c6f39f9550933aa27836a8745f41b85ccb02624636cac3a"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/commonjs-with-no-types/index.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b782a4178c2c04ac7cf0377baa8b026a62a5d25542d4a9612395dca63cec2262"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/commonjs-with-specific-types/index.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"262d8db188f968ed2a90e4ec7f5426a6a3ee0a5d10bc6a428b25c416bf270955"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/commonjs/index.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"5633b9e5e95f086c08f893f493c515cf67a6b2ad8c41e8309e2801e638dc142f"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/esm-with-no-types/index.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"88b2c40537a8c3723b0933447ac3299dbfed5125a29457fbd035ebe0dc1e9d42"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/esm-with-specific-types/index.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a9b99256dbe3a58639c7acb905b591569f94a5f889ee9f0fc0d32734e0dd9b5d"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/esm/index.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b874559d8ae114cd088768815ae9b6ba3130c1691be5d944e3df39fe8875c95a"}},{"ruleId":"R4","level":"warning","message":{"text":"No test reaches this file: No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL \u2014 if neither does, no test reaches this one."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/nodenext/index.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6bbe02f6be1c87a9f8bc58634dc43c547f5296656cac507b00c2a2e2ba836308"}},{"ruleId":"R7","level":"warning","message":{"text":"Dead file (~4 LoC): no import path from any entry point (24 application, 5 tooling, 16 test roots considered), and no other file in the scanned tree imports it \u2014 nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/commonjs-with-no-types/index.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"08f6f095937942b7fc221f77ebe200e1ec4278c94394849c9fb90f1408bf04f7"}},{"ruleId":"R7","level":"warning","message":{"text":"Dead file (~4 LoC): no import path from any entry point (24 application, 5 tooling, 16 test roots considered), and no other file in the scanned tree imports it \u2014 nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/commonjs-with-specific-types/index.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a6151336f14eb3c3f448c3da71f43eed20de8731681f62d544c53ead79284705"}},{"ruleId":"R7","level":"warning","message":{"text":"Dead file (~4 LoC): no import path from any entry point (24 application, 5 tooling, 16 test roots considered), and no other file in the scanned tree imports it \u2014 nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/commonjs/index.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"42f067b02908868eb236de8f02e9de830e5393c4fa52fc399a579123bf6a9b5d"}},{"ruleId":"R7","level":"warning","message":{"text":"Dead file (~4 LoC): no import path from any entry point (24 application, 5 tooling, 16 test roots considered), and no other file in the scanned tree imports it \u2014 nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make"},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/nodenext/index.ts"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"936bc032d0f2bf0796467532832362096d44d485a09e5c26382ddf0ac5074612"}},{"ruleId":"R8","level":"warning","message":{"text":"Unused dependency \u0027typescript-4.4\u0027: Declared in typescript/package.json but never imported anywhere in that package or its workspace members \u2014 no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"65ff9984fe22775dbde21b76a1bcc9fdec94b0115a8594915e007184cced8eb6"}},{"ruleId":"SC1","level":"warning","message":{"text":"JavaScript dependencies are not locked: typescript/package.json declares dependencies that no committed lockfile resolves \u2014 there is no package-lock.json / yarn.lock / pnpm-lock.yaml / bun.lock beside it, and no locked workspace above it names it \u2014 so its installs aren\u0027t reproducible (SSDF PW.4.4). Commit its package manager\u0027s lockfile (or add it to the locked workspace) and install from it (\u0060npm ci\u0060, \u0060yarn --immutable\u0060, \u0060pnpm i --frozen-lockfile\u0060 or \u0060bun i --frozen-lockfile\u0060). Advisory \u2014 never scored."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"typescript/package.json"},"region":{"startLine":2}}}],"partialFingerprints":{"codehealthFindingId/v1":"0c65a48c714b3f3313e86e9ce0083d967ff4d7bfc5244b6e1ee03471daf19451"}},{"ruleId":"X24","level":"warning","message":{"text":"Untrusted text written into markup unescaped: \u0060IS_EMPTY_INPUT?emptyHTML:dirtyPayload\u0060 is text this program did not author, and it is written into the text of an element through \u0060innerHTML\u0060 with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework\u0027s escaping output, or sanitise it if it must stay markup."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1624}}}],"partialFingerprints":{"codehealthFindingId/v1":"a7c6e2a26652e9bb7cad908c40113a17b841ad252271e4ce32df079f47c60429"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1171}}}],"partialFingerprints":{"codehealthFindingId/v1":"747dfc1e6f9f153f5f9761f7e38c7894dbe4402976f31df3a9e840f2c3401e3f"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1190}}}],"partialFingerprints":{"codehealthFindingId/v1":"cc43d56e3e529da159a416b63ba836ce0581525764999ba95f0a793ffc855ae9"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1234}}}],"partialFingerprints":{"codehealthFindingId/v1":"cfaa6b1799dafc1f0997164e51f14564da8b0fd14f462644ef7627d7297b9611"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1242}}}],"partialFingerprints":{"codehealthFindingId/v1":"f881cab7bfef1c61c622b970daf47bbe42c5dfab1e4bb34eb8c56758c25ef1a2"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1246}}}],"partialFingerprints":{"codehealthFindingId/v1":"1bed9ed40e3669df7ec5df2894fa2d58c1605320288e608131f157c4c820acae"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1547}}}],"partialFingerprints":{"codehealthFindingId/v1":"8d43fdd12b9f9e5188655810565174c8b18e801d2068f21920b99ff522c70d11"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1570}}}],"partialFingerprints":{"codehealthFindingId/v1":"d7eccb96c15a788774fa1ed90f0029a09b2db225510975f61c3b6af602f9ff6a"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1617}}}],"partialFingerprints":{"codehealthFindingId/v1":"5d5cd441078fa970666888efcea8e6525a81d85975466ab64c9e1e7564c7b486"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"src/purify.ts"},"region":{"startLine":1627}}}],"partialFingerprints":{"codehealthFindingId/v1":"8b3b743e4855949ed20498126d34e85c366ce24630e019ec92c4925b11701786"}},{"ruleId":"X5","level":"note","message":{"text":"Strict null checking is not enabled everywhere the repository type-checks: 0/9 of this repository\u0027s type-checking configuration(s) turn on strict null checking (\u0060\u0022strict\u0022: true\u0060, or \u0060\u0022strictNullChecks\u0022: true\u0060). A configuration that states neither is counted as OFF, because off is tsc\u0027s own default; a solution-style one whose \u0060\u0022files\u0022\u0060 is empty and whose \u0060\u0022references\u0022\u0060 point at other projects is in neither number, because it checks no source itself. Where it is off, \u0060string\u0060 admits \u0060null\u0060 and \u0060undefined\u0060: passing a value that is null compiles silently and throws on the first property access."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8870f9ff7b17c2e14c5ba3bc13137b94673aad0b9498438c572dabb049852943"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1059","guid":"a2381a08-60f6-9554-a8b8-f3018cfaaca5","name":"Insufficient Technical Documentation","shortDescription":{"text":"Insufficient Technical Documentation"},"helpUri":"https://cwe.mitre.org/data/definitions/1059.html"},{"id":"CWE-1357","guid":"e4d2e772-757e-0a5c-bd7d-77052949d866","name":"Reliance on Insufficiently Trustworthy Component","shortDescription":{"text":"Reliance on Insufficiently Trustworthy Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1357.html"},{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-319","guid":"7af97476-9f0d-4458-9163-3d2043918a1a","name":"Cleartext Transmission of Sensitive Information","shortDescription":{"text":"Cleartext Transmission of Sensitive Information"},"helpUri":"https://cwe.mitre.org/data/definitions/319.html"},{"id":"CWE-494","guid":"b8a65e0d-e459-4a55-a931-fc1136482375","name":"Download of Code Without Integrity Check","shortDescription":{"text":"Download of Code Without Integrity Check"},"helpUri":"https://cwe.mitre.org/data/definitions/494.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-829","guid":"13c33925-97fb-5a5e-b40c-56d328b8a4d7","name":"Inclusion of Functionality from Untrusted Control Sphere","shortDescription":{"text":"Inclusion of Functionality from Untrusted Control Sphere"},"helpUri":"https://cwe.mitre.org/data/definitions/829.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A02:2025","guid":"668dee9e-41bc-6354-97d0-fdf8f40c50c1","name":"Security Misconfiguration","shortDescription":{"text":"Security Misconfiguration"},"helpUri":"https://top10.owasp.org/2025/A02_2025-Security_Misconfiguration/"},{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A04:2025","guid":"6a9f5bfd-1a56-6453-beec-a7eff0ba3007","name":"Cryptographic Failures","shortDescription":{"text":"Cryptographic Failures"},"helpUri":"https://top10.owasp.org/2025/A04_2025-Cryptographic_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]},{"name":"OWASP Top 10 CI/CD Security Risks","guid":"3c9b2a6e-5d14-4f7b-8e02-6a1d9c4b7f35","organization":"OWASP Foundation","informationUri":"https://owasp.org/www-project-top-10-ci-cd-security-risks/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10 CI/CD Security Risks."},"taxa":[{"id":"CICD-SEC-3","guid":"458c83a6-ebf7-cf55-8cc3-b4d949bbf271","name":"Dependency Chain Abuse","shortDescription":{"text":"Dependency Chain Abuse"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-03-Dependency-Chain-Abuse"},{"id":"CICD-SEC-9","guid":"b3d36727-0395-5b51-94c4-5e173d62eab3","name":"Improper Artifact Integrity Validation","shortDescription":{"text":"Improper Artifact Integrity Validation"},"helpUri":"https://owasp.github.io/www-project-top-10-ci-cd-security-risks/CICD-SEC-09-Improper-Artifact-Integrity-Validation"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":7,"secretScannerRunsExcluded":0}},"redactionTokens":["A security finding was recorded here. Its details are withheld on the public artifact \u2014 ask the repository owner for the full report."]}]}