Public report — dalfox, published 30 Sep 2026.
Concrete security findings (which rule fired, in which file, on which line; CVE IDs, secret matches,
dependency versions) are REDACTED in this version; ask the repo owner for the full report.
Public
Codebase surveyMeasured under the Code Assurance Index · rubric rubric-2026.09.18 (frozen) · verify this surveyFiledcd_98e647ff2e824685b059946236a0d3d5
Filed 30 September 2026, 03:34 UTC
Public
Large · 113,707 LoC · rebuild ~1.2 person-years · weakest lens: Maturity (65%)
Findings by grade
92 critical394 serious23 minor43 could not be resolved — could be critical — see Limitations
This survey was produced by
Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
30 September 2026, 03:26 UTC
A measurement, not a certificate. The Code Assurance Index does not certify,
approve or guarantee this codebase; it records a reproducible number and the evidence it was computed from. The
standard is authored by Canine Development, who also build Watchdog — its only implementation today. That is said
here so the number is checked rather than believed.
Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸
492findings with an exact file:lineof 509 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
38/120dimensions across the health lenses113707 LoC — wide & deep
Band capped at Adequate: the weakest category (Code quality, 49%) reads Weak — the cover never out-promises the category table.
The system holds an adequate standing with a health score of 72%, representing a large, valuable asset that is currently carrying real operational risk. With over 113,000 lines of production code and a rebuild cost of approximately €180,000, the business has significant capital tied up in this platform. While the architecture is robust and performance is excellent, the overall maturity is weak, creating a fragile foundation for future growth and stability.
The most critical issue is a velocity tax on every change. Code quality signals indicate that modifications in weaker areas cost 5–10% more effort than in clean code. This inefficiency compounds as the codebase grows, meaning the team pays a hidden premium in time and cost for every feature delivered. This drag on delivery speed is the primary threat to agility and operational efficiency.
A secondary risk lies in the system’s maturity and decision-making transparency. The maturity score of 65% suggests that new teams may struggle to understand the system’s history and intent. Without clear records of why decisions were made, the organization faces higher risks of repeating past mistakes, introducing defects, or failing to onboard talent quickly. This lack of institutional knowledge increases the cost of change and reduces reliability.
The system’s genuine strength is its architectural integrity and performance. The architecture score of 98% and perfect performance rating indicate that the core structure is sound and capable of handling load. This provides a stable base upon which to address the maturity and quality issues. The high confidence in this assessment means these findings are reliable and actionable.
Focus first on recording significant decisions in a centralized, discoverable format. This single action pays for itself within two months by reducing the annual drag on engineering capacity. It is the highest-leverage move to protect the investment and improve team velocity. Until this is done, other improvements will yield diminishing returns due to the underlying inefficiencies.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
D22 · Inconsistent return type for validation methods. `Config.normalize_and_validate` returns `String` (likely an error message or empty string), while `ScanConfig.normalize_and_validate` also returns `String`. However, standard Rust API conventions for validation usually return `Result<(), Error>` or `Result<Self, Error>`. Returning a `String` for success/failure is ambiguous and inconsistent with idiomatic Rust error handling, especially when other parts of the API (like `parse_target`) return `Result`. Furthermore, having validation logic in both the parent and child config types suggests duplication of intent.
D22 · Naming inconsistency in reflection checking functions. `check_reflection_with_response` and `check_reflection_with_response_tracked` differ only by the 'tracked' suffix (likely adding concurrency tracking), but `check_reflection_with_hpp_url` uses a different pattern (`with_hpp_url`) instead of `with_response` or `with_client`. This makes it unclear if `hpp_url` is a variant of response checking or a distinct operation. The naming convention is not uniform across similar operations.
D22 · Inconsistent naming and return types for DOM verification. `check_dom_verification` and `check_dom_verification_with_client` return `(bool, Option<String>)`, while `check_dom_verification_with_client_outcome` returns `DomVerifyOutcome`. The 'outcome' suffix is inconsistent with the other 'with_client' variants. Additionally, having three functions for essentially the same operation with different return types (primitive tuple vs. struct) is confusing.
D22 · Inconsistent naming pattern for light verification. The functions are named `verify_dom_xss_light` and `verify_dom_xss_light_with_client`. In other modules (like `check_reflection`), the pattern is `check_..._with_response` vs `check_..._with_response_tracked`. Here, the base function doesn't specify the client source, implying it might use a global or default client, while the `_with_client` variant is explicit. This is a minor inconsistency in naming philosophy compared to other modules.
D22 · Inconsistent method naming for remote resource initialization. There are `init_remote_payloads` and `init_remote_wordlists` (no options), and `init_remote_payloads_with` and `init_remote_wordlists_with` (with options). The 'with' suffix is used for the options variant, but the base methods don't have a clear counterpart like `init_remote_payloads_default`. More importantly, `init_remote_payloads` and `init_remote_wordlists` are separate methods, whereas `init_remote_resources` in `utils` combines them. This duplication of intent (initializing remote resources) across different modules (`remote` vs `utils`) is confusing.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
1.1× (at 72% quality) — the last 20% of quality is most of the work
Size & shape
Large · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~1.2 person-years of build effort (about ~€180,000 to rebuild). Its weakest lens is Maturity at 65% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 1.1× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 49–294.2 engineer-days every year, paid as drag on the ~429,496 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 5–10% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 105,903 line(s) changed over a 90-day window ⇒ ~429,496/year · D1/D2/D4/D6 code quality: averaging 6.2/10 ⇒ a 5–10% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Value concentrated against a weak lens · Medium · Value at risk
This is a Large asset (~1.2 person-years to rebuild), and its weakest lens is Maturity at 65%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Maturity first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form). The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 6.2/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 5–10% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4/D6 code quality: averaging 6.2/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
Architecture — module dependency matrix
Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
125 modules, 238 dependencies. 1 dependency cycle across 9 modules, marked above the diagonal.
Showing the 40 most-connected modules; 85 more are not drawn.
Module dependency matrix. The row depends on the column; the number is how many type pairs create the dependency. A cell above the diagonal is part of a dependency cycle.
parameter_analysis.mining.probe_body uses parameter_analysis. Changing parameter_analysis can break parameter_analysis.mining.probe_body, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
20→10 parameter_analysis.mining.probe_body depends on cmd.scan.args✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_body → type in cmd.scan.args) reference.
parameter_analysis.mining.probe_dictionary uses utils.shimmer. Changing utils.shimmer can break parameter_analysis.mining.probe_dictionary, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
21→4 parameter_analysis.mining.probe_dictionary depends on target_parser✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_dictionary → type in target_parser) reference.
parameter_analysis.mining.probe_dictionary uses target_parser. Changing target_parser can break parameter_analysis.mining.probe_dictionary, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
21→5 parameter_analysis.mining.probe_dictionary depends on parameter_analysis✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_dictionary → type in parameter_analysis) reference.
parameter_analysis.mining.probe_dictionary uses parameter_analysis. Changing parameter_analysis can break parameter_analysis.mining.probe_dictionary, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
21→10 parameter_analysis.mining.probe_dictionary depends on cmd.scan.args✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_dictionary → type in cmd.scan.args) reference.
parameter_analysis.mining.probe_dictionary uses cmd.scan.args. Changing cmd.scan.args can break parameter_analysis.mining.probe_dictionary, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
22→1 parameter_analysis.mining.probe_graphql depends on utils.shimmer✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_graphql → type in utils.shimmer) reference.
parameter_analysis.mining.probe_graphql uses parameter_analysis. Changing parameter_analysis can break parameter_analysis.mining.probe_graphql, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
22→10 parameter_analysis.mining.probe_graphql depends on cmd.scan.args✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_graphql → type in cmd.scan.args) reference.
parameter_analysis.mining.probe_json uses parameter_analysis. Changing parameter_analysis can break parameter_analysis.mining.probe_json, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
23→10 parameter_analysis.mining.probe_json depends on cmd.scan.args✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_json → type in cmd.scan.args) reference.
parameter_analysis.mining.probe_multipart uses utils.shimmer. Changing utils.shimmer can break parameter_analysis.mining.probe_multipart, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→4 parameter_analysis.mining.probe_multipart depends on target_parser✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_multipart → type in target_parser) reference.
parameter_analysis.mining.probe_multipart uses target_parser. Changing target_parser can break parameter_analysis.mining.probe_multipart, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→5 parameter_analysis.mining.probe_multipart depends on parameter_analysis✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_multipart → type in parameter_analysis) reference.
parameter_analysis.mining.probe_multipart uses parameter_analysis. Changing parameter_analysis can break parameter_analysis.mining.probe_multipart, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
24→10 parameter_analysis.mining.probe_multipart depends on cmd.scan.args✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_multipart → type in cmd.scan.args) reference.
parameter_analysis.mining.probe_multipart uses cmd.scan.args. Changing cmd.scan.args can break parameter_analysis.mining.probe_multipart, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
25→1 parameter_analysis.mining.probe_query depends on utils.shimmer✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_query → type in utils.shimmer) reference.
parameter_analysis.mining.probe_query uses parameter_analysis. Changing parameter_analysis can break parameter_analysis.mining.probe_query, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
25→10 parameter_analysis.mining.probe_query depends on cmd.scan.args✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_query → type in cmd.scan.args) reference.
parameter_analysis.mining.probe_response_id uses utils.shimmer. Changing utils.shimmer can break parameter_analysis.mining.probe_response_id, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→4 parameter_analysis.mining.probe_response_id depends on target_parser✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_response_id → type in target_parser) reference.
parameter_analysis.mining.probe_response_id uses target_parser. Changing target_parser can break parameter_analysis.mining.probe_response_id, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→5 parameter_analysis.mining.probe_response_id depends on parameter_analysis✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_response_id → type in parameter_analysis) reference.
parameter_analysis.mining.probe_response_id uses parameter_analysis. Changing parameter_analysis can break parameter_analysis.mining.probe_response_id, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
26→10 parameter_analysis.mining.probe_response_id depends on cmd.scan.args✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_response_id → type in cmd.scan.args) reference.
parameter_analysis.mining.probe_response_id uses cmd.scan.args. Changing cmd.scan.args can break parameter_analysis.mining.probe_response_id, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→1 parameter_analysis.mining.probe_xml depends on utils.shimmer✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_xml → type in utils.shimmer) reference.
parameter_analysis.mining.probe_xml uses parameter_analysis. Changing parameter_analysis can break parameter_analysis.mining.probe_xml, not the reverse.
Position
Below the diagonal — points down the layering, which is what you want.
27→10 parameter_analysis.mining.probe_xml depends on cmd.scan.args✕
Type pairs
1 distinct (type in parameter_analysis.mining.probe_xml → type in cmd.scan.args) reference.
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 category
Findings
Severity
A03:2021 — Injection
88
High / Critical
A05:2021 — Security Misconfiguration
3
Medium
Roadmap
First, establish a centralized architecture decision record system to capture key design choices and their consequences, ensuring all documentation remains discoverable and consistent. Next, address the critical gaps in code documentation by adding a testing section to the root README and significantly improving the clarity and coverage of existing subdirectory guides. Finally, reduce cognitive complexity in the core modules, starting with mod.rs, check_reflection.rs, and ast_integration.rs, to improve maintainability and reduce technical debt.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
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 — 92
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 — 394
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 — 23
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 43
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
Watchdog 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. 34 of 38 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three 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; ◐ Advisory — an LLM prose judgement. 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; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 38 dimensions across the health lenses
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
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, 492 of 509 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.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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.
D4 Code Duplication — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it 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. The 92 duplicated block group(s) on this row were found in the languages this pass could tokenize, and they do NOT cover all of this repository's production source: .rs (113,707 lines, 94% of production source) went unread, because no language model this pass could load exposed a clone-unit token stream for those file kinds. Duplication in that source is UNMEASURED — its absence from the count above is a gap in this analyzer's language coverage, not a finding that the code is free of duplication.
D5 Coupling — not measured this run — Watchdog 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's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
D8 Code Coverage — not measured this run — Watchdog 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 READ here — but this repository measures it: a coverage step in CI (`cargo llvm-cov`) shows that coverage is collected and tracked in your own CI. The built-in collector has no runner for this ecosystem (.rs), so the analyzer could not read the number — a gap in the analyzer's language coverage, not an unmeasured repo. Not scored. To have the real number read, produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures. You can widen what we reach: optional: produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures — then the real number is read on the next scan.
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 (48 contributor(s) across 3147 commit(s) sampled, automation and bot accounts excluded). One of them holds 94% of the history; the other 47 hold 0.1% 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.
D26 Project Cohesion — not measured this run — Watchdog 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. Project size and spread are measured over build units (a .NET project, a Maven or Gradle module, an npm package, a Go module, a Cargo crate, a Python, Composer, Bundler, Mix, rebar3, sbt, SwiftPM or pub package) whose source a code model reads. This repository's production source is in a language no model reads, or in units whose build tool D26 does not recognise. That is a gap in this analyzer's language reach — not a finding that the repository's projects are cohesive.
AX3 Project dependency cycles — not measured this run — Watchdog 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 which project references which. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module, Python pyproject.toml, SwiftPM, sbt and RubyGems builds only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, so the collector owed is one that derives the module graph from the source's own imports. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
AX4 Dependency direction — not measured this run — Watchdog 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 direction each project reference points. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module, Python pyproject.toml, SwiftPM, sbt and RubyGems builds only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, so the collector owed is one that derives the module graph from the source's own imports. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
AX6 Interface segregation — not measured this run — Watchdog 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.
AX8 Test isolation — not measured this run — Watchdog 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 which projects are test projects, and what they reference. That is a language-neutral question, but the project-reference graph is collected from MSBuild .csproj/.fsproj/.vbproj, Gradle, Maven, Cargo, npm/pnpm/yarn, Go module, Python pyproject.toml, SwiftPM, sbt and RubyGems builds only, and this repository commits none — so there was no graph to read, and re-running the same commit reads the same nothing. No module manifest of any ecosystem this engine recognises was found either, so the collector owed is one that derives the module graph from the source's own imports. That is a COLLECTOR gap in this analyzer — no change to the scan image closes it — and not a finding that the repository is free of what this check looks for.
C1 Data Protection — not measured this run — Watchdog 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. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C2 Access Controls — not measured this run — Watchdog 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. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
C3 Audit Trail — not measured this run — Watchdog 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. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
C4 Data Retention — not measured this run — Watchdog 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. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
C5 Data-Subject Rights — not measured this run — Watchdog 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. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
ED5 Idempotency — not measured this run — Watchdog 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 finds retry-prone mutations by walking the repository's declared types, and NONE was loaded on this run, so it had nothing to look at. That is a limit of the analyzer's reach — it reads .NET projects — not a finding that this repository has no command handlers or message consumers.
GD1 Unfinished & placeholder code — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
IC1 Incompleteness & stubs — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
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.
S1 Web-Security Posture — not measured this run — Watchdog 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. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X1 Async correctness — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X12 Unreachable branch — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X13 Undrained process stream — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X14 Bypassable address classification — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X15 Unvalidated length from an untrusted reader — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X16 Unfloored truncation loop — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X17 Uncapped recursion over a caller-supplied document — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X18 Disposal-pattern correctness — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X19 Unrestored process-global state — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X2 Cancellation propagation — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X20 Mistyped argument guard — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X21 Side-effecting pattern guard — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X22 Contradicted release guard — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X23 Unguarded diagnostic materialisation — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X24 Document value interpolated into markup unescaped — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X25 Inert configuration knob — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X26 Unsynchronised callback handoff — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X27 Collection changed while being enumerated — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X28 Index access outside its own emptiness guard — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X29 Per-element action decided by a fixed element — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X3 Exception handling — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X30 Support guard that admits what it rejects — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X32 Type resolved by simple name across every loaded assembly — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X4 Structured logging — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
X5 Nullable reference types — not measured this run — Watchdog 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 implemented over the C# syntax tree, and no C# was loaded on this run, 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.
Repo exclusion declarations: 3 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
Watchdog assesses the repository exactly as committed, and only the repository. By design it does 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.
D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
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 Secret Scanning: Secret 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").
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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
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.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
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 REDACTED (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.
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.
AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
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.
The LLM boundary
LLM-set scores this run (4): D19, D21, D22, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score; each names its own sample and method on its card. They are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
95 function(s) exceeded the cyclomatic complexity threshold of 15; the worst was dalfox::cmd::scan::input::resolve_targets at 74. A further 6 function(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 dalfox::parameter_analysis::encoded_variants at 23 — they are counted neither in the figure above nor in this dimension's score. 3 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: src/scanning/tech_detect.rs (TechType::fmt at 19), src/waf/bypass/strategy.rs (dalfox::waf::bypass::strategy::get_bypass_strategy at 19), src/waf/mod.rs (WafType::fmt at 19). They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.
Resolve the 68 dalfox finding(s) in Cyclomatic Complexity — start with mod.rs (8), ast_integration.rs (6), check_dom_verification.rs (5). — One of this dimension's main actionable groups (68 warning-level).
Resolve the 19 DomXssVisitor finding(s) in Cyclomatic Complexity — start with sinks.rs (7), walk.rs (4), taint.rs (2). — One of this dimension's main actionable groups (19 warning-level).
Resolve the 3 DalfoxMcp finding(s) in Cyclomatic Complexity — start with mod.rs (3). — One of this dimension's main actionable groups (3 warning-level).
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 108 dalfox finding(s) in Cognitive Complexity — start with mod.rs (11), check_reflection.rs (8), ast_integration.rs (7). — One of this dimension's main actionable groups (108 warning-level).
Resolve the 21 DomXssVisitor finding(s) in Cognitive Complexity — start with sinks.rs (8), walk.rs (4), taint.rs (2). — One of this dimension's main actionable groups (21 warning-level).
Resolve the 6 ScanWorkerCtx finding(s) in Cognitive Complexity — start with mod.rs (6). — One of this dimension's main actionable groups (6 warning-level).
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
92 duplicated block group(s) detected. A further 2 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. Measured on part of this repository only: .rs (94% of production source) was not exposed to the token comparison, so duplication there is unmeasured and is not in this count.
+ 43 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 7 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with analysis.rs, check_reflection.rs, url_inject.rs. — One of this dimension's main actionable groups (7 warning-level).
Resolve the 6 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with mod.rs (2), preflight.rs, handlers.rs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 6 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with xml.rs (2), analysis.rs, form.rs. — One of this dimension's main actionable groups (6 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
D9 · Test Distribution9.8 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
3169 test methods: 2862 unit, 265 integration, 0 BDD, 42 e2e. The Rust suite contributes 3169 `#[test]` function(s) across 110 file(s) declaring at least one; its unit/integration split is Cargo's own — 25 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
4 outdated, 0 yanked direct Cargo dependencies. 33 of 34 direct crates were graded against crates.io (0 not published there, 1 not resolved by a committed Cargo.lock). Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from Cargo.lock there.
Outdated: clap · ×4
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
Top hotspots: src/mcp/mod.rs (32×39=1248); src/cmd/scan/mod.rs (23×50=1150); src/cmd/scan/input.rs (11×74=814) Repeated repair below the complexity floor: src/server/handlers.rs (10 of 11 changes were fixes); src/utils/http.rs (8 of 11 changes were fixes); src/utils/mod.rs (6 of 9 changes were fixes)
Resolve the 36 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (6), input.rs, check_reflection.rs. — One of this dimension's main actionable groups (36 warning-level).
Resolve the 10 Repeated repair finding(s) in Churn × Complexity Hotspots — start with handlers.rs, http.rs, mod.rs. — One of this dimension's main actionable groups (10 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
1 deducted task-comment markers across 113707 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.
TodoCommentsrc/parameter_analysis/mod.rs:387
What to do
Resolve the 1 TodoComment finding(s) in Explicit Debt — start with mod.rs. — One of this dimension's main actionable groups (1 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The repository's documentation consists of only README files (no architecture/design docs) and no XML-doc coverage; the visible content is a single directory-level README for each subdirectory. The root README gives an overview, installation, usage, contribution guidance, and licence, but every subdirectory's README is clipped by the scanner and does not itself state what it documents or how to use its contents.
What to do
Improve Documentation Quality — currently 2.0/10. — The repository's documentation consists of only README files (no architecture/design docs) and no XML-doc coverage; the visible content is a single directory-level README for each subdirectory. The root README gives an overview, installation, usage, contribution guidance, and licence, but every subdirectory's README is clipped by the scanner and does not itself state what it documents or how to use its contents.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
0 naming inconsistencies across 0 sampled symbols.
✓ On the Gold path — maintain.
Detailed fixes: d21_recommendation.md.
Do you agree with this assessment?
D22 · Internal API ConsistencyWeak◐ Sampled · advisory
What it measures: Whether the internal API surface is consistent and coherent.
Method: Judged by language model at low temperature over a sample of the public API surface (IsPackable or .Contracts types). Sampled, advisory; confidence discounted by model uncertainty.
5 API inconsistencies across a 400-member sample of 93 exposed types.
Inconsistent return type for validation methods. `Config.normalize_and_validate` returns `String` (likely an error message or empty string), while `ScanConfig.normalize_and_validate` also returns `String`. However, standard Rust API conventions for validation usually return `Result<(), Error>` or `Result<Self, Error>`. Returning a `String` for success/failure is ambiguous and inconsistent with idiomatic Rust error handling, especially when other parts of the API (like `parse_target`) return `Result`. Furthermore, having validation logic in both the parent and child config types suggests duplication of intent.
Naming inconsistency in reflection checking functions. `check_reflection_with_response` and `check_reflection_with_response_tracked` differ only by the 'tracked' suffix (likely adding concurrency tracking), but `check_reflection_with_hpp_url` uses a different pattern (`with_hpp_url`) instead of `with_response` or `with_client`. This makes it unclear if `hpp_url` is a variant of response checking or a distinct operation. The naming convention is not uniform across similar operations.
Inconsistent naming and return types for DOM verification. `check_dom_verification` and `check_dom_verification_with_client` return `(bool, Option<String>)`, while `check_dom_verification_with_client_outcome` returns `DomVerifyOutcome`. The 'outcome' suffix is inconsistent with the other 'with_client' variants. Additionally, having three functions for essentially the same operation with different return types (primitive tuple vs. struct) is confusing.
Inconsistent naming pattern for light verification. The functions are named `verify_dom_xss_light` and `verify_dom_xss_light_with_client`. In other modules (like `check_reflection`), the pattern is `check_..._with_response` vs `check_..._with_response_tracked`. Here, the base function doesn't specify the client source, implying it might use a global or default client, while the `_with_client` variant is explicit. This is a minor inconsistency in naming philosophy compared to other modules.
Inconsistent method naming for remote resource initialization. There are `init_remote_payloads` and `init_remote_wordlists` (no options), and `init_remote_payloads_with` and `init_remote_wordlists_with` (with options). The 'with' suffix is used for the options variant, but the base methods don't have a clear counterpart like `init_remote_payloads_default`. More importantly, `init_remote_payloads` and `init_remote_wordlists` are separate methods, whereas `init_remote_resources` in `utils` combines them. This duplication of intent (initializing remote resources) across different modules (`remote` vs `utils`) is confusing.
What to do
Resolve the 1 Inconsistent return type for validation methods.… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Naming inconsistency in reflection checking functions.… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Inconsistent naming and return types for DOM verification.… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d22_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Secret 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.
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).
88 finding(s): 0 critical, 87 high, 1 medium, 0 low. 67 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 8 file(s) — `docs/templates/404.html` (lines 1–5, line 14, lines 28–30), `docs/templates/breadcrumbs.html`, `docs/templates/footer.html` (lines 1–50, lines 52–54, lines 59–61), `docs/templates/header.html` (lines 2–93), `docs/templates/landing.html` (line 1, line 9, lines 27–29), … (+3 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. Separately, one or more rules could not re-parse an embedded snippet in 3 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 13 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (13 issue-level).
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).
No action in Static Analysis (SAST) — all 67 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (67 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Resolve the 3 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 180 of the 198 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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.
Resolve the 5 Boundary-crossing change coupling finding(s) in Change Coupling — start with tests.rs (2), pipe.rs, file.rs. — One of this dimension's main actionable groups (5 issue-level).
Resolve the 3 Change coupling finding(s) in Change Coupling — start with file.rs, mod.rs, tests.rs. — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
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. Scored 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. SCORED, not informational.
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.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 1 platform declaration(s) and 0 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.
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.
What to do
The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.
Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.
Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
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
Add a 'Testing' section to the root README — how to run the test suite.
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
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 significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
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.
Do you agree with this assessment?
P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged
Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.
Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.
Do you agree with this assessment?
P2 · Observability8.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
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.
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 the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin) or inside a Java method returning a Reactor Mono/Flux — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Do you agree with this assessment?
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.
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 — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X7 Silent fallback defaults — 10 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
X9 Subsumed condition operand — 3 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 4 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.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 74 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 — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
AC7 A11y enforcement — Frontend below the scale floor (14 DOM element(s) < 25) — too little surface to assess accessibility.
AX1 Captive dependencies — Not applicable: Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one.
AX2 Stateful singletons — Not applicable: Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. 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).
AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
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 — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository commits no project file of a kind this check models. This is a gap in the analyzer, not a finding about this repository
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/bui…; runtime evidence skipped 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 — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~13995 lines of test source are present (.rs) 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.
D14 License Compliance — Not scored — this repository's 336 shipped crate(s) were read from its Cargo.lock, but crates.io could not be asked for the licence of 63 of them (HTTP 429 Unknown Error), and a licence verdict over part of a dependency graph is not a licence verdict. Nothing is asserted about this repository's licensing in either direction.
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.
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. 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 — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 measured no build unit over this repository's .cr, .rs source. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D27 Navigability — symbol resolution incomplete — navigability not assessed
D3 God Classes — Most of this repository's production source (.cr, .rs) was not read by god-class detection, so class size was not assessed for the languages that are the product — whatever else this pass did read is not this repository's class size. Not scored — this is a gap in the analyzer, not a verdict about this repository.
D32 Data Compliance (PII/GDPR) — 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.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
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 — D5 reads a .NET project-reference graph only — this repository's production source is .cr, .rs, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
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 included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (9 value object(s))
ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
ED5 Idempotency — This check finds retry-prone mutations (command handlers and message/event consumers) by walking the repository's declared types, and none was loaded here, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
GD1 Unfinished & placeholder code — no source files were read — this check reads C# syntax, and none was loaded for this repository. That is a limit of the analyzer, not a finding about your code.
IC1 Incompleteness & stubs — 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
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 — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, 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 applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) 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. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — 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
X12 Unreachable branch — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X13 Undrained process stream — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X14 Bypassable address classification — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X15 Unvalidated length from an untrusted reader — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X16 Unfloored truncation loop — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X17 Uncapped recursion over a caller-supplied document — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X18 Disposal-pattern correctness — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X19 Unrestored process-global state — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
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 reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X21 Side-effecting pattern guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X22 Contradicted release guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X23 Unguarded diagnostic materialisation — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X24 Document value interpolated into markup unescaped — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X25 Inert configuration knob — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X26 Unsynchronised callback handoff — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X27 Collection changed while being enumerated — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X28 Index access outside its own emptiness guard — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X29 Per-element action decided by a fixed element — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X3 Exception handling — 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
X30 Support guard that admits what it rejects — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, not a finding about your code.
X32 Type resolved by simple name across every loaded assembly — This check reads C# syntax; no C# was loaded for this repository, so it has nothing to report. That is a limit of the analyzer, 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
X5 Nullable reference types — 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
X6 Hand-rolled structured-format parsing — 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.
Boundary-crossing change coupling: pipe.rs ↔ mod.rs src/cmd/pipe.rs— `src/cmd/pipe.rs` (context cmd) and `src/parameter_analysis/mod.rs` (context parameter_analysis) sit in DIFFERENT parts of the tree yet change together 55% of the time (12 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `11b3aafd` Add encoder selection and base64 encoding for payloads; `b064f8c2` Add param filtering option to scan command and tests; `6373ff66` Add output options and request/response info to scan results — run `git show` on any of them.
Boundary-crossing change coupling: tests.rs ↔ tests.rs src/cmd/scan/tests.rs— `src/cmd/scan/tests.rs` (context cmd) and `src/config/tests.rs` (context config) sit in DIFFERENT parts of the tree yet 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 — 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `557cb6a0` fix(config): stop config from overriding explicitly typed CLI flags; …; `c8f30734` refactor(args): give ScanArgs a Default so adding a flag touches one …; `d4cb9b03` fix(scanning,server,waf): close 10 latent bugs found by source audit … — run `git show` on any of them.
Boundary-crossing change coupling: file.rs ↔ mod.rs src/cmd/file.rs— `src/cmd/file.rs` (context cmd) and `src/parameter_analysis/mod.rs` (context parameter_analysis) sit in DIFFERENT parts of the tree yet change together 52% of the time (12 of the 23 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `11b3aafd` Add encoder selection and base64 encoding for payloads; `b064f8c2` Add param filtering option to scan command and tests; `6373ff66` Add output options and request/response info to scan results — run `git show` on any of them.
Boundary-crossing change coupling: url.rs ↔ mod.rs src/cmd/url.rs— `src/cmd/url.rs` (context cmd) and `src/parameter_analysis/mod.rs` (context parameter_analysis) sit in DIFFERENT parts of the tree yet change together 50% of the time (12 of the 24 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 12 shared commits counted here, the most recent 3 are `11b3aafd` Add encoder selection and base64 encoding for payloads; `b064f8c2` Add param filtering option to scan command and tests; `6373ff66` Add output options and request/response info to scan results — run `git show` on any of them.
Boundary-crossing change coupling: tests.rs ↔ tests.rs src/parameter_analysis/discovery/tests.rs— `src/parameter_analysis/discovery/tests.rs` (context parameter_analysis) and `src/scanning/check_reflection/tests.rs` (context scanning) sit in DIFFERENT parts of the tree yet change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `a602ebb0` fix: stop sending operator credentials to page-controlled origins (#1…; `c8f30734` refactor(args): give ScanArgs a Default so adding a flag touches one …; `8776f318` feat(scanning): compute JS breakout from the observed script prefix (… — run `git show` on any of them.
dalfox::cmd::scan::input::resolve_targets (cognitive 206) src/cmd/scan/input.rs:118— dalfox::cmd::scan::input::resolve_targets has cognitive complexity 206 (threshold 15). Drivers by points: if/else 51 (146 pts), match/switch 12 (38 pts), loops 6 (18 pts), boolean chains 4 (nesting depth added 133). 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.
dalfox::parameter_analysis::discovery::form::check_form_discovery_with (cognitive 185) src/parameter_analysis/discovery/form.rs:28— dalfox::parameter_analysis::discovery::form::check_form_discovery_with has cognitive complexity 185 (threshold 15). Drivers by points: if/else 41 (123 pts), loops 18 (53 pts), boolean chains 6, match/switch 2 (3 pts) (nesting depth added 118). 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.
dalfox::scanning::ast_integration::extract_js_and_script_ids_from_xml_document (cognitive 104) src/scanning/ast_integration.rs:177— dalfox::scanning::ast_integration::extract_js_and_script_ids_from_xml_document has cognitive complexity 104 (threshold 15). Drivers by points: if/else 22 (79 pts), boolean chains 14, loops 4 (10 pts), match/switch 1 (nesting depth added 63). 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.
dalfox::cmd::scan::analysis::preflight_and_analyze_target (cognitive 104) src/cmd/scan/analysis.rs:246— dalfox::cmd::scan::analysis::preflight_and_analyze_target has cognitive complexity 104 (threshold 15). Drivers by points: if/else 31 (74 pts), loops 8 (23 pts), boolean chains 7 (nesting depth added 58). 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.
dalfox::parameter_analysis::discovery::query::check_query_discovery (cognitive 94) src/parameter_analysis/discovery/query.rs:31— dalfox::parameter_analysis::discovery::query::check_query_discovery has cognitive complexity 94 (threshold 15). Drivers by points: if/else 32 (71 pts), loops 9 (18 pts), boolean chains 5 (nesting depth added 48). 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.
dalfox::parameter_analysis::active_probe_param (cognitive 94) src/parameter_analysis/mod.rs:857— dalfox::parameter_analysis::active_probe_param has cognitive complexity 94 (threshold 15). Drivers by points: if/else 22 (55 pts), loops 9 (26 pts), boolean chains 7, match/switch 3 (6 pts) (nesting depth added 53). 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.
dalfox::cmd::scan::scan_loop::scan_host_group (cognitive 86) src/cmd/scan/scan_loop.rs:366— dalfox::cmd::scan::scan_loop::scan_host_group has cognitive complexity 86 (threshold 15). Drivers by points: if/else 31 (71 pts), boolean chains 8, loops 4 (7 pts) (nesting depth added 43). 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.
dalfox::scanning::xss_common::generate_dynamic_payloads_uncached (cognitive 86) src/scanning/xss_common.rs:41— dalfox::scanning::xss_common::generate_dynamic_payloads_uncached has cognitive complexity 86 (threshold 15). Drivers by points: loops 19 (59 pts), if/else 6 (18 pts), match/switch 5 (9 pts) (nesting depth added 56). 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.
dalfox::scanning::url_inject::build_injected_url (cognitive 73) src/scanning/url_inject.rs:206— dalfox::scanning::url_inject::build_injected_url has cognitive complexity 73 (threshold 15). Drivers by points: if/else 25 (60 pts), loops 3 (8 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 41). 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.
dalfox::scanning::check_reflection::fetch_injection_response_with_client (cognitive 70) src/scanning/check_reflection.rs:2605— dalfox::scanning::check_reflection::fetch_injection_response_with_client has cognitive complexity 70 (threshold 15). Drivers by points: if/else 20 (53 pts), boolean chains 7, loops 2 (5 pts), match/switch 2 (5 pts) (nesting depth added 39). Of this number, 63 points are the body's own statements and 7 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.
dalfox::cmd::scan::run_scan (cognitive 70) src/cmd/scan/mod.rs:200— dalfox::cmd::scan::run_scan has cognitive complexity 70 (threshold 15). Drivers by points: if/else 32 (46 pts), boolean chains 11, match/switch 5 (8 pts), loops 3 (5 pts) (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.
dalfox::main (cognitive 69) src/main.rs:192— dalfox::main has cognitive complexity 69 (threshold 15). Drivers by points: if/else 26 (38 pts), match/switch 10 (23 pts), boolean chains 6, loops 1 (2 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.
dalfox::parameter_analysis::mining::probe_body::probe_body_params (cognitive 65) src/parameter_analysis/mining/probe_body.rs:5— dalfox::parameter_analysis::mining::probe_body::probe_body_params has cognitive complexity 65 (threshold 15). Drivers by points: if/else 18 (58 pts), loops 2 (4 pts), boolean chains 3 (nesting depth added 42). 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.
dalfox::parameter_analysis::xml_inject::parse_tag (cognitive 59) src/parameter_analysis/xml_inject.rs:196— dalfox::parameter_analysis::xml_inject::parse_tag has cognitive complexity 59 (threshold 15). Drivers by points: if/else 8 (24 pts), loops 8 (22 pts), boolean chains 11, match/switch 1 (2 pts) (nesting depth added 31). 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.
dalfox::scanning::js_context_verify::gather_sink_spans_in_statement (cognitive 59) src/scanning/js_context_verify.rs:371— dalfox::scanning::js_context_verify::gather_sink_spans_in_statement has cognitive complexity 59 (threshold 15). Drivers by points: if/else 12 (31 pts), loops 9 (24 pts), match/switch 2 (4 pts) (nesting depth added 36). 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.
dalfox::payload::js_breakout::enclosing_js_quote (cognitive 57) src/payload/js_breakout.rs:213— dalfox::payload::js_breakout::enclosing_js_quote has cognitive complexity 57 (threshold 15). Drivers by points: if/else 13 (29 pts), match/switch 4 (11 pts), boolean chains 9, loops 4 (8 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.
dalfox::scanning::param_jobs::generate_param_jobs (cognitive 56) src/scanning/param_jobs.rs:78— dalfox::scanning::param_jobs::generate_param_jobs has cognitive complexity 56 (threshold 15). Drivers by points: if/else 18 (41 pts), boolean chains 10, loops 2 (5 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.
dalfox::parameter_analysis::mining::probe_json::probe_json_body_params (cognitive 54) src/parameter_analysis/mining/probe_json.rs:5— dalfox::parameter_analysis::mining::probe_json::probe_json_body_params has cognitive complexity 54 (threshold 15). Drivers by points: if/else 20 (45 pts), boolean chains 4, match/switch 2 (3 pts), loops 2 (nesting depth added 26). 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.
dalfox::cmd::scan::output::render_dry_run (cognitive 52) src/cmd/scan/output.rs:16— dalfox::cmd::scan::output::render_dry_run has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (36 pts), loops 6 (15 pts), boolean chains 1 (nesting depth added 25). 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.
dalfox::payload::js_breakout::compute_js_breakout (cognitive 50) src/payload/js_breakout.rs:69— dalfox::payload::js_breakout::compute_js_breakout has cognitive complexity 50 (threshold 15). Drivers by points: if/else 13 (32 pts), match/switch 5 (12 pts), boolean chains 4, loops 2 (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.
dalfox::scanning::js_context_verify::gather_sink_spans_in_expression (cognitive 50) src/scanning/js_context_verify.rs:529— dalfox::scanning::js_context_verify::gather_sink_spans_in_expression has cognitive complexity 50 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 7 (15 pts), match/switch 4 (9 pts) (nesting depth added 28). 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.
dalfox::cmd::scan::input::detect_input_type (cognitive 49) src/cmd/scan/input.rs:1383— dalfox::cmd::scan::input::detect_input_type has cognitive complexity 49 (threshold 15). Drivers by points: if/else 15 (37 pts), match/switch 2 (8 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 30). 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.
dalfox::target_parser::parse_raw_http_request (cognitive 48) src/target_parser/mod.rs:539— dalfox::target_parser::parse_raw_http_request has cognitive complexity 48 (threshold 15). Drivers by points: if/else 17 (37 pts), loops 3 (6 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 24). 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.
dalfox::target_parser::har::parse_har (cognitive 48) src/target_parser/har.rs:109— dalfox::target_parser::har::parse_har has cognitive complexity 48 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 3 (7 pts), boolean chains 2, match/switch 1 (2 pts) (nesting depth added 28). 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.
dalfox::parameter_analysis::xml_inject::xml_injection_points (cognitive 47) src/parameter_analysis/xml_inject.rs:42— dalfox::parameter_analysis::xml_inject::xml_injection_points has cognitive complexity 47 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 4 (10 pts), match/switch 1 (3 pts), boolean chains 1 (nesting depth added 28). 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.
dalfox::cmd::scan::input::resolve_targets (cyclomatic 74) src/cmd/scan/input.rs:118— dalfox::cmd::scan::input::resolve_targets has cyclomatic complexity 74 (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.
dalfox::parameter_analysis::discovery::form::check_form_discovery_with (cyclomatic 61) src/parameter_analysis/discovery/form.rs:28— dalfox::parameter_analysis::discovery::form::check_form_discovery_with has cyclomatic complexity 61 (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.
dalfox::cmd::scan::run_scan (cyclomatic 50) src/cmd/scan/mod.rs:200— dalfox::cmd::scan::run_scan has cyclomatic complexity 50 (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.
dalfox::main (cyclomatic 49) src/main.rs:192— dalfox::main has cyclomatic complexity 49 (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.
dalfox::payload::js_breakout::compute_js_breakout (cyclomatic 46) src/payload/js_breakout.rs:69— dalfox::payload::js_breakout::compute_js_breakout has cyclomatic complexity 46 (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.
dalfox::payload::js_breakout::enclosing_js_quote (cyclomatic 45) src/payload/js_breakout.rs:213— dalfox::payload::js_breakout::enclosing_js_quote has cyclomatic complexity 45 (threshold 15). 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.
dalfox::scanning::js_context_verify::gather_sink_spans_in_expression (cyclomatic 44) src/scanning/js_context_verify.rs:529— dalfox::scanning::js_context_verify::gather_sink_spans_in_expression has cyclomatic complexity 44 (threshold 15). 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.
dalfox::parameter_analysis::discovery::query::check_query_discovery (cyclomatic 43) src/parameter_analysis/discovery/query.rs:31— dalfox::parameter_analysis::discovery::query::check_query_discovery 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.
dalfox::cmd::scan::analysis::preflight_and_analyze_target (cyclomatic 42) src/cmd/scan/analysis.rs:246— dalfox::cmd::scan::analysis::preflight_and_analyze_target has cyclomatic complexity 42 (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.
dalfox::scanning::ast_integration::extract_js_and_script_ids_from_xml_document (cyclomatic 41) src/scanning/ast_integration.rs:177— dalfox::scanning::ast_integration::extract_js_and_script_ids_from_xml_document 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.
dalfox::scanning::js_context_verify::gather_sink_spans_in_statement (cyclomatic 39) src/scanning/js_context_verify.rs:371— dalfox::scanning::js_context_verify::gather_sink_spans_in_statement has cyclomatic complexity 39 (threshold 15). 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.
dalfox::cmd::scan::scan_loop::scan_host_group (cyclomatic 38) src/cmd/scan/scan_loop.rs:366— dalfox::cmd::scan::scan_loop::scan_host_group has cyclomatic complexity 38 (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.
dalfox::parameter_analysis::active_probe_param (cyclomatic 38) src/parameter_analysis/mod.rs:857— dalfox::parameter_analysis::active_probe_param has cyclomatic complexity 38 (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.
dalfox::scanning::xss_common::generate_dynamic_payloads_uncached (cyclomatic 38) src/scanning/xss_common.rs:41— dalfox::scanning::xss_common::generate_dynamic_payloads_uncached has cyclomatic complexity 38 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
dalfox::cmd::scan::poc::generate_poc (cyclomatic 33) src/cmd/scan/poc.rs:67— dalfox::cmd::scan::poc::generate_poc has cyclomatic complexity 33 (threshold 15). Of this number, 19 points are the body's own statements and 14 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.
dalfox::parameter_analysis::xml_inject::parse_tag (cyclomatic 30) src/parameter_analysis/xml_inject.rs:196— dalfox::parameter_analysis::xml_inject::parse_tag has cyclomatic complexity 30 (threshold 15). 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.
dalfox::scanning::check_reflection::fetch_injection_response_with_client (cyclomatic 30) src/scanning/check_reflection.rs:2605— dalfox::scanning::check_reflection::fetch_injection_response_with_client has cyclomatic complexity 30 (threshold 15). Of this number, 26 points are the body's own statements and 4 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.
dalfox::scanning::check_dom_verification::classify_dom_evidence_in_xml (cyclomatic 30) src/scanning/check_dom_verification.rs:1016— dalfox::scanning::check_dom_verification::classify_dom_evidence_in_xml has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
dalfox::scanning::url_inject::build_injected_url (cyclomatic 30) src/scanning/url_inject.rs:206— dalfox::scanning::url_inject::build_injected_url has cyclomatic complexity 30 (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.
dalfox::scanning::param_jobs::generate_param_jobs (cyclomatic 29) src/scanning/param_jobs.rs:78— dalfox::scanning::param_jobs::generate_param_jobs 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.
dalfox::job::runner::execute_scan (cyclomatic 29) src/job/runner.rs:109— dalfox::job::runner::execute_scan 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.
dalfox::scanning::request_render::build_request_text (cyclomatic 29) src/scanning/request_render.rs:7— dalfox::scanning::request_render::build_request_text 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.
dalfox::scanning::xss_common::generate_adaptive_payloads (cyclomatic 29) src/scanning/xss_common.rs:315— dalfox::scanning::xss_common::generate_adaptive_payloads has cyclomatic complexity 29 (threshold 15). 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.
dalfox::scanning::ast_integration::has_self_bootstrap_verification (cyclomatic 28) src/scanning/ast_integration.rs:1139— dalfox::scanning::ast_integration::has_self_bootstrap_verification has cyclomatic complexity 28 (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.
dalfox::payload::xss_csp_bypass::analyze_csp (cyclomatic 28) src/payload/xss_csp_bypass.rs:170— dalfox::payload::xss_csp_bypass::analyze_csp has cyclomatic complexity 28 (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.
Hotspot: src/mcp/mod.rs src/mcp/mod.rs:396— src/mcp/mod.rs changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in DalfoxMcp::scan_with_dalfox at line 396. 19 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/mcp/mod.rs`: 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: src/cmd/scan/mod.rs src/cmd/scan/mod.rs:200— src/cmd/scan/mod.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in dalfox::cmd::scan::run_scan at line 200. 11 of those changes were fix/bug commits, and the other 12 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/cmd/scan/mod.rs`: 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: src/cmd/scan/input.rs src/cmd/scan/input.rs:118— src/cmd/scan/input.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 74 in dalfox::cmd::scan::input::resolve_targets at line 118. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/cmd/scan/input.rs`: 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: src/parameter_analysis/mod.rs src/parameter_analysis/mod.rs:857— src/parameter_analysis/mod.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in dalfox::parameter_analysis::active_probe_param at line 857. 8 of those changes were fix/bug commits, and the other 13 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/parameter_analysis/mod.rs`: 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: src/scanning/check_reflection.rs src/scanning/check_reflection.rs:2605— src/scanning/check_reflection.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in dalfox::scanning::check_reflection::fetch_injection_response_with_client at line 2605. 13 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/scanning/check_reflection.rs`: 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: src/cmd/scan/output.rs src/cmd/scan/output.rs:493— src/cmd/scan/output.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in dalfox::cmd::scan::output::render_results at line 493. 12 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/cmd/scan/output.rs`: 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: src/cmd/scan/analysis.rs src/cmd/scan/analysis.rs:246— src/cmd/scan/analysis.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 42 in dalfox::cmd::scan::analysis::preflight_and_analyze_target at line 246. 8 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/cmd/scan/analysis.rs`: 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: src/scanning/mod.rs src/scanning/mod.rs:1340— src/scanning/mod.rs changed 29 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in ScanWorkerCtx::run_dom_phase at line 1340. 15 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/scanning/mod.rs`: 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: src/scanning/url_inject.rs src/scanning/url_inject.rs:206— src/scanning/url_inject.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in dalfox::scanning::url_inject::build_injected_url at line 206. 7 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/scanning/url_inject.rs`: 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: src/scanning/ast_dom_analysis/taint.rs src/scanning/ast_dom_analysis/taint.rs:42— src/scanning/ast_dom_analysis/taint.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 67 in DomXssVisitor::call_taint_and_source at line 42. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/scanning/ast_dom_analysis/taint.rs`: 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: src/target_parser/mod.rs src/target_parser/mod.rs:539— src/target_parser/mod.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in dalfox::target_parser::parse_raw_http_request at line 539. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/target_parser/mod.rs`: 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: src/server/job_runner.rs src/server/job_runner.rs:199— src/server/job_runner.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in dalfox::server::job_runner::run_scan_job at line 199. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/server/job_runner.rs`: 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: src/server/util.rs src/server/util.rs:17— src/server/util.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in dalfox::server::util::validate_scan_options at line 17. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/server/util.rs`: 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: src/scanning/check_dom_verification.rs src/scanning/check_dom_verification.rs:746— src/scanning/check_dom_verification.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in dalfox::scanning::check_dom_verification::classify_dom_evidence at line 746. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/scanning/check_dom_verification.rs`: 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: src/cmd/scan/scan_loop.rs src/cmd/scan/scan_loop.rs:366— src/cmd/scan/scan_loop.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in dalfox::cmd::scan::scan_loop::scan_host_group at line 366. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/cmd/scan/scan_loop.rs`: 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: src/scanning/ast_integration.rs src/scanning/ast_integration.rs:972— src/scanning/ast_integration.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in dalfox::scanning::ast_integration::build_dom_xss_manual_poc_hint at line 972. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/scanning/ast_integration.rs`: 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: src/parameter_analysis/discovery/form.rs src/parameter_analysis/discovery/form.rs:28— src/parameter_analysis/discovery/form.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 61 in dalfox::parameter_analysis::discovery::form::check_form_discovery_with at line 28. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/parameter_analysis/discovery/form.rs`: 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: src/scanning/ast_dom_analysis/bindings.rs src/scanning/ast_dom_analysis/bindings.rs:15— src/scanning/ast_dom_analysis/bindings.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 58 in DomXssVisitor::bind_declarator_identifier at line 15. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/scanning/ast_dom_analysis/bindings.rs`: 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: src/job/runner.rs src/job/runner.rs:109— src/job/runner.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in dalfox::job::runner::execute_scan at line 109. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/job/runner.rs`: 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: src/cmd/scan/poc.rs src/cmd/scan/poc.rs:67— src/cmd/scan/poc.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in dalfox::cmd::scan::poc::generate_poc at line 67. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/cmd/scan/poc.rs`: 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: src/scanning/ast_dom_analysis/sinks.rs src/scanning/ast_dom_analysis/sinks.rs:9— src/scanning/ast_dom_analysis/sinks.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 44 in DomXssVisitor::walk_assignment_expression at line 9. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/scanning/ast_dom_analysis/sinks.rs`: 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: src/scanning/xss_common.rs src/scanning/xss_common.rs:315— src/scanning/xss_common.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 29 in dalfox::scanning::xss_common::generate_adaptive_payloads at line 315. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/scanning/xss_common.rs`: 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: src/server/mod.rs src/server/mod.rs:79— src/server/mod.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in dalfox::server::run_server at line 79. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/server/mod.rs`: 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: src/cmd/payload.rs src/cmd/payload.rs:431— src/cmd/payload.rs changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in dalfox::cmd::payload::run_payload at line 431. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/cmd/payload.rs`: 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: src/payload/xss_csp_bypass.rs src/payload/xss_csp_bypass.rs:170— src/payload/xss_csp_bypass.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 28 in dalfox::payload::xss_csp_bypass::analyze_csp at line 170. 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-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/payload/xss_csp_bypass.rs`: 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.
DomXssVisitor::call_taint_and_source (cognitive 100) src/scanning/ast_dom_analysis/taint.rs:42— DomXssVisitor::call_taint_and_source has cognitive complexity 100 (threshold 15). Drivers by points: if/else 37 (66 pts), boolean chains 23, loops 4 (9 pts), match/switch 1 (2 pts) (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.
DomXssVisitor::handle_reflect_apply (cognitive 89) src/scanning/ast_dom_analysis/sinks.rs:741— DomXssVisitor::handle_reflect_apply has cognitive complexity 89 (threshold 15). Drivers by points: if/else 22 (75 pts), boolean chains 7, loops 2 (7 pts) (nesting depth added 58). 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.
DomXssVisitor::bind_declarator_identifier (cognitive 80) src/scanning/ast_dom_analysis/bindings.rs:15— DomXssVisitor::bind_declarator_identifier has cognitive complexity 80 (threshold 15). Drivers by points: if/else 43 (58 pts), boolean chains 16, match/switch 5 (6 pts) (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.
DomXssVisitor::handle_member_method_sink (cognitive 79) src/scanning/ast_dom_analysis/sinks.rs:250— DomXssVisitor::handle_member_method_sink has cognitive complexity 79 (threshold 15). Drivers by points: if/else 22 (62 pts), boolean chains 11, loops 1 (3 pts), match/switch 1 (3 pts) (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.
DomXssVisitor::walk_assignment_expression (cognitive 78) src/scanning/ast_dom_analysis/sinks.rs:9— DomXssVisitor::walk_assignment_expression has cognitive complexity 78 (threshold 15). Drivers by points: if/else 31 (64 pts), boolean chains 12, match/switch 2 (nesting depth added 33). 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.
DomXssVisitor::find_source_in_expr (cognitive 60) src/scanning/ast_dom_analysis/bindings.rs:320— DomXssVisitor::find_source_in_expr has cognitive complexity 60 (threshold 15). Drivers by points: if/else 11 (37 pts), match/switch 5 (12 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 37). 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.
DomXssVisitor::handle_wrapper_invocation (cognitive 57) src/scanning/ast_dom_analysis/sinks.rs:601— DomXssVisitor::handle_wrapper_invocation has cognitive complexity 57 (threshold 15). Drivers by points: if/else 14 (40 pts), loops 3 (11 pts), boolean chains 6 (nesting depth added 34). 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.
DomXssVisitor::register_class_accessor_fields (cognitive 56) src/scanning/ast_dom_analysis/summaries.rs:221— DomXssVisitor::register_class_accessor_fields has cognitive complexity 56 (threshold 15). Drivers by points: if/else 13 (47 pts), loops 3 (7 pts), match/switch 1 (2 pts) (nesting depth added 39). 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.
DomXssVisitor::walk_expression (cognitive 53) src/scanning/ast_dom_analysis/walk.rs:238— DomXssVisitor::walk_expression has cognitive complexity 53 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 7 (16 pts), match/switch 4 (11 pts), boolean chains 1 (nesting depth added 31). 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.
DomXssVisitor::walk_statement (cognitive 47) src/scanning/ast_dom_analysis/walk.rs:17— DomXssVisitor::walk_statement has cognitive complexity 47 (threshold 15). Drivers by points: if/else 14 (32 pts), loops 4 (10 pts), match/switch 2 (3 pts), boolean chains 2 (nesting depth added 25). 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.
DomXssVisitor::walk_variable_declarator (cognitive 41) src/scanning/ast_dom_analysis/walk.rs:177— DomXssVisitor::walk_variable_declarator has cognitive complexity 41 (threshold 15). Drivers by points: if/else 10 (32 pts), loops 2 (6 pts), boolean chains 3 (nesting depth added 26). 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.
DomXssVisitor::handle_summary_and_sink_call (cognitive 39) src/scanning/ast_dom_analysis/sinks.rs:407— DomXssVisitor::handle_summary_and_sink_call has cognitive complexity 39 (threshold 15). Drivers by points: if/else 14 (27 pts), loops 3 (7 pts), boolean chains 5 (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.
DomXssVisitor::propagate_mutation_taint (cognitive 37) src/scanning/ast_dom_analysis/sinks.rs:531— DomXssVisitor::propagate_mutation_taint has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (26 pts), loops 2 (6 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 23). 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.
DomXssVisitor::collect_declared_names (cognitive 35) src/scanning/ast_dom_analysis/walk.rs:478— DomXssVisitor::collect_declared_names has cognitive complexity 35 (threshold 15). Drivers by points: if/else 7 (22 pts), loops 4 (11 pts), match/switch 1 (2 pts) (nesting depth added 23). 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.
DomXssVisitor::promise_kind_of_call (cognitive 28) src/scanning/ast_dom_analysis/async_flow.rs:180— DomXssVisitor::promise_kind_of_call has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (19 pts), loops 3 (6 pts), match/switch 2 (3 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.
DomXssVisitor::resolve_apply_argument_taint_at (cognitive 27) src/scanning/ast_dom_analysis/bound_calls.rs:72— DomXssVisitor::resolve_apply_argument_taint_at has cognitive complexity 27 (threshold 15). Drivers by points: if/else 7 (20 pts), match/switch 1 (3 pts), boolean chains 2, loops 1 (2 pts) (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.
DomXssVisitor::handle_object_assign_sink (cognitive 27) src/scanning/ast_dom_analysis/sinks.rs:997— DomXssVisitor::handle_object_assign_sink has cognitive complexity 27 (threshold 15). Drivers by points: if/else 11 (22 pts), loops 2 (3 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.
DomXssVisitor::walk_call_expression (cognitive 20) src/scanning/ast_dom_analysis/sinks.rs:1139— DomXssVisitor::walk_call_expression has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 4 (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.
DomXssVisitor::resolve_wrapper_param_argument_taint (cognitive 19) src/scanning/ast_dom_analysis/bound_calls.rs:158— DomXssVisitor::resolve_wrapper_param_argument_taint has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 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.
DomXssVisitor::classify_tt_create_method (cognitive 19) src/scanning/ast_dom_analysis/trusted_types.rs:107— DomXssVisitor::classify_tt_create_method has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 6 (8 pts), boolean chains 2, loops 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.
DomXssVisitor::is_tainted (cognitive 18) src/scanning/ast_dom_analysis/taint.rs:663— DomXssVisitor::is_tainted has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 5, match/switch 3 (5 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.
DomXssVisitor::call_taint_and_source (cyclomatic 67) src/scanning/ast_dom_analysis/taint.rs:42— DomXssVisitor::call_taint_and_source has cyclomatic complexity 67 (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.
DomXssVisitor::bind_declarator_identifier (cyclomatic 58) src/scanning/ast_dom_analysis/bindings.rs:15— DomXssVisitor::bind_declarator_identifier has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DomXssVisitor::walk_assignment_expression (cyclomatic 44) src/scanning/ast_dom_analysis/sinks.rs:9— DomXssVisitor::walk_assignment_expression has cyclomatic complexity 44 (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.
DomXssVisitor::walk_expression (cyclomatic 44) src/scanning/ast_dom_analysis/walk.rs:238— DomXssVisitor::walk_expression has cyclomatic complexity 44 (threshold 15). 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.
DomXssVisitor::find_source_in_expr (cyclomatic 42) src/scanning/ast_dom_analysis/bindings.rs:320— DomXssVisitor::find_source_in_expr has cyclomatic complexity 42 (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.
DomXssVisitor::walk_statement (cyclomatic 38) src/scanning/ast_dom_analysis/walk.rs:17— DomXssVisitor::walk_statement has cyclomatic complexity 38 (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.
DomXssVisitor::handle_member_method_sink (cyclomatic 34) src/scanning/ast_dom_analysis/sinks.rs:250— DomXssVisitor::handle_member_method_sink 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.
DomXssVisitor::handle_reflect_apply (cyclomatic 30) src/scanning/ast_dom_analysis/sinks.rs:741— DomXssVisitor::handle_reflect_apply has cyclomatic complexity 30 (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.
DomXssVisitor::is_tainted (cyclomatic 28) src/scanning/ast_dom_analysis/taint.rs:663— DomXssVisitor::is_tainted has cyclomatic complexity 28 (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.
DomXssVisitor::collect_declared_names (cyclomatic 25) src/scanning/ast_dom_analysis/walk.rs:478— DomXssVisitor::collect_declared_names has cyclomatic complexity 25 (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.
DomXssVisitor::handle_wrapper_invocation (cyclomatic 23) src/scanning/ast_dom_analysis/sinks.rs:601— DomXssVisitor::handle_wrapper_invocation has cyclomatic complexity 23 (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.
DomXssVisitor::handle_summary_and_sink_call (cyclomatic 20) src/scanning/ast_dom_analysis/sinks.rs:407— DomXssVisitor::handle_summary_and_sink_call 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.
DomXssVisitor::register_class_accessor_fields (cyclomatic 19) src/scanning/ast_dom_analysis/summaries.rs:221— DomXssVisitor::register_class_accessor_fields 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.
DomXssVisitor::walk_call_expression (cyclomatic 18) src/scanning/ast_dom_analysis/sinks.rs:1139— DomXssVisitor::walk_call_expression 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.
DomXssVisitor::promise_kind_of_call (cyclomatic 17) src/scanning/ast_dom_analysis/async_flow.rs:180— DomXssVisitor::promise_kind_of_call 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.
DomXssVisitor::propagate_mutation_taint (cyclomatic 17) src/scanning/ast_dom_analysis/sinks.rs:531— DomXssVisitor::propagate_mutation_taint 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.
DomXssVisitor::message_event_source_for_receiver (cyclomatic 16) src/scanning/ast_dom_analysis/events.rs:51— DomXssVisitor::message_event_source_for_receiver has cyclomatic complexity 16 (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.
DomXssVisitor::classify_tt_create_method (cyclomatic 16) src/scanning/ast_dom_analysis/trusted_types.rs:107— DomXssVisitor::classify_tt_create_method has cyclomatic complexity 16 (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.
DomXssVisitor::walk_variable_declarator (cyclomatic 16) src/scanning/ast_dom_analysis/walk.rs:177— DomXssVisitor::walk_variable_declarator 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.
Repeated repair: src/server/handlers.rs src/server/handlers.rs:874— src/server/handlers.rs changed 11 times in last 90 days and 10 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 13 (its worst body is dalfox::server::handlers::preflight_handler at line 874), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(jobs): align reachability probes with CLI (#1491)”; “fix: six defects found reviewing the 2026-09-02 merges (#1405-#1424) (#1425)”; “fix(server): anchor origin patterns, and harden the API's secret handling (#1423)”; “fix(server,mcp,payload): daemon-lifecycle defects — preflight pacing, per-job remote cache, draining-job retention, MCP capacity slot (#1406)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/server/handlers.rs`: 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.
Repeated repair: src/utils/http.rs src/utils/http.rs:846— src/utils/http.rs changed 11 times in last 90 days and 8 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is dalfox::utils::http::send_with_retry at line 846), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(scanner): gate XSS findings by response content type (#1494)”; “fix: follow a form action's same-host TLS upgrade (#1461)”; “fix: six defects found reviewing the 2026-09-02 merges (#1405-#1424) (#1425)”; “fix(scan): count requests that never reached the target (#1413)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/utils/http.rs`: 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.
Repeated repair: src/utils/mod.rs src/utils/mod.rs:137— src/utils/mod.rs changed 9 times in last 90 days and 6 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is dalfox::utils::finding_belongs_to_target at line 137), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(scanner): gate XSS findings by response content type (#1494)”; “fix: follow a form action's same-host TLS upgrade (#1461)”; “fix: six defects found reviewing the 2026-09-02 merges (#1405-#1424) (#1425)”; “fix(scan,server): harden request construction and input validation (#1404)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/utils/mod.rs`: 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.
Repeated repair: src/server/types.rs src/server/types.rs:204— src/server/types.rs changed 6 times in last 90 days and 5 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 3 (its worst body is dalfox::server::types::string_or_seq_cookie at line 204), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: six defects found reviewing the 2026-09-02 merges (#1405-#1424) (#1425)”; “fix(server): anchor origin patterns, and harden the API's secret handling (#1423)”; “fix: harden against crashes, hangs, and silently-clean scans (#1361)”; “fix(server): refuse browser-driven cross-site and rebound requests (#1356)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/server/types.rs`: 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.
Repeated repair: src/scanning/waf_strategy.rs src/scanning/waf_strategy.rs:203— src/scanning/waf_strategy.rs changed 4 times in last 90 days and 4 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 11 (its worst body is dalfox::scanning::waf_strategy::expand_waf_payloads at line 203), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: multi-policy CSP, quoted '>' in script tags, template-literal delimiter, credential-rotation resume, assigned-over parseInt (#1486)”; “fix(scanner): preserve payload selection and valid WAF variants (#1490)”; “fix: CSP meta/report-only precedence and WAF status misdetection (#1481)”; “fix: bug-hunt batch — blind XSS request builders, batch-mining attribution, server/MCP parity, and CLI silent-clean holes (#1476)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/scanning/waf_strategy.rs`: 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.
Repeated repair: src/scanning/payload_families.rs src/scanning/payload_families.rs:437— src/scanning/payload_families.rs changed 5 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 12 (its worst body is dalfox::scanning::payload_families::get_dom_payloads_for_context at line 437), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(scanner): gate XSS findings by response content type (#1494)”; “fix(scanner): preserve payload selection and valid WAF variants (#1490)”; “fix(dom-verify): false [V] on inert JS-string / data-block reflections, numeric A findings (#1478)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/scanning/payload_families.rs`: 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.
Repeated repair: src/lib.rs src/lib.rs:230— src/lib.rs changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 6 (its worst body is dalfox::with_job_scopes at line 230), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(http): honor request pacing and user-agent overrides (#1487)”; “fix: six defects found reviewing the 2026-09-02 merges (#1405-#1424) (#1425)”; “fix(scan): count requests that never reached the target (#1413)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/lib.rs`: 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.
Repeated repair: src/cmd/scan/state_file.rs src/cmd/scan/state_file.rs:620— src/cmd/scan/state_file.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 10 (its worst body is StateFile::append at line 620), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: multi-policy CSP, quoted '>' in script tags, template-literal delimiter, credential-rotation resume, assigned-over parseInt (#1486)”; “fix(scan): preserve incomplete results and resume state (#1485)”; “fix(config): stop config from overriding explicitly typed CLI flags; unrot agent guides (#1372)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/cmd/scan/state_file.rs`: 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.
Repeated repair: src/payload/remote.rs src/payload/remote.rs:472— src/payload/remote.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 7 (its worst body is dalfox::payload::remote::fetch_multiple_text_lists at line 472), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix: bug-hunt batch — blind XSS request builders, batch-mining attribution, server/MCP parity, and CLI silent-clean holes (#1476)”; “fix(server,mcp,payload): daemon-lifecycle defects — preflight pacing, per-job remote cache, draining-job retention, MCP capacity slot (#1406)”; “fix: harden against crashes, hangs, and silently-clean scans (#1361)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/payload/remote.rs`: 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.
Repeated repair: src/server/cors.rs src/server/cors.rs:51— src/server/cors.rs changed 3 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file's churn. Its max cyclomatic complexity is 8 (its worst body is dalfox::server::cors::compile_allowed_origins at line 51), UNDER the 15 threshold, so this is deliberately not filed as a churn × complexity hotspot — the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: “fix(server): anchor origin patterns, and harden the API's secret handling (#1423)”; “fix(server): refuse browser-driven cross-site and rebound requests (#1356)”; “fix(server,mcp): validate and normalize method/encoders at the API boundary (#1269)”. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2026-07-01..2026-09-29, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-01 00:56:41 +09:00' --until='2026-09-29 00:56:41 +09:00' --full-history --no-merges -- src/server/cors.rs`: 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.
Duplicated block (7 lines × 2) src/cmd/scan/analysis.rs:472— src/cmd/scan/analysis.rs:472-478 | src/parameter_analysis/mod.rs:1342-1348 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (7 lines × 2) src/scanning/check_reflection.rs:2687— src/scanning/check_reflection.rs:2687-2693 | src/scanning/check_reflection.rs:2836-2842 — 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 (7 lines × 2) src/scanning/url_inject.rs:633— src/scanning/url_inject.rs:633-639 | src/scanning/xss_blind.rs:280-286 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) src/utils/shimmer.rs:155— src/utils/shimmer.rs:155-161 | src/utils/shimmer.rs:177-183 — 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 (7 lines × 2) src/utils/log.rs:50— src/utils/log.rs:50-56 | src/utils/term.rs:182-188 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (7 lines × 2) src/parameter_analysis/mining/context_detect.rs:198— src/parameter_analysis/mining/context_detect.rs:198-204 | src/parameter_analysis/mining/context_detect.rs:213-219 — 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 (7 lines × 2) src/parameter_analysis/mining/probe_body.rs:21— src/parameter_analysis/mining/probe_body.rs:21-29 | src/parameter_analysis/mining/probe_json.rs:45-51 — before extracting anything, compare `src/parameter_analysis/mining/probe_body.rs` and `src/parameter_analysis/mining/probe_json.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
ScanWorkerCtx::run_dom_phase (cognitive 42) src/scanning/mod.rs:1340— ScanWorkerCtx::run_dom_phase has cognitive complexity 42 (threshold 15). Drivers by points: if/else 14 (37 pts), loops 2 (3 pts), boolean chains 2 (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.
ScanWorkerCtx::process_reflection_result (cognitive 29) src/scanning/mod.rs:1076— ScanWorkerCtx::process_reflection_result has cognitive complexity 29 (threshold 15). Drivers by points: if/else 12 (22 pts), boolean chains 4, loops 1 (3 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.
ScanWorkerCtx::probe_param (cognitive 24) src/scanning/mod.rs:803— ScanWorkerCtx::probe_param has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (4 pts), boolean chains 3, match/switch 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.
ScanWorkerCtx::run_hpp_phase (cognitive 23) src/scanning/mod.rs:1562— ScanWorkerCtx::run_hpp_phase has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (13 pts), match/switch 1 (5 pts), loops 2 (3 pts), boolean chains 2 (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.
ScanWorkerCtx::run_reflection_phase (cognitive 22) src/scanning/mod.rs:943— ScanWorkerCtx::run_reflection_phase has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), boolean chains 5, loops 2 (3 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.
ScanWorkerCtx::scan_param (cognitive 20) src/scanning/mod.rs:626— ScanWorkerCtx::scan_param has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14 (16 pts), boolean chains 3, match/switch 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, 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.
Duplicated block (8 lines × 2) src/cmd/scan/preflight.rs:95— src/cmd/scan/preflight.rs:95-102 | src/cmd/scan/preflight.rs:136-143 — 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 (8 lines × 2) src/scanning/mod.rs:983— src/scanning/mod.rs:983-990 | src/scanning/mod.rs:1395-1402 — 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 (8 lines × 2) src/server/handlers.rs:70— src/server/handlers.rs:70-77 | src/server/handlers.rs:500-507 — 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 (8 lines × 2) src/waf/bypass/mutate.rs:650— src/waf/bypass/mutate.rs:650-657 | src/waf/bypass/mutate.rs:789-796 — 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 (8 lines × 2) src/parameter_analysis/discovery/query.rs:48— src/parameter_analysis/discovery/query.rs:48-58 | src/parameter_analysis/discovery/query.rs:277-284 — 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 (8 lines × 2) src/oob/interactsh/mod.rs:158— src/oob/interactsh/mod.rs:158-165 | src/oob/interactsh/mod.rs:272-279 — 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 (6 lines × 2) src/cmd/scan/analysis.rs:83— src/cmd/scan/analysis.rs:83-88 | src/cmd/scan/scan_loop.rs:113-118 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (6 lines × 2) src/parameter_analysis/discovery/form.rs:95— src/parameter_analysis/discovery/form.rs:95-100 | src/scanning/xss_blind.rs:471-476 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) src/utils/xml.rs:427— src/utils/xml.rs:427-432 | src/utils/xml.rs:445-450 — 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 (6 lines × 2) src/cmd/scan/logging.rs:57— src/cmd/scan/logging.rs:57-62 | src/cmd/scan/logging.rs:113-118 — 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 (6 lines × 2) src/scanning/ast_dom_analysis/sinks.rs:120— src/scanning/ast_dom_analysis/sinks.rs:120-125 | src/scanning/ast_dom_analysis/sinks.rs:164-169 — 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 (6 lines × 2) src/utils/xml.rs:340— src/utils/xml.rs:340-345 | src/utils/xml.rs:377-382 — 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 (9 lines × 2) src/mcp/job_runtime.rs:56— src/mcp/job_runtime.rs:56-64 | src/server/job_runner.rs:121-129 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (9 lines × 2) src/scanning/check_dom_verification.rs:747— src/scanning/check_dom_verification.rs:747-755 | src/scanning/check_dom_verification.rs:784-792 — 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 (9 lines × 2) src/scanning/url_inject.rs:511— src/scanning/url_inject.rs:511-519 | src/scanning/url_inject.rs:523-531 — 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 (9 lines × 2) src/parameter_analysis/discovery/form.rs:417— src/parameter_analysis/discovery/form.rs:417-425 | src/parameter_analysis/discovery/form.rs:488-496 — 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 (9 lines × 2) src/parameter_analysis/discovery/form.rs:444— src/parameter_analysis/discovery/form.rs:444-452 | src/parameter_analysis/discovery/form.rs:515-523 — 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.
DalfoxMcp::scan_with_dalfox (cognitive 44) src/mcp/mod.rs:396— DalfoxMcp::scan_with_dalfox has cognitive complexity 44 (threshold 15). Drivers by points: if/else 26 (32 pts), boolean chains 5, match/switch 4 (5 pts), loops 2 (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, 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.
DalfoxMcp::run_job (cognitive 32) src/mcp/mod.rs:167— DalfoxMcp::run_job has cognitive complexity 32 (threshold 15). Drivers by points: if/else 17 (24 pts), match/switch 3 (5 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.
DalfoxMcp::results_json_for_scan (cognitive 23) src/mcp/mod.rs:877— DalfoxMcp::results_json_for_scan has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16 (22 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.
DalfoxMcp::preflight_dalfox (cognitive 19) src/mcp/mod.rs:1284— DalfoxMcp::preflight_dalfox has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11, match/switch 6, boolean chains 1, loops 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.
Duplicated block (15 lines × 2) src/cmd/scan/input.rs:434— src/cmd/scan/input.rs:434-448 | src/cmd/scan/input.rs:1406-1420 — 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 (15 lines × 2) src/encoding/pipeline.rs:259— src/encoding/pipeline.rs:259-273 | src/encoding/pipeline.rs:287-301 — 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 (15 lines × 2) src/payload/remote.rs:232— src/payload/remote.rs:232-246 | src/payload/remote.rs:271-285 — 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 (15 lines × 2) src/scanning/check_reflection.rs:220— src/scanning/check_reflection.rs:220-234 | src/scanning/check_reflection.rs:897-911 — 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 (11–12 lines × 2) src/mcp/mod.rs:935— src/mcp/mod.rs:935-946 | src/server/handlers.rs:149-159 — before extracting anything, compare `src/mcp/mod.rs` and `src/server/handlers.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (11–12 lines × 2) src/payload/remote.rs:223— src/payload/remote.rs:223-233 | src/payload/remote.rs:299-310 — 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 (11–12 lines × 2) src/payload/remote.rs:262— src/payload/remote.rs:262-272 | src/payload/remote.rs:361-372 — 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 (11–12 lines × 2) src/server/handlers.rs:63— src/server/handlers.rs:63-73 | src/server/handlers.rs:915-926 — 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 (11 lines × 2) src/cmd/scan/analysis.rs:130— src/cmd/scan/analysis.rs:130-140 | src/cmd/scan/scan_loop.rs:500-510 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (11 lines × 2) src/payload/remote.rs:442— src/payload/remote.rs:442-452 | src/payload/remote.rs:458-468 — 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 (11 lines × 2) src/scanning/check_reflection.rs:1510— src/scanning/check_reflection.rs:1510-1520 | src/scanning/check_reflection.rs:1735-1746 — 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 (11 lines × 2) src/scanning/url_inject.rs:832— src/scanning/url_inject.rs:832-842 | src/scanning/url_inject.rs:857-867 — 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 (10 lines × 2) src/scanning/url_inject.rs:457— src/scanning/url_inject.rs:457-466 | src/scanning/url_inject.rs:471-480 — 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 (10 lines × 2) src/payload/xss_html.rs:115— src/payload/xss_html.rs:115-124 | src/payload/xss_html.rs:161-170 — 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 (10 lines × 2) src/parameter_analysis/discovery/form.rs:230— src/parameter_analysis/discovery/form.rs:230-241 | src/parameter_analysis/discovery/form.rs:349-358 — 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 (10 lines × 2) src/parameter_analysis/mining/probe_graphql.rs:29— src/parameter_analysis/mining/probe_graphql.rs:29-38 | src/parameter_analysis/mining/probe_xml.rs:53-62 — before extracting anything, compare `src/parameter_analysis/mining/probe_graphql.rs` and `src/parameter_analysis/mining/probe_xml.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (8 lines × 3) src/encoding/pipeline.rs:259— src/encoding/pipeline.rs:259-266 | src/encoding/pipeline.rs:287-294 | src/encoding/pipeline.rs:340-347 — 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.
Duplicated block (8 lines × 3) src/encoding/pipeline.rs:264— src/encoding/pipeline.rs:264-272 | src/encoding/pipeline.rs:292-300 | src/encoding/pipeline.rs:370-377 — 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.
Duplicated block (8 lines × 3) src/mcp/job_runtime.rs:56— src/mcp/job_runtime.rs:56-63 | src/server/job_runner.rs:121-128 | src/server/job_runner.rs:164-171 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (8 lines × 3) src/parameter_analysis/discovery/form.rs:355— src/parameter_analysis/discovery/form.rs:355-362 | src/parameter_analysis/discovery/form.rs:436-443 | src/parameter_analysis/discovery/form.rs:507-514 — 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.
DalfoxMcp::scan_with_dalfox (cyclomatic 39) src/mcp/mod.rs:396— DalfoxMcp::scan_with_dalfox has cyclomatic complexity 39 (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.
DalfoxMcp::run_job (cyclomatic 21) src/mcp/mod.rs:167— DalfoxMcp::run_job 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.
DalfoxMcp::preflight_dalfox (cyclomatic 19) src/mcp/mod.rs:1284— DalfoxMcp::preflight_dalfox has cyclomatic complexity 19 (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.
ScanWorkerCtx::run_dom_phase (cyclomatic 17) src/scanning/mod.rs:1340— ScanWorkerCtx::run_dom_phase 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.
ScanWorkerCtx::scan_param (cyclomatic 16) src/scanning/mod.rs:626— ScanWorkerCtx::scan_param 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.
ScanWorkerCtx::probe_param (cyclomatic 16) src/scanning/mod.rs:803— ScanWorkerCtx::probe_param 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.
Change coupling: file.rs ↔ pipe.rs src/cmd/file.rs— `src/cmd/file.rs` and `src/cmd/pipe.rs` change together 95% of the time (21 of the 22 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 21 shared commits counted here, the most recent 3 are `557cb6a0` fix(config): stop config from overriding explicitly typed CLI flags; …; `016c22e9` fix(cli): apply config + global flags + --include-all in url/file/pip…; `2bbb661b` fix(cli): make url/file/pipe subcommands respect an explicit -i/--inp… — run `git show` on any of them.
Change coupling: mod.rs ↔ job_runner.rs src/mcp/mod.rs— `src/mcp/mod.rs` and `src/server/job_runner.rs` change together 93% of the time (13 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 13 shared commits counted here, the most recent 3 are `f57533e3` fix(jobs): align reachability probes with CLI (#1491); `676f492d` fix(server,mcp): run the remote payload fetch inside the scan budget …; `8617b5ab` fix(server,mcp): stop silently discarding proxy/callback_url and corr… — run `git show` on any of them.
Change coupling: tests.rs ↔ tests.rs src/parameter_analysis/discovery/tests.rs— `src/parameter_analysis/discovery/tests.rs` and `src/parameter_analysis/mining/tests.rs` change together 50% of the time (8 of the 16 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — 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 8 shared commits counted here, the most recent 3 are `c8f30734` refactor(args): give ScanArgs a Default so adding a flag touches one …; `8a16cc20` test(parameter_analysis): cover untested pure helpers (#1189); `8776f318` feat(scanning): compute JS breakout from the observed script prefix (… — run `git show` on any of them.
Duplicated block (17 lines × 2) src/mcp/mod.rs:242— src/mcp/mod.rs:242-258 | src/server/job_runner.rs:359-375 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (17 lines × 2) src/scanning/ast_integration.rs:233— src/scanning/ast_integration.rs:233-249 | src/scanning/ast_integration.rs:284-300 — 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 (17 lines × 2) src/server/handlers.rs:20— src/server/handlers.rs:20-36 | src/server/handlers.rs:886-902 — 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 (12 lines × 2) src/server/handlers.rs:18— src/server/handlers.rs:18-29 | src/server/handlers.rs:321-332 — 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 (12 lines × 2) src/utils/fs.rs:73— src/utils/fs.rs:73-84 | src/utils/fs.rs:122-133 — 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 (12 lines × 2) src/cmd/scan/logging.rs:77— src/cmd/scan/logging.rs:77-88 | src/cmd/scan/logging.rs:138-149 — 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 (5 lines × 2) src/oob/interactsh/mod.rs:163— src/oob/interactsh/mod.rs:163-167 | src/oob/interactsh/mod.rs:208-212 — 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 (5 lines × 2) src/encoding/mod.rs:235— src/encoding/mod.rs:235-239 | src/encoding/mod.rs:268-272 — 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 (5 lines × 2) src/server/handlers.rs:464— src/server/handlers.rs:464-468 | src/server/handlers.rs:470-474 — 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.
Result::results_to_markdown_with_meta (cyclomatic 27) src/scanning/result/format_markdown.rs:91— Result::results_to_markdown_with_meta has cyclomatic complexity 27 (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.
Result::results_to_sarif_with_meta (cyclomatic 21) src/scanning/result/format_sarif.rs:24— Result::results_to_sarif_with_meta 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.
Result::results_to_markdown_with_meta (cognitive 72) src/scanning/result/format_markdown.rs:91— Result::results_to_markdown_with_meta has cognitive complexity 72 (threshold 15). Drivers by points: if/else 27 (64 pts), loops 2 (5 pts), boolean chains 3 (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.
Result::results_to_sarif_with_meta (cognitive 20) src/scanning/result/format_sarif.rs:24— Result::results_to_sarif_with_meta has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 4, loops 1, match/switch 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.
Duplicated block (19 lines × 2) src/payload/remote.rs:309— src/payload/remote.rs:309-327 | src/payload/remote.rs:371-389 — 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 (19 lines × 2) src/scanning/xss_common.rs:70— src/scanning/xss_common.rs:70-92 | src/scanning/xss_common.rs:120-138 — 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) src/payload/remote.rs:237— src/payload/remote.rs:237-254 | src/payload/remote.rs:318-335 — 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) src/payload/remote.rs:276— src/payload/remote.rs:276-293 | src/payload/remote.rs:380-397 — 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 (15–16 lines × 2) src/scanning/check_reflection.rs:589— src/scanning/check_reflection.rs:589-603 | src/scanning/check_reflection.rs:704-719 — 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 (15–16 lines × 2) src/scanning/ast_dom_analysis/sinks.rs:612— src/scanning/ast_dom_analysis/sinks.rs:612-626 | src/scanning/ast_dom_analysis/sinks.rs:755-770 — 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 (14 lines × 2) src/server/handlers.rs:104— src/server/handlers.rs:104-117 | src/server/handlers.rs:531-544 — 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 (14 lines × 2) src/parameter_analysis/discovery/form.rs:429— src/parameter_analysis/discovery/form.rs:429-442 | src/parameter_analysis/discovery/form.rs:500-513 — 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 (13 lines × 2) src/job/mod.rs:94— src/job/mod.rs:94-106 | src/job/mod.rs:723-735 — 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 (13 lines × 2) src/scanning/xss_blind.rs:352— src/scanning/xss_blind.rs:352-364 | src/scanning/xss_blind.rs:539-551 — 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.
TodoComment src/parameter_analysis/mod.rs:387— /// TODO: — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
D22 · Internal API Consistency· Inconsistent return type for validation methods. `Config.normalize_and_validate` returns `String` (likely an error message or empty string), while `ScanConfig.normalize_and_validate` also returns `String`. However, standard Rust API conventions for validation usually return `Result<(), Error>` or `Result<Self, Error>`. Returning a `String` for success/failure is ambiguous and inconsistent with idiomatic Rust error handling, especially when other parts of the API (like `parse_target`) return `Result`. Furthermore, having validation logic in both the parent and child config types suggests duplication of intent. · ×1
Inconsistent return type for validation methods. `Config.normalize_and_validate` returns `String` (likely an error message or empty string), while `ScanConfig.normalize_and_validate` also returns `String`. However, standard Rust API conventions for validation usually return `Result<(), Error>` or `Result<Self, Error>`. Returning a `String` for success/failure is ambiguous and inconsistent with idiomatic Rust error handling, especially when other parts of the API (like `parse_target`) return `Result`. Furthermore, having validation logic in both the parent and child config types suggests duplication of intent. — Change both methods to return `Result<(), ValidationError>` or `Result<Self, ValidationError>`. Remove `normalize_and_validate` from `ScanConfig` if it is purely called by `Config`, or ensure they have distinct, non-overlapping responsibilities with clear return types. (signatures: dalfox.config.ScanConfig.normalize_and_validate(): String | dalfox.config.Config.normalize_and_validate(): String)
D22 · Internal API Consistency· Naming inconsistency in reflection checking functions. `check_reflection_with_response` and `check_reflection_with_response_tracked` differ only by the 'tracked' suffix (likely adding concurrency tracking), but `check_reflection_with_hpp_url` uses a different pattern (`with_hpp_url`) instead of `with_response` or `with_client`. This makes it unclear if `hpp_url` is a variant of response checking or a distinct operation. The naming convention is not uniform across similar operations. · ×1
Naming inconsistency in reflection checking functions. `check_reflection_with_response` and `check_reflection_with_response_tracked` differ only by the 'tracked' suffix (likely adding concurrency tracking), but `check_reflection_with_hpp_url` uses a different pattern (`with_hpp_url`) instead of `with_response` or `with_client`. This makes it unclear if `hpp_url` is a variant of response checking or a distinct operation. The naming convention is not uniform across similar operations. — Unify naming to `check_reflection_with_<variant>`. If `hpp_url` is just a specific way to get a response, consider `check_reflection_with_hpp` or ensure the 'with_' prefix consistently denotes the input source (e.g., `with_response`, `with_hpp_response`). Alternatively, use a single function with an enum argument for the source type. (signatures: dalfox.scanning.check_reflection.check_reflection_with_response(...) | dalfox.scanning.check_reflection.check_reflection_with_response_tracked(...) | dalfox.scanning.check_reflection.check_reflection_with_hpp_url(...))
D22 · Internal API Consistency· Inconsistent naming and return types for DOM verification. `check_dom_verification` and `check_dom_verification_with_client` return `(bool, Option<String>)`, while `check_dom_verification_with_client_outcome` returns `DomVerifyOutcome`. The 'outcome' suffix is inconsistent with the other 'with_client' variants. Additionally, having three functions for essentially the same operation with different return types (primitive tuple vs. struct) is confusing. · ×1
Inconsistent naming and return types for DOM verification. `check_dom_verification` and `check_dom_verification_with_client` return `(bool, Option<String>)`, while `check_dom_verification_with_client_outcome` returns `DomVerifyOutcome`. The 'outcome' suffix is inconsistent with the other 'with_client' variants. Additionally, having three functions for essentially the same operation with different return types (primitive tuple vs. struct) is confusing. — Standardize on a single function signature, preferably returning `DomVerifyOutcome`. Remove the variants that return tuples unless they are strictly internal helpers, or rename them to clearly indicate they are legacy/compatibility wrappers. (signatures: dalfox.scanning.check_dom_verification.check_dom_verification(...) | dalfox.scanning.check_dom_verification.check_dom_verification_with_client(...) | dalfox.scanning.check_dom_verification.check_dom_verification_with_client_outcome(...))
D22 · Internal API Consistency· Inconsistent naming pattern for light verification. The functions are named `verify_dom_xss_light` and `verify_dom_xss_light_with_client`. In other modules (like `check_reflection`), the pattern is `check_..._with_response` vs `check_..._with_response_tracked`. Here, the base function doesn't specify the client source, implying it might use a global or default client, while the `_with_client` variant is explicit. This is a minor inconsistency in naming philosophy compared to other modules. · ×1
Inconsistent naming pattern for light verification. The functions are named `verify_dom_xss_light` and `verify_dom_xss_light_with_client`. In other modules (like `check_reflection`), the pattern is `check_..._with_response` vs `check_..._with_response_tracked`. Here, the base function doesn't specify the client source, implying it might use a global or default client, while the `_with_client` variant is explicit. This is a minor inconsistency in naming philosophy compared to other modules. — Unify naming to `verify_dom_xss_light_with_<variant>`. If the base function uses a default client, rename it to `verify_dom_xss_light_default` for clarity. (signatures: dalfox.scanning.light_verify.verify_dom_xss_light(...) | dalfox.scanning.light_verify.verify_dom_xss_light_with_client(...))
D22 · Internal API Consistency· Inconsistent method naming for remote resource initialization. There are `init_remote_payloads` and `init_remote_wordlists` (no options), and `init_remote_payloads_with` and `init_remote_wordlists_with` (with options). The 'with' suffix is used for the options variant, but the base methods don't have a clear counterpart like `init_remote_payloads_default`. More importantly, `init_remote_payloads` and `init_remote_wordlists` are separate methods, whereas `init_remote_resources` in `utils` combines them. This duplication of intent (initializing remote resources) across different modules (`remote` vs `utils`) is confusing. · ×1
Inconsistent method naming for remote resource initialization. There are `init_remote_payloads` and `init_remote_wordlists` (no options), and `init_remote_payloads_with` and `init_remote_wordlists_with` (with options). The 'with' suffix is used for the options variant, but the base methods don't have a clear counterpart like `init_remote_payloads_default`. More importantly, `init_remote_payloads` and `init_remote_wordlists` are separate methods, whereas `init_remote_resources` in `utils` combines them. This duplication of intent (initializing remote resources) across different modules (`remote` vs `utils`) is confusing. — Consolidate remote resource initialization into a single API surface. Either expose `init_remote_resources` in the `remote` module or remove the `utils` wrapper. Ensure method names are consistent (e.g., `init_payloads` vs `init_wordlists` vs `init_resources`). Consider using a single `init_remote_resources(options: RemoteFetchOptions)` method that handles both payloads and wordlists. (signatures: dalfox.payload.remote.init_remote_payloads(...) | dalfox.payload.remote.init_remote_wordlists(...) | dalfox.payload.remote.init_remote_payloads_with(...) | dalfox.payload.remote.init_remote_wordlists_with(...))
Near-duplicate member pair (70 shared lines) src/server/handlers.rs:17— src/server/handlers.rs:17-117 | src/server/handlers.rs:320-544 — These two members are variants of one another: 70 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication· Members sharing a duplicated core (8 members, 50+ identical tokens) · ×1
Members sharing a duplicated core (8 members, 50+ identical tokens) src/parameter_analysis/discovery/cookie.rs:10— src/parameter_analysis/discovery/cookie.rs:10-106 | src/parameter_analysis/discovery/header.rs:67-184 | src/parameter_analysis/discovery/query.rs:35-352 | src/parameter_analysis/mining/probe_body.rs:11-183 | src/parameter_analysis/mining/probe_graphql.rs:23-135 | src/parameter_analysis/mining/probe_json.rs:11-207 | src/parameter_analysis/mining/probe_multipart.rs:20-131 | src/parameter_analysis/mining/probe_xml.rs:44-165 — These 8 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 8 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 8 times.
Duplicated block (22–27 lines × 2) src/scanning/check_dom_verification.rs:1208— src/scanning/check_dom_verification.rs:1208-1229 | src/scanning/check_reflection.rs:2739-2765 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (24–25 lines × 2) src/mcp/mod.rs:961— src/mcp/mod.rs:961-985 | src/server/handlers.rs:161-184 — before extracting anything, compare `src/mcp/mod.rs` and `src/server/handlers.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (23 lines × 2) src/parameter_analysis/mining/probe_graphql.rs:109— src/parameter_analysis/mining/probe_graphql.rs:109-131 | src/parameter_analysis/mining/probe_xml.rs:139-161 — before extracting anything, compare `src/parameter_analysis/mining/probe_graphql.rs` and `src/parameter_analysis/mining/probe_xml.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20–21 lines × 2) src/mcp/mod.rs:1144— src/mcp/mod.rs:1144-1163 | src/server/handlers.rs:796-816 — before extracting anything, compare `src/mcp/mod.rs` and `src/server/handlers.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (19–20 lines × 2) src/server/handlers.rs:46— src/server/handlers.rs:46-65 | src/server/handlers.rs:348-366 — 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 (17–20 lines × 2) src/server/handlers.rs:80— src/server/handlers.rs:80-99 | src/server/handlers.rs:509-525 — 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 (12–20 lines × 2) src/scanning/param_jobs.rs:211— src/scanning/param_jobs.rs:211-230 | src/scanning/param_jobs.rs:256-267 — 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 (17–18 lines × 5) src/parameter_analysis/discovery/cookie.rs:89— src/parameter_analysis/discovery/cookie.rs:89-105 | src/parameter_analysis/discovery/header.rs:167-183 | src/parameter_analysis/discovery/path.rs:177-193 | src/parameter_analysis/mining/probe_body.rs:156-173 | src/parameter_analysis/mining/probe_json.rs:182-199 — before extracting anything, compare `src/parameter_analysis/discovery/cookie.rs` and `src/parameter_analysis/discovery/header.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (15–18 lines × 2) src/mcp/mod.rs:1615— src/mcp/mod.rs:1615-1632 | src/server/handlers.rs:673-687 — before extracting anything, compare `src/mcp/mod.rs` and `src/server/handlers.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 76 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
Duplicated block (14–17 lines × 3) src/parameter_analysis/discovery/cookie.rs:37— src/parameter_analysis/discovery/cookie.rs:37-53 | src/parameter_analysis/discovery/header.rs:125-140 | src/parameter_analysis/mining/probe_body.rs:76-89 — before extracting anything, compare `src/parameter_analysis/discovery/cookie.rs` and `src/parameter_analysis/discovery/header.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (14–16 lines × 4) src/parameter_analysis/mining/probe_body.rs:147— src/parameter_analysis/mining/probe_body.rs:147-162 | src/parameter_analysis/mining/probe_graphql.rs:113-126 | src/parameter_analysis/mining/probe_json.rs:173-188 | src/parameter_analysis/mining/probe_xml.rs:143-156 — before extracting anything, compare `src/parameter_analysis/mining/probe_body.rs` and `src/parameter_analysis/mining/probe_json.rs` as WHOLE FILES: this scan already matched 4 separate duplicated blocks between them, totalling at least 54 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (16 lines × 3) src/parameter_analysis/mining/probe_graphql.rs:120— src/parameter_analysis/mining/probe_graphql.rs:120-135 | src/parameter_analysis/mining/probe_multipart.rs:116-131 | src/parameter_analysis/mining/probe_xml.rs:150-165 — before extracting anything, compare `src/parameter_analysis/mining/probe_graphql.rs` and `src/parameter_analysis/mining/probe_xml.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13–14 lines × 3) src/parameter_analysis/discovery/cookie.rs:81— src/parameter_analysis/discovery/cookie.rs:81-94 | src/parameter_analysis/discovery/header.rs:159-172 | src/parameter_analysis/mining/probe_multipart.rs:110-122 — before extracting anything, compare `src/parameter_analysis/discovery/cookie.rs` and `src/parameter_analysis/discovery/header.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13–14 lines × 2) src/parameter_analysis/mining/probe_graphql.rs:64— src/parameter_analysis/mining/probe_graphql.rs:64-77 | src/parameter_analysis/mining/probe_xml.rs:97-109 — before extracting anything, compare `src/parameter_analysis/mining/probe_graphql.rs` and `src/parameter_analysis/mining/probe_xml.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 79 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10–13 lines × 4) src/parameter_analysis/discovery/cookie.rs:41— src/parameter_analysis/discovery/cookie.rs:41-53 | src/parameter_analysis/discovery/header.rs:129-140 | src/parameter_analysis/discovery/query.rs:67-78 | src/parameter_analysis/mining/probe_body.rs:80-89 — before extracting anything, compare `src/parameter_analysis/discovery/cookie.rs` and `src/parameter_analysis/discovery/header.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (10–13 lines × 2) src/cmd/scan/analysis.rs:822— src/cmd/scan/analysis.rs:822-834 | src/cmd/scan/analysis.rs:867-876 — 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 (8–12 lines × 3) src/scanning/check_dom_verification.rs:1217— src/scanning/check_dom_verification.rs:1217-1228 | src/scanning/check_reflection.rs:2558-2565 | src/scanning/check_reflection.rs:2752-2763 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (10–11 lines × 6) src/parameter_analysis/discovery/cookie.rs:40— src/parameter_analysis/discovery/cookie.rs:40-50 | src/parameter_analysis/discovery/header.rs:128-138 | src/parameter_analysis/mining/probe_body.rs:79-88 | src/parameter_analysis/mining/probe_json.rs:84-93 | src/parameter_analysis/mining/probe_multipart.rs:63-72 | src/parameter_analysis/mining/probe_xml.rs:96-105 — before extracting anything, compare `src/parameter_analysis/discovery/cookie.rs` and `src/parameter_analysis/discovery/header.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 73 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (11 lines × 3) src/scanning/ast_dom_analysis/sinks.rs:426— src/scanning/ast_dom_analysis/sinks.rs:426-436 | src/scanning/ast_dom_analysis/sinks.rs:620-630 | src/scanning/ast_dom_analysis/sinks.rs:764-774 — 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.
Duplicated block (9–10 lines × 3) src/parameter_analysis/discovery/form.rs:171— src/parameter_analysis/discovery/form.rs:171-179 | src/parameter_analysis/discovery/form.rs:244-253 | src/parameter_analysis/discovery/form.rs:315-323 — 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.
Duplicated block (9–10 lines × 2) src/cmd/scan/output.rs:43— src/cmd/scan/output.rs:43-52 | src/scanning/param_jobs.rs:25-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (4–10 lines × 4) src/parameter_analysis/discovery/query.rs:151— src/parameter_analysis/discovery/query.rs:151-160 | src/parameter_analysis/discovery/query.rs:230-239 | src/parameter_analysis/discovery/query.rs:286-289 | src/parameter_analysis/discovery/query.rs:326-329 — all 4 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.
Duplicated block (8–9 lines × 2) src/cmd/scan/output.rs:249— src/cmd/scan/output.rs:249-257 | src/cmd/scan/output.rs:266-273 — 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 (7 lines × 3) src/cmd/scan/input.rs:595— src/cmd/scan/input.rs:595-601 | src/cmd/scan/input.rs:1156-1162 | src/job/runner.rs:46-52 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (3–6 lines × 3) src/parameter_analysis/discovery/query.rs:164— src/parameter_analysis/discovery/query.rs:164-173 | src/parameter_analysis/discovery/query.rs:243-248 | src/parameter_analysis/discovery/query.rs:289-291 — 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.
Duplicated block (5 lines × 3) src/parameter_analysis/discovery/form.rs:443— src/parameter_analysis/discovery/form.rs:443-447 | src/parameter_analysis/discovery/form.rs:514-518 | src/parameter_analysis/discovery/query.rs:330-334 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (9 lines × 3) src/cmd/file.rs:36— src/cmd/file.rs:36-44 | src/cmd/pipe.rs:31-39 | src/cmd/url.rs:37-45 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
Duplicated block (14 lines × 3) src/scanning/ast_dom_analysis/sinks.rs:476— src/scanning/ast_dom_analysis/sinks.rs:476-489 | src/scanning/ast_dom_analysis/sinks.rs:668-681 | src/scanning/ast_dom_analysis/sinks.rs:803-816 — 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.
Duplicated block (11 lines × 6) src/server/handlers.rs:19— src/server/handlers.rs:19-29 | src/server/handlers.rs:126-136 | src/server/handlers.rs:322-332 | src/server/handlers.rs:616-626 | src/server/handlers.rs:726-736 | src/server/handlers.rs:885-895 — all 6 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.
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.
Silent fallback default on Err src/scanning/result/format_json.rs:25— `results_to_json` turns every `Err` into `"[]".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err src/scanning/result/format_sarif.rs:189— `results_to_sarif_with_meta` turns every `Err` into `"{}".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err src/scanning/result/format_toml.rs:48— `results_to_toml_with_meta` turns every `Err` into `"".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err src/scanning/ast_integration.rs:1321— `analyze_javascript_for_dom_xss_with_html_context` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err src/scanning/check_dom_verification.rs:1548— `check_dom_verification_with_evidence` turns every `Err` into `DomVerifyEvidenceOutcome::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err src/encoding/pipeline.rs:258— `infer_b64_json` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err src/encoding/pipeline.rs:286— `infer_b64url_json` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err src/encoding/pipeline.rs:339— `infer_jwt` turns every `Err` into `Vec::new()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err src/scanning/vuln_libs.rs:252— `parse_version` turns every `Err` into `0` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Silent fallback default on Err src/config.rs:815— `default_json_template` turns every `Err` into `"{\n \"scan\": {}\n}".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. 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 arm or in the doc comment, and the row stops firing.
Duplicated predicate src/scanning/check_reflection.rs:1358— `end < bytes.len() && (bytes[end].is_ascii_alphanumeric() || bytes[end] == b'-')` appears character-identically in 2 files — src/scanning/check_reflection.rs, src/utils/html.rs. 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 src/job/tests.rs:845— `err.contains("blind") && err.contains("http")` appears character-identically in 2 files — src/job/tests.rs, src/server/tests.rs. 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 src/mcp/mod.rs:213— `target.insecure && target.url.scheme().eq_ignore_ascii_case("https")` appears character-identically in 2 files — src/mcp/mod.rs, src/server/job_runner.rs. 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.
Subsumed condition operand src/scanning/ast_integration.rs:1050— `source.contains("SharedWorker.message")` can never decide this `||` — every value satisfying `source.contains("SharedWorker.message")` also satisfies `source.contains("Worker.message")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand src/scanning/ast_integration.rs:1245— `source.contains("SharedWorker.message")` can never decide this `||` — every value satisfying `source.contains("SharedWorker.message")` also satisfies `source.contains("Worker.message")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
Subsumed condition operand src/waf/bypass/mutate.rs:405— `payload.contains("<img")` can never decide this `||` — every value satisfying `payload.contains("<img")` also satisfies `payload.contains("<im")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
No ADRs found — 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/`.
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.
Outdated: clap — `clap` is locked at 4.6.3 but 4.6.7 is the current stable release on crates.io, and it already satisfies the `"4.0"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated Cargo.lock.
Outdated: clap_complete — `clap_complete` is locked at 4.6.9 but 4.6.11 is the current stable release on crates.io, and it already satisfies the `"4"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap_complete` and commit the updated Cargo.lock.
Outdated: clap_mangen — `clap_mangen` is locked at 0.3.1 but 0.3.3 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap_mangen` and commit the updated Cargo.lock.
Outdated: rmcp — `rmcp` is locked at 3.4.1 but 3.5.0 is the current stable release on crates.io, and it already satisfies the `"3.0.1"` requirement declared in Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rmcp` and commit the updated Cargo.lock.
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.
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.
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.
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.
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.
Run 01a0f059-37e5-792e-b66f-3d96c6350b0f · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 92 · Warnings: 394 · Recommendations: 19 · Info: 4 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 30-09-2026 @ 03:26 UTC.
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.