Public report of avwo/whistle, published 15 November 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 15 November 2026, 04:56 UTC · Survey ID cd_55fb44fdb17f47999ccc41205cd8fe7b

avwo/whistle

Measured 15 November 2026, 04:52 UTC, at code version b962b8a

Supply-chain provenance & signing is not measured: Supply-chain provenance is not scored (this pipeline releases no artifact), but its build steps or GitHub Actions workflows have integrity defects, or nothing watches its dependency set for published advisories.

CAI score 32out of 100 At risk No change since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A medium codebase: 71,916 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 0.4 person-years · Weakest lens: Accessibility, 26

Findings by how serious they are

39 critical 912 serious 89 minor

12 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Assert small markCanine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
15 November 2026, 04:52 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds the Canine Code Analyzer. It is open to any tool that implements it, and today the Canine Code Analyzer is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. We work it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

62of 62 dimensions measured by tools.
1022of 1040 findings point to an exact file and line, so you can open each one in the code. The other 18 concern the repository as a whole, such as missing documentation.
62dimensions across 7 lenses, read from 71,916 lines of product code in 1 project.
Chapters

Executive summary

avwo/whistle is rated At risk because critical security findings are open, most of them in the packages it uses. Its score is held back in part because it has pages that don't say their language. It scores 32 out of 100, which the At risk rating leaves unchanged.

Accessibility, at 26, is the weakest lens, level with Code Health, and counts most in the score. The best first step for the work it takes is fixing the password or key in the code, worth about 2 points. Labelling the form fields and buttons would lift Accessibility itself, worth about 3 points. Raising Accessibility to 70 would lift the score to about 36.

Nineteen known security holes in the packages the code depends on can be used by attackers. Three passwords or keys in the code's history and one in the code are open to anyone who can read the repository, and three weaknesses in the code could be used by an attacker. Replacing each exposed password or key, updating the vulnerable packages and fixing the weaknesses the scanner points to would close these risks. Switching the validation back on would fix the five security checks on connections or logins switched off, and loading the key from a secret store instead of the code would deal with the three encryption keys written into the code. The two pages that don't say their language need their language set.

The product code is 71,916 lines, about €64,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Accessibility 26 · counts for 46%Code Health 26 · counts for 25%Security and Compliance 31 · counts for 14%Production Readiness 34 · counts for 8%Maturity 63 · counts for 4%Architecture 92 · counts for 2%Performance 100 · counts for 1%

If Accessibility rose from 26 to 70, the lowest score rated Strong, the score would rise from 32 to about 36.

Code composition: what the lines of code are
Product code 95%Tests 5%
New since the last survey: 88 findings

These 88 critical or serious findings weren't in the previous survey, on 29 October 2026.

We compare every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 598 findings

These 598 critical or serious findings were in the previous survey, on 29 October 2026, and are gone from this one. The first 100 are listed here.

  • Cyclomatic Complexity · index.getPipe (cyclomatic 22) lib/plugins/index.js
  • Cyclomatic Complexity · rules-hint.getHints (cyclomatic 20) biz/webui/htdocs/src/js/rules-hint.js
  • Cyclomatic Complexity · req-data.getStatusClass (cyclomatic 17) REDACTED
  • Cognitive Complexity · index.getPipe (cognitive 28) lib/plugins/index.js
  • Cognitive Complexity · rules-hint.getHints (cognitive 24) biz/webui/htdocs/src/js/rules-hint.js
  • Cognitive Complexity · parseQueryString (cognitive 24) REDACTED
  • Cognitive Complexity · util.parseLine (cognitive 22) REDACTED
  • Cognitive Complexity · parseLinesJSON (cognitive 17) REDACTED
  • Cognitive Complexity · rules.getDecoder (cognitive 16) lib/inspectors/rules.js
  • Churn × Complexity Hotspots · Hotspot: biz/webui/htdocs/src/js/data-center.js biz/webui/htdocs/src/js/data-center.js
  • Churn × Complexity Hotspots · Hotspot: biz/webui/htdocs/src/js/rules-hint.js biz/webui/htdocs/src/js/rules-hint.js
  • Churn × Complexity Hotspots · Hotspot: biz/webui/htdocs/src/js/network-modal.js biz/webui/htdocs/src/js/network-modal.js
  • Churn × Complexity Hotspots · Hotspot: REDACTED REDACTED
  • Churn × Complexity Hotspots · Hotspot: biz/webui/htdocs/src/js/timeline.js biz/webui/htdocs/src/js/timeline.js
  • Churn × Complexity Hotspots · Hotspot: biz/webui/htdocs/src/js/context-menu.js biz/webui/htdocs/src/js/context-menu.js
  • Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
  • Change Coupling · Change coupling: req-detail.js ↔ res-detail.js biz/webui/htdocs/src/js/req-detail.js
  • Code Duplication · Duplicated block (40 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (35 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (28 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (23 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (21 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (16 lines × 2 locations) bin/ca/cli.js
  • Code Duplication · Duplicated block (16 lines × 2 locations) biz/webui/htdocs/src/js/columns.js
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) biz/webui/htdocs/src/js/iframe-dialog.js
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) biz/webui/htdocs/src/js/recycle-bin.js
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) biz/webui/htdocs/src/js/recycle-bin.js
  • Code Duplication · Duplicated block (16 lines × 2 locations) biz/webui/htdocs/src/js/req-detail.js
  • Code Duplication · Duplicated block (16 lines × 3 locations) biz/webui/htdocs/src/js/request-rule.js
  • Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) lib/https/index.js
  • Code Duplication · Duplicated block (16 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (15 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (15 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (15 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (15 matched lines × 2 locations) lib/https/index.js
  • Code Duplication · Duplicated block (15 lines × 2 locations) lib/util/file-mgr.js
  • Code Duplication · Duplicated block with local edits (14 matched lines × 2 locations) bin/api.js
  • Code Duplication · Duplicated block with local edits (14 matched lines × 2 locations) biz/webui/htdocs/src/js/cookies-dialog.js
  • Code Duplication · Duplicated block with local edits (14 matched lines × 2 locations) biz/webui/htdocs/src/js/editor-dialog.js
  • Code Duplication · Duplicated block with local edits (14 matched lines × 2 locations) biz/webui/htdocs/src/js/frame-modal.js
  • Code Duplication · Duplicated block (14 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (14 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (14 lines × 2 locations) biz/webui/htdocs/src/js/mapping-rule.js
  • Code Duplication · Duplicated block (14 lines × 2 locations) biz/webui/htdocs/src/js/props-editor.js
  • Code Duplication · Duplicated block (14 lines × 2 locations) biz/webui/htdocs/src/js/req-detail.js
  • Code Duplication · Duplicated block with local edits (14 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (13 matched lines × 2 locations) biz/webui/cgi-bin/create-cert.js
  • Code Duplication · Duplicated block with local edits (13 matched lines × 2 locations) biz/webui/cgi-bin/rules/select2.js
  • Code Duplication · Duplicated block with local edits (13 matched lines × 2 locations) biz/webui/cgi-bin/util.js
  • Code Duplication · Duplicated block (13 lines × 2 locations) biz/webui/htdocs/src/js/composer.js
  • Code Duplication · Duplicated block (13 lines × 2 locations) biz/webui/htdocs/src/js/data-center.js
  • Code Duplication · Duplicated block (13 lines × 4 locations) biz/webui/htdocs/src/js/filter-input.js
  • Code Duplication · Duplicated block (13 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) biz/webui/htdocs/src/js/inspectors.js
  • Code Duplication · Duplicated block (13 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) biz/webui/htdocs/src/js/res-detail.js
  • Code Duplication · Duplicated block (13 lines × 2 locations) biz/webui/htdocs/src/js/timeline.js
  • Code Duplication · Duplicated block (13 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (13 lines × 2 locations) lib/service/console-log.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) biz/webui/cgi-bin/rules/add.js
  • Code Duplication · Duplicated block with local edits (12 matched lines × 2 locations) biz/webui/htdocs/src/js/cookies-dialog.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) biz/webui/htdocs/src/js/frame-composer.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) lib/socket-mgr.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) lib/util/common.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) lib/util/common.js
  • Code Duplication · Duplicated block (12 lines × 2 locations) lib/util/common.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) biz/webui/htdocs/src/js/mapping-rule.js
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) biz/webui/htdocs/src/js/network-modal.js
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) biz/webui/htdocs/src/js/text-dialog.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) biz/webui/htdocs/src/js/url-input.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) lib/config.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) lib/inspectors/req.js
  • Code Duplication · Duplicated block with local edits (11 matched lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 3 locations) REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) lib/util/common.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) lib/util/index.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) lib/util/index.js
  • Code Duplication · Duplicated block (11 lines × 2 locations) lib/util/index.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block (10 lines × 2 locations) biz/webui/htdocs/src/js/about.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) biz/webui/htdocs/src/js/debug-rule.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) biz/webui/htdocs/src/js/debug-rule.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) biz/webui/htdocs/src/js/filter-input.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) biz/webui/htdocs/src/js/frame-modal.js
  • Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) biz/webui/htdocs/src/js/iframe-dialog.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) biz/webui/htdocs/src/js/inspector.js
  • Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) biz/webui/htdocs/src/js/kv-dialog.js
  • Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) biz/webui/htdocs/src/js/list.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) biz/webui/htdocs/src/js/network-modal.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) biz/webui/htdocs/src/js/network-modal.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) biz/webui/htdocs/src/js/parse-rules.js
  • Code Duplication · Duplicated block (10 lines × 2 locations) REDACTED
  • Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) biz/webui/htdocs/src/js/rules-dialog.js
  • Code Duplication · Duplicated block with local edits (10 matched lines × 2 locations) biz/webui/htdocs/src/js/shortcuts-settings.js
Rebuild cost: about €64,000 · Estimate
Cost to rebuild€21,000 to €110,000, for 356 to 1,128 hours of work, about 0.4 person-years for one engineer
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.7 at a score of 32. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 71,916 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: We price the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.
Raises the score by about 2 points · Low effort · REDACTED Scanning
2
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Raises the score by about 3 points · Medium effort · Forms & labels
3
Stop accepting every TLS certificate: delete `rejectUnauthorized: false` / `NODE_TLS_REJECT_UNAUTHORIZED=0` so the chain, hostname and expiry are verified, and trust a self-signed or private server by passing its CA (`ca`, or `NODE_EXTRA_CA_CERTS`) — never by switching verification off.
This repository constructs a TLS client that accepts any certificate at 5 sites, not one: `REDACTED:226` (`rejectUnauthorized: false`), `lib/config.js:65` (`rejectUnauthorized: false`), `lib/https/ca.js:602` (`rejectUnauthorized: false`), `lib/https/ca.js:719` (`rejectUnauthorized: false`), `lib/util/patch.js:20` (`NODE_TLS_REJECT_UNAUTHORIZED = "0"`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
Raises the score by about 3 points · Medium effort · Web-Security Posture

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €64,000 to build again, about 0.4 person-years of work. Its weakest lens is Accessibility, at 26 (Weak). Accessibility is about whether the interface is built so that everyone can use it, including people who can't see the screen or can't use a mouse. Because the weakest lens counts most in the score, work on Accessibility also moves the score most.
Based on: the rebuild estimate · the Accessibility grade · how much each lens counts
What to do: Start with the Accessibility actions in Top priorities.
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 2.0 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 15% to 34% on every change. The history of the code shows how much it changes: about 7,294 lines over the last 90 days, which is about 29,581 lines a year. At that pace, the extra work comes to an estimated 11.1 to 66.6 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
If you do one thing first · First action
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning. Of all the actions in this report, it raises the score most for the work it takes: about 2 points for low effort, because it clears the 1 REDACTED Scanning findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

At a glance — Code Health · 26% · Weak · gated by D1, D2, R1, R2, X3, X5 ·

At a glance — Architecture · 92% · Exemplary ·

At a glance — Maturity · 63% · Adequate · gated by M2 ·

At a glance — Readiness · 34% · Weak · gated by R4, P3, P7 ·

At a glance — Security · 31% · Weak · gated by D29, S1 ·

At a glance — Accessibility · 26% · Weak · gated by AC2, AC3 ·

At a glance — Performance · 100% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A05:2025 — Injection59High / Critical
A03:2025 — Software Supply Chain Failures34High / Critical
A07:2025 — Authentication Failures5High / Critical

Roadmap

Top priorities: Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label; Stop accepting every TLS certificate: delete `rejectUnauthorized: false` / `NODE_TLS_REJECT_UNAUTHORIZED=0` so the chain, hostname and expiry are verified, and trust a self-signed or private server by passing its CA (`ca`, or `NODE_EXTRA_CA_CERTS`) — never by switching verification off. This repository constructs a TLS client that accepts any certificate at 5 sites, not one: `REDACTED:226` (`rejectUnauthorized: false`), `lib/config.js:65` (`rejectUnauthorized: false`), `lib/https/ca.js:602` (`rejectUnauthorized: false`), `lib/https/ca.js:719` (`rejectUnauthorized: false`), `lib/util/patch.js:20` (`NODE_TLS_REJECT_UNAUTHORIZED = "0"`). Each is a separate decision — fixing only the line this row cites leaves the others in place; Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED.+1.9 ptsLowREDACTED Scanning
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+3.2 ptsMediumForms & labels
Stop accepting every TLS certificate: delete `rejectUnauthorized: false` / `NODE_TLS_REJECT_UNAUTHORIZED=0` so the chain, hostname and expiry are verified, and trust a self-signed or private server by passing its CA (`ca`, or `NODE_EXTRA_CA_CERTS`) — never by switching verification off. This repository constructs a TLS client that accepts any certificate at 5 sites, not one: `REDACTED:226` (`rejectUnauthorized: false`), `lib/config.js:65` (`rejectUnauthorized: false`), `lib/https/ca.js:602` (`rejectUnauthorized: false`), `lib/https/ca.js:719` (`rejectUnauthorized: false`), `lib/util/patch.js:20` (`NODE_TLS_REJECT_UNAUTHORIZED = "0"`). Each is a separate decision — fixing only the line this row cites leaves the others in place.+2.7 ptsMediumWeb-Security Posture
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED.+1.3 ptsLowADR Quality
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+2.4 ptsMediumPage structure
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.+2.2 ptsMediumVisual & motion safety
Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.+1.8 ptsMediumType Safety
Resolve the 20 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (20).+1.6 ptsMediumDependency Hygiene

File quality

Per-file score 0–10 — a quality signature. Of 118 files carrying findings, judged against the Production bar: 1% slop · 84% mixed · 15% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopDependency Vulnerabilities: Critical CVE: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.0MixedDependency Vulnerabilities: Medium CVE: REDACTED
REDACTED4.2MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedREDACTED Scanning: Leaked secret: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED4.9MixedStatic Analysis (SAST): Medium: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): Medium: REDACTED
lib/plugins/get-plugins-sync.js5.6MixedCyclomatic Complexity: get-plugins-sync.default (cyclomatic 24)
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
biz/webui/cgi-bin/rules/add.js6.3MixedCognitive Complexity: add.default (cognitive 18)
lib/util/index.js6.5MixedCyclomatic Complexity: index.readRuleList (cyclomatic 42)
lib/https/ca.js6.7MixedCyclomatic Complexity: ca.loadCustomCerts (cyclomatic 22)
REDACTED6.9MixedStatic Analysis (SAST): Medium: REDACTED

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 39

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 912

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 89

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 12

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 62 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.

Every figure here is one of two kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10.

What we checked — 62 dimensions across the health lenses
D1D2D3D12D13D14D15D17D19D20D21D27D28D29D30D34D35D43D44AC2AC3AC6AX10AX3AX4C2GD1IC1M1M2M3M4P1P2P3P6P7PF3R1R10R11R2R3R4R5R6R7R8R9S1X1X12X14X16X19X21X24X28X29X3X30X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1022 of 1040 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Canine Code Analyzer duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic

Every finding is locatable in findings.md. Run 01a1dd8d-2e1d-77cf-a523-cff96d3a11b4.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT MEASURED: test source is present (.js) and the coverage collector does support this ecosystem — it drives jest, vitest and mocha — but the test script invokes plain node, a bespoke harness the collector has no way to instrument, so no coverage was collected. Read from the manifests: the root package has a `scripts.test` of `npm run lintfix && node test/index.test.js`. Not scored — this is a gap in the analyzer's runner coverage, not a missing .js runner and not a defect in this repository.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test source is present (.js) and its test script runs a plain-node harness, which the reliability runner re-ran on its own: `node test/index.test.js` in the repository root exited cleanly on 3 of 3 runs. The harness executes every test file inside its own process and starts none of them as a separate `node` process, so each run yields a single pass/fail for the whole suite — too coarse to tell which test is flaky. Not scored — this is a limit of what a one-process harness reports, not a finding about this repository.
  • D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (65 contributor(s) across 11708 commit(s) sampled, automation and bot accounts excluded). One of them holds 99% of the history; the other 64 hold 0% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
  • D21 Naming Consistency — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. D21's naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22 identifies the intentionally-exposed surface from `IsPackable` and `.Contracts` project names, MSBuild conventions read off the loaded project set. This target exposed no such projects, so the probe never ran; this says nothing about whether the repository has a public API. This repository commits no C#/VB source at all, so there was never an MSBuild project set to read these conventions off. That is OUR side and it is an ADMISSION gap, not an environment fault: it declares a published package (REDACTED), but no published-package marker D22 reads admitted any project here. D22 DOES collect the public API of every language in this tree, and admits a project only when its manifest makes that ecosystem's publication act in a form the marker recognises — so what is missing is not a collector but an admission rule for the publication act this repository makes, if it makes one. The remedy is a better discriminator for that marker — not a collector, and no change to the scan image can close it. The marker's rules are measured to refuse applications, so one refused repository is the rule working as calibrated; several are the evidence that it is too strict. For npm the surface is what a published REDACTED's entry points (exports, main, module, types) export, followed through the source; an entry that names build output the tree does not commit (dist/, build/) is not followed back to source, because only a tsconfig outDir/rootDir pair states that mapping and a bundler's input lives in executable configuration this engine does not evaluate.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D24 compares a comment's words with the identifiers, literals and constructs of the code it annotates, using English function-word and rationale lexicons. Comments in another script or language were left unread rather than counted as clean.
  • D26 Project Cohesion — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `(repository root)` (70735 LoC, 269 module-visible types across 29 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
  • D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `bin/ca/index.d.ts`, `index.d.ts` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is computed over the public interfaces this run's compilations declare, and none was loaded, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXB2 Runtime readiness — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. The dev server kept running but no port it opened served a page in the time allowed. (rule: no-answer). The renderer reported: the dev server (`npm run dev`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "The unused option is deprecated. Please use options.discardUnused instead. / The urls option is deprecated. Please use options.normalizeUrl instead. / The idents option is deprecated. Please use options.mergeIdents instead. / The idents option is deprecated. Please use options.reduceIdents instead. / Hash: 0f176b08abc06ba17ac2 / Version: webpack 1.11.0 / Time: 13734ms / Asset Size Chunks Chunk Names / decode.js 6.39 kB 0 [emitted] decode / REDACTED 1.96 MB 1 [emitted] index / + 684 hidden modules" No runtime evidence was gathered.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server (`npm run dev`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "The unused option is deprecated. Please use options.discardUnused instead. / The urls option is deprecated. Please use options.normalizeUrl instead. / The idents option is deprecated. Please use options.mergeIdents instead. / The idents option is deprecated. Please use options.reduceIdents instead. / Hash: 0f176b08abc06ba17ac2 / Version: webpack 1.11.0 / Time: 13734ms / Asset Size Chunks Chunk Names / decode.js 6.39 kB 0 [emitted] decode / REDACTED 1.96 MB 1 [emitted] index / + 684 hidden modules" No runtime evidence was gathered.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
  • R10 Code Duplication — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 119 further occurrence(s) are not listed individually; the score already reflects all 159.
  • R2 Cyclomatic Complexity — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 266 further occurrence(s) are not listed individually; the score already reflects all 306.
  • R3 Large Files — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 2 further occurrence(s) are not listed individually; the score already reflects all 42.
  • R4 Test Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 230 further occurrence(s) are not listed individually; the score already reflects all 270.
  • R7 Dead Code — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 38 further occurrence(s) are not listed individually; the score already reflects all 78.
  • X10 Duplicated predicate — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 3 further occurrence(s) are not listed individually; the score already reflects all 43.
  • X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 141 further occurrence(s) are not listed individually; the score already reflects all 181.
  • X4 Structured logging — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.

Repo exclusion declarations: 14 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 REDACTED Scanning: REDACTED detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
  • D21 Naming Consistency: Naming consistency compares each name with the convention its structural peers follow in this repository: it cannot tell whether a consistently used name is a good one, and languages other than C# and TypeScript are not measured.
  • D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity2.0 / 10Critical✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

309 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was res.default at 337. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being load-plugin.addParserApi at 22 — they are counted neither in the figure above nor in this dimension's score.

exports::initServers (cyclomatic 55) · ×5REDACTED:1608
data-server.init::formatFilter (cyclomatic 30) · ×3lib/util/data-server.js:413
load-plugin.default::initServers (cyclomatic 55) · ×2REDACTED:1608
is-utf8.isUtf8 (cyclomatic 52) · ×2lib/util/is-utf8.js:3
exports (cyclomatic 38) · ×2lib/inspectors/req.js:456

+ 189 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 4 bodies over 120 down to 120 or less in Cyclomatic Complexity — start with res.default (cyclomatic 337), componentDidMount (cyclomatic 286), config.extend (cyclomatic 228). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cyclomatic Complexity from 2.0 to about 3.0/10, projected with the scoring formula itself and assuming each lands exactly at 120; a cleaner split scores higher.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity2.0 / 10Critical✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

399 method(s) exceeded the cognitive complexity threshold of 15; the worst was componentDidMount at 376.

exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request::retry (cognitive 54) · ×6REDACTED:467
init::getData (cognitive 48) · ×5lib/util/data-server.js:886
emitDataEvents::handleReqBody::write (cognitive 20) · ×3lib/inspectors/data.js:281
render (cognitive 16) · ×3biz/webui/htdocs/src/js/network-settings.js:358
is-utf8.isUtf8 (cognitive 52) · ×2lib/util/is-utf8.js:3

+ 255 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 30 bodies over 60 down to 60 or less in Cognitive Complexity — start with componentDidMount (cognitive 376), extend (cognitive 267), tunnel.tunnelProxy (cognitive 253). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 30 together lifts Cognitive Complexity from 2.0 to about 3.7/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes7.0 / 10Adequate✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 7.0 / 10 · rule-coverage 100% · ceiling Prevented

51 over-large unit(s) detected — types, modules or files that carry too much.

FunctionTooLong: load-plugin.default · ×28REDACTED:1123
FileTooLong: REDACTED · ×23REDACTED

What to do

  1. Resolve the 28 FunctionTooLong finding(s) in God Classes — start with REDACTED (5), REDACTED (4), req.js (2). — One of this dimension's main actionable groups (28 warning-level).
  2. Resolve the 23 FileTooLong finding(s) in God Classes — start with REDACTED (5), REDACTED, REDACTED. — One of this dimension's main actionable groups (23 warning-level).

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene7.1 / 10Strong✓ Tool-verified

What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.

Maturity: Documented → Verified → Prevented · effective 7.1 / 10 · rule-coverage 100% · ceiling Verified

8 outdated direct production npm dependency(ies) of 26 graded, 0 pinning defect(s), across 1 REDACTED (1 of them the product) and 1 committed lockfile(s). Development dependencies are deliberately not graded for currency: that grade is about what SHIPS. 5 direct dependency(ies) — production, development or optional — are marked DEPRECATED by their publisher (the registry's per-version mark, or the lockfile's copy of it when the registry could not be asked); deprecated transitive packages are listed but not charged. Whether any is UNMAINTAINED is not graded — the registry publishes no maintenance status, and release age does not stand in for one. Whether any is UNUSED is not graded either: that is a source question, and the frontend dependency lens (R8) answers it in this same run. Known CVEs in this dependency graph are D30's question, read from the manifest there.

Deprecated: babel-eslint · ×5REDACTED:82
Deprecated: browserslist · ×20REDACTED:2038
Outdated (npm): lru-cache · ×2REDACTED:51
Outdated (npm): body-parser · ×6

What to do

  1. Resolve the 20 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (20). — One of this dimension's main actionable groups (20 recommendation-level).
  2. Resolve the 5 Deprecated finding(s) in Dependency Hygiene — start with REDACTED (5). — One of this dimension's main actionable groups (5 warning-level).
  3. Resolve the 2 Outdated (npm) finding(s) in Dependency Hygiene — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · REDACTED Scanning5.0 / 10Adequate✓ Tool-verified

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Prevented

1 secret(s) detected.

REDACTED

What to do

  1. Resolve the 1 Leaked secret finding(s) in REDACTED Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 114 shipped npm package(s) use a banned license. Licences were resolved from registry.npmjs.org over the 114 package(s) this repository's committed lockfile installs for a consumer — its 26 production, optional and peer dependency(ies), across 1 product REDACTED manifest(s), and everything those install in turn. Its 34 `devDependencies` declaration(s), and every package only they reach, are excluded: a consumer installs none of them. ★ Each licence is the one the registry publishes for the package's CURRENT release rather than for the pinned version, which is the same caveat the Hex and RubyGems arms carry. This repository publishes itself under MIT, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots7.2 / 10Strong✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 7.2 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: lib/config.js (10×228=2280); REDACTED (5×337=1685); lib/tunnel.js (4×223=892)

Hotspot: lib/config.js · ×12lib/config.js:516

What to do

  1. Resolve the 12 Hotspot finding(s) in Churn × Complexity Hotspots — start with config.js, REDACTED, tunnel.js. — One of this dimension's main actionable groups (12 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt10.0 / 10Exemplary○ Nothing flagged

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

0 deducted task-comment markers across 460 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

✓ On the Gold path — maintain.

Detailed fixes: d17_recommendation.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 244 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs foundREDACTED:30

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D21 · Naming Consistency6.0 / 10Adequate✓ Tool-verified

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Seven vocabulary-free rules (N1-N7) mine each naming convention from the repository and flag a name that breaks a convention its structural peers in the same unit follow; production C# and TypeScript, each its own population. Deterministic, no model, no sample. Advisory.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Verified

4 naming inconsistencies among 99 declarations measured against a convention their peers follow.

`getDataURL` spells `URL` where 64 names in the project spell it `Url`biz/webui/htdocs/src/js/qrcode.js:8
`notRootCa` spells `Ca` where 12 names in the project spell it `CA`lib/https/ca.js:61
`getLocalhostIP` spells `IP` where 19 names in the project spell it `Ip`lib/util/index.js:3982
`FindProxyForURL` spells `URL` where 64 names in the project spell it `Url`test/plugins/whistle.test/assets/files/pac.js:1

What to do

  1. Resolve the 1 `getDataURL` spells `URL` where 64 names in the project spell it `Url` finding(s) in Naming Consistency — start with qrcode.js. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 `notRootCa` spells `Ca` where 12 names in the project spell it `CA` finding(s) in Naming Consistency — start with ca.js. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 `getLocalhostIP` spells `IP` where 19 names in the project spell it `Ip` finding(s) in Naming Consistency — start with REDACTED. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d21_recommendation.md · top locations in Appendix A, every location in findings.md.

D27 · Navigability10.0 / 10Exemplary✓ Tool-verified

What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.

Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.

Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

9 % of calls cross a namespace and 0 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.

✓ On the Gold path — maintain.

Detailed fixes: d27_recommendation.md.

D28 · Secrets (history)7.0 / 10Adequategated by 3 critical findings✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: REDACTED scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 7.0 / 10 · rule-coverage 100% · ceiling Documented

3 finding(s): 0 critical, 3 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 3 REDACTED finding(s) in Secrets (history) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.3 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 0.3 / 10 · rule-coverage 100% · ceiling Documented

59 finding(s): 0 critical, 4 high, 55 medium, 0 low. semgrep hit a parse error in 16 file(s) — `bin/ca/index.d.ts` (line 1), `biz/webui/htdocs/src/js/data-center.js`, `REDACTED`, `REDACTED`, `REDACTED`, … (+11 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 5 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 22 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (13), REDACTED (9). — One of this dimension's main actionable groups (22 warning-level).
  2. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED. — One of this dimension's main actionable groups (3 issue-level).
  3. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

34 finding(s): 5 critical, 14 high, 15 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 14 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (14). — One of this dimension's main actionable groups (14 issue-level).
  2. Resolve the 13 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (12), REDACTED. — One of this dimension's main actionable groups (13 warning-level).
  3. Resolve the 5 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (5). — One of this dimension's main actionable groups (5 issue-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Every significant source file has living knowledge — recently and meaningfully worked. Counted over 138 of the 316 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md.

D35 · Change Coupling9.8 / 10Stronggated by 5 serious findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: add.js↔add.js 77%; get-plugins-sync.js↔get-plugins.js 62%; about.js↔plugins.js 55%

Change coupling: add.js ↔ add.js · ×5biz/webui/cgi-bin/rules/add.js:1

What to do

  1. Resolve the 5 Change coupling finding(s) in Change Coupling — start with add.js, get-plugins-sync.js, about.js. — One of this dimension's main actionable groups (5 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Reported apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life6.0 / 10Adequate✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 26 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

End-of-life runtime: Node.js 16REDACTED:78

What to do

  1. Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AC2 · Forms & labels1.0 / 10Critical✓ Tool-verified

Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.

Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — biz/webui/htdocs/editor.html:22

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure3.5 / 10Weak✓ Tool-verified

Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.

Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.

Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en"). (×2) — biz/webui/htdocs/editor.html:2, biz/webui/htdocs/index.html:2
  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — biz/webui/htdocs/editor.html:2

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC6 · Visual & motion safety4.3 / 10Weak✓ Tool-verified

Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.

Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.

Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.

  • `.w-mark :is(th, td)` sets color: #fff on background-color: #3b88fd — 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them. — biz/webui/htdocs/src/css/base.css:388
  • `textarea[readonly]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/base.css:258
  • `.w-detail .w-dock-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/base.css:370
  • `.ReactVirtualized__Grid.ReactVirtualized__List` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/base.css:394
  • `.w-com-tabs .w-tab-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/composer.css:79
  • `.w-com-bar .btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/composer.css:118
  • `.w-iframe-dialog .modal-body iframe` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/iframe-dialog.css:18
  • `.w-iframe > iframe.fill` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/iframe.css:10
  • `.w-menu a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/index.css:20
  • `:is(.w-large-dialog, .w-custom-dialog) .modal-body` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/large-dialog.css:78
  • `.w-list-data` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/list.css:8
  • `.w-list-left a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/list.css:27
  • `.w-menu-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/menu-item.css:8
  • `.w-plugins-list` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/plugins.css:94
  • `.w-req-data-list` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/req-data.css:77
  • `.tree-node` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — biz/webui/htdocs/src/css/req-data.css:266
  • `.w-shake-horizontal` moves (`animation: shakeHorizontal 0.5s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce. — biz/webui/htdocs/src/css/base.css:547

What to do

  • Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
AX10 · Code composition9.7 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

C2 · Access Controls7.0 / 10Strong✓ Tool-verified

Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.

Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.

  • Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect. — REDACTED:147

What to do

  • Name the access rules — roles/permissions declared once (a @Roles/@Permissions decorator with its guard, a CASL ability, a casbin model, or Supabase CREATE POLICY) and consulted where access is checked, so the rule set is reviewable and testable on its own.
GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue in this repository's JavaScript/TypeScript: functions whose whole body still throws a "not implemented" error, and placeholder text (lorem ipsum, changeme/replace_me…) left in strings and JSX of non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.

IC1 · Incompleteness & stubs10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unfinished work detected by code SHAPE, not keywords, in this repository's JavaScript/TypeScript: functions that only throw a "not implemented" error, functions that take inputs and return a constant or do nothing, async functions that never await, dead `if (false)` branches, and skeleton classes most of whose methods are holes.

Method: Roslyn syntax scan: incompleteness by code shape (constant-returning methods, async-never-await, #if false branches, guards that return what the code already falls through to, tests an earlier guard already decided, comparisons against NaN, skeleton types), not keyword-gated. Deterministic, code-shape heuristic.

M1 · Documentation (README)6.7 / 10Adequate✓ Tool-verified

Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` 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.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

M4 · Documentation accuracy10.0 / 10Exemplary○ Nothing flagged

Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.

Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.

P1 · CI/CD gates5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

  • A CI pipeline exists but no test-runner invocation (your stack's test command, or a test job) was found — changes may merge without the suite running.
  • A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.

What to do

  • Run the test suite in CI via an explicit runner step (`npm test` for the toolchain this pipeline already uses) and gate merges on it.
  • Add an explicit build step to your CI pipeline — your stack's own build command, or, if the pipeline delegates to a task runner, a build task that runner executes in CI — so every change is built before merge.
P2 · Observability7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • `lib/util/data-server.js` reports through `console.*` at line 931 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — lib/util/data-server.js:931
  • `REDACTED` reports through `console.*` at line 107 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — REDACTED:107

What to do

  • Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
  • Add a health-check endpoint (@godaddy/terminus or a /health route) so orchestrators and load balancers can probe liveness/readiness.
P3 · Security & performance tooling0.0 / 10Critical✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

  • No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
  • `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — REDACTED:39

What to do

  • Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
  • Enable Dependabot/Renovate or a dependency-review gate.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

P7 · Outbound HTTP resilience3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.

Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.

  • `http.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — bin/whistle.js:40
  • `http.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. (×6) — lib/https/index.js:1055, REDACTED:166, lib/plugins/proxy.js:102, …

What to do

  • Bound every outbound call: pass `signal: AbortSignal.timeout(ms)` to `fetch`, set `timeout` on the axios instance (`axios.create({ timeout })`), and add retries with back-off (`axios-retry`, `p-retry`) and a breaker (`opossum`, `cockatiel`) around dependencies that fail.
PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from each language's code model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

R1 · Type Safety0.0 / 10Critical✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

  • 0 typed · 436 plain JS — the untyped files are assets/js/log.js, assets/js/weinre.js, biz/index.js, biz/init.js, biz/webui/cgi-bin/abort.js, biz/webui/cgi-bin/add-rules-values.js (+430 more).

What to do

  • Adopt TypeScript for the frontend: add a typecheck step to the build, then either type-check the existing JavaScript in place (`checkJs`/JSDoc types) or convert the highest-traffic modules first — no file is typed today, so this is an adoption, not a clean-up.
R10 · Code Duplication7.1 / 10Strong✓ Tool-verified

React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.

  • 27 duplicated blocks under the repository root have copies in at least two of the sibling directories bin, biz, lib — 20 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 27 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 27 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 27 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — biz/webui/htdocs/src/js/is-utf8.js:1
  • 12 duplicated blocks under lib/ have copies in at least two of the sibling directories handlers, https, inspectors, plugins, rules, service (+1 more sibling(s) not listed) — 8 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 12 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — REDACTED:1242
  • 8 duplicated blocks under biz/webui/cgi-bin/ have copies in at least two of the sibling directories rules, values — 4 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — biz/webui/cgi-bin/rules/export.js:4
  • biz/webui/htdocs/src/js/request-rule.js:51 · biz/webui/htdocs/src/js/response-rule.js:82 — the two spans are one implementation copied and then locally edited — 693 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — biz/webui/htdocs/src/js/request-rule.js:51
  • biz/webui/htdocs/src/js/console-log.js:108 · biz/webui/htdocs/src/js/server-log.js:47 — the two spans are one implementation copied and then locally edited — 461 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — biz/webui/htdocs/src/js/console-log.js:108
  • lib/socket-mgr.js:336 · lib/socket-mgr.js:467 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — lib/socket-mgr.js:336
  • biz/webui/htdocs/src/js/is-utf8.js:1 · lib/util/is-utf8.js:1 — these 2 files are line-for-line copies of one another — 57 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done. — biz/webui/htdocs/src/js/is-utf8.js:1
  • lib/inspectors/req.js:105 · REDACTED:917 — the two spans are one implementation copied and then locally edited — 333 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — lib/inspectors/req.js:105
  • lib/socket-mgr.js:402 · lib/socket-mgr.js:531 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — lib/socket-mgr.js:402
  • biz/webui/htdocs/src/js/export-dialog.js:12 · biz/webui/htdocs/src/js/import-dialog.js:43 — the two spans are one implementation copied and then locally edited — 214 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — biz/webui/htdocs/src/js/export-dialog.js:12
  • REDACTED:2953 · REDACTED:2993 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:2953
  • biz/webui/htdocs/src/js/frame-composer.js:245 · biz/webui/htdocs/src/js/frame-composer.js:286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — biz/webui/htdocs/src/js/frame-composer.js:245
  • biz/webui/htdocs/src/js/network-modal.js:287 · lib/util/data-server.js:736 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — biz/webui/htdocs/src/js/network-modal.js:287
  • REDACTED:2153 · lib/util/common.js:1358 — the two spans are one implementation copied and then locally edited — 288 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:2153
  • REDACTED:1206 · REDACTED:1241 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:1206
  • REDACTED:2127 · REDACTED:2157 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:2127
  • biz/webui/htdocs/src/js/list-modal.js:181 · lib/rules/storage.js:438 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — biz/webui/htdocs/src/js/list-modal.js:181
  • biz/webui/htdocs/src/js/network-modal.js:516 · biz/webui/htdocs/src/js/network-modal.js:567 · biz/webui/htdocs/src/js/network-modal.js:595 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. — biz/webui/htdocs/src/js/network-modal.js:516
  • REDACTED:775 · lib/util/index.js:1500 — the two spans are one implementation copied and then locally edited — 139 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:775
  • biz/webui/htdocs/src/js/tool-box.js:169 · biz/webui/htdocs/src/js/tool-box.js:216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — biz/webui/htdocs/src/js/tool-box.js:169
  • biz/webui/cgi-bin/rules/export.js:4 · biz/webui/cgi-bin/values/export.js:4 — the two spans are one implementation copied and then locally edited — 168 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — biz/webui/cgi-bin/rules/export.js:4
  • biz/webui/htdocs/src/js/req-detail.js:206 · biz/webui/htdocs/src/js/res-detail.js:257 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — biz/webui/htdocs/src/js/req-detail.js:206
  • REDACTED:2513 · REDACTED:2538 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:2513
  • REDACTED:3231 · REDACTED:3254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — REDACTED:3231
  • biz/webui/htdocs/src/js/modal.js:112 · biz/webui/htdocs/src/js/modal.js:144 — the two spans are one implementation copied and then locally edited — 100 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — biz/webui/htdocs/src/js/modal.js:112
  • biz/webui/htdocs/src/js/network-settings.js:372 · biz/webui/htdocs/src/js/network-settings.js:395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — biz/webui/htdocs/src/js/network-settings.js:372
  • lib/inspectors/data.js:278 · lib/inspectors/data.js:363 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — lib/inspectors/data.js:278
  • lib/util/data-server.js:666 · lib/util/data-server.js:852 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — lib/util/data-server.js:666
  • biz/webui/htdocs/src/js/sync-dialog.js:41 · biz/webui/htdocs/src/js/sync-dialog.js:63 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — biz/webui/htdocs/src/js/sync-dialog.js:41
  • biz/webui/cgi-bin/rules/list2.js:1 · biz/webui/cgi-bin/values/list2.js:1 — the two spans are one implementation copied and then locally edited — 123 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — biz/webui/cgi-bin/rules/list2.js:1
  • biz/webui/htdocs/src/js/list-modal.js:493 · biz/webui/htdocs/src/js/list-modal.js:515 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — biz/webui/htdocs/src/js/list-modal.js:493
  • lib/plugins/get-plugins-sync.js:143 · lib/plugins/index.js:385 — the two spans are one implementation copied and then locally edited — 108 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — lib/plugins/get-plugins-sync.js:143
  • lib/util/replace-pattern-transform.js:13 · lib/util/replace-string-transform.js:7 — the two spans are one implementation copied and then locally edited — 156 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — lib/util/replace-pattern-transform.js:13
  • REDACTED:2818 · REDACTED:2890 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — REDACTED:2818
  • biz/webui/htdocs/src/js/req-type.js:69 · biz/webui/htdocs/src/js/req-type.js:87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — biz/webui/htdocs/src/js/req-type.js:69
  • lib/inspectors/req.js:477 · REDACTED:835 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — lib/inspectors/req.js:477
  • lib/plugins/get-plugins-sync.js:41 · lib/plugins/get-plugins-sync.js:66 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — lib/plugins/get-plugins-sync.js:41
  • biz/webui/htdocs/src/js/dns-servers-dialog.js:52 · biz/webui/htdocs/src/js/online.js:675 — the two spans are one implementation copied and then locally edited — 54 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — biz/webui/htdocs/src/js/dns-servers-dialog.js:52
  • REDACTED:519 · REDACTED:801 — the two spans are one implementation copied and then locally edited — 108 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — REDACTED:519
  • biz/webui/htdocs/src/js/json-dialog.js:175 · biz/webui/htdocs/src/js/recycle-bin.js:200 — the two spans are one implementation copied and then locally edited — 55 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — biz/webui/htdocs/src/js/json-dialog.js:175

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries9.5 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Conformance to the detected frontend architecture layout (feature-sliced / layered src) plus cross-package deep-import rules (D-386).

Method: Conformance to the detected frontend layout (feature-sliced / layered src) plus cross-package deep-import rules, over the module graph. Deterministic.

  • biz/webui/htdocs/src/js/base-css.js:5 imports bootstrap/dist/js/bootstrap.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — biz/webui/htdocs/src/js/base-css.js:5
  • REDACTED:4 imports react-virtualized/dist/umd/react-virtualized, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — REDACTED:4

What to do

  • Fix the listed violations: import through public entries (package exports / slice index), never reach into another layer or package's internals.
R2 · Cyclomatic Complexity2.0 / 10Critical✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • extend has cyclomatic complexity 129 and cognitive complexity 161; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — lib/config.js:516
  • (anonymous) has cyclomatic complexity 102 and cognitive complexity 198; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — biz/webui/htdocs/src/js/rules-hint.js:552
  • (anonymous) has cyclomatic complexity 75 and cognitive complexity 137; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1554
  • render has cyclomatic complexity 75 and cognitive complexity 80; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:3918
  • (anonymous) has cyclomatic complexity 71 and cognitive complexity 132; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1458
  • resolveVarValue has cyclomatic complexity 66 and cognitive complexity 33; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:621
  • resolveRuleList has cyclomatic complexity 65 and cognitive complexity 134; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:929
  • (anonymous) has cyclomatic complexity 61 and cognitive complexity 57; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — lib/config.js:739
  • onClickContextMenu has cyclomatic complexity 61 and cognitive complexity 22; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:921
  • (anonymous) has cyclomatic complexity 58 and cognitive complexity 118; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:235
  • parseRule has cyclomatic complexity 57 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1229
  • matchFilter has cyclomatic complexity 56 and cognitive complexity 98; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1819
  • render has cyclomatic complexity 56 and cognitive complexity 71; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — biz/webui/htdocs/src/js/res-detail.js:63
  • (anonymous) has cyclomatic complexity 55 and cognitive complexity 68; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — biz/webui/htdocs/src/js/data-center.js:1157
  • initServers has cyclomatic complexity 55 and cognitive complexity 27; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1608
  • isUtf8 has cyclomatic complexity 52 and cognitive complexity 52; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — biz/webui/htdocs/src/js/is-utf8.js:3, lib/util/is-utf8.js:3
  • setReqData has cyclomatic complexity 46 and cognitive complexity 62; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — biz/webui/htdocs/src/js/data-center.js:1726
  • exports has cyclomatic complexity 45 and cognitive complexity 93; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — biz/index.js:31
  • onContextMenu has cyclomatic complexity 45 and cognitive complexity 51; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:1095
  • request has cyclomatic complexity 44 and cognitive complexity 39; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:424
  • checkItem has cyclomatic complexity 44 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — biz/webui/htdocs/src/js/network-modal.js:178
  • (anonymous) has cyclomatic complexity 43 and cognitive complexity 55; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:834
  • getAppName has cyclomatic complexity 43 and cognitive complexity 34; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — biz/webui/htdocs/src/js/data-center.js:1603
  • render has cyclomatic complexity 42 and cognitive complexity 36; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — biz/webui/htdocs/src/js/composer.js:1191
  • retry has cyclomatic complexity 41 and cognitive complexity 54; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:467
  • getProxy has cyclomatic complexity 41 and cognitive complexity 48; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:126
  • (anonymous) has cyclomatic complexity 37 and cognitive complexity 55; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — biz/webui/htdocs/src/js/overview.js:147
  • handleRequest has cyclomatic complexity 37 and cognitive complexity 45; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:345
  • render has cyclomatic complexity 37 and cognitive complexity 42; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — biz/webui/htdocs/src/js/req-detail.js:53
  • (anonymous) has cyclomatic complexity 36 and cognitive complexity 48; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:975
  • (anonymous) has cyclomatic complexity 36 and cognitive complexity 36; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — lib/https/index.js:1184
  • (anonymous) has cyclomatic complexity 35 and cognitive complexity 38; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — biz/webui/htdocs/src/js/rules-mode.js:191
  • getData has cyclomatic complexity 34 and cognitive complexity 48; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — lib/util/data-server.js:886
  • isRegUrl has cyclomatic complexity 31 and cognitive complexity 37; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:144
  • parseMetaInfo has cyclomatic complexity 30 and cognitive complexity 38; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — lib/service/extract-saz.js:30
  • formatFilter has cyclomatic complexity 30 and cognitive complexity 33; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — lib/util/data-server.js:413
  • exports has cyclomatic complexity 30 and cognitive complexity 32; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — lib/init.js:157
  • str has cyclomatic complexity 29 and cognitive complexity 65; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — assets/js/log.js:66
  • componentDidUpdate has cyclomatic complexity 29 and cognitive complexity 49; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — REDACTED:483
R3 · Large Files4.7 / 10Weak✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • REDACTED has 4775 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • lib/util/index.js has 3643 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/util/index.js:1
  • REDACTED has 3187 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 2554 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 2375 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • biz/webui/htdocs/src/js/data-center.js has 2096 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/data-center.js:1
  • lib/util/common.js has 2032 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/util/common.js:1
  • REDACTED has 1679 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • biz/webui/htdocs/src/js/composer.js has 1577 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/composer.js:1
  • lib/plugins/index.js has 1455 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/plugins/index.js:1
  • lib/https/index.js has 1316 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/https/index.js:1
  • REDACTED has 1284 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • lib/config.js has 1096 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/config.js:1
  • biz/webui/htdocs/src/js/plugins.js has 1021 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/plugins.js:1
  • biz/webui/htdocs/src/js/network-modal.js has 959 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/network-modal.js:1
  • biz/webui/htdocs/src/js/rules-hint.js has 959 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/rules-hint.js:1
  • lib/util/data-server.js has 949 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/util/data-server.js:1
  • lib/socket-mgr.js has 919 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/socket-mgr.js:1
  • biz/webui/htdocs/src/js/list.js has 898 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/list.js:1
  • lib/tunnel.js has 860 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/tunnel.js:1
  • REDACTED has 806 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • lib/https/ca.js has 802 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/https/ca.js:1
  • lib/rules/util.js has 672 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/rules/util.js:1
  • biz/webui/htdocs/src/js/online.js has 663 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/online.js:1
  • REDACTED has 657 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • REDACTED has 597 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • lib/inspectors/req.js has 580 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/inspectors/req.js:1
  • biz/webui/htdocs/src/js/editor.js has 565 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/editor.js:1
  • biz/webui/htdocs/src/js/network-settings.js has 561 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/network-settings.js:1
  • biz/webui/htdocs/src/js/editor-dialog.js has 543 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/editor-dialog.js:1
  • biz/webui/htdocs/src/js/list-modal.js has 541 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/list-modal.js:1
  • lib/inspectors/data.js has 529 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/inspectors/data.js:1
  • REDACTED has 517 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — REDACTED:1
  • lib/https/h2.js has 466 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/https/h2.js:1
  • lib/rules/storage.js has 465 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/rules/storage.js:1
  • biz/webui/htdocs/src/js/frame-list.js has 462 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/frame-list.js:1
  • biz/webui/htdocs/src/js/props-editor.js has 450 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/props-editor.js:1
  • lib/service/util.js has 440 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/service/util.js:1
  • lib/util/http-mgr.js has 439 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — lib/util/http-mgr.js:1
  • biz/webui/htdocs/src/js/url-input.js has 418 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — biz/webui/htdocs/src/js/url-input.js:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage1.7 / 10Critical✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • 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 — if neither does, no test reaches this one. (×40) — REDACTED:1, REDACTED:1, REDACTED:1, …

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness7.3 / 10Strong✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

R6 · Tooling6.7 / 10Adequate✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each REDACTED script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: REDACTED scanned for test/lint/typecheck script wiring. Deterministic presence check.

  • test ✓ · lint ✓ · typecheck ✗ — read from this repository's REDACTED scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.

What to do

  • Add type checking (adopt TypeScript, or type-check the existing JavaScript with `checkJs`) as REDACTED scripts and run them in CI.
R7 · Dead Code9.2 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 138 application, 5 tooling and 121 test entry point(s) detected in this repo. Gate removals on `npm run dev` — an undetected custom entry would make these reachable.
  • no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×39) — bin/api.js, biz/webui/cgi-bin/init.js, biz/webui/cgi-bin/create-cert.js, …

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene9.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Declared in the root REDACTED but never imported anywhere in that package or its workspace members — 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. (×2)

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports8.2 / 10Strong✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

  • REDACTED → REDACTED → lib/rules/util.js → REDACTED — REDACTED:10

What to do

  • Break each cycle by extracting the shared piece into a module both sides can import.
S1 · Web-Security Posture0.0 / 10Critical✓ Tool-verified

Other · Security — Read from this repository's JavaScript/TypeScript source: cryptographic hygiene (weak hash or cipher, key material fixed in the source) and outbound TLS (certificate validation, protocol version) — facts about code that hold whether or not it serves anything itself. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.

Method: Roslyn plus filesystem scan: HSTS/security headers, secure cookies, input validation, middleware order, weak crypto (MD5/SHA1/DES); HTTPS-metadata context-aware. On a repository with no .NET source it reads JavaScript/TypeScript, Dart, Ruby, Scala, Rust or Elixir source itself (test, vendored, generated and minified paths not) for the arms that hold whether or not the code serves HTTP: a weak hash or cipher, key material fixed in the source, a TLS client that accepts any certificate, and (JavaScript/TypeScript, Ruby, Scala, Rust and Elixir) an obsolete TLS version; the server controls are not assessed there, and a Dart, Ruby, Scala, Rust or Elixir repository that serves no HTTP of its own is N/A on them. Deterministic.

  • `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose. (×5) — REDACTED:226, lib/config.js:65, lib/https/ca.js:602, …
  • `salt` is the key-derivation salt, and its shipped DEFAULT is a compile-time constant — an installation that never overrides it encrypts with a value published in this repository, and the code cannot distinguish that state from a configured one. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash. (×2) — lib/util/common.js:1966, lib/util/common.js:1979
  • `key` is the MAC key, and its shipped DEFAULT is a compile-time constant — an installation that never overrides it encrypts with a value published in this repository, and the code cannot distinguish that state from a configured one. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash. — lib/util/common.js:2121
  • MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call. (×4) — lib/https/ca.js:209, lib/https/emudhra.js:21, lib/https/index.js:155, …
  • This code fixes scrypt at N=16,384 (r=8, p=1), Node's default. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price. (×2) — lib/util/common.js:1966, lib/util/common.js:1979

What to do

  • Stop accepting every TLS certificate: delete `rejectUnauthorized: false` / `NODE_TLS_REJECT_UNAUTHORIZED=0` so the chain, hostname and expiry are verified, and trust a self-signed or private server by passing its CA (`ca`, or `NODE_EXTRA_CA_CERTS`) — never by switching verification off. This repository constructs a TLS client that accepts any certificate at 5 sites, not one: `REDACTED:226` (`rejectUnauthorized: false`), `lib/config.js:65` (`rejectUnauthorized: false`), `lib/https/ca.js:602` (`rejectUnauthorized: false`), `lib/https/ca.js:719` (`rejectUnauthorized: false`), `lib/util/patch.js:20` (`NODE_TLS_REJECT_UNAUTHORIZED = "0"`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Load cryptographic key and salt material from configuration, an environment variable or a secrets manager rather than fixing it in the source, and fail fast at startup when it is absent — a default that silently works is the one that reaches production. Rotate anything already committed: it must be treated as disclosed. Salts should be generated per password and stored with the hash, never shared across installations. This repository constructs key or salt material fixed at compile time at 3 sites, not one: `lib/util/common.js:1966` (key-derivation salt, default `salt`), `lib/util/common.js:1979` (key-derivation salt, default `salt`), `lib/util/common.js:2121` (MAC key, default `key`). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Review each MD5/SHA1 use by what it protects: replace it with SHA-256+ (or a KDF for passwords) where the digest is security-relevant, and switch it to a non-cryptographic hash (xxhash, murmurhash) where it only derives an identifier such as a cache key. This repository constructs a collision-broken hash (MD5/SHA1) at 4 sites, not one: `lib/https/ca.js:209` (createHash("sha1")), `lib/https/emudhra.js:21` (createHash("sha1")), `lib/https/index.js:155` (createHash("sha1")), `lib/util/common.js:1342` (createHash("sha1")). Each is a separate decision — fixing only the line this row cites leaves the others in place.
  • Raise the cost parameter to current guidance — PBKDF2 at 1,300,000 (HMAC-SHA1), 600,000 (SHA-256) or 210,000 (SHA-512) iterations; scrypt at N=2^17, r=8, p=1; bcrypt at a work factor of 10 or more — or move to a memory-hard KDF (Argon2id, scrypt) where the platform offers one. Read the parameter from configuration and tune it to roughly 100 ms per derivation on the slowest hardware that must run it, so the price can be raised again without shipping new code. This repository constructs a key derivation priced below the floor at 2 sites, not one: `lib/util/common.js:1966` (scrypt, N=16,384 (r=8, p=1), Node's default), `lib/util/common.js:1979` (scrypt, N=16,384 (r=8, p=1), Node's default). Each is a separate decision — fixing only the line this row cites leaves the others in place.
X1 · Async correctness5.6 / 10Adequate✓ Tool-verified

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

  • The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it. — lib/plugins/shared-storage.js:19

What to do

  • `async` Promise executor
X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling2.4 / 10Critical✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×39) — REDACTED:96, REDACTED:195, lib/config.js:157, …
  • `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included. — lib/util/index.js:3802

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X5 · Nullable reference types2.0 / 10Critical✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • This repository commits no tsconfig, so whatever type-checks it uses tsc's own defaults, in which `strict` and `strictNullChecks` are OFF: `string` admits `null` and `undefined`, and a value that is null is compiled through to the property access that throws. If the build passes `--strict` on a command line instead, put it in a committed tsconfig — this check reads configuration, and configuration is all it can read.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

WCAG coverage — what static analysis assessed

Statically assessed 10 of 55 WCAG 2.2 Level A/AA success criteria (18%; ≈20% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 45 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only

Not statically assessed — these 45 Level A/AA criteria need runtime or manual evaluation (WCAG-EM): 1.1.1, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.1, 1.4.2, 1.4.5, 1.4.10, 1.4.11, 1.4.12, 1.4.13, 2.1.1, 2.1.2, 2.1.4, 2.2.2, 2.3.1, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.4.11, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.5.7, 2.5.8, 3.1.2, 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.6, 3.3.1, 3.3.3, 3.3.4, 3.3.7, 3.3.8, 4.1.3.

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health26%Weak — gated by D1, D2, R1, R2, X3, X5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture92%ExemplarySolid.
Maturity63%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness34%Weak — gated by R4, P3, P7Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security31%Weak — gated by D29, S1Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility26%Weak — gated by AC2, AC3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance100%ExemplaryStrongest area.
Unscored — 4 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • X10 Duplicated predicate — 40 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X6 Hand-rolled structured-format parsing — 4 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 2 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • P4 Deployment & Rollback — not evidenced — no deploy/rollback/approval signal in the repo; absence of evidence is not evidence of a manual release
  • P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 60 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
  • AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — no test/production split to check
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server (`npm run dev`) kept running but served no page within 2 minutes. Likely cause (not identified): the dev server kept running but no port it opened served a page in the time allowed. Last output: "The unused option is deprecated. Please use options.discardUnused instead. / The urls option is deprecated. Please use options.normalizeUrl instead. / The idents option is deprecated. Please use options.mergeIdents instead. / The idents option is deprecated. Please use options.reduceIdents instead. / Hash: 0f176b08abc06ba17ac2 / Version: webpack 1.11.0 / Time: 13734ms / Asset Size Chunks Chunk Names / decode.js 6.39 kB 0 [emitted] decode / REDACTED 1.96 MB 1 [emitted] index / + 684 hidden modules" No runtime evidence was gathered. This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
  • C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
  • C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
  • C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
  • D10 Test Quality — ~3570 lines of test source are present (.js) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not scored — the plain-node test harness runs every file in one process
  • D16 Bus Factor — single-maintainer repository — bus factor is not applicable
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D22 Internal API Consistency — The exposed public-API surface could not be collected — no C#/VB projects loaded.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ sibling projects each declaring an entity of their own or taking another project's integration events. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — 80 of 153 comment blocks were not judged (75 in a non-Latin script, 5 in a language other than English): redundancy is judged by word overlap with the code's identifiers, which cannot be measured across languages.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 2 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D36 Supply-chain Provenance & Signing — The CI pipeline publishes no artifact — no package publish, container push or release with files to download. Supply-chain provenance, signing and an SBOM describe a PUBLISHED artifact for the people who obtain it, so there is nothing to attest here; a deployment of the service itself publishes nothing for anyone else to verify. Add them to the release pipeline when this repo starts publishing artifacts (a package, a container image, or a release with downloadable files). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D4 Code Duplication — This repository's production source (.js, .mts) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication. The rest — .html (721 lines, 1% of production source) — is compared by neither card, so duplication there is unmeasured; it is a corner of this repository, not its product.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D5 Coupling — Not applicable — this npm build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
  • D6 Cohesion (LCOM4) — No production classes were analyzable, so cohesion (LCOM4) was not measured (the solution likely failed to load or has no production code).
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured — the test script invokes plain node, which the collector cannot instrument
  • DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this lens looks for
  • ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a REDACTED, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
  • X27 Collection changed while being enumerated — Not applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing — every loop form (`for…of`, `for…in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 39 finding(s)
D30 · Dependency Vulnerabilities · High CVE · ×14
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×5
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
S1 · Web-Security Posture · TLS certificate validation disabled · ×5
  • TLS certificate validation disabled REDACTED:226 — `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
  • TLS certificate validation disabled lib/config.js:65 — `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
  • TLS certificate validation disabled lib/https/ca.js:602 — `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
  • TLS certificate validation disabled lib/https/ca.js:719 — `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
  • TLS certificate validation disabled lib/util/patch.js:20 — `rejectUnauthorized: false` is set on a TLS client, so every peer certificate is accepted — including one an attacker presents. Chain, expiry, revocation and hostname are all skipped, so an attacker on the network path can present any certificate and read or rewrite the traffic — the connection is encrypted to the attacker, not to the intended host. Remove the option so Node validates the peer. If the server presents a self-signed or privately-issued certificate, trust THAT issuer rather than every certificate: pass its CA as `ca` (or set `NODE_EXTRA_CA_CERTS`), which keeps the chain and hostname checks on. A managed database or broker that documents `rejectUnauthorized: false` publishes a CA bundle for exactly this purpose.
D28 · Secrets (history) · REDACTED · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
S1 · Web-Security Posture · Cryptographic key material is a compile-time constant · ×3
  • Cryptographic key material is a compile-time constant lib/util/common.js:1966 — `salt` is the key-derivation salt, and its shipped DEFAULT is a compile-time constant — an installation that never overrides it encrypts with a value published in this repository, and the code cannot distinguish that state from a configured one. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
  • Cryptographic key material is a compile-time constant lib/util/common.js:1979 — `salt` is the key-derivation salt, and its shipped DEFAULT is a compile-time constant — an installation that never overrides it encrypts with a value published in this repository, and the code cannot distinguish that state from a configured one. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
  • Cryptographic key material is a compile-time constant lib/util/common.js:2121 — `key` is the MAC key, and its shipped DEFAULT is a compile-time constant — an installation that never overrides it encrypts with a value published in this repository, and the code cannot distinguish that state from a configured one. A key that ships with the source is not secret: every contributor, fork, mirror and released binary carries it, so anyone holding the repository can decrypt what any installation encrypted, and there is no way to invalidate what was already protected because every deployment built from this source shares the value. Where the constant is a password salt the consequence differs but is no smaller — one global salt means precomputation amortises across every installation, which is the property salting exists to destroy. Read the value from configuration, an environment variable or a secrets manager at startup and FAIL FAST when it is absent, so a missing key stops the process instead of silently falling back to a shared default; treat the committed value as disclosed and rotate it rather than only deleting the line. For a salt, generate a fresh random one per password and store it alongside the hash.
AC3 · Page structure · <html> without a lang · ×2
  • <html> without a lang biz/webui/htdocs/editor.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
  • <html> without a lang biz/webui/htdocs/index.html:2 — The page declares no language, so assistive tech can't pick the right pronunciation. Add lang (e.g. lang="en").
AC2 · Forms & labels · <textarea> without a programmatic label · ×1
  • <textarea> without a programmatic label biz/webui/htdocs/editor.html:22 — This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D13 · REDACTED Scanning · Leaked secret · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
R9 · Circular Imports · Import cycle (3 files) · ×1
  • Import cycle (3 files) REDACTED:10 — REDACTED → REDACTED → lib/rules/util.js → REDACTED
Serious — 912 finding(s)
R4 · Test Coverage · No test reaches this file · ×40
  • No test reaches this file REDACTED:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/data-center.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/composer.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/network-modal.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/plugins.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/rules-hint.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/list.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/online.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file lib/inspectors/req.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/list-modal.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/editor.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file bin/api.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/network-settings.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/editor-dialog.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file lib/inspectors/data.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file REDACTED:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file lib/service/util.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/frame-list.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file biz/webui/htdocs/src/js/props-editor.js:1 — 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 — if neither does, no test reaches this one.
  • No test reaches this file assets/js/log.js:1 — 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 — if neither does, no test reaches this one.
  • + 15 more in this group — see findings.md.
X3 · Exception handling · Swallowed exception (empty catch) · ×39
  • Swallowed exception (empty catch) REDACTED:96 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) REDACTED:195 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/config.js:157 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/config.js:160 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/config.js:163 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/config.js:274 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/config.js:403 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/config.js:445 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/config.js:450 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/config.js:589 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/config.js:679 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/socket-mgr.js:294 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/socket-mgr.js:300 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/socket-mgr.js:927 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/util/common.js:161 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/util/common.js:224 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/util/common.js:645 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/util/common.js:712 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/util/common.js:852 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/util/common.js:1059 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/util/common.js:1499 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/util/common.js:1596 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/util/common.js:1604 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/util/common.js:1653 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • Swallowed exception (empty catch) lib/util/common.js:1667 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
  • + 14 more in this group — see findings.md.
D3 · God Classes · FunctionTooLong · ×28
  • FunctionTooLong: load-plugin.default REDACTED:1123 — FunctionTooLong — default runs 1179 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 1079 over it, 11.79× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: res.default REDACTED:190 — FunctionTooLong — default runs 876 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 776 over it, 8.76× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: tunnel.tunnelProxy lib/tunnel.js:38 — FunctionTooLong — tunnelProxy runs 660 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 560 over it, 6.60× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.resolveWebsocket lib/https/index.js:89 — FunctionTooLong — resolveWebsocket runs 644 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 544 over it, 6.44× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: config.extend lib/config.js:516 — FunctionTooLong — extend runs 512 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 412 over it, 5.12× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: data-server.init lib/util/data-server.js:401 — FunctionTooLong — init runs 428 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 328 over it, 4.28× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: data.emitDataEvents lib/inspectors/data.js:55 — FunctionTooLong — emitDataEvents runs 376 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 276 over it, 3.76× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: data-center.startLoadData biz/webui/htdocs/src/js/data-center.js:1055 — FunctionTooLong — startLoadData runs 309 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 209 over it, 3.09× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rules-hint.CodeMirror.registerHelper("hint","rulesHint") biz/webui/htdocs/src/js/rules-hint.js:552 — FunctionTooLong — CodeMirror.registerHelper("hint","rulesHint") runs 262 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 162 over it, 2.62× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: req.handleParams lib/inspectors/req.js:156 — FunctionTooLong — handleParams runs 210 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 110 over it, 2.10× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: service.sessionsHandler REDACTED:302 — FunctionTooLong — sessionsHandler runs 191 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 91 over it, 1.91× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rules-mode.CodeMirror.defineMode("rules") biz/webui/htdocs/src/js/rules-mode.js:27 — FunctionTooLong — CodeMirror.defineMode("rules") runs 181 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 81 over it, 1.81× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rules.resolveMatchFilter REDACTED:1549 — FunctionTooLong — resolveMatchFilter runs 160 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 60 over it, 1.60× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rules.parseRule REDACTED:1229 — FunctionTooLong — parseRule runs 148 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 48 over it, 1.48× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: rules.resolveRuleList REDACTED:929 — FunctionTooLong — resolveRuleList runs 145 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.default lib/https/index.js:1151 — FunctionTooLong — default runs 143 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 43 over it, 1.43× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.proxy REDACTED:36 — FunctionTooLong — proxy runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: index.getProxy REDACTED:126 — FunctionTooLong — getProxy runs 141 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 41 over it, 1.41× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: composer.handleRequest REDACTED:345 — FunctionTooLong — handleRequest runs 132 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 32 over it, 1.32× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: proxy.default lib/plugins/proxy.js:127 — FunctionTooLong — default runs 130 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: log.patchJSON assets/js/log.js:13 — FunctionTooLong — patchJSON runs 129 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 29 over it, 1.29× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: extract-saz.default lib/service/extract-saz.js:108 — FunctionTooLong — default runs 126 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: columns.getDefaultColumns biz/webui/htdocs/src/js/columns.js:26 — FunctionTooLong — getDefaultColumns runs 117 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 17 over it, 1.17× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: file-proxy.default lib/handlers/file-proxy.js:233 — FunctionTooLong — default runs 116 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: req.default lib/inspectors/req.js:456 — FunctionTooLong — default runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15× 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 — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • + 3 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×23
  • FileTooLong: REDACTED REDACTED — FileTooLong — 3845 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 92% of them inside a single declaration: Index (441-4862). The bar is 500 significant lines; this is 3345 over it, 7.69× 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 — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: util/index.js lib/util/index.js — FileTooLong — 2807 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 2307 over it, 5.61× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 2532 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 2032 over it, 5.06× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 2014 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1514 over it, 4.03× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1864 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1364 over it, 3.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: js/data-center.js biz/webui/htdocs/src/js/data-center.js — FileTooLong — 1622 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1122 over it, 3.24× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: util/common.js lib/util/common.js — FileTooLong — 1553 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1053 over it, 3.11× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1392 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 74% of them inside a single declaration: ReqData (472-1718). The bar is 500 significant lines; this is 892 over it, 2.78× 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 — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: js/composer.js biz/webui/htdocs/src/js/composer.js — FileTooLong — 1332 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 93% of them inside a single declaration: Composer (126-1595). The bar is 500 significant lines; this is 832 over it, 2.66× 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 — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: https/index.js lib/https/index.js — FileTooLong — 1054 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 61% of them inside a single declaration: resolveWebsocket (89-904). The bar is 500 significant lines; this is 554 over it, 2.11× 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 — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 1011 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 511 over it, 2.02× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lib/config.js lib/config.js — FileTooLong — 895 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 395 over it, 1.79× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: js/plugins.js biz/webui/htdocs/src/js/plugins.js — FileTooLong — 852 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 63% of them inside a single declaration: Home (159-806). The bar is 500 significant lines; this is 352 over it, 1.70× 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 — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: js/rules-hint.js biz/webui/htdocs/src/js/rules-hint.js — FileTooLong — 756 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 256 over it, 1.51× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: js/network-modal.js biz/webui/htdocs/src/js/network-modal.js — FileTooLong — 724 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 224 over it, 1.45× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: js/list.js biz/webui/htdocs/src/js/list.js — FileTooLong — 722 significant lines (blank, comment-only and punctuation-only lines excluded), about 84% of them inside a single declaration: List (154-909). The bar is 500 significant lines; this is 222 over it, 1.44× 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 — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: lib/socket-mgr.js lib/socket-mgr.js — FileTooLong — 714 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 214 over it, 1.43× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: util/data-server.js lib/util/data-server.js — FileTooLong — 703 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 203 over it, 1.41× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: lib/tunnel.js lib/tunnel.js — FileTooLong — 694 significant lines (blank, comment-only and punctuation-only lines excluded), about 95% of them inside a single declaration: tunnelProxy (38-877). The bar is 500 significant lines; this is 194 over it, 1.39× 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 — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 645 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 145 over it, 1.29× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: https/ca.js lib/https/ca.js — FileTooLong — 609 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 109 over it, 1.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: js/online.js biz/webui/htdocs/src/js/online.js — FileTooLong — 540 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units), about 65% of them inside a single declaration: Online (257-691). The bar is 500 significant lines; this is 40 over it, 1.08× 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 — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: REDACTED REDACTED — FileTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 18 over it, 1.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
AC6 · Visual & motion safety · Focus outline removed in CSS without a · ×15
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/base.css:258 — `textarea[readonly]` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/base.css:370 — `.w-detail .w-dock-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/base.css:394 — `.ReactVirtualized__Grid.ReactVirtualized__List` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/composer.css:79 — `.w-com-tabs .w-tab-btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/composer.css:118 — `.w-com-bar .btn` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/iframe-dialog.css:18 — `.w-iframe-dialog .modal-body iframe` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/iframe.css:10 — `.w-iframe > iframe.fill` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/index.css:20 — `.w-menu a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/large-dialog.css:78 — `:is(.w-large-dialog, .w-custom-dialog) .modal-body` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/list.css:8 — `.w-list-data` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/list.css:27 — `.w-list-left a` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/menu-item.css:8 — `.w-menu-item` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/plugins.css:94 — `.w-plugins-list` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/req-data.css:77 — `.w-req-data-list` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
  • Focus outline removed in CSS without a :focus replacement biz/webui/htdocs/src/css/req-data.css:266 — `.tree-node` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
D30 · Dependency Vulnerabilities · Medium CVE · ×13
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D15 · Churn × Complexity Hotspots · Hotspot · ×12
  • Hotspot: lib/config.js lib/config.js:516 — lib/config.js changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 228 in config.extend at line 516. 3 of those changes were fix/bug commits, and the other 7 changed it for other reasons — this file is under both repair and feature pressure. 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 23:05:00 +08:00' --until='2026-11-08 23:05:00 +08:00' --full-history --no-merges -- lib/config.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:190 — REDACTED changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 337 in res.default at line 190. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 23:05:00 +08:00' --until='2026-11-08 23:05:00 +08:00' --full-history --no-merges -- REDACTED`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/tunnel.js lib/tunnel.js:38 — lib/tunnel.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 223 in tunnel.tunnelProxy at line 38. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 23:05:00 +08:00' --until='2026-11-08 23:05:00 +08:00' --full-history --no-merges -- lib/tunnel.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:1123 — REDACTED changed 2 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 343 in load-plugin.default at line 1123. 1 of those changes was a fix/bug commit, and the other 1 changed it for other reasons — this file is under both repair and feature pressure. 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 23:05:00 +08:00' --until='2026-11-08 23:05:00 +08:00' --full-history --no-merges -- REDACTED`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/util/data-server.js lib/util/data-server.js:401 — lib/util/data-server.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 198 in data-server.init at line 401. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 23:05:00 +08:00' --until='2026-11-08 23:05:00 +08:00' --full-history --no-merges -- lib/util/data-server.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/https/index.js lib/https/index.js:1151 — lib/https/index.js changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 71 in index.default at line 1151. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 23:05:00 +08:00' --until='2026-11-08 23:05:00 +08:00' --full-history --no-merges -- lib/https/index.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/inspectors/data.js lib/inspectors/data.js:55 — lib/inspectors/data.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 139 in data.emitDataEvents at line 55. 2 of those changes were fix/bug commits, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 23:05:00 +08:00' --until='2026-11-08 23:05:00 +08:00' --full-history --no-merges -- lib/inspectors/data.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:929 — REDACTED changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 78 in rules.resolveRuleList at line 929. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 23:05:00 +08:00' --until='2026-11-08 23:05:00 +08:00' --full-history --no-merges -- REDACTED`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: biz/webui/htdocs/src/js/res-detail.js biz/webui/htdocs/src/js/res-detail.js:63 — biz/webui/htdocs/src/js/res-detail.js changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 56 in render at line 63. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 23:05:00 +08:00' --until='2026-11-08 23:05:00 +08:00' --full-history --no-merges -- biz/webui/htdocs/src/js/res-detail.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: REDACTED REDACTED:235 — REDACTED changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in composer.handleHttp at line 235. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. 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 — a file this often edited pays the complexity back every time. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 23:05:00 +08:00' --until='2026-11-08 23:05:00 +08:00' --full-history --no-merges -- REDACTED`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: biz/webui/htdocs/src/js/req-detail.js biz/webui/htdocs/src/js/req-detail.js:53 — biz/webui/htdocs/src/js/req-detail.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in render at line 53. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 23:05:00 +08:00' --until='2026-11-08 23:05:00 +08:00' --full-history --no-merges -- biz/webui/htdocs/src/js/req-detail.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: lib/https/h2.js lib/https/h2.js:394 — lib/https/h2.js changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in h2.request at line 394. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-10..2026-11-08, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-10 23:05:00 +08:00' --until='2026-11-08 23:05:00 +08:00' --full-history --no-merges -- lib/https/h2.js`: 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 — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R7 · Dead Code · Dead file (~9 LoC) · ×9
  • Dead file (~9 LoC) biz/webui/cgi-bin/cookies.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~9 LoC) biz/webui/cgi-bin/https-status.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~9 LoC) biz/webui/cgi-bin/rules/allow-multiple-choice.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~9 LoC) biz/webui/cgi-bin/rules/recycle/list.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~9 LoC) biz/webui/cgi-bin/rules/recycle/remove.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~9 LoC) biz/webui/cgi-bin/rules/recycle/view.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~9 LoC) biz/webui/cgi-bin/set-dns-order.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~9 LoC) biz/webui/cgi-bin/values/recycle/list.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~9 LoC) biz/webui/cgi-bin/values/recycle/remove.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
P7 · Outbound HTTP resilience · Outbound HTTP without resilience · ×7
  • Outbound HTTP without resilience bin/whistle.js:40 — `http.get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience lib/https/index.js:1055 — `http.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:166 — `http.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience lib/plugins/proxy.js:102 — `http.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience lib/plugins/proxy.js:224 — `http.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience REDACTED:249 — `http.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
  • Outbound HTTP without resilience lib/util/common.js:1314 — `http.request(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
D2 · Cognitive Complexity · exports · ×6
  • exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request::retry (cognitive 54) REDACTED:467 — exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request::retry has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (35 pts), boolean chains 19 (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.
  • exports::normalizeArgs (cognitive 47) REDACTED:1254 — exports::normalizeArgs has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 10, ternaries 4 (10 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.
  • exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request (cognitive 39) REDACTED:424 — exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request has cognitive complexity 39 (threshold 15). Drivers by points: if/else 19 (22 pts), boolean chains 16, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • exports::initServers (cognitive 27) REDACTED:1608 — exports::initServers has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 25, if/else 2. 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.
  • exports::initServers::(anonymous)::(anonymous)::(anonymous)::connect (cognitive 23) REDACTED:2436 — exports::initServers::(anonymous)::(anonymous)::(anonymous)::connect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 9). 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.
  • exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request::send (cognitive 23) REDACTED:596 — exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request::send has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, ternaries 4 (5 pts), error handling 1 (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.
D1 · Cyclomatic Complexity · exports · ×5
  • exports::initServers (cyclomatic 55) REDACTED:1608 — exports::initServers has cyclomatic complexity 55 (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.
  • exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request (cyclomatic 44) REDACTED:424 — exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request has cyclomatic complexity 44 (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.
  • exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request::retry (cyclomatic 41) REDACTED:467 — exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request::retry has cyclomatic complexity 41 (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.
  • exports::normalizeArgs (cyclomatic 29) REDACTED:1254 — exports::normalizeArgs has cyclomatic complexity 29 (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.
  • exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request::send (cyclomatic 20) REDACTED:596 — exports::request::(anonymous)::(anonymous)::(anonymous)::(anonymous)::request::send 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.
D12 · Dependency Hygiene · Deprecated · ×5
  • Deprecated: babel-eslint REDACTED:82 — babel-eslint 6.1.2, declared in REDACTED, is marked deprecated by its publisher: "babel-eslint is now @babel/eslint-parser. This package will no longer receive updates.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: bootstrap REDACTED:90 — bootstrap 3.3.5, declared in REDACTED, is marked deprecated by its publisher: "This version of Bootstrap is no longer supported. Please upgrade to the latest version.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: eslint REDACTED:95 — eslint 2.13.1, declared in REDACTED, is marked deprecated by its publisher: "This version is no longer supported. Please see https://eslint.org/version-support for other options.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: istanbul REDACTED:98 — istanbul 0.4.5, declared in REDACTED, is marked deprecated by its publisher: "This module is no longer maintained, try this instead: npm i nyc Visit https://istanbul.js.org/integrations for other alternatives.". Replace it with the package or version that message names, or record why this one must stay.
  • Deprecated: request REDACTED:106 — request 2.88.2, declared in REDACTED, is marked deprecated by its publisher: "request has been deprecated, see https://github.com/request/request/issues/3142". Replace it with the package or version that message names, or record why this one must stay.
D2 · Cognitive Complexity · init · ×5
  • init::getData (cognitive 48) lib/util/data-server.js:886 — init::getData has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 16, ternaries 4 (7 pts), loops 1 (3 pts) (nesting depth added 13). 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.
  • init::formatFilter (cognitive 33) lib/util/data-server.js:413 — init::formatFilter has cognitive complexity 33 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 13, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • init::checkType (cognitive 29) lib/util/data-server.js:719 — init::checkType has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 3 (9 pts), boolean chains 4, loops 2 (nesting depth added 8). 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.
  • init::getSessionsForApi (cognitive 20) lib/util/data-server.js:818 — init::getSessionsForApi has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 6). 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.
  • init::checkItem (cognitive 18) lib/util/data-server.js:566 — init::checkItem has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, loops 1 (2 pts), ternaries 1 (2 pts) (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.
D35 · Change Coupling · Change coupling · ×5
  • Change coupling: add.js ↔ add.js biz/webui/cgi-bin/rules/add.js:1 — `biz/webui/cgi-bin/rules/add.js` and `biz/webui/cgi-bin/values/add.js` change together 77% of the time (10 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `0bb5c2bf` refactor: refine ui; `a615b16b` feat: refine Rules & Values group; `2ff17c52` refactor: refine code — run `git show` on any of them.
  • Change coupling: get-plugins-sync.js ↔ get-plugins.js lib/plugins/get-plugins-sync.js:1 — `lib/plugins/get-plugins-sync.js` and `lib/plugins/get-plugins.js` change together 62% of the time (23 of the 37 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 23 shared commits counted here, the most recent 3 are `9073718f` feat: add whistleName option; `6594c75d` feat: load dev plugins; `889a0f55` feat: add config.notUninstallPluginPath — run `git show` on any of them.
  • Change coupling: about.js ↔ plugins.js biz/webui/htdocs/src/js/about.js:1 — `biz/webui/htdocs/src/js/about.js` and `biz/webui/htdocs/src/js/plugins.js` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `07323263` refactor: refine ui; `fec6706a` feat: modify docs url; `13ab1b07` feat: darm mode — run `git show` on any of them.
  • Change coupling: bridge.js ↔ REDACTED biz/webui/htdocs/src/js/bridge.js:1 — `biz/webui/htdocs/src/js/bridge.js` and `REDACTED` change together 53% of the time (8 of the 15 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `eb80860b` refactor: refine code; `e1ae0d7a` feat: refine import data; `aefe4b68` feat: export rule item — run `git show` on any of them.
  • Change coupling: get-data.js ↔ init.js biz/webui/cgi-bin/get-data.js:1 — `biz/webui/cgi-bin/get-data.js` and `biz/webui/cgi-bin/init.js` change together 51% of the time (19 of the 37 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well, and counted over this repository's 10,000 most recent commits rather than its whole history — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 19 shared commits counted here, the most recent 3 are `b55839bd` feat: refine Tools/Console; `9a29b8b4` feat: refine ui; `dc3b8cb3` feat: custom plugins context menu — run `git show` on any of them.
D29 · Static Analysis (SAST) · REDACTED · ×4
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
R10 · Code Duplication · Duplicated block (23 lines × 2 locations) · ×4
  • Duplicated block (23 lines × 2 locations) REDACTED:3231 — REDACTED:3231 · REDACTED:3254 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2 locations) biz/webui/htdocs/src/js/network-settings.js:372 — biz/webui/htdocs/src/js/network-settings.js:372 · biz/webui/htdocs/src/js/network-settings.js:395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (23 lines × 2 locations) lib/inspectors/data.js:278 — lib/inspectors/data.js:278 · lib/inspectors/data.js:363 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (23 lines × 2 locations) lib/util/data-server.js:666 — lib/util/data-server.js:666 · lib/util/data-server.js:852 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R7 · Dead Code · Dead file (~14 LoC) · ×4
  • Dead file (~14 LoC) biz/webui/cgi-bin/get-frames.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~14 LoC) biz/webui/cgi-bin/get-matched-rules.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~14 LoC) REDACTED — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~14 LoC) REDACTED — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
S1 · Web-Security Posture · Weak hash algorithm · ×4
  • Weak hash algorithm lib/https/ca.js:209 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm lib/https/emudhra.js:21 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm lib/https/index.js:155 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
  • Weak hash algorithm lib/util/common.js:1342 — MD5/SHA1 is computed here, and both are collision-broken. If this digest protects anything — a signature, an integrity or tamper check, a credential, or any value an attacker can influence — that is a real weakness: use SHA-256+ (`createHash("sha256")`) for content integrity, or a KDF (bcrypt/Argon2/scrypt) for password storage. If it only derives a non-security identifier (a cache key, an avatar URL, an ETag), collision resistance carries no security consequence here; make that intent explicit instead — a non-cryptographic hash such as xxhash or murmurhash says it in code — since the algorithm alone cannot distinguish the two uses. Where a protocol this code does not own fixes the digest (a k-anonymity range query, a legacy signature format), the protocol decides; say so beside the call.
D1 · Cyclomatic Complexity · data-server.init · ×3
  • data-server.init::formatFilter (cyclomatic 30) lib/util/data-server.js:413 — data-server.init::formatFilter has cyclomatic complexity 30 (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: 3 other methods here (data-server.init, data-server.init::checkClientIp, data-server.init::checkType) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • data-server.init::checkType (cyclomatic 22) lib/util/data-server.js:719 — data-server.init::checkType has cyclomatic complexity 22 (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: 3 other methods here (data-server.init, data-server.init::formatFilter, data-server.init::checkClientIp) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
  • data-server.init::checkClientIp (cyclomatic 17) lib/util/data-server.js:495 — data-server.init::checkClientIp has cyclomatic complexity 17 (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: 3 other methods here (data-server.init, data-server.init::formatFilter, data-server.init::checkType) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
D2 · Cognitive Complexity · emitDataEvents · ×3
  • emitDataEvents::handleReqBody::write (cognitive 20) lib/inspectors/data.js:281 — emitDataEvents::handleReqBody::write has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • emitDataEvents::handleResBody::write (cognitive 20) lib/inspectors/data.js:366 — emitDataEvents::handleResBody::write has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 3 (nesting depth added 10). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • emitDataEvents::handleError (cognitive 19) lib/inspectors/data.js:448 — emitDataEvents::handleError has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4, ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · render (cognitive 16) · ×3
  • render (cognitive 16) biz/webui/htdocs/src/js/network-settings.js:358 — render has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7 (8 pts), boolean chains 5, if/else 3 (nesting depth added 1). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 425). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
  • render (cognitive 16) biz/webui/htdocs/src/js/props-editor.js:302 — render has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 13, boolean chains 3. Of this number, 12 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — 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.
  • render (cognitive 16) biz/webui/htdocs/src/js/json-viewer.js:140 — render has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (7 pts), boolean chains 5, ternaries 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
R10 · Code Duplication · Duplicated block with local edits (21 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (21 matched lines × 2 locations) biz/webui/cgi-bin/rules/list2.js:1 — biz/webui/cgi-bin/rules/list2.js:1 · biz/webui/cgi-bin/values/list2.js:1 — the two spans are one implementation copied and then locally edited — 123 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (21 matched lines × 2 locations) lib/plugins/get-plugins-sync.js:143 — lib/plugins/get-plugins-sync.js:143 · lib/plugins/index.js:385 — the two spans are one implementation copied and then locally edited — 108 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (21 matched lines × 2 locations) lib/util/replace-pattern-transform.js:13 — lib/util/replace-pattern-transform.js:13 · lib/util/replace-string-transform.js:7 — the two spans are one implementation copied and then locally edited — 156 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (18 lines × 2 locations) · ×3
  • Duplicated block (18 lines × 2 locations) biz/webui/htdocs/src/js/req-type.js:69 — biz/webui/htdocs/src/js/req-type.js:69 · biz/webui/htdocs/src/js/req-type.js:87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2 locations) lib/inspectors/req.js:477 — lib/inspectors/req.js:477 · REDACTED:835 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (18 lines × 2 locations) lib/plugins/get-plugins-sync.js:41 — lib/plugins/get-plugins-sync.js:41 · lib/plugins/get-plugins-sync.js:66 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (17 matched lines × 2 locations) · ×3
  • Duplicated block with local edits (17 matched lines × 2 locations) biz/webui/htdocs/src/js/dns-servers-dialog.js:52 — biz/webui/htdocs/src/js/dns-servers-dialog.js:52 · biz/webui/htdocs/src/js/online.js:675 — the two spans are one implementation copied and then locally edited — 54 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (17 matched lines × 2 locations) REDACTED:519 — REDACTED:519 · REDACTED:801 — the two spans are one implementation copied and then locally edited — 108 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
  • Duplicated block with local edits (17 matched lines × 2 locations) biz/webui/htdocs/src/js/json-dialog.js:175 — biz/webui/htdocs/src/js/json-dialog.js:175 · biz/webui/htdocs/src/js/recycle-bin.js:200 — the two spans are one implementation copied and then locally edited — 55 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
D1 · Cyclomatic Complexity · load-plugin.default · ×2
  • load-plugin.default::initServers (cyclomatic 55) REDACTED:1608 — load-plugin.default::initServers has cyclomatic complexity 55 (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: one other method here (load-plugin.default::normalizeArgs) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
  • load-plugin.default::normalizeArgs (cyclomatic 29) REDACTED:1254 — load-plugin.default::normalizeArgs has cyclomatic complexity 29 (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: one other method here (load-plugin.default::initServers) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D1 · Cyclomatic Complexity · is-utf8.isUtf8 (cyclomatic 52) · ×2
  • is-utf8.isUtf8 (cyclomatic 52) lib/util/is-utf8.js:3 — is-utf8.isUtf8 has cyclomatic complexity 52 (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.
  • is-utf8.isUtf8 (cyclomatic 52) biz/webui/htdocs/src/js/is-utf8.js:3 — is-utf8.isUtf8 has cyclomatic complexity 52 (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.
D1 · Cyclomatic Complexity · exports (cyclomatic 38) · ×2
  • exports (cyclomatic 38) lib/inspectors/req.js:456 — exports has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 2 of the 38 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 474, 544, 587). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • exports (cyclomatic 38) lib/service/extract-saz.js:108 — exports has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 1 of the 38 points is its own statement and the rest belongs to 12 function items inside it that branch (a function literal at line 196, a function literal at line 155, a function literal at line 119, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · render (cyclomatic 37) · ×2
  • render (cyclomatic 37) biz/webui/htdocs/src/js/frame-list.js:312 — render has cyclomatic complexity 37 (threshold 15). Most of this is not in the body itself: 8 of the 37 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 381, 438). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
  • render (cyclomatic 37) biz/webui/htdocs/src/js/req-detail.js:53 — render has cyclomatic complexity 37 (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.
D1 · Cyclomatic Complexity · render (cyclomatic 25) · ×2
  • render (cyclomatic 25) REDACTED:395 — render has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 6 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 420). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
  • render (cyclomatic 25) biz/webui/htdocs/src/js/menu-item.js:14 — render has cyclomatic complexity 25 (threshold 15). Of this number, 15 points are the body's own statements and 10 belong to 3 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · componentDidMount (cyclomatic 20) · ×2
  • componentDidMount (cyclomatic 20) biz/webui/htdocs/src/js/composer.js:179 — componentDidMount has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 9 function items inside it that branch (a function literal at line 257, a function literal at line 194, (anonymous)::updateComposer, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • componentDidMount (cyclomatic 20) biz/webui/htdocs/src/js/list.js:166 — componentDidMount has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 170, a function literal at line 194, a function literal at line 243, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · exports (cyclomatic 20) · ×2
  • exports (cyclomatic 20) lib/inspectors/log.js:26 — exports has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 32, a function literal at line 56, (anonymous)::_transform). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • exports (cyclomatic 20) lib/https/load-cert.js:11 — exports has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 3 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · render (cyclomatic 17) · ×2
  • render (cyclomatic 17) REDACTED:1569 — render has cyclomatic complexity 17 (threshold 15). Of this number, 9 points are the body's own statements and 8 belong to 2 function literals inside it that branch. 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.
  • render (cyclomatic 17) biz/webui/htdocs/src/js/props-editor.js:302 — render has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · render (cyclomatic 16) · ×2
  • render (cyclomatic 16) biz/webui/htdocs/src/js/plugins.js:937 — render has cyclomatic complexity 16 (threshold 15). Of this number, 10 points are the body's own statements and 6 belong to 2 function literals inside it that branch. 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.
  • render (cyclomatic 16) biz/webui/htdocs/src/js/dropdown.js:42 — render has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to 2 function literals inside it that branch. 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.
D2 · Cognitive Complexity · is-utf8.isUtf8 (cognitive 52) · ×2
  • is-utf8.isUtf8 (cognitive 52) lib/util/is-utf8.js:3 — is-utf8.isUtf8 has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (37 pts), boolean chains 14, loops 1 (nesting depth added 22). 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.
  • is-utf8.isUtf8 (cognitive 52) biz/webui/htdocs/src/js/is-utf8.js:3 — is-utf8.isUtf8 has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (37 pts), boolean chains 14, loops 1 (nesting depth added 22). 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.
D2 · Cognitive Complexity · componentDidMount (cognitive 41) · ×2
  • componentDidMount (cognitive 41) REDACTED:600 — componentDidMount has cognitive complexity 41 (threshold 15). Drivers by points: if/else 22 (26 pts), boolean chains 12, ternaries 2 (3 pts) (nesting depth added 5). None of this is in the body itself: all 41 points belong to 20 function items inside it that branch (a function literal at line 677, importRemoteUrl, a function literal at line 621, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • componentDidMount (cognitive 41) biz/webui/htdocs/src/js/editor-dialog.js:140 — componentDidMount has cognitive complexity 41 (threshold 15). Drivers by points: boolean chains 16, ternaries 4 (13 pts), if/else 8 (12 pts) (nesting depth added 13). Most of this is not in the body itself: 2 of the 41 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 176, initTextArea, initTextArea::onkeydown, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · load-plugin.default · ×2
  • load-plugin.default::normalizeArgs (cognitive 37) REDACTED:1254 — load-plugin.default::normalizeArgs has cognitive complexity 37 (threshold 15). Drivers by points: if/else 16 (27 pts), boolean chains 10 (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: one other method here (load-plugin.default::initServers) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
  • load-plugin.default::initServers (cognitive 28) REDACTED:1608 — load-plugin.default::initServers has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 26, if/else 2. 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: one other method here (load-plugin.default::normalizeArgs) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D2 · Cognitive Complexity · handleParams · ×2
  • handleParams::_transform (cognitive 29) lib/inspectors/req.js:171 — handleParams::_transform has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (18 pts), error handling 2 (6 pts), boolean chains 3, ternaries 1 (2 pts) (nesting depth added 12). 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.
  • handleParams::_transform (cognitive 22) lib/inspectors/req.js:383 — handleParams::_transform has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 3 (6 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · getBodyRules (cognitive 23) · ×2
  • getBodyRules (cognitive 23) biz/webui/htdocs/src/js/request-rule.js:114 — getBodyRules has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 9). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 128, addRule). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
  • getBodyRules (cognitive 23) biz/webui/htdocs/src/js/response-rule.js:114 — getBodyRules has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 2, match/switch 1 (nesting depth added 9). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 128, addRule). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · (anonymous) (cognitive 19) · ×2
  • (anonymous) (cognitive 19) biz/webui/htdocs/src/js/list.js:839 — (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, ternaries 9, if/else 1. Of this number, 18 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — 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.
  • (anonymous) (cognitive 19) REDACTED:289 — (anonymous) has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1 (nesting depth added 8). 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.
D2 · Cognitive Complexity · (anonymous) (cognitive 18) · ×2
  • (anonymous) (cognitive 18) REDACTED:485 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 3). 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.
  • (anonymous) (cognitive 18) lib/rules/util.js:58 — (anonymous) has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (7 pts), ternaries 2 (nesting depth added 2). Of this number, 9 points are the body's own statements and 9 belong to 3 function items inside it that branch. 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.
D2 · Cognitive Complexity · exports (cognitive 18) · ×2
  • exports (cognitive 18) lib/util/parse-url-safe.js:145 — exports has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6, error handling 1 (nesting depth added 3). 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.
  • exports (cognitive 18) biz/webui/cgi-bin/rules/add.js:5 — exports has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3 (nesting depth added 6). 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.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium vulnerability · ×2
  • REDACTED
  • REDACTED
R10 · Code Duplication · Duplicated block (25 lines × 2 locations) · ×2
  • Duplicated block (25 lines × 2 locations) biz/webui/htdocs/src/js/req-detail.js:206 — biz/webui/htdocs/src/js/req-detail.js:206 · biz/webui/htdocs/src/js/res-detail.js:257 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
  • Duplicated block (25 lines × 2 locations) REDACTED:2513 — REDACTED:2513 · REDACTED:2538 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R11 · Import Boundaries · Boundary violation [package · ×2
  • Boundary violation [package:third-party-deep-import] biz/webui/htdocs/src/js/base-css.js:5 — biz/webui/htdocs/src/js/base-css.js:5 imports bootstrap/dist/js/bootstrap.js, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
  • Boundary violation [package:third-party-deep-import] REDACTED:4 — REDACTED:4 imports react-virtualized/dist/umd/react-virtualized, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead.
R2 · Cyclomatic Complexity · Complex function isUtf8 (cyclomatic 52, cognitive 52) · ×2
  • Complex function isUtf8 (cyclomatic 52, cognitive 52) biz/webui/htdocs/src/js/is-utf8.js:3 — isUtf8 has cyclomatic complexity 52 and cognitive complexity 52; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
  • Complex function isUtf8 (cyclomatic 52, cognitive 52) lib/util/is-utf8.js:3 — isUtf8 has cyclomatic complexity 52 and cognitive complexity 52; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R7 · Dead Code · Dead file (~37 LoC) · ×2
  • Dead file (~37 LoC) biz/webui/cgi-bin/rules/add.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~37 LoC) biz/webui/cgi-bin/rules/project.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~34 LoC) · ×2
  • Dead file (~34 LoC) biz/webui/cgi-bin/get-session.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~34 LoC) biz/webui/cgi-bin/rules/export.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~22 LoC) · ×2
  • Dead file (~22 LoC) biz/webui/cgi-bin/add-rules-values.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~22 LoC) biz/webui/cgi-bin/get-cert.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~21 LoC) · ×2
  • Dead file (~21 LoC) REDACTED — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~21 LoC) biz/webui/cgi-bin/plugins/status.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~17 LoC) · ×2
  • Dead file (~17 LoC) biz/webui/cgi-bin/plugins/list.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~17 LoC) biz/webui/cgi-bin/set-custom-column.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~16 LoC) · ×2
  • Dead file (~16 LoC) biz/webui/cgi-bin/rules/select.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~16 LoC) biz/webui/cgi-bin/rules/select2.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~11 LoC) · ×2
  • Dead file (~11 LoC) biz/webui/cgi-bin/rules/move-top.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
  • Dead file (~11 LoC) biz/webui/cgi-bin/values/get.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
S1 · Web-Security Posture · Password key derivation is priced too cheaply · ×2
  • Password key derivation is priced too cheaply lib/util/common.js:1966 — This code fixes scrypt at N=16,384 (r=8, p=1), Node's default. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price.
  • Password key derivation is priced too cheaply lib/util/common.js:1979 — This code fixes scrypt at N=16,384 (r=8, p=1), Node's default. A key-derivation function's only defence is the cost of ONE guess, and that cost is this number — the algorithm choice does not set it. Current OWASP guidance is 1,300,000 PBKDF2 iterations with HMAC-SHA1, 600,000 with SHA-256 and 210,000 with SHA-512; scrypt at N=2^17, r=8, p=1 (or an equivalent N·r·p product); Argon2id at 19 MiB of memory and 2 iterations (or an equivalent row); bcrypt at a work factor of at least 10. This figure divides the attacker's work by a factor of tens or hundreds against the same stolen hash, on hardware they already own. Where what is derived is short or low-entropy — a PIN, a numeric parental code, a four-character token — the whole keyspace falls in the time this parameter buys, and no salt or constant-time comparison changes that. Raise the count to the current published figure for the PRF you use, measure it on the slowest hardware that must run it (a target of roughly 100 ms per derivation is the usual budget), and read the value from configuration so a deployment can raise it again without a rebuild. Where the derived value must interoperate with a format someone else fixed, the count cannot move — derive a SEPARATE value for anything you own rather than inheriting the external format's price.
AC3 · Page structure · Page without a main landmark · ×1
  • Page without a main landmark biz/webui/htdocs/editor.html:2 — No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>.
AC6 · Visual & motion safety · Low contrast colour pair in CSS (3.4 · ×1
  • Low contrast colour pair in CSS (3.4:1) biz/webui/htdocs/src/css/base.css:388 — `.w-mark :is(th, td)` sets color: #fff on background-color: #3b88fd — 3.4:1, below the 4.5:1 WCAG AA minimum for normal text. Darken or lighten one of them.
AC6 · Visual & motion safety · Animation without a prefers-reduced-motion guard · ×1
  • Animation without a prefers-reduced-motion guard biz/webui/htdocs/src/css/base.css:547 — `.w-shake-horizontal` moves (`animation: shakeHorizontal 0.5s ease-in-out`) and nothing reads prefers-reduced-motion for it — no @media (prefers-reduced-motion) rule for this element, no reset this project loads — so a motion-sensitive user cannot turn it off (WCAG 2.3.3). Declare it under @media (prefers-reduced-motion: no-preference), or neutralise it under reduce.
D1 · Cyclomatic Complexity · res.default (cyclomatic 337) · ×1
  • res.default (cyclomatic 337) REDACTED:190 — res.default has cyclomatic complexity 337 (threshold 15). Of this number, 123 points are the body's own statements and 214 belong to 26 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · componentDidMount (cyclomatic 286) · ×1
  • componentDidMount (cyclomatic 286) REDACTED:978 — componentDidMount has cyclomatic complexity 286 (threshold 15). Most of this is not in the body itself: 7 of the 286 points are its own statements and the rest belongs to 116 function items inside it that branch (a function literal at line 1458, a function literal at line 1662, a function literal at line 1408, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · config.extend (cyclomatic 228) · ×1
  • config.extend (cyclomatic 228) lib/config.js:516 — config.extend has cyclomatic complexity 228 (threshold 15). Of this number, 133 points are the body's own statements and 95 belong to 12 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · tunnel.tunnelProxy (cyclomatic 223) · ×1
  • tunnel.tunnelProxy (cyclomatic 223) lib/tunnel.js:38 — tunnel.tunnelProxy has cyclomatic complexity 223 (threshold 15). Most of this is not in the body itself: 1 of the 223 points is its own statement and the rest belongs to 36 function literals inside it that branch (lines 759, 44, 456, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · rules-hint.CodeMirror.registerHelper("hint","rulesHint") (cyclomatic 114) · ×1
  • rules-hint.CodeMirror.registerHelper("hint","rulesHint") (cyclomatic 114) biz/webui/htdocs/src/js/rules-hint.js:552 — rules-hint.CodeMirror.registerHelper("hint","rulesHint") has cyclomatic complexity 114 (threshold 15). Of this number, 104 points are the body's own statements and 10 belong to 6 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 114) · ×1
  • (anonymous) (cyclomatic 114) biz/webui/htdocs/src/js/rules-hint.js:552 — (anonymous) has cyclomatic complexity 114 (threshold 15). Of this number, 102 points are the body's own statements and 12 belong to 9 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · render (cyclomatic 81) · ×1
  • render (cyclomatic 81) REDACTED:3918 — render has cyclomatic complexity 81 (threshold 15). Of this number, 75 points are the body's own statements and 6 belong to 3 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · rules.resolveRuleList (cyclomatic 78) · ×1
  • rules.resolveRuleList (cyclomatic 78) REDACTED:929 — rules.resolveRuleList has cyclomatic complexity 78 (threshold 15). Of this number, 65 points are the body's own statements and 13 belong to 4 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · rules.resolveMatchFilter (cyclomatic 75) · ×1
  • rules.resolveMatchFilter (cyclomatic 75) REDACTED:1549 — rules.resolveMatchFilter has cyclomatic complexity 75 (threshold 15). Most of this is not in the body itself: 1 of the 75 points is its own statement and the rest belongs to one function literal inside it that branches (line 1554). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.default (cyclomatic 71) · ×1
  • index.default (cyclomatic 71) lib/https/index.js:1151 — index.default has cyclomatic complexity 71 (threshold 15). Most of this is not in the body itself: 4 of the 71 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 1184, a function literal at line 1236, isCaptureIp, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · exports (cyclomatic 71) · ×1
  • exports (cyclomatic 71) lib/https/index.js:1151 — exports has cyclomatic complexity 71 (threshold 15). Most of this is not in the body itself: 4 of the 71 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 1184, (anonymous)::handleConnect, isCaptureIp, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · rules.matchFilter (cyclomatic 69) · ×1
  • rules.matchFilter (cyclomatic 69) REDACTED:1819 — rules.matchFilter has cyclomatic complexity 69 (threshold 15). Of this number, 56 points are the body's own statements and 13 belong to 2 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · rules.resolveVarValue (cyclomatic 66) · ×1
  • rules.resolveVarValue (cyclomatic 66) REDACTED:621 — rules.resolveVarValue has cyclomatic complexity 66 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · render (cyclomatic 66) · ×1
  • render (cyclomatic 66) biz/webui/htdocs/src/js/res-detail.js:63 — render has cyclomatic complexity 66 (threshold 15). Of this number, 56 points are the body's own statements and 10 belong to 2 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · onClickContextMenu (cyclomatic 64) · ×1
  • onClickContextMenu (cyclomatic 64) REDACTED:921 — onClickContextMenu has cyclomatic complexity 64 (threshold 15). Of this number, 61 points are the body's own statements and 3 belong to 2 function items inside it that branch. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · onContextMenu (cyclomatic 60) · ×1
  • onContextMenu (cyclomatic 60) REDACTED:1095 — onContextMenu has cyclomatic complexity 60 (threshold 15). Of this number, 45 points are the body's own statements and 15 belong to 3 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · rules.parseRule (cyclomatic 57) · ×1
  • rules.parseRule (cyclomatic 57) REDACTED:1229 — rules.parseRule has cyclomatic complexity 57 (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.
D1 · Cyclomatic Complexity · rules-mode.CodeMirror.defineMode("rules").token (cyclomatic 53) · ×1
  • rules-mode.CodeMirror.defineMode("rules").token (cyclomatic 53) biz/webui/htdocs/src/js/rules-mode.js:174 — rules-mode.CodeMirror.defineMode("rules").token has cyclomatic complexity 53 (threshold 15). Of this number, 19 points are the body's own statements and 34 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · service.sessionsHandler (cyclomatic 53) · ×1
  • service.sessionsHandler (cyclomatic 53) REDACTED:302 — service.sessionsHandler has cyclomatic complexity 53 (threshold 15). Most of this is not in the body itself: 1 of the 53 points is its own statement and the rest belongs to 21 function literals inside it that branch (lines 354, 487, 547, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous).token (cyclomatic 53) · ×1
  • (anonymous).token (cyclomatic 53) biz/webui/htdocs/src/js/rules-mode.js:174 — (anonymous).token has cyclomatic complexity 53 (threshold 15). Of this number, 19 points are the body's own statements and 34 belong to 2 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · index.getRulesFromPlugins (cyclomatic 51) · ×1
  • index.getRulesFromPlugins (cyclomatic 51) lib/plugins/index.js:891 — index.getRulesFromPlugins has cyclomatic complexity 51 (threshold 15). Most of this is not in the body itself: 1 of the 51 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 982, 920, 893, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · data-center.setReqData (cyclomatic 46) · ×1
  • data-center.setReqData (cyclomatic 46) biz/webui/htdocs/src/js/data-center.js:1726 — data-center.setReqData has cyclomatic complexity 46 (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.
D1 · Cyclomatic Complexity · index.default (cyclomatic 45) · ×1
  • index.default (cyclomatic 45) biz/index.js:31 — index.default has cyclomatic complexity 45 (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.
D1 · Cyclomatic Complexity · exports (cyclomatic 45) · ×1
  • exports (cyclomatic 45) biz/index.js:31 — exports has cyclomatic complexity 45 (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.
D1 · Cyclomatic Complexity · network-modal.checkItem (cyclomatic 44) · ×1
  • network-modal.checkItem (cyclomatic 44) biz/webui/htdocs/src/js/network-modal.js:178 — network-modal.checkItem has cyclomatic complexity 44 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · render (cyclomatic 44) · ×1
  • render (cyclomatic 44) biz/webui/htdocs/src/js/overview.js:137 — render has cyclomatic complexity 44 (threshold 15). Most of this is not in the body itself: 8 of the 44 points are its own statements and the rest belongs to one function literal inside it that branches (line 147). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · data-center.getAppName (cyclomatic 43) · ×1
  • data-center.getAppName (cyclomatic 43) biz/webui/htdocs/src/js/data-center.js:1603 — data-center.getAppName has cyclomatic complexity 43 (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.
D1 · Cyclomatic Complexity · index.readRuleList (cyclomatic 42) · ×1
  • index.readRuleList (cyclomatic 42) lib/util/index.js:1283 — index.readRuleList has cyclomatic complexity 42 (threshold 15). Most of this is not in the body itself: 13 of the 42 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 1346, execCallback, a function literal at line 1380, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · render (cyclomatic 42) · ×1
  • render (cyclomatic 42) biz/webui/htdocs/src/js/composer.js:1191 — render has cyclomatic complexity 42 (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.
D1 · Cyclomatic Complexity · index.getProxy (cyclomatic 41) · ×1
  • index.getProxy (cyclomatic 41) REDACTED:126 — index.getProxy has cyclomatic complexity 41 (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: one other method here (index.getProxy::resolvePacRule) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D1 · Cyclomatic Complexity · socket-mgr.handleWsSend (cyclomatic 41) · ×1
  • socket-mgr.handleWsSend (cyclomatic 41) lib/socket-mgr.js:325 — socket-mgr.handleWsSend has cyclomatic complexity 41 (threshold 15). Of this number, 19 points are the body's own statements and 22 belong to 7 function literals inside it that branch. 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: one other method here (socket-mgr.handleWsReceive) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D1 · Cyclomatic Complexity · socket-mgr.handleWsReceive (cyclomatic 41) · ×1
  • socket-mgr.handleWsReceive (cyclomatic 41) lib/socket-mgr.js:457 — socket-mgr.handleWsReceive has cyclomatic complexity 41 (threshold 15). Of this number, 19 points are the body's own statements and 22 belong to 7 function literals inside it that branch. 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: one other method here (socket-mgr.handleWsSend) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D1 · Cyclomatic Complexity · file-proxy.default (cyclomatic 40) · ×1
  • file-proxy.default (cyclomatic 40) lib/handlers/file-proxy.js:233 — file-proxy.default has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 13 of the 40 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 297, render, a function literal at line 345, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · updateServerInfo (cyclomatic 40) · ×1
  • updateServerInfo (cyclomatic 40) biz/webui/htdocs/src/js/online.js:330 — updateServerInfo has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 15 of the 40 points are its own statements and the rest belongs to 11 function items inside it that branch (a function literal at line 444, toggleDns, addInfo, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · exports (cyclomatic 40) · ×1
  • exports (cyclomatic 40) lib/handlers/file-proxy.js:233 — exports has cyclomatic complexity 40 (threshold 15). Most of this is not in the body itself: 13 of the 40 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 297, render, a function literal at line 345, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · req.default (cyclomatic 38) · ×1
  • req.default (cyclomatic 38) lib/inspectors/req.js:456 — req.default has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 2 of the 38 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 474, 544, 587). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · extract-saz.default (cyclomatic 38) · ×1
  • extract-saz.default (cyclomatic 38) lib/service/extract-saz.js:108 — extract-saz.default has cyclomatic complexity 38 (threshold 15). Most of this is not in the body itself: 1 of the 38 points is its own statement and the rest belongs to 5 function items inside it that branch (a function literal at line 196, a function literal at line 155, a function literal at line 119, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · composer.handleRequest (cyclomatic 37) · ×1
  • composer.handleRequest (cyclomatic 37) REDACTED:345 — composer.handleRequest has cyclomatic complexity 37 (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: one other method here (composer.handleRequest::getBody) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D1 · Cyclomatic Complexity · componentDidUpdate (cyclomatic 36) · ×1
  • componentDidUpdate (cyclomatic 36) REDACTED:483 — componentDidUpdate has cyclomatic complexity 36 (threshold 15). Of this number, 29 points are the body's own statements and 7 belong to 3 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · render (cyclomatic 36) · ×1
  • render (cyclomatic 36) biz/webui/htdocs/src/js/matched-rule.js:100 — render has cyclomatic complexity 36 (threshold 15). Most of this is not in the body itself: 14 of the 36 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 137, 121, 158, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · componentDidMount (cyclomatic 35) · ×1
  • componentDidMount (cyclomatic 35) REDACTED:600 — componentDidMount has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 20 function items inside it that branch (a function literal at line 677, importRemoteUrl, a function literal at line 621, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · render (cyclomatic 35) · ×1
  • render (cyclomatic 35) biz/webui/htdocs/src/js/timeline.js:8 — render has cyclomatic complexity 35 (threshold 15). Most of this is not in the body itself: 3 of the 35 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 40, 21, 15). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · init.default (cyclomatic 34) · ×1
  • init.default (cyclomatic 34) lib/init.js:157 — init.default has cyclomatic complexity 34 (threshold 15). Of this number, 31 points are the body's own statements and 3 belong to 2 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · init · ×1
  • init::getData (cyclomatic 34) lib/util/data-server.js:886 — init::getData has cyclomatic complexity 34 (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.
D1 · Cyclomatic Complexity · exports (cyclomatic 34) · ×1
  • exports (cyclomatic 34) lib/init.js:157 — exports has cyclomatic complexity 34 (threshold 15). Of this number, 30 points are the body's own statements and 4 belong to 3 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · common.createPattern (cyclomatic 33) · ×1
  • common.createPattern (cyclomatic 33) lib/util/common.js:2199 — common.createPattern has cyclomatic complexity 33 (threshold 15). Most of this is not in the body itself: 7 of the 33 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 2219, add). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.proxy (cyclomatic 32) · ×1
  • index.proxy (cyclomatic 32) REDACTED:36 — index.proxy has cyclomatic complexity 32 (threshold 15). Most of this is not in the body itself: 13 of the 32 points are its own statements and the rest belongs to 9 function items inside it that branch (createNormalServer, a function literal at line 197, a function literal at line 50, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · getInitialState (cyclomatic 32) · ×1
  • getInitialState (cyclomatic 32) REDACTED:442 — getInitialState has cyclomatic complexity 32 (threshold 15). Of this number, 26 points are the body's own statements and 6 belong to 4 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · rules.isRegUrl (cyclomatic 31) · ×1
  • rules.isRegUrl (cyclomatic 31) REDACTED:144 — rules.isRegUrl has cyclomatic complexity 31 (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.
D1 · Cyclomatic Complexity · getHeaderRules (cyclomatic 31) · ×1
  • getHeaderRules (cyclomatic 31) biz/webui/htdocs/src/js/rule-mixin.js:79 — getHeaderRules has cyclomatic complexity 31 (threshold 15). Most of this is not in the body itself: 7 of the 31 points are its own statements and the rest belongs to one function literal inside it that branches (line 92). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · render (cyclomatic 31) · ×1
  • render (cyclomatic 31) biz/webui/htdocs/src/js/detail.js:194 — render has cyclomatic complexity 31 (threshold 15). Of this number, 23 points are the body's own statements and 8 belong to 3 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · dns.lookupDNS (cyclomatic 30) · ×1
  • dns.lookupDNS (cyclomatic 30) lib/rules/dns.js:57 — dns.lookupDNS has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 6 of the 30 points are its own statements and the rest belongs to 4 function items inside it that branch (handleDns, handleDns::handleCallback, execCallback, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · extract-saz.parseMetaInfo (cyclomatic 30) · ×1
  • extract-saz.parseMetaInfo (cyclomatic 30) lib/service/extract-saz.js:30 — extract-saz.parseMetaInfo has cyclomatic complexity 30 (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.
D1 · Cyclomatic Complexity · setSettings (cyclomatic 30) · ×1
  • setSettings (cyclomatic 30) biz/webui/htdocs/src/js/network-settings.js:241 — setSettings has cyclomatic complexity 30 (threshold 15). Of this number, 18 points are the body's own statements and 12 belong to 3 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · componentDidMount (cyclomatic 30) · ×1
  • componentDidMount (cyclomatic 30) biz/webui/htdocs/src/js/editor-dialog.js:140 — componentDidMount has cyclomatic complexity 30 (threshold 15). Most of this is not in the body itself: 3 of the 30 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 176, initTextArea, initTextArea::onkeydown, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · exports (cyclomatic 30) · ×1
  • exports (cyclomatic 30) REDACTED:143 — exports has cyclomatic complexity 30 (threshold 15). Of this number, 17 points are the body's own statements and 13 belong to 9 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · log.patchJSON · ×1
  • log.patchJSON::str (cyclomatic 29) assets/js/log.js:66 — log.patchJSON::str has cyclomatic complexity 29 (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.
D1 · Cyclomatic Complexity · index.getClientCert (cyclomatic 29) · ×1
  • index.getClientCert (cyclomatic 29) REDACTED:742 — index.getClientCert has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 750, 793, 827, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · data-server.init (cyclomatic 29) · ×1
  • data-server.init (cyclomatic 29) lib/util/data-server.js:401 — data-server.init 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: 3 other methods here (data-server.init::formatFilter, data-server.init::checkClientIp, data-server.init::checkType) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 4 times rather than 4 independent problems. Splitting this body alone leaves the other 3 exactly as they are. Where these are variations on one operation, the change that clears all 4 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.
D1 · Cyclomatic Complexity · index.default (cyclomatic 29) · ×1
  • index.default (cyclomatic 29) REDACTED:143 — index.default has cyclomatic complexity 29 (threshold 15). Of this number, 16 points are the body's own statements and 13 belong to 3 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · req.handleParams (cyclomatic 29) · ×1
  • req.handleParams (cyclomatic 29) lib/inspectors/req.js:156 — req.handleParams has cyclomatic complexity 29 (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: one other method here (req.handleParams::getChunk) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D1 · Cyclomatic Complexity · proxy.default (cyclomatic 29) · ×1
  • proxy.default (cyclomatic 29) lib/plugins/proxy.js:127 — proxy.default has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 9 function literals inside it that branch (lines 187, 134, 142, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · onClickContextMenu (cyclomatic 29) · ×1
  • onClickContextMenu (cyclomatic 29) biz/webui/htdocs/src/js/list.js:499 — onClickContextMenu has cyclomatic complexity 29 (threshold 15). Of this number, 26 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · getBodyRules (cyclomatic 29) · ×1
  • getBodyRules (cyclomatic 29) biz/webui/htdocs/src/js/response-rule.js:114 — getBodyRules has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 4 of the 29 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 128, addRule). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · exports (cyclomatic 29) · ×1
  • exports (cyclomatic 29) lib/plugins/proxy.js:127 — exports has cyclomatic complexity 29 (threshold 15). Most of this is not in the body itself: 1 of the 29 points is its own statement and the rest belongs to 12 function items inside it that branch ((anonymous)::request, (anonymous)::connect, (anonymous)::request::createConnection, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · http-mgr.updateBody (cyclomatic 28) · ×1
  • http-mgr.updateBody (cyclomatic 28) lib/util/http-mgr.js:357 — http-mgr.updateBody has cyclomatic complexity 28 (threshold 15). Most of this is not in the body itself: 5 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 375). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · h2.request (cyclomatic 28) · ×1
  • h2.request (cyclomatic 28) lib/https/h2.js:394 — h2.request has cyclomatic complexity 28 (threshold 15). Of this number, 19 points are the body's own statements and 9 belong to 3 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · util.harToSession (cyclomatic 28) · ×1
  • util.harToSession (cyclomatic 28) REDACTED:1337 — util.harToSession has cyclomatic complexity 28 (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.
D1 · Cyclomatic Complexity · index.authReq (cyclomatic 27) · ×1
  • index.authReq (cyclomatic 27) lib/plugins/index.js:816 — index.authReq has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 834, a function literal at line 865, execCallback, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · data-center.updateServerInfo (cyclomatic 27) · ×1
  • data-center.updateServerInfo (cyclomatic 27) biz/webui/htdocs/src/js/data-center.js:1933 — data-center.updateServerInfo has cyclomatic complexity 27 (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.
D1 · Cyclomatic Complexity · rules-hint.handleRemoteHints (cyclomatic 27) · ×1
  • rules-hint.handleRemoteHints (cyclomatic 27) biz/webui/htdocs/src/js/rules-hint.js:401 — rules-hint.handleRemoteHints has cyclomatic complexity 27 (threshold 15). Most of this is not in the body itself: 11 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 423). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · onCompose (cyclomatic 27) · ×1
  • onCompose (cyclomatic 27) biz/webui/htdocs/src/js/composer.js:527 — onCompose has cyclomatic complexity 27 (threshold 15). Of this number, 24 points are the body's own statements and 3 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · index.readPackages (cyclomatic 26) · ×1
  • index.readPackages (cyclomatic 26) lib/plugins/index.js:349 — index.readPackages has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 2 of the 26 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 362, a function literal at line 357, callbackHandler). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.getCookieItem (cyclomatic 25) · ×1
  • index.getCookieItem (cyclomatic 25) lib/util/index.js:3106 — index.getCookieItem has cyclomatic complexity 25 (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.
D1 · Cyclomatic Complexity · util.addRules (cyclomatic 25) · ×1
  • util.addRules (cyclomatic 25) lib/rules/util.js:605 — util.addRules has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 7 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 616). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · rules.parseWildcard (cyclomatic 25) · ×1
  • rules.parseWildcard (cyclomatic 25) REDACTED:1162 — rules.parseWildcard has cyclomatic complexity 25 (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.
D1 · Cyclomatic Complexity · getPopup (cyclomatic 25) · ×1
  • getPopup (cyclomatic 25) biz/webui/htdocs/src/js/context-menu.js:103 — getPopup has cyclomatic complexity 25 (threshold 15). Most of this is not in the body itself: 4 of the 25 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 120, a function literal at line 158, update, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · storage.Storage (cyclomatic 24) · ×1
  • storage.Storage (cyclomatic 24) lib/rules/storage.js:61 — storage.Storage has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 5 of the 24 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 81, 163, 148). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · get-plugins-sync.default (cyclomatic 24) · ×1
  • get-plugins-sync.default (cyclomatic 24) lib/plugins/get-plugins-sync.js:89 — get-plugins-sync.default has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to one function literal inside it that branches (line 96). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · socket-mgr.handleConnect (cyclomatic 24) · ×1
  • socket-mgr.handleConnect (cyclomatic 24) lib/socket-mgr.js:764 — socket-mgr.handleConnect has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 11 of the 24 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 803, handleTransform, a function literal at line 801). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · upgrade.getPluginNameByReq (cyclomatic 24) · ×1
  • upgrade.getPluginNameByReq (cyclomatic 24) REDACTED:13 — upgrade.getPluginNameByReq has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · data.emitDataEvents · ×1
  • data.emitDataEvents::handleResBody (cyclomatic 24) lib/inspectors/data.js:325 — data.emitDataEvents::handleResBody has cyclomatic complexity 24 (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.
D1 · Cyclomatic Complexity · onContextMenu (cyclomatic 24) · ×1
  • onContextMenu (cyclomatic 24) biz/webui/htdocs/src/js/list.js:611 — onContextMenu has cyclomatic complexity 24 (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.
D1 · Cyclomatic Complexity · onSave (cyclomatic 24) · ×1
  • onSave (cyclomatic 24) biz/webui/htdocs/src/js/editor-dialog.js:272 — onSave has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 6 of the 24 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 287, 346, 279, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · exports (cyclomatic 24) · ×1
  • exports (cyclomatic 24) lib/plugins/get-plugins-sync.js:89 — exports has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 96, 91). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plugin.installPlugins (cyclomatic 23) · ×1
  • plugin.installPlugins (cyclomatic 23) bin/plugin.js:219 — plugin.installPlugins has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 4 function items inside it that branch (callback, a function literal at line 229, a function literal at line 247, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.parsePathReplace (cyclomatic 23) · ×1
  • index.parsePathReplace (cyclomatic 23) lib/util/index.js:1016 — index.parsePathReplace has cyclomatic complexity 23 (threshold 15). Of this number, 17 points are the body's own statements and 6 belong to 2 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · rules.resolveResCookiesVar (cyclomatic 23) · ×1
  • rules.resolveResCookiesVar (cyclomatic 23) REDACTED:491 — rules.resolveResCookiesVar has cyclomatic complexity 23 (threshold 15). Of this number, 14 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · rules.resolveTplVar (cyclomatic 23) · ×1
  • rules.resolveTplVar (cyclomatic 23) REDACTED:721 — rules.resolveTplVar has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to one function literal inside it that branches (line 722). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · parse-curl.default (cyclomatic 23) · ×1
  • parse-curl.default (cyclomatic 23) biz/webui/htdocs/src/js/parse-curl.js:82 — parse-curl.default has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 92, 130). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · exports (cyclomatic 23) · ×1
  • exports (cyclomatic 23) biz/webui/htdocs/src/js/parse-curl.js:82 — exports has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 92, 130). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · use.getConfig (cyclomatic 22) · ×1
  • use.getConfig (cyclomatic 22) bin/use.js:194 — use.getConfig has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 belong to 2 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · cli.default (cyclomatic 22) · ×1
  • cli.default (cyclomatic 22) bin/ca/cli.js:54 — cli.default has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 8 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 56). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · rules.resolveFilterPattern (cyclomatic 22) · ×1
  • rules.resolveFilterPattern (cyclomatic 22) REDACTED:1475 — rules.resolveFilterPattern has cyclomatic complexity 22 (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.
D1 · Cyclomatic Complexity · index.getProxy · ×1
  • index.getProxy::resolvePacRule (cyclomatic 22) REDACTED:192 — index.getProxy::resolvePacRule has cyclomatic complexity 22 (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: one other method here (index.getProxy) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D1 · Cyclomatic Complexity · ca.loadCustomCerts (cyclomatic 22) · ×1
  • ca.loadCustomCerts (cyclomatic 22) lib/https/ca.js:340 — ca.loadCustomCerts has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 7 of the 22 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 347, 378). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.getPipe.<returned closure> (cyclomatic 22) · ×1
  • index.getPipe.<returned closure> (cyclomatic 22) lib/plugins/index.js:1205 — index.getPipe.<returned closure> has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 2 of the 22 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 1210, 1258, 1240, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · data-center.handleHashFilterChanged (cyclomatic 22) · ×1
  • data-center.handleHashFilterChanged (cyclomatic 22) biz/webui/htdocs/src/js/data-center.js:188 — data-center.handleHashFilterChanged has cyclomatic complexity 22 (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.
D1 · Cyclomatic Complexity · index.toHttp1 (cyclomatic 22) · ×1
  • index.toHttp1 (cyclomatic 22) lib/https/index.js:1013 — index.toHttp1 has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 6 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 1057, handleAbort, a function literal at line 1059, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · upgrade.upgradeHandler (cyclomatic 22) · ×1
  • upgrade.upgradeHandler (cyclomatic 22) REDACTED:77 — upgrade.upgradeHandler has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 125, destroy, getBuffer, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · req.handleParams · ×1
  • req.handleParams::getChunk (cyclomatic 22) lib/inspectors/req.js:305 — req.handleParams::getChunk has cyclomatic complexity 22 (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: one other method here (req.handleParams) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D1 · Cyclomatic Complexity · composer.handleHttp (cyclomatic 22) · ×1
  • composer.handleHttp (cyclomatic 22) REDACTED:235 — composer.handleHttp has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 4 of the 22 points are its own statements and the rest belongs to 5 function items inside it that branch (a function literal at line 307, a function literal at line 249, a function literal at line 271, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · addParserApi (cyclomatic 22) · ×1
  • addParserApi (cyclomatic 22) REDACTED:334 — addParserApi has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 377, on, emitDisconnect, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · execute (cyclomatic 22) · ×1
  • execute (cyclomatic 22) biz/webui/htdocs/src/js/composer.js:779 — execute has cyclomatic complexity 22 (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.
D1 · Cyclomatic Complexity · getPipe (cyclomatic 22) · ×1
  • getPipe (cyclomatic 22) lib/plugins/index.js:1202 — getPipe has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 6 function items inside it that branch (a function literal at line 1210, a function literal at line 1258, (anonymous)::(anonymous)::handleConnect, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · http-mgr.request (cyclomatic 21) · ×1
  • http-mgr.request (cyclomatic 21) lib/util/http-mgr.js:193 — http-mgr.request has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 205, 232, 202, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · data-center.startLoadData · ×1
  • data-center.startLoadData::load (cyclomatic 21) biz/webui/htdocs/src/js/data-center.js:1060 — data-center.startLoadData::load has cyclomatic complexity 21 (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.
D1 · Cyclomatic Complexity · createRules (cyclomatic 21) · ×1
  • createRules (cyclomatic 21) REDACTED:2772 — createRules has cyclomatic complexity 21 (threshold 15). Of this number, 13 points are the body's own statements and 8 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · getRulesFromPlugins · ×1
  • getRulesFromPlugins::(anonymous)::(anonymous)::(anonymous)::handleRules (cyclomatic 21) lib/plugins/index.js:982 — getRulesFromPlugins::(anonymous)::(anonymous)::(anonymous)::handleRules has cyclomatic complexity 21 (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.
D1 · Cyclomatic Complexity · formatFiles (cyclomatic 21) · ×1
  • formatFiles (cyclomatic 21) biz/webui/htdocs/src/js/certs-info-dialog.js:126 — formatFiles has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · renderKey · ×1
  • renderKey::render (cyclomatic 21) biz/webui/htdocs/src/js/properties.js:97 — renderKey::render has cyclomatic complexity 21 (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.
D1 · Cyclomatic Complexity · use.default (cyclomatic 20) · ×1
  • use.default (cyclomatic 20) bin/use.js:252 — use.default has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 6 function literals inside it that branch (lines 278, 266, 253, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · plugin.install (cyclomatic 20) · ×1
  • plugin.install (cyclomatic 20) bin/plugin.js:124 — plugin.install has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 146, 194). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.replaceQueryString (cyclomatic 20) · ×1
  • index.replaceQueryString (cyclomatic 20) lib/util/index.js:1763 — index.replaceQueryString has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 5 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · index.getHintList (cyclomatic 20) · ×1
  • index.getHintList (cyclomatic 20) lib/util/index.js:2554 — index.getHintList has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to one function literal inside it that branches (line 2561). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.setResCors (cyclomatic 20) · ×1
  • index.setResCors (cyclomatic 20) lib/util/index.js:2935 — index.setResCors has cyclomatic complexity 20 (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.
D1 · Cyclomatic Complexity · storage.proto.moveTo (cyclomatic 20) · ×1
  • storage.proto.moveTo (cyclomatic 20) lib/rules/storage.js:424 — storage.proto.moveTo 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.
D1 · Cyclomatic Complexity · rules.resolveRuleValue (cyclomatic 20) · ×1
  • rules.resolveRuleValue (cyclomatic 20) REDACTED:582 — rules.resolveRuleValue 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.
D1 · Cyclomatic Complexity · network-modal.checkFilterType (cyclomatic 20) · ×1
  • network-modal.checkFilterType (cyclomatic 20) biz/webui/htdocs/src/js/network-modal.js:271 — network-modal.checkFilterType 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.
D1 · Cyclomatic Complexity · network-modal.proto.filter (cyclomatic 20) · ×1
  • network-modal.proto.filter (cyclomatic 20) biz/webui/htdocs/src/js/network-modal.js:323 — network-modal.proto.filter has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 3 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 343, 328). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · load-cert.default (cyclomatic 20) · ×1
  • load-cert.default (cyclomatic 20) lib/https/load-cert.js:11 — load-cert.default has cyclomatic complexity 20 (threshold 15). Of this number, 10 points are the body's own statements and 10 belong to 2 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · init.addErrorEvents (cyclomatic 20) · ×1
  • init.addErrorEvents (cyclomatic 20) lib/init.js:9 — init.addErrorEvents has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to 4 function items inside it that branch (abort, countdown, a function literal at line 36, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · log.default (cyclomatic 20) · ×1
  • log.default (cyclomatic 20) lib/inspectors/log.js:26 — log.default has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 2 of the 20 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 32, 52, 56). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · proxy.createSocket (cyclomatic 20) · ×1
  • proxy.createSocket (cyclomatic 20) lib/plugins/proxy.js:61 — proxy.createSocket has cyclomatic complexity 20 (threshold 15). Of this number, 14 points are the body's own statements and 6 belong to 2 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · sendRequest (cyclomatic 20) · ×1
  • sendRequest (cyclomatic 20) biz/webui/htdocs/src/js/composer.js:896 — sendRequest has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 5 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 909, 903). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · getHints (cyclomatic 20) · ×1
  • getHints (cyclomatic 20) biz/webui/htdocs/src/js/rules-hint.js:195 — getHints has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 2 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 20) · ×1
  • (anonymous) (cyclomatic 20) biz/webui/htdocs/src/js/list.js:839 — (anonymous) has cyclomatic complexity 20 (threshold 15). Of this number, 19 points are the body's own statements and 1 belongs to 2 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · common.readStream (cyclomatic 19) · ×1
  • common.readStream (cyclomatic 19) lib/util/common.js:741 — common.readStream has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 746, 778, 755, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · proxy.default (cyclomatic 19) · ×1
  • proxy.default (cyclomatic 19) bin/proxy.js:48 — proxy.default has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 56). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.setResponseFor (cyclomatic 19) · ×1
  • index.setResponseFor (cyclomatic 19) lib/util/index.js:3226 — index.setResponseFor has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · rules.resolveRules (cyclomatic 19) · ×1
  • rules.resolveRules (cyclomatic 19) REDACTED:2239 — rules.resolveRules has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 8 of the 19 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2260, 2273, 2281). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.pluginMgr.loadCert (cyclomatic 19) · ×1
  • index.pluginMgr.loadCert (cyclomatic 19) lib/plugins/index.js:228 — index.pluginMgr.loadCert has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 244, 229). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.pluginMgr.getResRules (cyclomatic 19) · ×1
  • index.pluginMgr.getResRules (cyclomatic 19) lib/plugins/index.js:1313 — index.pluginMgr.getResRules has cyclomatic complexity 19 (threshold 15). Of this number, 15 points are the body's own statements and 4 belong to 2 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · index.app.use() (cyclomatic 19) · ×1
  • index.app.use() (cyclomatic 19) REDACTED:485 — index.app.use() has cyclomatic complexity 19 (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.
D1 · Cyclomatic Complexity · list-modal.proto.moveTo (cyclomatic 19) · ×1
  • list-modal.proto.moveTo (cyclomatic 19) biz/webui/htdocs/src/js/list-modal.js:172 — list-modal.proto.moveTo has cyclomatic complexity 19 (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.
D1 · Cyclomatic Complexity · req-data.getValue (cyclomatic 19) · ×1
  • req-data.getValue (cyclomatic 19) REDACTED:294 — req-data.getValue 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.
D1 · Cyclomatic Complexity · load-plugin.setContext (cyclomatic 19) · ×1
  • load-plugin.setContext (cyclomatic 19) REDACTED:159 — load-plugin.setContext has cyclomatic complexity 19 (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 is NOT this file's highest cyclomatic complexity: load-plugin.addParserApi (cyclomatic 22) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · createValues (cyclomatic 19) · ×1
  • createValues (cyclomatic 19) REDACTED:2838 — createValues has cyclomatic complexity 19 (threshold 15). Of this number, 12 points are the body's own statements and 7 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · showCookiesDialog (cyclomatic 19) · ×1
  • showCookiesDialog (cyclomatic 19) biz/webui/htdocs/src/js/composer.js:998 — showCookiesDialog has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 1008). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 19) · ×1
  • (anonymous) (cyclomatic 19) REDACTED:485 — (anonymous) has cyclomatic complexity 19 (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.
D1 · Cyclomatic Complexity · getBodyRules (cyclomatic 19) · ×1
  • getBodyRules (cyclomatic 19) biz/webui/htdocs/src/js/request-rule.js:114 — getBodyRules has cyclomatic complexity 19 (threshold 15). Most of this is not in the body itself: 4 of the 19 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 128, addRule). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · tab.html.off (cyclomatic 18) · ×1
  • tab.html.off (cyclomatic 18) assets/tab.html:190 — tab.html.off has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · common.readWhistleRc (cyclomatic 18) · ×1
  • common.readWhistleRc (cyclomatic 18) lib/util/common.js:1396 — common.readWhistleRc has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 1409). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.setReqCookies (cyclomatic 18) · ×1
  • index.setReqCookies (cyclomatic 18) lib/util/index.js:3065 — index.setReqCookies has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to 3 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · index.pluginMgr.on("updateRules") (cyclomatic 18) · ×1
  • index.pluginMgr.on("updateRules") (cyclomatic 18) lib/plugins/index.js:157 — index.pluginMgr.on("updateRules") has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 172, 198, 163, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · util.parseUploadBody (cyclomatic 18) · ×1
  • util.parseUploadBody (cyclomatic 18) REDACTED:2556 — util.parseUploadBody has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · list-modal.proto.filter (cyclomatic 18) · ×1
  • list-modal.proto.filter (cyclomatic 18) biz/webui/htdocs/src/js/list-modal.js:456 — list-modal.proto.filter has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 5 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 468). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · socket-mgr.handleFrame (cyclomatic 18) · ×1
  • socket-mgr.handleFrame (cyclomatic 18) lib/socket-mgr.js:232 — socket-mgr.handleFrame has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · req.toMultipart (cyclomatic 18) · ×1
  • req.toMultipart (cyclomatic 18) lib/inspectors/req.js:60 — req.toMultipart has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · composer.handleComposerHistory (cyclomatic 18) · ×1
  • composer.handleComposerHistory (cyclomatic 18) REDACTED:46 — composer.handleComposerHistory 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.
D1 · Cyclomatic Complexity · startLoadData (cyclomatic 18) · ×1
  • startLoadData (cyclomatic 18) REDACTED:2212 — startLoadData has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 3 of the 18 points are its own statements and the rest belongs to 7 function items inside it that branch (update, atBottom, scrollToBottom, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 18) · ×1
  • (anonymous) (cyclomatic 18) lib/plugins/index.js:157 — (anonymous) has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 198, 172, 163, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · onContextMenu (cyclomatic 18) · ×1
  • onContextMenu (cyclomatic 18) biz/webui/htdocs/src/js/plugins.js:860 — onContextMenu 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.
D1 · Cyclomatic Complexity · componentDidMount · ×1
  • componentDidMount::find (cyclomatic 18) biz/webui/htdocs/src/js/editor.js:238 — componentDidMount::find has cyclomatic complexity 18 (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.
D1 · Cyclomatic Complexity · common.getPeerPlugins (cyclomatic 17) · ×1
  • common.getPeerPlugins (cyclomatic 17) lib/util/common.js:316 — common.getPeerPlugins has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 7 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 339, 344). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · common.compareVersion (cyclomatic 17) · ×1
  • common.compareVersion (cyclomatic 17) lib/util/common.js:1358 — common.compareVersion has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · util.showUsage (cyclomatic 17) · ×1
  • util.showUsage (cyclomatic 17) bin/util.js:74 — util.showUsage has cyclomatic complexity 17 (threshold 15). Of this number, 16 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · whistle-transform.proto._transform (cyclomatic 17) · ×1
  • whistle-transform.proto._transform (cyclomatic 17) lib/util/whistle-transform.js:102 — whistle-transform.proto._transform has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to one function item inside it that branches. 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.
D1 · Cyclomatic Complexity · index.getMatcherJson (cyclomatic 17) · ×1
  • index.getMatcherJson (cyclomatic 17) lib/util/index.js:1233 — index.getMatcherJson has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · index.ignoreRules (cyclomatic 17) · ×1
  • index.ignoreRules (cyclomatic 17) lib/util/index.js:2093 — index.ignoreRules has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 2100, 2120). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.initHeaderRules (cyclomatic 17) · ×1
  • index.initHeaderRules (cyclomatic 17) REDACTED:580 — index.initHeaderRules has cyclomatic complexity 17 (threshold 15). Of this number, 13 points are the body's own statements and 4 belong to 2 function literals inside it that branch. 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.
D1 · Cyclomatic Complexity · index.notEqual (cyclomatic 17) · ×1
  • index.notEqual (cyclomatic 17) lib/service/index.js:101 — index.notEqual has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · util.addPluginMenus (cyclomatic 17) · ×1
  • util.addPluginMenus (cyclomatic 17) REDACTED:2298 — util.addPluginMenus has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · util.parseImportData (cyclomatic 17) · ×1
  • util.parseImportData (cyclomatic 17) REDACTED:2365 — util.parseImportData has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 2 of the 17 points are its own statements and the rest belongs to 3 function items inside it that branch (handleItem, a function literal at line 2400, a function literal at line 2410). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · util.filterJson (cyclomatic 17) · ×1
  • util.filterJson (cyclomatic 17) REDACTED:3087 — util.filterJson has cyclomatic complexity 17 (threshold 15). Of this number, 12 points are the body's own statements and 5 belong to one function literal inside it that branches. 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.
D1 · Cyclomatic Complexity · protocols.getHelpUrl (cyclomatic 17) · ×1
  • protocols.getHelpUrl (cyclomatic 17) biz/webui/htdocs/src/js/protocols.js:201 — protocols.getHelpUrl has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · (anonymous) (cyclomatic 17) · ×1
  • (anonymous) (cyclomatic 17) lib/rules/util.js:58 — (anonymous) has cyclomatic complexity 17 (threshold 15). Of this number, 11 points are the body's own statements and 6 belong to 3 function items inside it that branch. 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.
D1 · Cyclomatic Complexity · onFilterKeyDown (cyclomatic 17) · ×1
  • onFilterKeyDown (cyclomatic 17) biz/webui/htdocs/src/js/filter-input.js:164 — onFilterKeyDown has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · replace-pattern-transform.replacePattern (cyclomatic 16) · ×1
  • replace-pattern-transform.replacePattern (cyclomatic 16) lib/util/replace-pattern-transform.js:64 — replace-pattern-transform.replacePattern has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to one function literal inside it that branches (line 67). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · index.resolveIgnore (cyclomatic 16) · ×1
  • index.resolveIgnore (cyclomatic 16) lib/util/index.js:1916 — index.resolveIgnore has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1921, 1958). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · rules.resolveUrlVar (cyclomatic 16) · ×1
  • rules.resolveUrlVar (cyclomatic 16) REDACTED:456 — rules.resolveUrlVar has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · rules.parseText (cyclomatic 16) · ×1
  • rules.parseText (cyclomatic 16) REDACTED:1745 — rules.parseText has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1749, 1785). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · h2.requestH2 (cyclomatic 16) · ×1
  • h2.requestH2 (cyclomatic 16) lib/https/h2.js:269 — h2.requestH2 has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 4 function literals inside it that branch (lines 294, 319, 281, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · data-center.checkFilter (cyclomatic 16) · ×1
  • data-center.checkFilter (cyclomatic 16) biz/webui/htdocs/src/js/data-center.js:382 — data-center.checkFilter has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · frame-modal.proto.filter (cyclomatic 16) · ×1
  • frame-modal.proto.filter (cyclomatic 16) biz/webui/htdocs/src/js/frame-modal.js:55 — frame-modal.proto.filter has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (isHide, a function literal at line 94). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D1 · Cyclomatic Complexity · index.resolveWebsocket · ×1
  • index.resolveWebsocket::pipeData (cyclomatic 16) lib/https/index.js:621 — index.resolveWebsocket::pipeData has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · index.handleGlobalException (cyclomatic 16) · ×1
  • index.handleGlobalException (cyclomatic 16) REDACTED:243 — index.handleGlobalException has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · composer.handleRequest · ×1
  • composer.handleRequest::getBody (cyclomatic 16) REDACTED:439 — composer.handleRequest::getBody has cyclomatic complexity 16 (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: one other method here (composer.handleRequest) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D1 · Cyclomatic Complexity · formatHistory (cyclomatic 16) · ×1
  • formatHistory (cyclomatic 16) biz/webui/htdocs/src/js/composer.js:428 — formatHistory has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 4 of the 16 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 437, 477, 479). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · componentDidMount (cyclomatic 16) · ×1
  • componentDidMount (cyclomatic 16) biz/webui/htdocs/src/js/plugins.js:160 — componentDidMount has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to 12 function literals inside it that branch (lines 208, 163, 203, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · tunnelProxy · ×1
  • tunnelProxy::(anonymous)::(anonymous)::(anonymous)::emitError (cyclomatic 16) lib/tunnel.js:828 — tunnelProxy::(anonymous)::(anonymous)::(anonymous)::emitError has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · handleParams · ×1
  • handleParams::_transform (cyclomatic 16) lib/inspectors/req.js:171 — handleParams::_transform has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · onNetworkSettingsChange (cyclomatic 16) · ×1
  • onNetworkSettingsChange (cyclomatic 16) biz/webui/htdocs/src/js/network-settings.js:88 — onNetworkSettingsChange has cyclomatic complexity 16 (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.
D2 · Cognitive Complexity · componentDidMount (cognitive 376) · ×1
  • componentDidMount (cognitive 376) REDACTED:978 — componentDidMount has cognitive complexity 376 (threshold 15). Drivers by points: if/else 166 (244 pts), boolean chains 79, ternaries 18 (47 pts), error handling 3 (4 pts), loops 1 (2 pts) (nesting depth added 109). Most of this is not in the body itself: 6 of the 376 points are its own statements and the rest belongs to 116 function items inside it that branch (a function literal at line 1458, a function literal at line 1662, a function literal at line 1408, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · extend (cognitive 267) · ×1
  • extend (cognitive 267) lib/config.js:516 — extend has cognitive complexity 267 (threshold 15). Drivers by points: if/else 145 (181 pts), boolean chains 64, ternaries 9 (14 pts), error handling 2 (5 pts), match/switch 1 (3 pts) (nesting depth added 46). Of this number, 161 points are the body's own statements and 106 belong to 15 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · tunnel.tunnelProxy (cognitive 253) · ×1
  • tunnel.tunnelProxy (cognitive 253) lib/tunnel.js:38 — tunnel.tunnelProxy has cognitive complexity 253 (threshold 15). Drivers by points: if/else 116 (152 pts), boolean chains 84, ternaries 9 (13 pts), error handling 2 (4 pts) (nesting depth added 42). None of this is in the body itself: all 253 points belong to 36 function literals inside it that branch (lines 759, 348, 456, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · (anonymous) (cognitive 250) · ×1
  • (anonymous) (cognitive 250) biz/webui/htdocs/src/js/rules-hint.js:552 — (anonymous) has cognitive complexity 250 (threshold 15). Drivers by points: if/else 63 (187 pts), boolean chains 43, ternaries 6 (18 pts), loops 2 (nesting depth added 136). Of this number, 198 points are the body's own statements and 52 belong to 9 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · rules-hint.CodeMirror.registerHelper("hint","rulesHint") (cognitive 198) · ×1
  • rules-hint.CodeMirror.registerHelper("hint","rulesHint") (cognitive 198) biz/webui/htdocs/src/js/rules-hint.js:552 — rules-hint.CodeMirror.registerHelper("hint","rulesHint") has cognitive complexity 198 (threshold 15). Drivers by points: if/else 54 (148 pts), boolean chains 43, ternaries 2 (5 pts), loops 2 (nesting depth added 97). Of this number, 187 points are the body's own statements and 11 belong to 6 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · resolveRuleList (cognitive 147) · ×1
  • resolveRuleList (cognitive 147) REDACTED:929 — resolveRuleList has cognitive complexity 147 (threshold 15). Drivers by points: if/else 30 (87 pts), boolean chains 30, ternaries 8 (20 pts), loops 3 (10 pts) (nesting depth added 76). Of this number, 134 points are the body's own statements and 13 belong to 5 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · resolveMatchFilter (cognitive 137) · ×1
  • resolveMatchFilter (cognitive 137) REDACTED:1549 — resolveMatchFilter has cognitive complexity 137 (threshold 15). Drivers by points: if/else 41 (77 pts), ternaries 10 (33 pts), boolean chains 23, match/switch 1 (4 pts) (nesting depth added 62). None of this is in the body itself: all 137 points belong to one function literal inside it that branches (line 1554). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · res.default (cognitive 122) · ×1
  • res.default (cognitive 122) REDACTED:190 — res.default has cognitive complexity 122 (threshold 15). Drivers by points: boolean chains 120, if/else 2. 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.
D2 · Cognitive Complexity · rules.matchFilter (cognitive 113) · ×1
  • rules.matchFilter (cognitive 113) REDACTED:1819 — rules.matchFilter has cognitive complexity 113 (threshold 15). Drivers by points: if/else 44 (61 pts), ternaries 12 (35 pts), boolean chains 13, loops 1 (4 pts) (nesting depth added 43). Of this number, 98 points are the body's own statements and 15 belong to 2 function items inside it that branch. 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.
D2 · Cognitive Complexity · exports (cognitive 93) · ×1
  • exports (cognitive 93) biz/index.js:31 — exports has cognitive complexity 93 (threshold 15). Drivers by points: if/else 35 (70 pts), ternaries 4 (13 pts), boolean chains 10 (nesting depth added 44). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · render (cognitive 90) · ×1
  • render (cognitive 90) REDACTED:3918 — render has cognitive complexity 90 (threshold 15). Drivers by points: ternaries 37 (38 pts), boolean chains 28, if/else 13 (20 pts), loops 2 (4 pts) (nesting depth added 10). Of this number, 80 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · render (cognitive 83) · ×1
  • render (cognitive 83) biz/webui/htdocs/src/js/res-detail.js:63 — render has cognitive complexity 83 (threshold 15). Drivers by points: if/else 19 (38 pts), boolean chains 19, ternaries 14 (19 pts), match/switch 1 (4 pts), loops 1 (3 pts) (nesting depth added 29). Of this number, 71 points are the body's own statements and 12 belong to 2 function items inside it that branch. 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.
D2 · Cognitive Complexity · extract-saz.default (cognitive 82) · ×1
  • extract-saz.default (cognitive 82) lib/service/extract-saz.js:108 — extract-saz.default has cognitive complexity 82 (threshold 15). Drivers by points: if/else 35 (79 pts), boolean chains 3 (nesting depth added 44). None of this is in the body itself: all 82 points belong to 5 function items inside it that branch (a function literal at line 196, a function literal at line 155, a function literal at line 119, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · exports (cognitive 82) · ×1
  • exports (cognitive 82) lib/service/extract-saz.js:108 — exports has cognitive complexity 82 (threshold 15). Drivers by points: if/else 35 (79 pts), boolean chains 3 (nesting depth added 44). None of this is in the body itself: all 82 points belong to 12 function items inside it that branch (a function literal at line 196, a function literal at line 155, a function literal at line 119, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · index.default (cognitive 80) · ×1
  • index.default (cognitive 80) biz/index.js:31 — index.default has cognitive complexity 80 (threshold 15). Drivers by points: if/else 35 (70 pts), boolean chains 10 (nesting depth added 35). 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.
D2 · Cognitive Complexity · index.getProxy (cognitive 79) · ×1
  • index.getProxy (cognitive 79) REDACTED:126 — index.getProxy has cognitive complexity 79 (threshold 15). Drivers by points: if/else 34 (42 pts), boolean chains 37 (nesting depth added 8). Of this number, 46 points are the body's own statements and 33 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · render (cognitive 79) · ×1
  • render (cognitive 79) biz/webui/htdocs/src/js/overview.js:137 — render has cognitive complexity 79 (threshold 15). Drivers by points: if/else 21 (56 pts), boolean chains 11, ternaries 2 (9 pts), match/switch 1 (3 pts) (nesting depth added 44). Most of this is not in the body itself: 10 of the 79 points are its own statements and the rest belongs to one function literal inside it that branches (line 147). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.getRulesFromPlugins (cognitive 78) · ×1
  • index.getRulesFromPlugins (cognitive 78) lib/plugins/index.js:891 — index.getRulesFromPlugins has cognitive complexity 78 (threshold 15). Drivers by points: if/else 29 (45 pts), ternaries 6 (17 pts), boolean chains 16 (nesting depth added 27). None of this is in the body itself: all 78 points belong to 6 function literals inside it that branch (lines 982, 920, 959, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · exports (cognitive 76) · ×1
  • exports (cognitive 76) lib/https/index.js:1151 — exports has cognitive complexity 76 (threshold 15). Drivers by points: if/else 29 (34 pts), boolean chains 33, ternaries 4 (6 pts), error handling 1 (3 pts) (nesting depth added 9). Most of this is not in the body itself: 3 of the 76 points are its own statements and the rest belongs to 12 function items inside it that branch (a function literal at line 1184, (anonymous)::handleConnect, (anonymous)::handleRequest, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · parseRule (cognitive 75) · ×1
  • parseRule (cognitive 75) REDACTED:1229 — parseRule has cognitive complexity 75 (threshold 15). Drivers by points: if/else 35 (54 pts), ternaries 6 (9 pts), boolean chains 8, loops 1 (2 pts), match/switch 1 (2 pts) (nesting depth added 24). 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.
D2 · Cognitive Complexity · index.default (cognitive 72) · ×1
  • index.default (cognitive 72) lib/https/index.js:1151 — index.default has cognitive complexity 72 (threshold 15). Drivers by points: if/else 29 (34 pts), boolean chains 32, error handling 1 (3 pts), ternaries 2 (3 pts) (nesting depth added 8). Most of this is not in the body itself: 3 of the 72 points are its own statements and the rest belongs to 10 function items inside it that branch (a function literal at line 1184, a function literal at line 1236, a function literal at line 1277, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · updateServerInfo (cognitive 72) · ×1
  • updateServerInfo (cognitive 72) biz/webui/htdocs/src/js/online.js:330 — updateServerInfo has cognitive complexity 72 (threshold 15). Drivers by points: if/else 30 (59 pts), boolean chains 9, ternaries 2 (4 pts) (nesting depth added 31). Of this number, 17 points are the body's own statements and 55 belong to 11 function items inside it that branch. 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.
D2 · Cognitive Complexity · readRuleList (cognitive 69) · ×1
  • readRuleList (cognitive 69) lib/util/index.js:1283 — readRuleList has cognitive complexity 69 (threshold 15). Drivers by points: if/else 26 (44 pts), boolean chains 15, ternaries 4 (10 pts) (nesting depth added 24). Of this number, 16 points are the body's own statements and 53 belong to 5 function items inside it that branch. 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.
D2 · Cognitive Complexity · exports (cognitive 68) · ×1
  • exports (cognitive 68) lib/handlers/file-proxy.js:233 — exports has cognitive complexity 68 (threshold 15). Drivers by points: if/else 22 (39 pts), ternaries 8 (18 pts), boolean chains 11 (nesting depth added 27). Of this number, 23 points are the body's own statements and 45 belong to 5 function items inside it that branch. 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.
D2 · Cognitive Complexity · sessionsHandler (cognitive 67) · ×1
  • sessionsHandler (cognitive 67) REDACTED:302 — sessionsHandler has cognitive complexity 67 (threshold 15). Drivers by points: if/else 28 (36 pts), boolean chains 13, ternaries 11 (13 pts), loops 1 (3 pts), error handling 2 (nesting depth added 12). None of this is in the body itself: all 67 points belong to 33 function items inside it that branch (a function literal at line 354, a function literal at line 487, a function literal at line 532, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · render (cognitive 67) · ×1
  • render (cognitive 67) biz/webui/htdocs/src/js/matched-rule.js:100 — render has cognitive complexity 67 (threshold 15). Drivers by points: if/else 21 (46 pts), boolean chains 12, ternaries 3 (9 pts) (nesting depth added 31). Of this number, 17 points are the body's own statements and 50 belong to 5 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · patchJSON · ×1
  • patchJSON::str (cognitive 65) assets/js/log.js:66 — patchJSON::str has cognitive complexity 65 (threshold 15). Drivers by points: if/else 10 (27 pts), ternaries 7 (24 pts), loops 3 (9 pts), boolean chains 4, match/switch 1 (nesting depth added 40). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · setReqData (cognitive 62) · ×1
  • setReqData (cognitive 62) biz/webui/htdocs/src/js/data-center.js:1726 — setReqData has cognitive complexity 62 (threshold 15). Drivers by points: if/else 19 (28 pts), ternaries 11 (18 pts), boolean chains 16 (nesting depth added 16). 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.
D2 · Cognitive Complexity · componentDidUpdate (cognitive 61) · ×1
  • componentDidUpdate (cognitive 61) REDACTED:483 — componentDidUpdate has cognitive complexity 61 (threshold 15). Drivers by points: if/else 21 (45 pts), loops 4 (8 pts), boolean chains 7, ternaries 1 (nesting depth added 28). Of this number, 49 points are the body's own statements and 12 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · onContextMenu (cognitive 61) · ×1
  • onContextMenu (cognitive 61) REDACTED:1095 — onContextMenu has cognitive complexity 61 (threshold 15). Drivers by points: boolean chains 27, if/else 16 (21 pts), ternaries 9, loops 2 (3 pts), match/switch 1 (nesting depth added 6). Of this number, 51 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · (anonymous).token (cognitive 57) · ×1
  • (anonymous).token (cognitive 57) biz/webui/htdocs/src/js/rules-mode.js:174 — (anonymous).token has cognitive complexity 57 (threshold 15). Drivers by points: if/else 40 (43 pts), ternaries 4 (8 pts), boolean chains 6 (nesting depth added 7). Of this number, 19 points are the body's own statements and 38 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · file-proxy.default (cognitive 56) · ×1
  • file-proxy.default (cognitive 56) lib/handlers/file-proxy.js:233 — file-proxy.default has cognitive complexity 56 (threshold 15). Drivers by points: if/else 21 (35 pts), boolean chains 12, ternaries 4 (9 pts) (nesting depth added 19). Of this number, 21 points are the body's own statements and 35 belong to 5 function items inside it that branch. 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.
D2 · Cognitive Complexity · getHeaderRules (cognitive 55) · ×1
  • getHeaderRules (cognitive 55) biz/webui/htdocs/src/js/rule-mixin.js:79 — getHeaderRules has cognitive complexity 55 (threshold 15). Drivers by points: if/else 18 (44 pts), boolean chains 8, ternaries 2, match/switch 1 (nesting depth added 26). Most of this is not in the body itself: 6 of the 55 points are its own statements and the rest belongs to one function literal inside it that branches (line 92). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · exports (cognitive 55) · ×1
  • exports (cognitive 55) REDACTED:143 — exports has cognitive complexity 55 (threshold 15). Drivers by points: if/else 19 (37 pts), boolean chains 8, error handling 2 (6 pts), loops 1 (4 pts) (nesting depth added 25). Of this number, 39 points are the body's own statements and 16 belong to 9 function items inside it that branch. 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.
D2 · Cognitive Complexity · util.addRules (cognitive 54) · ×1
  • util.addRules (cognitive 54) lib/rules/util.js:605 — util.addRules has cognitive complexity 54 (threshold 15). Drivers by points: if/else 18 (45 pts), boolean chains 7, ternaries 1 (2 pts) (nesting depth added 28). Most of this is not in the body itself: 8 of the 54 points are its own statements and the rest belongs to one function literal inside it that branches (line 616). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · req.handleParams · ×1
  • req.handleParams::getChunk (cognitive 54) lib/inspectors/req.js:305 — req.handleParams::getChunk has cognitive complexity 54 (threshold 15). Drivers by points: if/else 16 (45 pts), boolean chains 8, loops 1 (nesting depth added 29). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (req.handleParams) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D2 · Cognitive Complexity · authReq (cognitive 52) · ×1
  • authReq (cognitive 52) lib/plugins/index.js:816 — authReq has cognitive complexity 52 (threshold 15). Drivers by points: if/else 15 (26 pts), ternaries 3 (13 pts), boolean chains 8, error handling 1 (5 pts) (nesting depth added 25). Most of this is not in the body itself: 1 of the 52 points is its own statement and the rest belongs to 4 function items inside it that branch (a function literal at line 834, a function literal at line 865, execCallback, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · exports (cognitive 52) · ×1
  • exports (cognitive 52) lib/https/load-cert.js:11 — exports has cognitive complexity 52 (threshold 15). Drivers by points: if/else 13 (42 pts), boolean chains 5, ternaries 1 (5 pts) (nesting depth added 33). Of this number, 23 points are the body's own statements and 29 belong to 3 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · rules-mode.CodeMirror.defineMode("rules").token (cognitive 51) · ×1
  • rules-mode.CodeMirror.defineMode("rules").token (cognitive 51) biz/webui/htdocs/src/js/rules-mode.js:174 — rules-mode.CodeMirror.defineMode("rules").token has cognitive complexity 51 (threshold 15). Drivers by points: if/else 40 (43 pts), boolean chains 6, ternaries 2 (nesting depth added 3). Of this number, 19 points are the body's own statements and 32 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · index.default (cognitive 50) · ×1
  • index.default (cognitive 50) REDACTED:143 — index.default has cognitive complexity 50 (threshold 15). Drivers by points: if/else 19 (37 pts), boolean chains 8, loops 1 (4 pts), error handling 1 (nesting depth added 21). Of this number, 34 points are the body's own statements and 16 belong to 3 function items inside it that branch. 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.
D2 · Cognitive Complexity · render (cognitive 49) · ×1
  • render (cognitive 49) biz/webui/htdocs/src/js/frame-list.js:312 — render has cognitive complexity 49 (threshold 15). Drivers by points: ternaries 13 (20 pts), if/else 12 (18 pts), boolean chains 11 (nesting depth added 13). Most of this is not in the body itself: 7 of the 49 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 381, 438). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · util.parseUploadBody (cognitive 47) · ×1
  • util.parseUploadBody (cognitive 47) REDACTED:2556 — util.parseUploadBody has cognitive complexity 47 (threshold 15). Drivers by points: if/else 11 (29 pts), error handling 2 (10 pts), boolean chains 4, ternaries 2 (3 pts), loops 1 (nesting depth added 27). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · load-cert.default (cognitive 47) · ×1
  • load-cert.default (cognitive 47) lib/https/load-cert.js:11 — load-cert.default has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (42 pts), boolean chains 5 (nesting depth added 29). Of this number, 18 points are the body's own statements and 29 belong to 2 function items inside it that branch. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · handleRequest (cognitive 45) · ×1
  • handleRequest (cognitive 45) REDACTED:345 — handleRequest has cognitive complexity 45 (threshold 15). Drivers by points: if/else 34 (48 pts), boolean chains 20, ternaries 7 (17 pts), error handling 1 (3 pts) (nesting depth added 26). 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.
D2 · Cognitive Complexity · req.default (cognitive 44) · ×1
  • req.default (cognitive 44) lib/inspectors/req.js:456 — req.default has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 10, ternaries 3 (4 pts), error handling 1 (2 pts) (nesting depth added 8). Most of this is not in the body itself: 1 of the 44 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 474, 544, 587). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · getClientCert (cognitive 44) · ×1
  • getClientCert (cognitive 44) REDACTED:742 — getClientCert has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (34 pts), boolean chains 7, ternaries 1 (2 pts), error handling 1 (nesting depth added 13). Most of this is not in the body itself: 3 of the 44 points are its own statements and the rest belongs to 7 function literals inside it that branch (lines 750, 793, 827, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · filter (cognitive 44) · ×1
  • filter (cognitive 44) biz/webui/htdocs/src/js/network-modal.js:323 — filter has cognitive complexity 44 (threshold 15). Drivers by points: ternaries 6 (19 pts), if/else 9 (18 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 23). Most of this is not in the body itself: 3 of the 44 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 343, 328). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · exports (cognitive 44) · ×1
  • exports (cognitive 44) lib/inspectors/req.js:456 — exports has cognitive complexity 44 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 10, ternaries 3 (4 pts), error handling 1 (2 pts) (nesting depth added 8). Most of this is not in the body itself: 1 of the 44 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 474, 544, 587). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · render (cognitive 44) · ×1
  • render (cognitive 44) biz/webui/htdocs/src/js/timeline.js:8 — render has cognitive complexity 44 (threshold 15). Drivers by points: if/else 17 (20 pts), ternaries 14 (17 pts), boolean chains 7 (nesting depth added 6). Most of this is not in the body itself: 2 of the 44 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 40, 21, 15). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · render (cognitive 42) · ×1
  • render (cognitive 42) biz/webui/htdocs/src/js/req-detail.js:53 — render has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (16 pts), boolean chains 13, ternaries 12 (13 pts) (nesting depth added 7). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · resolveRuleValue (cognitive 40) · ×1
  • resolveRuleValue (cognitive 40) REDACTED:582 — resolveRuleValue has cognitive complexity 40 (threshold 15). Drivers by points: if/else 7 (18 pts), ternaries 3 (11 pts), boolean chains 8, loops 1 (3 pts) (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · parsePathReplace (cognitive 39) · ×1
  • parsePathReplace (cognitive 39) lib/util/index.js:1016 — parsePathReplace has cognitive complexity 39 (threshold 15). Drivers by points: if/else 13 (26 pts), boolean chains 7, ternaries 3 (6 pts) (nesting depth added 16). Of this number, 26 points are the body's own statements and 13 belong to 2 function literals inside it that branch. 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.
D2 · Cognitive Complexity · render (cognitive 39) · ×1
  • render (cognitive 39) biz/webui/htdocs/src/js/detail.js:194 — render has cognitive complexity 39 (threshold 15). Drivers by points: ternaries 11 (15 pts), if/else 9 (14 pts), boolean chains 10 (nesting depth added 9). Of this number, 23 points are the body's own statements and 16 belong to 3 function items inside it that branch. 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.
D2 · Cognitive Complexity · dns.lookupDNS (cognitive 38) · ×1
  • dns.lookupDNS (cognitive 38) lib/rules/dns.js:57 — dns.lookupDNS has cognitive complexity 38 (threshold 15). Drivers by points: if/else 22 (28 pts), boolean chains 6, ternaries 1 (3 pts), error handling 1 (nesting depth added 8). Most of this is not in the body itself: 6 of the 38 points are its own statements and the rest belongs to 4 function items inside it that branch (handleDns, handleDns::handleCallback, execCallback, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · showCookiesDialog (cognitive 38) · ×1
  • showCookiesDialog (cognitive 38) biz/webui/htdocs/src/js/composer.js:998 — showCookiesDialog has cognitive complexity 38 (threshold 15). Drivers by points: if/else 11 (28 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 20). Most of this is not in the body itself: 2 of the 38 points are its own statements and the rest belongs to one function literal inside it that branches (line 1008). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · parseMetaInfo (cognitive 38) · ×1
  • parseMetaInfo (cognitive 38) lib/service/extract-saz.js:30 — parseMetaInfo has cognitive complexity 38 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 11, ternaries 2 (4 pts) (nesting depth added 8). 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.
D2 · Cognitive Complexity · h2.request (cognitive 37) · ×1
  • h2.request (cognitive 37) lib/https/h2.js:394 — h2.request has cognitive complexity 37 (threshold 15). Drivers by points: if/else 17 (27 pts), boolean chains 8, error handling 1, ternaries 1 (nesting depth added 10). Of this number, 27 points are the body's own statements and 10 belong to 3 function literals inside it that branch. 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.
D2 · Cognitive Complexity · isRegUrl (cognitive 37) · ×1
  • isRegUrl (cognitive 37) REDACTED:144 — isRegUrl has cognitive complexity 37 (threshold 15). Drivers by points: if/else 19 (21 pts), boolean chains 8, ternaries 5 (7 pts), error handling 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · exports (cognitive 37) · ×1
  • exports (cognitive 37) lib/init.js:157 — exports has cognitive complexity 37 (threshold 15). Drivers by points: if/else 18 (21 pts), boolean chains 14, ternaries 1 (2 pts) (nesting depth added 4). Of this number, 32 points are the body's own statements and 5 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · render (cognitive 36) · ×1
  • render (cognitive 36) biz/webui/htdocs/src/js/composer.js:1191 — render has cognitive complexity 36 (threshold 15). Drivers by points: boolean chains 21, ternaries 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.
D2 · Cognitive Complexity · onContextMenu (cognitive 36) · ×1
  • onContextMenu (cognitive 36) biz/webui/htdocs/src/js/list.js:611 — onContextMenu has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 9, ternaries 5 (9 pts), loops 1 (2 pts) (nesting depth added 10). 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.
D2 · Cognitive Complexity · updateBody (cognitive 36) · ×1
  • updateBody (cognitive 36) lib/util/http-mgr.js:357 — updateBody has cognitive complexity 36 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 11, ternaries 2 (6 pts) (nesting depth added 11). Most of this is not in the body itself: 4 of the 36 points are its own statements and the rest belongs to one function literal inside it that branches (line 375). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · list-modal.proto.moveTo (cognitive 35) · ×1
  • list-modal.proto.moveTo (cognitive 35) biz/webui/htdocs/src/js/list-modal.js:172 — list-modal.proto.moveTo has cognitive complexity 35 (threshold 15). Drivers by points: if/else 8 (20 pts), loops 2 (7 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 19). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · exports (cognitive 35) · ×1
  • exports (cognitive 35) lib/inspectors/log.js:26 — exports has cognitive complexity 35 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 10, ternaries 1 (4 pts) (nesting depth added 15). Most of this is not in the body itself: 1 of the 35 points is its own statement and the rest belongs to 3 function items inside it that branch (a function literal at line 32, a function literal at line 56, (anonymous)::_transform). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · data-center.getAppName (cognitive 34) · ×1
  • data-center.getAppName (cognitive 34) biz/webui/htdocs/src/js/data-center.js:1603 — data-center.getAppName has cognitive complexity 34 (threshold 15). Drivers by points: if/else 10 (27 pts), boolean chains 6, match/switch 1 (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.
D2 · Cognitive Complexity · getRulesFromPlugins · ×1
  • getRulesFromPlugins::(anonymous)::(anonymous)::(anonymous)::handleRules (cognitive 34) lib/plugins/index.js:982 — getRulesFromPlugins::(anonymous)::(anonymous)::(anonymous)::handleRules has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (21 pts), boolean chains 9, ternaries 2 (4 pts) (nesting depth added 10). 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.
D2 · Cognitive Complexity · setSettings (cognitive 34) · ×1
  • setSettings (cognitive 34) biz/webui/htdocs/src/js/network-settings.js:241 — setSettings has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 11, ternaries 3 (6 pts) (nesting depth added 6). Of this number, 20 points are the body's own statements and 14 belong to 3 function items inside it that branch. 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.
D2 · Cognitive Complexity · onSave (cognitive 34) · ×1
  • onSave (cognitive 34) biz/webui/htdocs/src/js/editor-dialog.js:272 — onSave has cognitive complexity 34 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 6, ternaries 5 (6 pts), loops 1 (nesting depth added 7). Most of this is not in the body itself: 5 of the 34 points are its own statements and the rest belongs to 5 function literals inside it that branch (lines 287, 346, 279, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · plugin.install (cognitive 33) · ×1
  • plugin.install (cognitive 33) bin/plugin.js:124 — plugin.install has cognitive complexity 33 (threshold 15). Drivers by points: if/else 11 (18 pts), error handling 3 (9 pts), boolean chains 5, ternaries 1 (nesting depth added 13). Most of this is not in the body itself: 3 of the 33 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 146, 194). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · init.default (cognitive 33) · ×1
  • init.default (cognitive 33) lib/init.js:157 — init.default has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 14, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · setResponseFor (cognitive 33) · ×1
  • setResponseFor (cognitive 33) lib/util/index.js:3226 — setResponseFor has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 8, ternaries 1 (4 pts) (nesting depth added 15). Of this number, 30 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · resolveVarValue (cognitive 33) · ×1
  • resolveVarValue (cognitive 33) REDACTED:621 — resolveVarValue has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 15, ternaries 5 (10 pts), if/else 4 (7 pts), match/switch 1 (nesting depth added 8). 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.
D2 · Cognitive Complexity · proxy (cognitive 33) · ×1
  • proxy (cognitive 33) REDACTED:36 — proxy has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 10, ternaries 5 (nesting depth added 4). Most of this is not in the body itself: 11 of the 33 points are its own statements and the rest belongs to 16 function items inside it that branch (createNormalServer, a function literal at line 182, a function literal at line 50, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · util.harToSession (cognitive 32) · ×1
  • util.harToSession (cognitive 32) REDACTED:1337 — util.harToSession has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 16, if/else 11 (13 pts), ternaries 3 (nesting depth added 2). 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.
D2 · Cognitive Complexity · getInitialState (cognitive 32) · ×1
  • getInitialState (cognitive 32) REDACTED:442 — getInitialState has cognitive complexity 32 (threshold 15). Drivers by points: boolean chains 17, if/else 14, ternaries 1. Of this number, 26 points are the body's own statements and 6 belong to 4 function items inside it that branch. 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.
D2 · Cognitive Complexity · createRules (cognitive 32) · ×1
  • createRules (cognitive 32) REDACTED:2772 — createRules has cognitive complexity 32 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 5, ternaries 3 (5 pts) (nesting depth added 9). Most of this is not in the body itself: 15 of the 32 points are its own statements and the rest belongs to one function literal inside it that branches (line 2809). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · tab.html.off (cognitive 31) · ×1
  • tab.html.off (cognitive 31) assets/tab.html:190 — tab.html.off has cognitive complexity 31 (threshold 15). Drivers by points: if/else 17 (30 pts), match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · req.handleParams (cognitive 31) · ×1
  • req.handleParams (cognitive 31) lib/inspectors/req.js:156 — req.handleParams has cognitive complexity 31 (threshold 15). Drivers by points: if/else 34 (115 pts), boolean chains 30, ternaries 4 (9 pts), loops 1 (3 pts) (nesting depth added 88). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function. This shape REPEATS in the file: one other method here (req.handleParams::getChunk) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D2 · Cognitive Complexity · resolveFilterPattern (cognitive 31) · ×1
  • resolveFilterPattern (cognitive 31) REDACTED:1475 — resolveFilterPattern has cognitive complexity 31 (threshold 15). Drivers by points: if/else 15 (22 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 9). 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.
D2 · Cognitive Complexity · setValue (cognitive 31) · ×1
  • setValue (cognitive 31) biz/webui/htdocs/src/js/rules-dialog.js:250 — setValue has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 3 (9 pts), boolean chains 4 (nesting depth added 13). Of this number, 18 points are the body's own statements and 13 belong to 3 function items inside it that branch. 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.
D2 · Cognitive Complexity · exports (cognitive 31) · ×1
  • exports (cognitive 31) lib/plugins/proxy.js:127 — exports has cognitive complexity 31 (threshold 15). Drivers by points: boolean chains 15, if/else 13 (14 pts), ternaries 2 (nesting depth added 1). None of this is in the body itself: all 31 points belong to 12 function items inside it that branch ((anonymous)::request, (anonymous)::connect, (anonymous)::request::createConnection, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · rules-hint.getFocusRuleName (cognitive 30) · ×1
  • rules-hint.getFocusRuleName (cognitive 30) biz/webui/htdocs/src/js/rules-hint.js:913 — rules-hint.getFocusRuleName has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (6 pts), boolean chains 1 (nesting depth added 16). 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.
D2 · Cognitive Complexity · checkFilter (cognitive 30) · ×1
  • checkFilter (cognitive 30) biz/webui/htdocs/src/js/data-center.js:382 — checkFilter has cognitive complexity 30 (threshold 15). Drivers by points: if/else 6 (18 pts), ternaries 2 (8 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 19). 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.
D2 · Cognitive Complexity · getPeerPlugins (cognitive 30) · ×1
  • getPeerPlugins (cognitive 30) lib/util/common.js:316 — getPeerPlugins has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (21 pts), boolean chains 4, ternaries 1 (4 pts), loops 1 (nesting depth added 15). Most of this is not in the body itself: 7 of the 30 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 339, 344, 329). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · readPackages (cognitive 30) · ×1
  • readPackages (cognitive 30) lib/plugins/index.js:349 — readPackages has cognitive complexity 30 (threshold 15). Drivers by points: boolean chains 14, ternaries 3 (9 pts), if/else 6 (7 pts) (nesting depth added 7). Most of this is not in the body itself: 1 of the 30 points is its own statement and the rest belongs to 8 function items inside it that branch (a function literal at line 362, a function literal at line 357, callbackHandler, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · toHttp1 (cognitive 30) · ×1
  • toHttp1 (cognitive 30) lib/https/index.js:1013 — toHttp1 has cognitive complexity 30 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 6, error handling 3 (6 pts), ternaries 3 (6 pts) (nesting depth added 9). Most of this is not in the body itself: 8 of the 30 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 1057, a function literal at line 1059, handleAbort, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · handleHttp (cognitive 30) · ×1
  • handleHttp (cognitive 30) REDACTED:235 — handleHttp has cognitive complexity 30 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 5, ternaries 2 (3 pts), loops 1 (nesting depth added 6). Most of this is not in the body itself: 5 of the 30 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 307, a function literal at line 249, send::(anonymous)::handleResponse, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Storage (cognitive 30) · ×1
  • Storage (cognitive 30) lib/rules/storage.js:61 — Storage has cognitive complexity 30 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 5, error handling 2, ternaries 1 (nesting depth added 5). Most of this is not in the body itself: 7 of the 30 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 81, 148, 163). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · formatFiles (cognitive 30) · ×1
  • formatFiles (cognitive 30) biz/webui/htdocs/src/js/certs-info-dialog.js:126 — formatFiles has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 7, ternaries 2 (5 pts), loops 1 (nesting depth added 9). Of this number, 25 points are the body's own statements and 5 belong to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · storage.proto.moveTo (cognitive 29) · ×1
  • storage.proto.moveTo (cognitive 29) lib/rules/storage.js:424 — storage.proto.moveTo has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 6, loops 2 (5 pts), ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · data-center.handleHashFilterChanged (cognitive 29) · ×1
  • data-center.handleHashFilterChanged (cognitive 29) biz/webui/htdocs/src/js/data-center.js:188 — data-center.handleHashFilterChanged has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 10, loops 1 (2 pts) (nesting depth added 9). 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.
D2 · Cognitive Complexity · socket-mgr.handleConnect (cognitive 29) · ×1
  • socket-mgr.handleConnect (cognitive 29) lib/socket-mgr.js:764 — socket-mgr.handleConnect has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 12, ternaries 1 (nesting depth added 4). Most of this is not in the body itself: 9 of the 29 points are its own statements and the rest belongs to 3 function items inside it that branch (a function literal at line 803, handleTransform, a function literal at line 801). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · onCompose (cognitive 29) · ×1
  • onCompose (cognitive 29) biz/webui/htdocs/src/js/composer.js:527 — onCompose has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (17 pts), ternaries 6 (8 pts), boolean chains 4 (nesting depth added 4). Of this number, 24 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · request (cognitive 29) · ×1
  • request (cognitive 29) lib/util/http-mgr.js:193 — request has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, error handling 1 (4 pts), ternaries 2 (4 pts) (nesting depth added 9). None of this is in the body itself: all 29 points belong to 9 function items inside it that branch (a function literal at line 205, a function literal at line 243, (anonymous)::handleResponse, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · _transform (cognitive 29) · ×1
  • _transform (cognitive 29) lib/util/whistle-transform.js:102 — _transform has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (18 pts), ternaries 3 (8 pts), boolean chains 3 (nesting depth added 13). Of this number, 22 points are the body's own statements and 7 belong to 2 function items inside it that branch. 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.
D2 · Cognitive Complexity · index.getPipe.<returned closure> (cognitive 28) · ×1
  • index.getPipe.<returned closure> (cognitive 28) lib/plugins/index.js:1205 — index.getPipe.<returned closure> has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 9 (nesting depth added 6). Most of this is not in the body itself: 1 of the 28 points is its own statement and the rest belongs to 4 function literals inside it that branch (lines 1210, 1240, 1258, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · util.parseKeyword (cognitive 28) · ×1
  • util.parseKeyword (cognitive 28) REDACTED:1634 — util.parseKeyword has cognitive complexity 28 (threshold 15). Drivers by points: if/else 7 (22 pts), boolean chains 5, loops 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · rules-hint.handleRemoteHints (cognitive 28) · ×1
  • rules-hint.handleRemoteHints (cognitive 28) biz/webui/htdocs/src/js/rules-hint.js:401 — rules-hint.handleRemoteHints has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 11, ternaries 2 (4 pts) (nesting depth added 5). Most of this is not in the body itself: 9 of the 28 points are its own statements and the rest belongs to one function literal inside it that branches (line 423). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · data-server.init (cognitive 28) · ×1
  • data-server.init (cognitive 28) lib/util/data-server.js:401 — data-server.init has cognitive complexity 28 (threshold 15). Drivers by points: if/else 62 (82 pts), boolean chains 68, ternaries 4 (9 pts), loops 5 (7 pts) (nesting depth added 27). 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: one other method here (data-server.init::checkClientIp) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D2 · Cognitive Complexity · proxy.default (cognitive 28) · ×1
  • proxy.default (cognitive 28) lib/plugins/proxy.js:127 — proxy.default has cognitive complexity 28 (threshold 15). Drivers by points: boolean chains 15, if/else 12 (13 pts) (nesting depth added 1). None of this is in the body itself: all 28 points belong to 9 function literals inside it that branch (lines 187, 134, 142, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · resolveTplVar (cognitive 28) · ×1
  • resolveTplVar (cognitive 28) REDACTED:721 — resolveTplVar has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 11, ternaries 3 (5 pts) (nesting depth added 5). None of this is in the body itself: all 28 points belong to 2 function literals inside it that branch (lines 722, 755). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · getValue (cognitive 28) · ×1
  • getValue (cognitive 28) REDACTED:294 — getValue has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 6, error handling 2 (5 pts), ternaries 2 (4 pts) (nesting depth added 8). 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.
D2 · Cognitive Complexity · getPipe (cognitive 28) · ×1
  • getPipe (cognitive 28) lib/plugins/index.js:1202 — getPipe has cognitive complexity 28 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 9 (nesting depth added 6). None of this is in the body itself: all 28 points belong to 6 function items inside it that branch (a function literal at line 1210, (anonymous)::(anonymous)::handleConnect, a function literal at line 1258, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · cli.default (cognitive 27) · ×1
  • cli.default (cognitive 27) bin/ca/cli.js:54 — cli.default has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 10 (nesting depth added 5). Most of this is not in the body itself: 6 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 56). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · util.parseImportData (cognitive 27) · ×1
  • util.parseImportData (cognitive 27) REDACTED:2365 — util.parseImportData has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (11 pts), ternaries 2 (7 pts), boolean chains 6, error handling 1 (3 pts) (nesting depth added 9). Most of this is not in the body itself: 2 of the 27 points are its own statements and the rest belongs to 3 function items inside it that branch (handleItem, a function literal at line 2400, a function literal at line 2410). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · data.emitDataEvents · ×1
  • data.emitDataEvents::handleResBody (cognitive 27) lib/inspectors/data.js:325 — data.emitDataEvents::handleResBody has cognitive complexity 27 (threshold 15). Drivers by points: boolean chains 13, if/else 7 (11 pts), ternaries 2 (3 pts) (nesting depth added 5). 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.
D2 · Cognitive Complexity · createValues (cognitive 27) · ×1
  • createValues (cognitive 27) REDACTED:2838 — createValues has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16 (21 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 6). Most of this is not in the body itself: 12 of the 27 points are its own statements and the rest belongs to one function literal inside it that branches (line 2881). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · addPluginMenus (cognitive 27) · ×1
  • addPluginMenus (cognitive 27) REDACTED:2298 — addPluginMenus has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 8, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 10). 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.
D2 · Cognitive Complexity · handleFrame (cognitive 27) · ×1
  • handleFrame (cognitive 27) lib/socket-mgr.js:232 — handleFrame has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (17 pts), ternaries 2 (6 pts), boolean chains 4 (nesting depth added 10). 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.
D2 · Cognitive Complexity · checkFilterType (cognitive 27) · ×1
  • checkFilterType (cognitive 27) biz/webui/htdocs/src/js/network-modal.js:271 — checkFilterType has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (14 pts), ternaries 3 (9 pts), boolean chains 2, loops 2 (nesting depth added 8). 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.
D2 · Cognitive Complexity · common.readWhistleRc (cognitive 26) · ×1
  • common.readWhistleRc (cognitive 26) lib/util/common.js:1396 — common.readWhistleRc has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 7, ternaries 1 (nesting depth added 8). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 1409). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.notEqual (cognitive 26) · ×1
  • index.notEqual (cognitive 26) lib/service/index.js:101 — index.notEqual has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 12). 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.
D2 · Cognitive Complexity · composer.handleWebSocket (cognitive 26) · ×1
  • composer.handleWebSocket (cognitive 26) REDACTED:177 — composer.handleWebSocket has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (21 pts), boolean chains 4, loops 1 (nesting depth added 9). Most of this is not in the body itself: 6 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 198, 189). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · resolveProps (cognitive 26) · ×1
  • resolveProps (cognitive 26) REDACTED:1125 — resolveProps has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 2 (7 pts), boolean chains 4 (nesting depth added 13). Most of this is not in the body itself: 3 of the 26 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1129, 1143). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · save (cognitive 26) · ×1
  • save (cognitive 26) biz/webui/htdocs/src/js/rules-dialog.js:183 — save has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 3 (nesting depth added 11). Most of this is not in the body itself: 1 of the 26 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 193, 229, 201). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · onFilterKeyDown (cognitive 26) · ×1
  • onFilterKeyDown (cognitive 26) biz/webui/htdocs/src/js/filter-input.js:164 — onFilterKeyDown has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (26 pts) (nesting depth added 9). 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.
D2 · Cognitive Complexity · getPluginNameByReq (cognitive 26) · ×1
  • getPluginNameByReq (cognitive 26) REDACTED:13 — getPluginNameByReq has cognitive complexity 26 (threshold 15). Drivers by points: boolean chains 9, ternaries 6 (9 pts), if/else 8 (nesting depth added 3). Of this number, 17 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · getHintList (cognitive 25) · ×1
  • getHintList (cognitive 25) lib/util/index.js:2554 — getHintList has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 6, ternaries 3 (5 pts) (nesting depth added 7). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 2561). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · addParserApi (cognitive 25) · ×1
  • addParserApi (cognitive 25) REDACTED:334 — addParserApi has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, error handling 4 (8 pts), boolean chains 4 (nesting depth added 4). None of this is in the body itself: all 25 points belong to 8 function items inside it that branch (a function literal at line 377, on, emitDisconnect, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · parseWildcard (cognitive 25) · ×1
  • parseWildcard (cognitive 25) REDACTED:1162 — parseWildcard has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 8, ternaries 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · resolveRules (cognitive 25) · ×1
  • resolveRules (cognitive 25) REDACTED:2239 — resolveRules has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (15 pts), ternaries 3 (6 pts), boolean chains 4 (nesting depth added 8). Most of this is not in the body itself: 11 of the 25 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2260, 2273, 2281). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · render (cognitive 25) · ×1
  • render (cognitive 25) REDACTED:395 — render has cognitive complexity 25 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 9, boolean chains 6 (nesting depth added 3). Most of this is not in the body itself: 5 of the 25 points are its own statements and the rest belongs to one function literal inside it that branches (line 420). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · onClickContextMenu (cognitive 25) · ×1
  • onClickContextMenu (cognitive 25) REDACTED:921 — onClickContextMenu has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 15, if/else 6 (9 pts), match/switch 1 (nesting depth added 3). Of this number, 22 points are the body's own statements and 3 belong to 2 function items inside it that branch. 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.
D2 · Cognitive Complexity · componentDidMount (cognitive 25) · ×1
  • componentDidMount (cognitive 25) biz/webui/htdocs/src/js/list.js:166 — componentDidMount has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (15 pts), ternaries 4 (6 pts), boolean chains 4 (nesting depth added 5). Most of this is not in the body itself: 3 of the 25 points are its own statements and the rest belongs to 13 function items inside it that branch (a function literal at line 170, a function literal at line 194, a function literal at line 243, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · getRawResByPath (cognitive 25) · ×1
  • getRawResByPath (cognitive 25) lib/handlers/file-proxy.js:100 — getRawResByPath has cognitive complexity 25 (threshold 15). Drivers by points: if/else 12 (20 pts), ternaries 2 (3 pts), boolean chains 2 (nesting depth added 9). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 3 function items inside it that branch (response, a function literal at line 151, a function literal at line 143). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · plugin.installPlugins · ×1
  • plugin.installPlugins::callback (cognitive 24) bin/plugin.js:224 — plugin.installPlugins::callback has cognitive complexity 24 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6, error handling 2 (6 pts) (nesting depth added 10). 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.
D2 · Cognitive Complexity · data-server.init · ×1
  • data-server.init::checkClientIp (cognitive 24) lib/util/data-server.js:495 — data-server.init::checkClientIp has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 5, loops 1 (2 pts) (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: one other method here (data-server.init) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D2 · Cognitive Complexity · replaceQueryString (cognitive 24) · ×1
  • replaceQueryString (cognitive 24) lib/util/index.js:1763 — replaceQueryString has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 8, ternaries 1 (2 pts) (nesting depth added 3). Most of this is not in the body itself: 10 of the 24 points are its own statements and the rest belongs to 6 function items inside it that branch (addValue, a function literal at line 1803, parseKey, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · parseQuery (cognitive 24) · ×1
  • parseQuery (cognitive 24) REDACTED:906 — parseQuery has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 5, error handling 2 (4 pts), ternaries 2 (4 pts) (nesting depth added 8). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to one function literal inside it that branches (line 914). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · wrapTunnelWriter (cognitive 24) · ×1
  • wrapTunnelWriter (cognitive 24) REDACTED:901 — wrapTunnelWriter has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 2 (nesting depth added 10). Most of this is not in the body itself: 2 of the 24 points are its own statements and the rest belongs to 9 function items inside it that branch (write, write, write, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · execute (cognitive 24) · ×1
  • execute (cognitive 24) biz/webui/htdocs/src/js/composer.js:779 — execute has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 6, ternaries 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · sendRequest (cognitive 24) · ×1
  • sendRequest (cognitive 24) biz/webui/htdocs/src/js/composer.js:896 — sendRequest has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 11 (nesting depth added 3). Most of this is not in the body itself: 4 of the 24 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 909, 903). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · (anonymous) (cognitive 24) · ×1
  • (anonymous) (cognitive 24) lib/plugins/index.js:157 — (anonymous) has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 6). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 198, 172, 163, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · getHints (cognitive 24) · ×1
  • getHints (cognitive 24) biz/webui/htdocs/src/js/rules-hint.js:195 — getHints has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 6, ternaries 1 (nesting depth added 3). Of this number, 15 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · toMultipart (cognitive 24) · ×1
  • toMultipart (cognitive 24) lib/inspectors/req.js:60 — toMultipart has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (9 pts), error handling 2 (6 pts), boolean chains 5, ternaries 2 (4 pts) (nesting depth added 8). 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.
D2 · Cognitive Complexity · renderKey · ×1
  • renderKey::render (cognitive 24) biz/webui/htdocs/src/js/properties.js:97 — renderKey::render has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 9, if/else 4 (7 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · getPopup (cognitive 24) · ×1
  • getPopup (cognitive 24) biz/webui/htdocs/src/js/context-menu.js:103 — getPopup has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 18, boolean chains 6. Most of this is not in the body itself: 3 of the 24 points are its own statements and the rest belongs to 6 function items inside it that branch (a function literal at line 120, a function literal at line 158, update, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · render (cognitive 24) · ×1
  • render (cognitive 24) biz/webui/htdocs/src/js/menu-item.js:14 — render has cognitive complexity 24 (threshold 15). Drivers by points: ternaries 12, boolean chains 10, if/else 2. Of this number, 14 points are the body's own statements and 10 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — 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.
D2 · Cognitive Complexity · use.getConfig (cognitive 23) · ×1
  • use.getConfig (cognitive 23) bin/use.js:194 — use.getConfig has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 10, ternaries 1 (2 pts) (nesting depth added 2). Of this number, 13 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · index.setResCors (cognitive 23) · ×1
  • index.setResCors (cognitive 23) lib/util/index.js:2935 — index.setResCors has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (17 pts), boolean chains 4, ternaries 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · get-plugins-sync.readPluginModulesSync (cognitive 23) · ×1
  • get-plugins-sync.readPluginModulesSync (cognitive 23) lib/plugins/get-plugins-sync.js:22 — get-plugins-sync.readPluginModulesSync has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (5 pts), error handling 2 (3 pts), boolean chains 1 (nesting depth added 10). Most of this is not in the body itself: 3 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 39, 30, 65). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · data-center.startLoadData · ×1
  • data-center.startLoadData::load (cognitive 23) biz/webui/htdocs/src/js/data-center.js:1060 — data-center.startLoadData::load has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 8, ternaries 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · util.getFilename (cognitive 23) · ×1
  • util.getFilename (cognitive 23) lib/service/util.js:270 — util.getFilename has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14 (23 pts) (nesting depth added 9). 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.
D2 · Cognitive Complexity · ignoreRules (cognitive 23) · ×1
  • ignoreRules (cognitive 23) lib/util/index.js:2093 — ignoreRules has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 5, ternaries 1 (nesting depth added 7). Most of this is not in the body itself: 2 of the 23 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 2100, 2120, 2125). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · checkProxyHost (cognitive 23) · ×1
  • checkProxyHost (cognitive 23) lib/util/index.js:3842 — checkProxyHost has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), ternaries 2 (6 pts), boolean chains 4, loops 1 (2 pts) (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.
D2 · Cognitive Complexity · parseLogs (cognitive 23) · ×1
  • parseLogs (cognitive 23) REDACTED:330 — parseLogs has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (15 pts), ternaries 1 (3 pts), boolean chains 2, error handling 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.
D2 · Cognitive Complexity · handlePatternChange (cognitive 23) · ×1
  • handlePatternChange (cognitive 23) biz/webui/htdocs/src/js/create-rule.js:173 — handlePatternChange has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 9). 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.
D2 · Cognitive Complexity · exports (cognitive 23) · ×1
  • exports (cognitive 23) biz/webui/htdocs/src/js/parse-curl.js:82 — exports has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, ternaries 2 (5 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 6). Most of this is not in the body itself: 1 of the 23 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 92, 130). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · componentDidMount (cognitive 23) · ×1
  • componentDidMount (cognitive 23) biz/webui/htdocs/src/js/network.js:25 — componentDidMount has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (19 pts), boolean chains 4 (nesting depth added 10). None of this is in the body itself: all 23 points belong to 2 function literals inside it that branch (lines 28, 50). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · common.parseLine (cognitive 22) · ×1
  • common.parseLine (cognitive 22) lib/util/common.js:1151 — common.parseLine has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 2 (nesting depth added 11). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · use.default (cognitive 22) · ×1
  • use.default (cognitive 22) bin/use.js:252 — use.default has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, ternaries 3 (5 pts), boolean chains 4 (nesting depth added 2). None of this is in the body itself: all 22 points belong to 6 function literals inside it that branch (lines 266, 278, 253, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · proxy.default (cognitive 22) · ×1
  • proxy.default (cognitive 22) bin/proxy.js:48 — proxy.default has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 7 (nesting depth added 4). Most of this is not in the body itself: 3 of the 22 points are its own statements and the rest belongs to one function literal inside it that branches (line 56). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · componentDidMount (cognitive 22) · ×1
  • componentDidMount (cognitive 22) biz/webui/htdocs/src/js/composer.js:179 — componentDidMount has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 8, ternaries 2 (nesting depth added 2). None of this is in the body itself: all 22 points belong to 9 function items inside it that branch (a function literal at line 257, a function literal at line 194, (anonymous)::updateComposer, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · tunnelProxy · ×1
  • tunnelProxy::(anonymous)::(anonymous)::(anonymous)::emitError (cognitive 22) lib/tunnel.js:828 — tunnelProxy::(anonymous)::(anonymous)::(anonymous)::emitError has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 2 (5 pts), boolean chains 4 (nesting depth added 6). 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.
D2 · Cognitive Complexity · onClickContextMenu (cognitive 22) · ×1
  • onClickContextMenu (cognitive 22) biz/webui/htdocs/src/js/list.js:499 — onClickContextMenu has cognitive complexity 22 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 5, error handling 1 (4 pts), ternaries 2, match/switch 1 (nesting depth added 8). Of this number, 18 points are the body's own statements and 4 belong to one function item inside it that branches. 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.
D2 · Cognitive Complexity · initHeaderRules (cognitive 22) · ×1
  • initHeaderRules (cognitive 22) REDACTED:580 — initHeaderRules has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (14 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 6). Of this number, 15 points are the body's own statements and 7 belong to 2 function literals inside it that branch. 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.
D2 · Cognitive Complexity · handleRequest · ×1
  • handleRequest::getBody (cognitive 22) REDACTED:439 — handleRequest::getBody has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (11 pts), ternaries 2 (6 pts), boolean chains 5 (nesting depth added 8). 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.
D2 · Cognitive Complexity · handleChange (cognitive 22) · ×1
  • handleChange (cognitive 22) biz/webui/htdocs/src/js/response-rule.js:54 — handleChange has cognitive complexity 22 (threshold 15). Drivers by points: if/else 10 (21 pts), boolean chains 1 (nesting depth added 11). Of this number, 19 points are the body's own statements and 3 belong to one function item inside it that branches. To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · exports (cognitive 22) · ×1
  • exports (cognitive 22) lib/plugins/get-plugins-sync.js:89 — exports has cognitive complexity 22 (threshold 15). Drivers by points: boolean chains 13, error handling 2 (3 pts), if/else 3, ternaries 3 (nesting depth added 1). None of this is in the body itself: all 22 points belong to 2 function literals inside it that branch (lines 96, 91). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · updateOptions (cognitive 22) · ×1
  • updateOptions (cognitive 22) biz/webui/htdocs/src/js/custom-select.js:20 — updateOptions has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (15 pts), ternaries 2 (4 pts), boolean chains 3 (nesting depth added 8). Of this number, 19 points are the body's own statements and 3 belong to 2 function literals inside it that branch. 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.
D2 · Cognitive Complexity · render (cognitive 22) · ×1
  • render (cognitive 22) biz/webui/htdocs/src/js/frame-data.js:84 — render has cognitive complexity 22 (threshold 15). Drivers by points: ternaries 5 (15 pts), if/else 4 (5 pts), boolean chains 2 (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.
D2 · Cognitive Complexity · replace-pattern-transform.replacePattern (cognitive 21) · ×1
  • replace-pattern-transform.replacePattern (cognitive 21) lib/util/replace-pattern-transform.js:64 — replace-pattern-transform.replacePattern has cognitive complexity 21 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 4, ternaries 3 (4 pts), error handling 1 (3 pts) (nesting depth added 8). Most of this is not in the body itself: 3 of the 21 points are its own statements and the rest belongs to one function literal inside it that branches (line 67). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · get-plugins-sync.default (cognitive 21) · ×1
  • get-plugins-sync.default (cognitive 21) lib/plugins/get-plugins-sync.js:89 — get-plugins-sync.default has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 12, error handling 2 (3 pts), if/else 3, ternaries 3 (nesting depth added 1). None of this is in the body itself: all 21 points belong to one function literal inside it that branches (line 96). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · project.default (cognitive 21) · ×1
  • project.default (cognitive 21) biz/webui/cgi-bin/rules/project.js:5 — project.default has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 8). 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.
D2 · Cognitive Complexity · util.handleImportData (cognitive 21) · ×1
  • util.handleImportData (cognitive 21) REDACTED:1454 — util.handleImportData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 4 (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.
D2 · Cognitive Complexity · upgrade.upgradeHandler (cognitive 21) · ×1
  • upgrade.upgradeHandler (cognitive 21) REDACTED:77 — upgrade.upgradeHandler has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 10 (nesting depth added 2). Most of this is not in the body itself: 2 of the 21 points are its own statements and the rest belongs to 4 function items inside it that branch (a function literal at line 125, destroy, getBuffer, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · startLoadData (cognitive 21) · ×1
  • startLoadData (cognitive 21) REDACTED:2212 — startLoadData has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 7 (nesting depth added 2). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 7 function items inside it that branch (update, a function literal at line 2266, atBottom, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · getMatcherJson (cognitive 21) · ×1
  • getMatcherJson (cognitive 21) lib/util/index.js:1233 — getMatcherJson has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 5, ternaries 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · getPluginMenu (cognitive 21) · ×1
  • getPluginMenu (cognitive 21) lib/util/index.js:2492 — getPluginMenu has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 3 (9 pts), if/else 3 (6 pts), boolean chains 5, loops 1 (nesting depth added 9). 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.
D2 · Cognitive Complexity · setReqCookies (cognitive 21) · ×1
  • setReqCookies (cognitive 21) lib/util/index.js:3065 — setReqCookies has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (7 pts), ternaries 3 (5 pts) (nesting depth added 4). Most of this is not in the body itself: 7 of the 21 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 3088, 3074, 3098). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · getCookieItem (cognitive 21) · ×1
  • getCookieItem (cognitive 21) lib/util/index.js:3106 — getCookieItem has cognitive complexity 21 (threshold 15). Drivers by points: boolean chains 15, ternaries 2 (4 pts), if/else 2 (nesting depth added 2). 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.
D2 · Cognitive Complexity · loadCustomCerts (cognitive 21) · ×1
  • loadCustomCerts (cognitive 21) lib/https/ca.js:340 — loadCustomCerts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, error handling 3 (4 pts), ternaries 1 (3 pts) (nesting depth added 4). Most of this is not in the body itself: 4 of the 21 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 378, 347). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · componentDidMount · ×1
  • componentDidMount::find (cognitive 21) biz/webui/htdocs/src/js/editor.js:238 — componentDidMount::find has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), ternaries 3 (5 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · exports (cognitive 21) · ×1
  • exports (cognitive 21) biz/webui/cgi-bin/rules/project.js:5 — exports has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 8). 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.
D2 · Cognitive Complexity · common.createPattern (cognitive 20) · ×1
  • common.createPattern (cognitive 20) lib/util/common.js:2199 — common.createPattern has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 7, match/switch 1 (nesting depth added 1). Most of this is not in the body itself: 6 of the 20 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 2219, add). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · index.pluginMgr.getResRules (cognitive 20) · ×1
  • index.pluginMgr.getResRules (cognitive 20) lib/plugins/index.js:1313 — index.pluginMgr.getResRules has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 12, if/else 5 (6 pts), error handling 1 (2 pts) (nesting depth added 2). Of this number, 16 points are the body's own statements and 4 belong to 2 function literals inside it that branch. 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.
D2 · Cognitive Complexity · protocols.setPlugins (cognitive 20) · ×1
  • protocols.setPlugins (cognitive 20) biz/webui/htdocs/src/js/protocols.js:117 — protocols.setPlugins has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8 (19 pts), boolean chains 1 (nesting depth added 11). Most of this is not in the body itself: 1 of the 20 points is its own statement and the rest belongs to one function literal inside it that branches (line 128). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · setContext (cognitive 20) · ×1
  • setContext (cognitive 20) REDACTED:159 — setContext has cognitive complexity 20 (threshold 15). Drivers by points: boolean chains 10, if/else 6 (7 pts), ternaries 2 (3 pts) (nesting depth added 2). 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.
D2 · Cognitive Complexity · getFullUrl (cognitive 20) · ×1
  • getFullUrl (cognitive 20) lib/util/common.js:1248 — getFullUrl has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 3, ternaries 2 (nesting depth added 5). 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.
D2 · Cognitive Complexity · updateTree (cognitive 20) · ×1
  • updateTree (cognitive 20) biz/webui/htdocs/src/js/network-modal.js:941 — updateTree has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 10). 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.
D2 · Cognitive Complexity · cgiHandler (cognitive 20) · ×1
  • cgiHandler (cognitive 20) REDACTED:387 — cgiHandler has cognitive complexity 20 (threshold 15). Drivers by points: ternaries 4 (10 pts), if/else 6 (7 pts), boolean chains 2, error handling 1 (nesting depth added 7). Most of this is not in the body itself: 4 of the 20 points are its own statements and the rest belongs to 2 function items inside it that branch (a function literal at line 406, handleResponse). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · onUrlKeyDown (cognitive 20) · ×1
  • onUrlKeyDown (cognitive 20) biz/webui/htdocs/src/js/url-input.js:196 — onUrlKeyDown has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (18 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.
D2 · Cognitive Complexity · parse-url-safe.default (cognitive 19) · ×1
  • parse-url-safe.default (cognitive 19) lib/util/parse-url-safe.js:145 — parse-url-safe.default has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 7, error handling 1 (nesting depth added 3). 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.
D2 · Cognitive Complexity · util.showUsage (cognitive 19) · ×1
  • util.showUsage (cognitive 19) bin/util.js:74 — util.showUsage has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4, ternaries 3 (nesting depth added 4). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · rules.parseText (cognitive 19) · ×1
  • rules.parseText (cognitive 19) REDACTED:1745 — rules.parseText has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6 (nesting depth added 4). Most of this is not in the body itself: 1 of the 19 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 1749, 1785). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.app.use() (cognitive 19) · ×1
  • index.app.use() (cognitive 19) REDACTED:289 — index.app.use() has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (18 pts), boolean chains 1 (nesting depth added 8). 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.
D2 · Cognitive Complexity · util.getProperty (cognitive 19) · ×1
  • util.getProperty (cognitive 19) REDACTED:628 — util.getProperty has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (15 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 10). 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.
D2 · Cognitive Complexity · util.filterJson (cognitive 19) · ×1
  • util.filterJson (cognitive 19) REDACTED:3087 — util.filterJson has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 7, loops 1 (2 pts) (nesting depth added 3). Of this number, 14 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — 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.
D2 · Cognitive Complexity · list-modal.proto.filter (cognitive 19) · ×1
  • list-modal.proto.filter (cognitive 19) biz/webui/htdocs/src/js/list-modal.js:456 — list-modal.proto.filter has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 11, if/else 6 (8 pts) (nesting depth added 2). Most of this is not in the body itself: 3 of the 19 points are its own statements and the rest belongs to one function literal inside it that branches (line 468). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · init.addErrorEvents (cognitive 19) · ×1
  • init.addErrorEvents (cognitive 19) lib/init.js:9 — init.addErrorEvents has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 5 (nesting depth added 2). None of this is in the body itself: all 19 points belong to 4 function items inside it that branch (abort, countdown, a function literal at line 36, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · proxy.createSocket (cognitive 19) · ×1
  • proxy.createSocket (cognitive 19) lib/plugins/proxy.js:61 — proxy.createSocket has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 7. Of this number, 13 points are the body's own statements and 6 belong to 2 function items inside it that branch. To reduce it, split the body: this score is breadth rather than depth — 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.
D2 · Cognitive Complexity · getPageName (cognitive 19) · ×1
  • getPageName (cognitive 19) REDACTED:324 — getPageName has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 8, boolean chains 1 (nesting depth added 5). 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.
D2 · Cognitive Complexity · replay (cognitive 19) · ×1
  • replay (cognitive 19) REDACTED:3165 — replay has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4, ternaries 2 (nesting depth added 4). Of this number, 15 points are the body's own statements and 4 belong to 3 function items inside it that branch. 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.
D2 · Cognitive Complexity · readStream (cognitive 19) · ×1
  • readStream (cognitive 19) lib/util/common.js:741 — readStream has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 9, if/else 7 (8 pts), error handling 1, ternaries 1 (nesting depth added 1). None of this is in the body itself: all 19 points belong to 8 function items inside it that branch (a function literal at line 778, a function literal at line 746, (anonymous)::getBuffer, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · render (cognitive 19) · ×1
  • render (cognitive 19) biz/webui/htdocs/src/js/plugins.js:937 — render has cognitive complexity 19 (threshold 15). Drivers by points: ternaries 9, if/else 4 (6 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 3). Of this number, 12 points are the body's own statements and 7 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — 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.
D2 · Cognitive Complexity · getProxy · ×1
  • getProxy::resolvePacRule (cognitive 19) REDACTED:192 — getProxy::resolvePacRule has cognitive complexity 19 (threshold 15). Drivers by points: boolean chains 14, if/else 5. 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.
D2 · Cognitive Complexity · handleReq (cognitive 19) · ×1
  • handleReq (cognitive 19) lib/inspectors/req.js:103 — handleReq has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 5). 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.
D2 · Cognitive Complexity · filter · ×1
  • filter::isHide (cognitive 19) biz/webui/htdocs/src/js/frame-modal.js:65 — filter::isHide has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 2 (5 pts), boolean chains 1, loops 1 (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.
D2 · Cognitive Complexity · exports (cognitive 19) · ×1
  • exports (cognitive 19) biz/webui/cgi-bin/download.js:3 — exports has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (4 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · rules.getLines (cognitive 18) · ×1
  • rules.getLines (cognitive 18) REDACTED:410 — rules.getLines has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3 (nesting depth added 6). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 419). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · ca.parseAllCustomCerts (cognitive 18) · ×1
  • ca.parseAllCustomCerts (cognitive 18) lib/https/ca.js:287 — ca.parseAllCustomCerts has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 6 (nesting depth added 6). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 305, 297). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.app.use() (cognitive 18) · ×1
  • index.app.use() (cognitive 18) REDACTED:485 — index.app.use() has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 7, ternaries 1 (3 pts) (nesting depth added 3). 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.
D2 · Cognitive Complexity · add.default (cognitive 18) · ×1
  • add.default (cognitive 18) biz/webui/cgi-bin/rules/add.js:5 — add.default has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 3 (nesting depth added 6). 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.
D2 · Cognitive Complexity · parse-curl.default (cognitive 18) · ×1
  • parse-curl.default (cognitive 18) biz/webui/htdocs/src/js/parse-curl.js:82 — parse-curl.default has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 5, error handling 1 (2 pts), match/switch 1 (nesting depth added 3). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 92, 130). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · list-modal.proto.getActiveObj (cognitive 18) · ×1
  • list-modal.proto.getActiveObj (cognitive 18) biz/webui/htdocs/src/js/list-modal.js:291 — list-modal.proto.getActiveObj has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (17 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.
D2 · Cognitive Complexity · log.default (cognitive 18) · ×1
  • log.default (cognitive 18) lib/inspectors/log.js:26 — log.default has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 10, if/else 5 (8 pts) (nesting depth added 3). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 3 function literals inside it that branch (lines 32, 52, 56). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · res.setCookies (cognitive 18) · ×1
  • res.setCookies (cognitive 18) REDACTED:85 — res.setCookies has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (6 pts), boolean chains 1 (nesting depth added 9). Of this number, 9 points are the body's own statements and 9 belong to 2 function literals inside it that branch. 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.
D2 · Cognitive Complexity · load-plugin.requestFrames (cognitive 18) · ×1
  • load-plugin.requestFrames (cognitive 18) REDACTED:638 — load-plugin.requestFrames has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6, error handling 1 (2 pts) (nesting depth added 2). Most of this is not in the body itself: 4 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 657). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · selectRules (cognitive 18) · ×1
  • selectRules (cognitive 18) REDACTED:3053 — selectRules has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 2, ternaries 1 (nesting depth added 7). Most of this is not in the body itself: 2 of the 18 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 3060, 3076, 3072). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · parseDelQuery (cognitive 18) · ×1
  • parseDelQuery (cognitive 18) lib/util/index.js:2686 — parseDelQuery has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 5). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to one function literal inside it that branches (line 2691). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · resolveResCookiesVar (cognitive 18) · ×1
  • resolveResCookiesVar (cognitive 18) REDACTED:491 — resolveResCookiesVar has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 6, match/switch 1 (2 pts), ternaries 1 (nesting depth added 3). Of this number, 13 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — 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.
D2 · Cognitive Complexity · resolveValue (cognitive 18) · ×1
  • resolveValue (cognitive 18) REDACTED:811 — resolveValue has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 3, ternaries 1 (3 pts) (nesting depth added 5). Of this number, 14 points are the body's own statements and 4 belong to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · clearCache (cognitive 18) · ×1
  • clearCache (cognitive 18) lib/util/data-server.js:147 — clearCache has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 3). Of this number, 14 points are the body's own statements and 4 belong to 3 function items inside it that branch. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · lookupDNS · ×1
  • lookupDNS::handleDns (cognitive 18) lib/rules/dns.js:75 — lookupDNS::handleDns has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (13 pts), ternaries 1 (3 pts), boolean chains 1, error handling 1 (nesting depth added 5). 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.
D2 · Cognitive Complexity · createCgi (cognitive 18) · ×1
  • createCgi (cognitive 18) biz/webui/htdocs/src/js/cgi.js:8 — createCgi has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 4, ternaries 2 (3 pts) (nesting depth added 3). Most of this is not in the body itself: 1 of the 18 points is its own statement and the rest belongs to 4 function items inside it that branch (cgiFn, cgiFn::execCallback, cgiFn::error, …). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · zlib.unzip (cognitive 17) · ×1
  • zlib.unzip (cognitive 17) lib/util/zlib.js:58 — zlib.unzip has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2 (nesting depth added 8). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · common.compareVersion (cognitive 17) · ×1
  • common.compareVersion (cognitive 17) lib/util/common.js:1358 — common.compareVersion has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4 (5 pts), boolean chains 4, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · use.existsPlugin (cognitive 17) · ×1
  • use.existsPlugin (cognitive 17) bin/use.js:38 — use.existsPlugin has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, ternaries 2 (4 pts), loops 1 (nesting depth added 4). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. 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.
D2 · Cognitive Complexity · download.default (cognitive 17) · ×1
  • download.default (cognitive 17) biz/webui/cgi-bin/download.js:3 — download.default has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), error handling 2 (4 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · network-modal.checkItem (cognitive 17) · ×1
  • network-modal.checkItem (cognitive 17) biz/webui/htdocs/src/js/network-modal.js:178 — network-modal.checkItem has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 10, ternaries 2 (4 pts), if/else 1 (2 pts), match/switch 1 (nesting depth added 3). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · socket-mgr.handleWsSend (cognitive 17) · ×1
  • socket-mgr.handleWsSend (cognitive 17) lib/socket-mgr.js:325 — socket-mgr.handleWsSend has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 14, if/else 2, ternaries 1. 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: one other method here (socket-mgr.handleWsReceive) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D2 · Cognitive Complexity · socket-mgr.handleWsReceive (cognitive 17) · ×1
  • socket-mgr.handleWsReceive (cognitive 17) lib/socket-mgr.js:457 — socket-mgr.handleWsReceive has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 14, if/else 2, ternaries 1. 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: one other method here (socket-mgr.handleWsSend) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both 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.
D2 · Cognitive Complexity · socket-mgr.handleUpgrade (cognitive 17) · ×1
  • socket-mgr.handleUpgrade (cognitive 17) lib/socket-mgr.js:685 — socket-mgr.handleUpgrade has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 8 (nesting depth added 2). Most of this is not in the body itself: 5 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 715, 713, 720). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · transformReq (cognitive 17) · ×1
  • transformReq (cognitive 17) lib/util/index.js:2333 — transformReq has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 6 (nesting depth added 3). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 3 function items inside it that branch (a function literal at line 2346, abort, a function literal at line 2381). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · resolveUrlVar (cognitive 17) · ×1
  • resolveUrlVar (cognitive 17) REDACTED:456 — resolveUrlVar has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 7, if/else 5 (6 pts), ternaries 2 (4 pts) (nesting depth added 3). 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.
D2 · Cognitive Complexity · updateItem (cognitive 17) · ×1
  • updateItem (cognitive 17) biz/webui/htdocs/src/js/data-center.js:998 — updateItem has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, ternaries 1 (4 pts) (nesting depth added 6). None of this is in the body itself: all 17 points belong to one function literal inside it that branches (line 999). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · parsePlainText (cognitive 17) · ×1
  • parsePlainText (cognitive 17) lib/util/common.js:1195 — parsePlainText has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 6, ternaries 2 (3 pts) (nesting depth added 2). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 1197, 1221). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · formatHistory (cognitive 17) · ×1
  • formatHistory (cognitive 17) biz/webui/htdocs/src/js/composer.js:428 — formatHistory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 4, ternaries 4 (nesting depth added 1). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 437, 477, 479). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · getRegistryList (cognitive 17) · ×1
  • getRegistryList (cognitive 17) biz/webui/htdocs/src/js/plugins.js:235 — getRegistryList has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4 (nesting depth added 3). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 5 function literals inside it that branch (lines 247, 238, 240, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · index.setClientId (cognitive 16) · ×1
  • index.setClientId (cognitive 16) lib/util/index.js:827 — index.setClientId has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 6 (nesting depth added 5). 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.
D2 · Cognitive Complexity · index.readRuleList · ×1
  • index.readRuleList::execCallback (cognitive 16) lib/util/index.js:1315 — index.readRuleList::execCallback has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, ternaries 1 (2 pts) (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.
D2 · Cognitive Complexity · index.resolveIgnore (cognitive 16) · ×1
  • index.resolveIgnore (cognitive 16) lib/util/index.js:1916 — index.resolveIgnore has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 6 (nesting depth added 1). Most of this is not in the body itself: 3 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1921, 1958). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · add.default (cognitive 16) · ×1
  • add.default (cognitive 16) biz/webui/cgi-bin/values/add.js:5 — add.default has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 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.
D2 · Cognitive Complexity · util.initData (cognitive 16) · ×1
  • util.initData (cognitive 16) REDACTED:1978 — util.initData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, error handling 1 (3 pts) (nesting depth added 5). 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.
D2 · Cognitive Complexity · util.compareVersion (cognitive 16) · ×1
  • util.compareVersion (cognitive 16) REDACTED:2153 — util.compareVersion has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (7 pts), ternaries 4 (5 pts), boolean chains 3, loops 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · protocols.getHelpUrl (cognitive 16) · ×1
  • protocols.getHelpUrl (cognitive 16) biz/webui/htdocs/src/js/protocols.js:201 — protocols.getHelpUrl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (12 pts), boolean chains 4 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — 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.
D2 · Cognitive Complexity · index.resolveWebsocket · ×1
  • index.resolveWebsocket::pipeData (cognitive 16) lib/https/index.js:621 — index.resolveWebsocket::pipeData has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · rules.getDecoder.<returned closure> (cognitive 16) · ×1
  • rules.getDecoder.<returned closure> (cognitive 16) lib/inspectors/rules.js:74 — rules.getDecoder.<returned closure> has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4 (nesting depth added 4). Most of this is not in the body itself: 5 of the 16 points are its own statements and the rest belongs to 2 function items inside it that branch (handleDecode, a function literal at line 86). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · showPluginTab (cognitive 16) · ×1
  • showPluginTab (cognitive 16) REDACTED:2605 — showPluginTab has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 5, loops 1 (2 pts) (nesting depth added 5). 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.
D2 · Cognitive Complexity · getPreviewUrl (cognitive 16) · ×1
  • getPreviewUrl (cognitive 16) REDACTED:2057 — getPreviewUrl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (9 pts), ternaries 3 (6 pts), boolean chains 1 (nesting depth added 6). 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.
D2 · Cognitive Complexity · loadCert (cognitive 16) · ×1
  • loadCert (cognitive 16) lib/plugins/index.js:228 — loadCert has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, boolean chains 5, ternaries 2 (3 pts), error handling 1 (nesting depth added 1). None of this is in the body itself: all 16 points belong to 2 function literals inside it that branch (lines 244, 229). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · handleWsSend · ×1
  • handleWsSend::onData (cognitive 16) lib/socket-mgr.js:379 — handleWsSend::onData has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (7 pts), if/else 4 (5 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · handleWsReceive · ×1
  • handleWsReceive::onData (cognitive 16) lib/socket-mgr.js:509 — handleWsReceive::onData has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 6 (7 pts), if/else 4 (5 pts), boolean chains 4 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · renderHeaderAction (cognitive 16) · ×1
  • renderHeaderAction (cognitive 16) biz/webui/htdocs/src/js/rule-mixin.js:290 — renderHeaderAction has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (9 pts), if/else 5 (6 pts), boolean chains 1 (nesting depth added 5). 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.
D2 · Cognitive Complexity · getRuleList (cognitive 16) · ×1
  • getRuleList (cognitive 16) biz/webui/htdocs/src/js/list-dialog.js:65 — getRuleList has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 7 (nesting depth added 1). Most of this is not in the body itself: 6 of the 16 points are its own statements and the rest belongs to 7 function items inside it that branch (a function literal at line 109, a function literal at line 71, a function literal at line 94, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · getDecoder (cognitive 16) · ×1
  • getDecoder (cognitive 16) lib/inspectors/rules.js:73 — getDecoder has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 4 (nesting depth added 4). None of this is in the body itself: all 16 points belong to 4 function items inside it that branch (a function literal at line 74, (anonymous)::handleDecode, a function literal at line 86, …). The named helpers are already separate functions; the literals' work cannot be called, reviewed or tested from outside this body. To reduce it, move the named helpers out of the body to the enclosing scope and lift each literal's work into a named function there, so each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · Parser (cognitive 16) · ×1
  • Parser (cognitive 16) lib/util/transproto.js:41 — Parser has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 2 (3 pts) (nesting depth added 5). None of this is in the body itself: all 16 points belong to 2 function items inside it that branch (parseChunk, write). Those helpers are already separate functions, so extracting the branching again is not available. To reduce it, move them out of the body to the enclosing scope, where each is measured, reviewed and tested on its own, and reduce whichever one then reads as the largest.
D2 · Cognitive Complexity · exports (cognitive 16) · ×1
  • exports (cognitive 16) biz/webui/cgi-bin/values/add.js:5 — exports has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 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.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D44 · Platform End-of-Life · End-of-life runtime · ×1
  • End-of-life runtime: Node.js 16 REDACTED:78 — REDACTED declares Node.js 16 as this project's engines.node, and Node.js 16, support ended 2023-09-11. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2023-09-11 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
P12 · CI test-gate honesty · Coverage collected but not gated · ×1
  • Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
R1 · Type Safety · Type Safety · ×1
  • Type Safety — 0 typed · 436 plain JS — the untyped files are assets/js/log.js, assets/js/weinre.js, biz/index.js, biz/init.js, biz/webui/cgi-bin/abort.js, biz/webui/cgi-bin/add-rules-values.js (+430 more).
R10 · Code Duplication · Duplication concentrated across 3 sibling directories (27 clone groups) · ×1
  • Duplication concentrated across 3 sibling directories (27 clone groups) biz/webui/htdocs/src/js/is-utf8.js:1 — 27 duplicated blocks under the repository root have copies in at least two of the sibling directories bin, biz, lib — 20 of them are reported below, and 7 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 27 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 27 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 27 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 7 sibling directories (12 clone groups) · ×1
  • Duplication concentrated across 7 sibling directories (12 clone groups) REDACTED:1242 — 12 duplicated blocks under lib/ have copies in at least two of the sibling directories handlers, https, inspectors, plugins, rules, service (+1 more sibling(s) not listed) — 8 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 12 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 12 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 12 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplication concentrated across 2 sibling directories (8 clone groups) · ×1
  • Duplication concentrated across 2 sibling directories (8 clone groups) biz/webui/cgi-bin/rules/export.js:4 — 8 duplicated blocks under biz/webui/cgi-bin/ have copies in at least two of the sibling directories rules, values — 4 of them are reported below, and 4 are counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 8 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 8 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 8 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on.
R10 · Code Duplication · Duplicated block with local edits (113 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (113 matched lines × 2 locations) biz/webui/htdocs/src/js/request-rule.js:51 — biz/webui/htdocs/src/js/request-rule.js:51 · biz/webui/htdocs/src/js/response-rule.js:82 — the two spans are one implementation copied and then locally edited — 693 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (85 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (85 matched lines × 2 locations) biz/webui/htdocs/src/js/console-log.js:108 — biz/webui/htdocs/src/js/console-log.js:108 · biz/webui/htdocs/src/js/server-log.js:47 — the two spans are one implementation copied and then locally edited — 461 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (63 lines × 2 locations) · ×1
  • Duplicated block (63 lines × 2 locations) lib/socket-mgr.js:336 — lib/socket-mgr.js:336 · lib/socket-mgr.js:467 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Wholesale file copy (57 identical lines × 2 files) · ×1
  • Wholesale file copy (57 identical lines × 2 files) biz/webui/htdocs/src/js/is-utf8.js:1 — biz/webui/htdocs/src/js/is-utf8.js:1 · lib/util/is-utf8.js:1 — these 2 files are line-for-line copies of one another — 57 lines are identical, in the same order, in every one of them — so this is one fact about the file set, not a block to extract. An edit made to one file and not the others changes behaviour silently, which is the failure a wholesale copy guarantees. Pick one file as the single source and derive the others from it (re-export it, spread it into the local overrides each variant genuinely needs, or generate the copies at build time) — the few lines that differ between the files are exactly the part each variant should still own. Check first whether the copies are deliberately standalone deliverables (a translation file seeded from its sibling and waiting to be translated); where they are, the duplication is the design, and the honest move is to mark the seeded file as untranslated rather than to let it pass as done.
R10 · Code Duplication · Duplicated block with local edits (52 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (52 matched lines × 2 locations) lib/inspectors/req.js:105 — lib/inspectors/req.js:105 · REDACTED:917 — the two spans are one implementation copied and then locally edited — 333 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (51 lines × 2 locations) · ×1
  • Duplicated block (51 lines × 2 locations) lib/socket-mgr.js:402 — lib/socket-mgr.js:402 · lib/socket-mgr.js:531 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block with local edits (44 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (44 matched lines × 2 locations) biz/webui/htdocs/src/js/export-dialog.js:12 — biz/webui/htdocs/src/js/export-dialog.js:12 · biz/webui/htdocs/src/js/import-dialog.js:43 — the two spans are one implementation copied and then locally edited — 214 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (40 lines × 2 locations) · ×1
  • Duplicated block (40 lines × 2 locations) REDACTED:2953 — REDACTED:2953 · REDACTED:2993 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (36 lines × 2 locations) · ×1
  • Duplicated block (36 lines × 2 locations) biz/webui/htdocs/src/js/frame-composer.js:245 — biz/webui/htdocs/src/js/frame-composer.js:245 · biz/webui/htdocs/src/js/frame-composer.js:286 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (33 lines × 2 locations) · ×1
  • Duplicated block (33 lines × 2 locations) biz/webui/htdocs/src/js/network-modal.js:287 — biz/webui/htdocs/src/js/network-modal.js:287 · lib/util/data-server.js:736 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block with local edits (33 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (33 matched lines × 2 locations) REDACTED:2153 — REDACTED:2153 · lib/util/common.js:1358 — the two spans are one implementation copied and then locally edited — 288 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (31 lines × 2 locations) · ×1
  • Duplicated block (31 lines × 2 locations) REDACTED:1206 — REDACTED:1206 · REDACTED:1241 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (29 lines × 2 locations) · ×1
  • Duplicated block (29 lines × 2 locations) REDACTED:2127 — REDACTED:2127 · REDACTED:2157 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R10 · Code Duplication · Duplicated block (28 lines × 2 locations) · ×1
  • Duplicated block (28 lines × 2 locations) biz/webui/htdocs/src/js/list-modal.js:181 — biz/webui/htdocs/src/js/list-modal.js:181 · lib/rules/storage.js:438 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another.
R10 · Code Duplication · Duplicated block (27 lines × 3 locations) · ×1
  • Duplicated block (27 lines × 3 locations) biz/webui/htdocs/src/js/network-modal.js:516 — biz/webui/htdocs/src/js/network-modal.js:516 · biz/webui/htdocs/src/js/network-modal.js:567 · biz/webui/htdocs/src/js/network-modal.js:595 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
R10 · Code Duplication · Duplicated block with local edits (27 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (27 matched lines × 2 locations) REDACTED:775 — REDACTED:775 · lib/util/index.js:1500 — the two spans are one implementation copied and then locally edited — 139 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (26 lines × 2 locations) · ×1
  • Duplicated block (26 lines × 2 locations) biz/webui/htdocs/src/js/tool-box.js:169 — biz/webui/htdocs/src/js/tool-box.js:169 · biz/webui/htdocs/src/js/tool-box.js:216 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block with local edits (25 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (25 matched lines × 2 locations) biz/webui/cgi-bin/rules/export.js:4 — biz/webui/cgi-bin/rules/export.js:4 · biz/webui/cgi-bin/values/export.js:4 — the two spans are one implementation copied and then locally edited — 168 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block with local edits (23 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (23 matched lines × 2 locations) biz/webui/htdocs/src/js/modal.js:112 — biz/webui/htdocs/src/js/modal.js:112 · biz/webui/htdocs/src/js/modal.js:144 — the two spans are one implementation copied and then locally edited — 100 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (22 lines × 2 locations) · ×1
  • Duplicated block (22 lines × 2 locations) biz/webui/htdocs/src/js/sync-dialog.js:41 — biz/webui/htdocs/src/js/sync-dialog.js:41 · biz/webui/htdocs/src/js/sync-dialog.js:63 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (21 lines × 2 locations) · ×1
  • Duplicated block (21 lines × 2 locations) biz/webui/htdocs/src/js/list-modal.js:493 — biz/webui/htdocs/src/js/list-modal.js:493 · biz/webui/htdocs/src/js/list-modal.js:515 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (20 lines × 2 locations) · ×1
  • Duplicated block (20 lines × 2 locations) REDACTED:2818 — REDACTED:2818 · REDACTED:2890 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
R2 · Cyclomatic Complexity · Complex function extend (cyclomatic 129, cognitive 161) · ×1
  • Complex function extend (cyclomatic 129, cognitive 161) lib/config.js:516 — extend has cyclomatic complexity 129 and cognitive complexity 161; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 102, cognitive 198) · ×1
  • Complex function (anonymous) (cyclomatic 102, cognitive 198) biz/webui/htdocs/src/js/rules-hint.js:552 — (anonymous) has cyclomatic complexity 102 and cognitive complexity 198; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 75, cognitive 137) · ×1
  • Complex function (anonymous) (cyclomatic 75, cognitive 137) REDACTED:1554 — (anonymous) has cyclomatic complexity 75 and cognitive complexity 137; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function render (cyclomatic 75, cognitive 80) · ×1
  • Complex function render (cyclomatic 75, cognitive 80) REDACTED:3918 — render has cyclomatic complexity 75 and cognitive complexity 80; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 71, cognitive 132) · ×1
  • Complex function (anonymous) (cyclomatic 71, cognitive 132) REDACTED:1458 — (anonymous) has cyclomatic complexity 71 and cognitive complexity 132; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function resolveVarValue (cyclomatic 66, cognitive 33) · ×1
  • Complex function resolveVarValue (cyclomatic 66, cognitive 33) REDACTED:621 — resolveVarValue has cyclomatic complexity 66 and cognitive complexity 33; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function resolveRuleList (cyclomatic 65, cognitive 134) · ×1
  • Complex function resolveRuleList (cyclomatic 65, cognitive 134) REDACTED:929 — resolveRuleList has cyclomatic complexity 65 and cognitive complexity 134; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 61, cognitive 57) · ×1
  • Complex function (anonymous) (cyclomatic 61, cognitive 57) lib/config.js:739 — (anonymous) has cyclomatic complexity 61 and cognitive complexity 57; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onClickContextMenu (cyclomatic 61, cognitive 22) · ×1
  • Complex function onClickContextMenu (cyclomatic 61, cognitive 22) REDACTED:921 — onClickContextMenu has cyclomatic complexity 61 and cognitive complexity 22; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 58, cognitive 118) · ×1
  • Complex function (anonymous) (cyclomatic 58, cognitive 118) REDACTED:235 — (anonymous) has cyclomatic complexity 58 and cognitive complexity 118; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseRule (cyclomatic 57, cognitive 75) · ×1
  • Complex function parseRule (cyclomatic 57, cognitive 75) REDACTED:1229 — parseRule has cyclomatic complexity 57 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function matchFilter (cyclomatic 56, cognitive 98) · ×1
  • Complex function matchFilter (cyclomatic 56, cognitive 98) REDACTED:1819 — matchFilter has cyclomatic complexity 56 and cognitive complexity 98; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function render (cyclomatic 56, cognitive 71) · ×1
  • Complex function render (cyclomatic 56, cognitive 71) biz/webui/htdocs/src/js/res-detail.js:63 — render has cyclomatic complexity 56 and cognitive complexity 71; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 55, cognitive 68) · ×1
  • Complex function (anonymous) (cyclomatic 55, cognitive 68) biz/webui/htdocs/src/js/data-center.js:1157 — (anonymous) has cyclomatic complexity 55 and cognitive complexity 68; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function initServers (cyclomatic 55, cognitive 27) · ×1
  • Complex function initServers (cyclomatic 55, cognitive 27) REDACTED:1608 — initServers has cyclomatic complexity 55 and cognitive complexity 27; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function setReqData (cyclomatic 46, cognitive 62) · ×1
  • Complex function setReqData (cyclomatic 46, cognitive 62) biz/webui/htdocs/src/js/data-center.js:1726 — setReqData has cyclomatic complexity 46 and cognitive complexity 62; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function exports (cyclomatic 45, cognitive 93) · ×1
  • Complex function exports (cyclomatic 45, cognitive 93) biz/index.js:31 — exports has cyclomatic complexity 45 and cognitive complexity 93; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function onContextMenu (cyclomatic 45, cognitive 51) · ×1
  • Complex function onContextMenu (cyclomatic 45, cognitive 51) REDACTED:1095 — onContextMenu has cyclomatic complexity 45 and cognitive complexity 51; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function request (cyclomatic 44, cognitive 39) · ×1
  • Complex function request (cyclomatic 44, cognitive 39) REDACTED:424 — request has cyclomatic complexity 44 and cognitive complexity 39; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function checkItem (cyclomatic 44, cognitive 17) · ×1
  • Complex function checkItem (cyclomatic 44, cognitive 17) biz/webui/htdocs/src/js/network-modal.js:178 — checkItem has cyclomatic complexity 44 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 sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 43, cognitive 55) · ×1
  • Complex function (anonymous) (cyclomatic 43, cognitive 55) REDACTED:834 — (anonymous) has cyclomatic complexity 43 and cognitive complexity 55; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getAppName (cyclomatic 43, cognitive 34) · ×1
  • Complex function getAppName (cyclomatic 43, cognitive 34) biz/webui/htdocs/src/js/data-center.js:1603 — getAppName has cyclomatic complexity 43 and cognitive complexity 34; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function render (cyclomatic 42, cognitive 36) · ×1
  • Complex function render (cyclomatic 42, cognitive 36) biz/webui/htdocs/src/js/composer.js:1191 — render has cyclomatic complexity 42 and cognitive complexity 36; 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 — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function retry (cyclomatic 41, cognitive 54) · ×1
  • Complex function retry (cyclomatic 41, cognitive 54) REDACTED:467 — retry has cyclomatic complexity 41 and cognitive complexity 54; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getProxy (cyclomatic 41, cognitive 48) · ×1
  • Complex function getProxy (cyclomatic 41, cognitive 48) REDACTED:126 — getProxy has cyclomatic complexity 41 and cognitive complexity 48; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 37, cognitive 55) · ×1
  • Complex function (anonymous) (cyclomatic 37, cognitive 55) biz/webui/htdocs/src/js/overview.js:147 — (anonymous) has cyclomatic complexity 37 and cognitive complexity 55; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function handleRequest (cyclomatic 37, cognitive 45) · ×1
  • Complex function handleRequest (cyclomatic 37, cognitive 45) REDACTED:345 — handleRequest has cyclomatic complexity 37 and cognitive complexity 45; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function render (cyclomatic 37, cognitive 42) · ×1
  • Complex function render (cyclomatic 37, cognitive 42) biz/webui/htdocs/src/js/req-detail.js:53 — render has cyclomatic complexity 37 and cognitive complexity 42; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 36, cognitive 48) · ×1
  • Complex function (anonymous) (cyclomatic 36, cognitive 48) REDACTED:975 — (anonymous) has cyclomatic complexity 36 and cognitive complexity 48; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 36, cognitive 36) · ×1
  • Complex function (anonymous) (cyclomatic 36, cognitive 36) lib/https/index.js:1184 — (anonymous) has cyclomatic complexity 36 and cognitive complexity 36; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function (anonymous) (cyclomatic 35, cognitive 38) · ×1
  • Complex function (anonymous) (cyclomatic 35, cognitive 38) biz/webui/htdocs/src/js/rules-mode.js:191 — (anonymous) has cyclomatic complexity 35 and cognitive complexity 38; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function getData (cyclomatic 34, cognitive 48) · ×1
  • Complex function getData (cyclomatic 34, cognitive 48) lib/util/data-server.js:886 — getData has cyclomatic complexity 34 and cognitive complexity 48; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function isRegUrl (cyclomatic 31, cognitive 37) · ×1
  • Complex function isRegUrl (cyclomatic 31, cognitive 37) REDACTED:144 — isRegUrl has cyclomatic complexity 31 and cognitive complexity 37; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function parseMetaInfo (cyclomatic 30, cognitive 38) · ×1
  • Complex function parseMetaInfo (cyclomatic 30, cognitive 38) lib/service/extract-saz.js:30 — parseMetaInfo has cyclomatic complexity 30 and cognitive complexity 38; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function formatFilter (cyclomatic 30, cognitive 33) · ×1
  • Complex function formatFilter (cyclomatic 30, cognitive 33) lib/util/data-server.js:413 — formatFilter has cyclomatic complexity 30 and cognitive complexity 33; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function exports (cyclomatic 30, cognitive 32) · ×1
  • Complex function exports (cyclomatic 30, cognitive 32) lib/init.js:157 — exports has cyclomatic complexity 30 and cognitive complexity 32; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function str (cyclomatic 29, cognitive 65) · ×1
  • Complex function str (cyclomatic 29, cognitive 65) assets/js/log.js:66 — str has cyclomatic complexity 29 and cognitive complexity 65; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function componentDidUpdate (cyclomatic 29, cognitive 49) · ×1
  • Complex function componentDidUpdate (cyclomatic 29, cognitive 49) REDACTED:483 — componentDidUpdate has cyclomatic complexity 29 and cognitive complexity 49; 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 — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 4775 lines of code REDACTED:1 — REDACTED has 4775 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/util/index.js · ×1
  • lib/util/index.js: 3643 lines of code lib/util/index.js:1 — lib/util/index.js has 3643 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 3187 lines of code REDACTED:1 — REDACTED has 3187 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 2554 lines of code REDACTED:1 — REDACTED has 2554 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 2375 lines of code REDACTED:1 — REDACTED has 2375 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/data-center.js · ×1
  • biz/webui/htdocs/src/js/data-center.js: 2096 lines of code biz/webui/htdocs/src/js/data-center.js:1 — biz/webui/htdocs/src/js/data-center.js has 2096 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/util/common.js · ×1
  • lib/util/common.js: 2032 lines of code lib/util/common.js:1 — lib/util/common.js has 2032 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1679 lines of code REDACTED:1 — REDACTED has 1679 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/composer.js · ×1
  • biz/webui/htdocs/src/js/composer.js: 1577 lines of code biz/webui/htdocs/src/js/composer.js:1 — biz/webui/htdocs/src/js/composer.js has 1577 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/plugins/index.js · ×1
  • lib/plugins/index.js: 1455 lines of code lib/plugins/index.js:1 — lib/plugins/index.js has 1455 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/https/index.js · ×1
  • lib/https/index.js: 1316 lines of code lib/https/index.js:1 — lib/https/index.js has 1316 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 1284 lines of code REDACTED:1 — REDACTED has 1284 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/config.js · ×1
  • lib/config.js: 1096 lines of code lib/config.js:1 — lib/config.js has 1096 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/plugins.js · ×1
  • biz/webui/htdocs/src/js/plugins.js: 1021 lines of code biz/webui/htdocs/src/js/plugins.js:1 — biz/webui/htdocs/src/js/plugins.js has 1021 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/network-modal.js · ×1
  • biz/webui/htdocs/src/js/network-modal.js: 959 lines of code biz/webui/htdocs/src/js/network-modal.js:1 — biz/webui/htdocs/src/js/network-modal.js has 959 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/rules-hint.js · ×1
  • biz/webui/htdocs/src/js/rules-hint.js: 959 lines of code biz/webui/htdocs/src/js/rules-hint.js:1 — biz/webui/htdocs/src/js/rules-hint.js has 959 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/util/data-server.js · ×1
  • lib/util/data-server.js: 949 lines of code lib/util/data-server.js:1 — lib/util/data-server.js has 949 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/socket-mgr.js · ×1
  • lib/socket-mgr.js: 919 lines of code lib/socket-mgr.js:1 — lib/socket-mgr.js has 919 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/list.js · ×1
  • biz/webui/htdocs/src/js/list.js: 898 lines of code biz/webui/htdocs/src/js/list.js:1 — biz/webui/htdocs/src/js/list.js has 898 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/tunnel.js · ×1
  • lib/tunnel.js: 860 lines of code lib/tunnel.js:1 — lib/tunnel.js has 860 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 806 lines of code REDACTED:1 — REDACTED has 806 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/https/ca.js · ×1
  • lib/https/ca.js: 802 lines of code lib/https/ca.js:1 — lib/https/ca.js has 802 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/rules/util.js · ×1
  • lib/rules/util.js: 672 lines of code lib/rules/util.js:1 — lib/rules/util.js has 672 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/online.js · ×1
  • biz/webui/htdocs/src/js/online.js: 663 lines of code biz/webui/htdocs/src/js/online.js:1 — biz/webui/htdocs/src/js/online.js has 663 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 657 lines of code REDACTED:1 — REDACTED has 657 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 597 lines of code REDACTED:1 — REDACTED has 597 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/inspectors/req.js · ×1
  • lib/inspectors/req.js: 580 lines of code lib/inspectors/req.js:1 — lib/inspectors/req.js has 580 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/editor.js · ×1
  • biz/webui/htdocs/src/js/editor.js: 565 lines of code biz/webui/htdocs/src/js/editor.js:1 — biz/webui/htdocs/src/js/editor.js has 565 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/network-settings.js · ×1
  • biz/webui/htdocs/src/js/network-settings.js: 561 lines of code biz/webui/htdocs/src/js/network-settings.js:1 — biz/webui/htdocs/src/js/network-settings.js has 561 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/editor-dialog.js · ×1
  • biz/webui/htdocs/src/js/editor-dialog.js: 543 lines of code biz/webui/htdocs/src/js/editor-dialog.js:1 — biz/webui/htdocs/src/js/editor-dialog.js has 543 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/list-modal.js · ×1
  • biz/webui/htdocs/src/js/list-modal.js: 541 lines of code biz/webui/htdocs/src/js/list-modal.js:1 — biz/webui/htdocs/src/js/list-modal.js has 541 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/inspectors/data.js · ×1
  • lib/inspectors/data.js: 529 lines of code lib/inspectors/data.js:1 — lib/inspectors/data.js has 529 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · REDACTED · ×1
  • REDACTED: 517 lines of code REDACTED:1 — REDACTED has 517 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/https/h2.js · ×1
  • lib/https/h2.js: 466 lines of code lib/https/h2.js:1 — lib/https/h2.js has 466 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/rules/storage.js · ×1
  • lib/rules/storage.js: 465 lines of code lib/rules/storage.js:1 — lib/rules/storage.js has 465 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/frame-list.js · ×1
  • biz/webui/htdocs/src/js/frame-list.js: 462 lines of code biz/webui/htdocs/src/js/frame-list.js:1 — biz/webui/htdocs/src/js/frame-list.js has 462 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/props-editor.js · ×1
  • biz/webui/htdocs/src/js/props-editor.js: 450 lines of code biz/webui/htdocs/src/js/props-editor.js:1 — biz/webui/htdocs/src/js/props-editor.js has 450 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/service/util.js · ×1
  • lib/service/util.js: 440 lines of code lib/service/util.js:1 — lib/service/util.js has 440 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · lib/util/http-mgr.js · ×1
  • lib/util/http-mgr.js: 439 lines of code lib/util/http-mgr.js:1 — lib/util/http-mgr.js has 439 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · biz/webui/htdocs/src/js/url-input.js · ×1
  • biz/webui/htdocs/src/js/url-input.js: 418 lines of code biz/webui/htdocs/src/js/url-input.js:1 — biz/webui/htdocs/src/js/url-input.js has 418 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R6 · Tooling · No typecheck script · ×1
  • No typecheck script — test ✓ · lint ✓ · typecheck ✗ — read from this repository's REDACTED scripts and corroborated against its CI workflows. A script counts when its name or command matches the step: `test` for the suite, `lint` or `prettier` for linting, `typecheck`/`type-check`/`tsc` for type checking. ✗ therefore means no script or CI step under those names was found, NOT that the step is absent from your pipeline — a task invoked by a runner this check does not read, or named something else entirely, is not seen and is worth confirming before acting on a cross. A ✓ means the wiring is DECLARED — a script or CI step under those names exists. It is not a statement that the step passes, or that it runs at all: nothing here installs a dependency or executes a suite.
R7 · Dead Code · Dead file (~581 LoC) · ×1
  • Dead file (~581 LoC) bin/api.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~45 LoC) · ×1
  • Dead file (~45 LoC) biz/webui/cgi-bin/init.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~38 LoC) · ×1
  • Dead file (~38 LoC) biz/webui/cgi-bin/create-cert.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~31 LoC) · ×1
  • Dead file (~31 LoC) biz/webui/cgi-bin/values/add.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~29 LoC) · ×1
  • Dead file (~29 LoC) biz/webui/cgi-bin/values/export.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~25 LoC) · ×1
  • Dead file (~25 LoC) REDACTED — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~23 LoC) · ×1
  • Dead file (~23 LoC) REDACTED — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~19 LoC) · ×1
  • Dead file (~19 LoC) biz/webui/cgi-bin/rules/value.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~18 LoC) · ×1
  • Dead file (~18 LoC) biz/webui/cgi-bin/rules/unselect2.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~13 LoC) · ×1
  • Dead file (~13 LoC) biz/webui/cgi-bin/custom-frames.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~12 LoC) · ×1
  • Dead file (~12 LoC) biz/webui/cgi-bin/frames.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R7 · Dead Code · Dead file (~10 LoC) · ×1
  • Dead file (~10 LoC) biz/webui/cgi-bin/rules/enabled.js — no import path from any entry point (138 application, 5 tooling, 121 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency 'coveralls' · ×1
  • Unused dependency 'coveralls' — Declared in the root REDACTED but never imported anywhere in that package or its workspace members — 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.
R8 · Dependency Hygiene · Unused dependency 'istanbul' · ×1
  • Unused dependency 'istanbul' — Declared in the root REDACTED but never imported anywhere in that package or its workspace members — 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.
X1 · Async correctness · `async` Promise executor · ×1
  • `async` Promise executor lib/plugins/shared-storage.js:19 — The function passed to `new Promise(…)` is `async`. The constructor ignores what its executor returns, so anything this executor throws — every throw inside an `async` function, including after an `await` — rejects a Promise nobody holds instead of the one being constructed: the outer Promise never settles, whoever awaits it hangs, and the error is reported nowhere. If the body needs `await`, it does not need `new Promise` at all: make the enclosing function `async` and `return` the value (or `throw`) directly. If it wraps a callback API, keep the executor synchronous — call the API and `resolve`/`reject` from its callback — and do the awaiting outside it.
X3 · Exception handling · Swallowed exception (caught, then discarded) · ×1
  • Swallowed exception (caught, then discarded) lib/util/index.js:3802 — `catch (e)` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, or keep only the failure you expect and rethrow the rest (`catch (e) { if (!(e instanceof SyntaxError)) throw e; … }`, or test `e.name`), because a JavaScript catch takes every exception, programming errors included.
Minor — 83 finding(s)
X10 · Duplicated predicate · Duplicated predicate · ×40
  • Duplicated predicate biz/webui/cgi-bin/get-data.js:54 — `!config.notAllowedDisablePlugins && properties.get('disabledAllPlugins')` appears character-identically in 2 files — biz/webui/cgi-bin/get-data.js, biz/webui/cgi-bin/init.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/cgi-bin/get-data.js:55 — `!config.notAllowedDisableRules && properties.get('disabledAllRules')` appears character-identically in 2 files — biz/webui/cgi-bin/get-data.js, biz/webui/cgi-bin/init.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/inspectors/log.js:48 — `!req._customCache && util.disableResStore(_res.headers)` appears character-identically in 2 files — lib/inspectors/log.js, lib/inspectors/weinre.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/htdocs/src/js/data-center.js:1781 — `!requestTime || requestTime > responseTime` appears character-identically in 2 files — biz/webui/htdocs/src/js/data-center.js, biz/webui/htdocs/src/js/timeline.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/inspectors/log.js:47 — `!util.isEnable(req, 'keepAllCSP') && util.disableCSP(_res.headers)` appears character-identically in 2 files — lib/inspectors/log.js, lib/inspectors/weinre.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/htdocs/src/js/is-utf8.js:32 — `(0xe1 <= byte && byte <= 0xec) || byte == 0xee || byte == 0xef` appears character-identically in 2 files — biz/webui/htdocs/src/js/is-utf8.js, lib/util/is-utf8.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:1024 — `(headers && headers['content-encoding']) || headers` appears character-identically in 2 files — REDACTED, lib/util/common.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate assets/js/log.js:229 — `/^\/[\w./-]+$/.test(prefixPath) && prefixPath.length <= 128` appears character-identically in 2 files — assets/js/log.js, assets/js/weinre.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/htdocs/src/js/is-utf8.js:75 — `0x80 <= byte1 && byte1 <= 0x8f && 0x80 <= byte2 && byte2 <= 0xbf && 0x80 <= byte3 && byte3 <= 0xbf` appears character-identically in 2 files — biz/webui/htdocs/src/js/is-utf8.js, lib/util/is-utf8.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/htdocs/src/js/is-utf8.js:40 — `0x80 <= byte1 && byte1 <= 0x9f && 0x80 <= byte2 && byte2 <= 0xbf` appears character-identically in 2 files — biz/webui/htdocs/src/js/is-utf8.js, lib/util/is-utf8.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/htdocs/src/js/is-utf8.js:33 — `0x80 <= byte1 && byte1 <= 0xbf && 0x80 <= byte2 && byte2 <= 0xbf` appears character-identically in 2 files — biz/webui/htdocs/src/js/is-utf8.js, lib/util/is-utf8.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/htdocs/src/js/is-utf8.js:62 — `0x80 <= byte1 && byte1 <= 0xbf && 0x80 <= byte2 && byte2 <= 0xbf && 0x80 <= byte3 && byte3 <= 0xbf` appears character-identically in 2 files — biz/webui/htdocs/src/js/is-utf8.js, lib/util/is-utf8.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/htdocs/src/js/is-utf8.js:49 — `0x90 <= byte1 && byte1 <= 0xbf && 0x80 <= byte2 && byte2 <= 0xbf && 0x80 <= byte3 && byte3 <= 0xbf` appears character-identically in 2 files — biz/webui/htdocs/src/js/is-utf8.js, lib/util/is-utf8.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/htdocs/src/js/is-utf8.js:26 — `0xa0 <= byte1 && byte1 <= 0xbf && 0x80 <= byte2 && byte2 <= 0xbf` appears character-identically in 2 files — biz/webui/htdocs/src/js/is-utf8.js, lib/util/is-utf8.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/htdocs/src/js/frame-modal.js:119 — `activeItem && list.indexOf(activeItem) === -1` appears character-identically in 2 files — biz/webui/htdocs/src/js/frame-modal.js, biz/webui/htdocs/src/js/network-modal.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/htdocs/src/js/is-utf8.js:8 — `byte == 0x09 || byte == 0x0a || byte == 0x0d || (0x20 <= byte && byte <= 0x7f)` appears character-identically in 2 files — biz/webui/htdocs/src/js/is-utf8.js, lib/util/is-utf8.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/util/common.js:1762 — `c === 'EPROTO' || c === 'ERR_SSL_BAD_ECPOINT' || c === 'ERR_SSL_VERSION_OR_CIPHER_MISMATCH' || String(e.message).indexOf('disconnected befor…` appears character-identically in 2 files — lib/util/common.js, lib/util/index.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/tunnel.js:84 — `clientInfo[1] || util.getClientPort(req)` appears character-identically in 2 files — lib/tunnel.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/init.js:168 — `clientInfo[2] || util.getRemoteAddr(req)` appears character-identically in 3 files — lib/init.js, lib/tunnel.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/init.js:169 — `clientInfo[3] || util.getRemotePort(req)` appears character-identically in 3 files — lib/init.js, lib/tunnel.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/plugins/get-plugins-sync.js:132 — `conf.noOption || conf.notOption || conf.disableOption|| conf.disabledOption` appears character-identically in 2 files — lib/plugins/get-plugins-sync.js, lib/plugins/index.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate lib/inspectors/req.js:488 — `data.body && typeof data.body !== 'string'` appears character-identically in 2 files — lib/inspectors/req.js, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/cgi-bin/create-cert.js:10 — `domain && typeof domain === 'string' && domain.trim()` appears character-identically in 2 files — biz/webui/cgi-bin/create-cert.js, biz/webui/cgi-bin/get-cert.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate REDACTED:177 — `e.target.nodeName != 'INPUT' && preventBlur(e)` appears character-identically in 2 files — REDACTED, REDACTED. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate biz/webui/cgi-bin/rules/export.js:25 — `filename && typeof filename === 'string'` appears character-identically in 2 files — biz/webui/cgi-bin/rules/export.js, biz/webui/cgi-bin/values/export.js. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • + 15 more in this group — see findings.md.
D12 · Dependency Hygiene · Deprecated · ×20
  • Deprecated: browserslist REDACTED:2038 — browserslist 0.4.0 is resolved in REDACTED and is marked deprecated by its publisher: "Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: fsevents REDACTED:3449 — fsevents 1.2.13 is resolved in REDACTED and is marked deprecated by its publisher: "Upgrade to fsevents v2 to mitigate potential security issues". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: circular-json REDACTED:3469 — circular-json 0.3.3 is resolved in REDACTED and is marked deprecated by its publisher: "CircularJSON is in maintenance only, flatted is its successor.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: core-js REDACTED:3874 — core-js 2.6.12 is resolved in REDACTED and is marked deprecated by its publisher: "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: css-list REDACTED:3957 — css-list 0.1.3 is resolved in REDACTED and is marked deprecated by its publisher: "Deprecated.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: core-js REDACTED:5378 — core-js 1.2.7 is resolved in REDACTED and is marked deprecated by its publisher: "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: flatten REDACTED:5522 — flatten 0.0.1 is resolved in REDACTED and is marked deprecated by its publisher: "flatten is deprecated in favor of utility frameworks such as lodash.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:5853 — glob 7.2.3 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: har-validator REDACTED:6014 — har-validator 5.1.5 is resolved in REDACTED and is marked deprecated by its publisher: "this library is no longer supported". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: inflight REDACTED:6425 — inflight 1.0.6 is resolved in REDACTED and is marked deprecated by its publisher: "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: glob REDACTED:7264 — glob 5.0.15 is resolved in REDACTED and is marked deprecated by its publisher: "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: flatten REDACTED:10017 — flatten 1.0.3 is resolved in REDACTED and is marked deprecated by its publisher: "flatten is deprecated in favor of utility frameworks such as lodash.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: postcss-single-charset REDACTED:10025 — postcss-single-charset 0.3.0 is resolved in REDACTED and is marked deprecated by its publisher: "Package no longer supported. Contact support@npmjs.com for more info.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: querystring REDACTED:10388 — querystring 0.2.0 is resolved in REDACTED and is marked deprecated by its publisher: "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: resolve-url REDACTED:11237 — resolve-url 0.2.1 is resolved in REDACTED and is marked deprecated by its publisher: "https://github.com/lydell/resolve-url#deprecated". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: rimraf REDACTED:11276 — rimraf 2.6.3 is resolved in REDACTED and is marked deprecated by its publisher: "Rimraf versions prior to v4 are no longer supported". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: source-map-resolve REDACTED:12108 — source-map-resolve 0.5.3 is resolved in REDACTED and is marked deprecated by its publisher: "See https://github.com/lydell/source-map-resolve#deprecated". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: source-map-url REDACTED:12133 — source-map-url 0.4.1 is resolved in REDACTED and is marked deprecated by its publisher: "See https://github.com/lydell/source-map-url#deprecated". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: urix REDACTED:13284 — urix 0.1.0 is resolved in REDACTED and is marked deprecated by its publisher: "Please see https://github.com/lydell/urix#deprecated". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
  • Deprecated: uuid REDACTED:13385 — uuid 3.4.0 is resolved in REDACTED and is marked deprecated by its publisher: "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).". This repository does not declare it — a direct dependency pulls it in, so the move is to upgrade or replace that dependency.
X6 · Hand-rolled structured-format parsing · Hand-rolled JSON/XML parsing via regex · ×4
  • Hand-rolled JSON/XML parsing via regex biz/webui/htdocs/src/js/history-data.js:252 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex biz/webui/htdocs/src/js/list.js:886 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex biz/webui/htdocs/src/js/properties.js:260 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
  • Hand-rolled JSON/XML parsing via regex REDACTED:361 — A regex whose pattern encodes JSON/XML syntax is parsing a structured format by hand — malformed or differently-typed content (e.g. `"amount": "5"` as a string) silently mis-parses instead of failing validation. This JavaScript/TypeScript code already uses a real parser in the same package; use it here too.
D12 · Dependency Hygiene · Outdated (npm) · ×2
  • Outdated (npm): lru-cache REDACTED:51 — lru-cache is pinned at 4.1.5; registry.npmjs.org publishes 11.5.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): mime REDACTED:52 — mime is pinned at 1.6.0; registry.npmjs.org publishes 4.1.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
P2 · Observability · Console output used as the logging channel · ×2
  • Console output used as the logging channel lib/util/data-server.js:931 — `lib/util/data-server.js` reports through `console.*` at line 931 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
  • Console output used as the logging channel REDACTED:107 — `REDACTED` reports through `console.*` at line 107 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline.
C2 · Access Controls · No named authorization policies · ×1
  • No named authorization policies REDACTED:147 — Authorization IS enforced here (by route guards, auth middleware or checks that refuse a caller) — this is NOT a claim that endpoints are unprotected. What's missing is a NAMED rule set: who may do what is encoded inline where it is checked, so the rules can't be listed, reviewed or tested apart from the code that applies them. Recommendation, not a defect.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found REDACTED:30 — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`. ADRs are expected here because `REDACTED` makes this repository a deployable product (line 30).
D21 · Naming Consistency · `getDataURL` spells `URL` where 64 names in the project spell it `Url` · ×1
  • `getDataURL` spells `URL` where 64 names in the project spell it `Url` biz/webui/htdocs/src/js/qrcode.js:8 — 64 of 66 names in project whistle spell the token `Url` (64 of 66; unit: names in project whistle containing `Url`). Peers: api.createUrl (bin/api.js:87); data-center.checkUrl (biz/webui/htdocs/src/js/data-center.js:1835); matched-rule.getRealUrl (biz/webui/htdocs/src/js/matched-rule.js:95); matched-rule.getRealUrl(realUrl) (biz/webui/htdocs/src/js/matched-rule.js:95); network-modal.checkUrl (biz/webui/htdocs/src/js/network-modal.js:134). Rename to `getDataUrl`. [rule N6]
D21 · Naming Consistency · `notRootCa` spells `Ca` where 12 names in the project spell it `CA` · ×1
  • `notRootCa` spells `Ca` where 12 names in the project spell it `CA` lib/https/ca.js:61 — 12 of 13 names in project whistle spell the token `CA` (12 of 13; unit: names in project whistle containing `CA`). Peers: api.getRootCA (bin/api.js:104); index.getCAConfig (bin/ca/index.js:42); https-settings.getCAType (REDACTED:12); index.getCAType (REDACTED:430); util.getCAHash (REDACTED:429). Rename to `notRootCA`. [rule N6]
D21 · Naming Consistency · `getLocalhostIP` spells `IP` where 19 names in the project spell it `Ip` · ×1
  • `getLocalhostIP` spells `IP` where 19 names in the project spell it `Ip` lib/util/index.js:3982 — 19 of 20 names in project whistle spell the token `Ip` (19 of 20; unit: names in project whistle containing `Ip`). Peers: util.getIpList (bin/util.js:34); util.getServerIp (REDACTED:654); index.handleWebsocket(clientIp) (lib/https/index.js:43); index.getTunnelData(clientIp) (lib/https/index.js:906); index.getTunnelHeaders(clientIp) (lib/https/index.js:1121). Rename to `getLocalhostIp`. [rule N6]
D21 · Naming Consistency · `FindProxyForURL` spells `URL` where 64 names in the project spell it `Url` · ×1
  • `FindProxyForURL` spells `URL` where 64 names in the project spell it `Url` test/plugins/whistle.test/assets/files/pac.js:1 — 64 of 66 names in project whistle spell the token `Url` (64 of 66; unit: names in project whistle containing `Url`). Peers: api.createUrl (bin/api.js:87); data-center.checkUrl (biz/webui/htdocs/src/js/data-center.js:1835); matched-rule.getRealUrl (biz/webui/htdocs/src/js/matched-rule.js:95); matched-rule.getRealUrl(realUrl) (biz/webui/htdocs/src/js/matched-rule.js:95); network-modal.checkUrl (biz/webui/htdocs/src/js/network-modal.js:134). Rename to `FindProxyForUrl`. [rule N6]
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` 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.
P1 · CI/CD gates · CI test execution not evidenced · ×1
  • CI test execution not evidenced — A CI pipeline exists but no test-runner invocation (your stack's test command, or a test job) was found — changes may merge without the suite running.
P1 · CI/CD gates · CI build step not evidenced · ×1
  • CI build step not evidenced — A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.
P3 · Security & performance tooling · No SAST · ×1
  • No SAST — No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 1 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
P3 · Security & performance tooling · No dependency-update automation · ×1
  • No dependency-update automation REDACTED:39 — `REDACTED` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
X5 · Nullable reference types · Strict null checking is not enabled everywhere the repository type-checks · ×1
  • Strict null checking is not enabled everywhere the repository type-checks — This repository commits no tsconfig, so whatever type-checks it uses tsc's own defaults, in which `strict` and `strictNullChecks` are OFF: `string` admits `null` and `undefined`, and a value that is null is compiled through to the property access that throws. If the build passes `--strict` on a command line instead, put it in a committed tsconfig — this check reads configuration, and configuration is all it can read.
X7 · Silent fallback defaults · Silent fallback default in catch · ×1
  • Silent fallback default in catch lib/util/parse-url-safe.js:75 — `encode` swallows every exception into `return ''` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the handler or in the docstring, and the row stops firing.
Minor — 6 finding(s)
D12 · Dependency Hygiene · Outdated (npm) · ×6
  • Outdated (npm): body-parser — body-parser is pinned at 1.20.9; registry.npmjs.org publishes 2.4.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): colors — colors is pinned at 1.1.2; registry.npmjs.org publishes 1.4.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): express — express is pinned at 4.22.3; registry.npmjs.org publishes 5.3.0 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): iconv-lite — iconv-lite is pinned at 0.4.24; registry.npmjs.org publishes 0.7.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): node-forge — node-forge is pinned at 1.4.2; registry.npmjs.org publishes 1.4.3 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.
  • Outdated (npm): xml2js — xml2js is pinned at 0.5.0; registry.npmjs.org publishes 0.6.2 as the latest release. Upgrading is a judgement call — read that package's changelog for what changed between the two — but a direct production dependency several releases behind is where security and compatibility debt accumulates silently.

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-99d2478c0420419bbe8e181cc19bde06/history.json --exit-code 0 --source .2artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-99d2478c0420419bbe8e181cc19bde06/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude biz/webui/htdocs/src/js/components --exclude test/plugins/whistle.test/assets/values .59artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .34artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 2 file(s) — `bin/ca/index.d.ts`, `index.d.ts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** .0artifacts/raw/trivy-fs.json

Run 01a1dd8d-2e1d-77cf-a523-cff96d3a11b4 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md