Public report — nuclei, published 6 Aug 2026. Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version; ask the repo owner for the full report.
Watchdog 06-08-2026 @ 08:28 UTC Public
Code Health Audit

Projectdiscovery/nuclei

No baseline yet — first run
60% Adequate
CriticalWeakAdequateStrongExemplary
middle

Medium · 81,999 LoC · rebuild ~1.3 person-years · weakest lens: Security (53%)

Grounded in facts. Every number here is computed, not narrated — reproducible, tool-backed, and traceable to a line of code. How to trust this ▸

38/40dimensions tool-verifieddeterministic · confidence 1.0 · 2 LLM-assisted, advisory
603findings with an exact file:lineof 620 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
40/109dimensions across the health lenses81999 LoC — wide & deep

Executive summary

Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.

projectdiscovery/nuclei is sound in substance but carries real gaps (60%). It is not in crisis, but the issues below raise the cost of changing it — friction its consumers ultimately inherit.

It is strongest in Event-Driven (100%) — its messaging keeps components properly decoupled. Architecture (100%) is solid too.

The area that most needs attention is Security (53%) — exposure to security and compliance incidents is elevated. Accessibility (57%) is the next concern — it raises ongoing delivery and operational cost.

Leadership focus, highest impact first: Declare <html lang>, a document <title> and a <main> landmark,… (Page structure); accessibility in the test suite you already have (A11y enforcement); 49 High finding(s) (Static Analysis (SAST)).

For scale: Medium (~81,999 production lines); rebuilding it from scratch would take roughly ~1.3 person-years (~1–3 engineers). Approximate, ±~30%.

It builds on a genuinely strong Event-Driven foundation (100%); the priorities above are the highest-leverage way to bring the rest up to that level.

How the score is built — each lens's share of the headline Width 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.
Security 53% · 46% weightAccessibility 57% · 25% weightMaturity 61% · 14% weightReadiness 74% · 8% weightCode Health 81% · 4% weightArchitecture 100% · 2% weightEvent-Driven 100% · 1% weight

Raise Security 53 → 70 (the Healthy floor) ⇒ headline 60 → ~64.

Code composition — where the lines go
Tests 100%
Rebuild cost & value ~ Modeled — €62,000–€310,000
Cost to rebuild€62,000–€310,000 (0.6–2.0 person-years (1,037–3,291 h), ~1–3 engineers)
Domain complexityHigh — harder problems cost more per line
Quality factor0.8× (at 60% quality) — the last 20% of quality is most of the work
Size & shapeMedium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
Dead frontend code~190 LoC unreachable (4 file(s)) — that slice of this estimate buys code with zero runtime value; deleting it is the cheapest win in this report (the R7 card lists every file)

This codebase represents roughly ~1.3 person-years of build effort (about ~€190,000 to rebuild). Its weakest lens is Security at 53% — the part of that asset most exposed by the findings below.

How we model this: boilerplate at a scaffolding rate + logic × domain High (×1.5) — CQRS, event-driven integration × a 0.8× 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 network policy finding(s) in Network Egress Confinement.
+2.1 pts · Low effort · Network Egress Confinement
2
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
+4.2 pts · Medium effort · Page structure
3
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
+4.2 pts · Medium effort · A11y enforcement

Diagnosis — what's actually going on

The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 32.8–196.6 engineer-days every year, paid as drag on the ~175,350 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 7–17% 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: 43,237 line(s) changed over a 90-day window ⇒ ~175,350/year · D1/D2/D4 code quality: averaging 5.0/10 ⇒ a 7–17% 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 Medium asset (~1.3 person-years to rebuild), and its weakest lens is Security at 53%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Medium, ~1.3 person-years rebuild (81,999 LoC) · weakest lens: Security 53%
→ Direct remediation budget at Security 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: Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 5.0/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 7–17% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 5.0/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

235 modules, 472 dependencies — 1 dependency cycle, shown as the red cell(s) above the diagonal. 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.)

…nuclei/v3/pkg/catalog…nuclei/v3/pkg/js/gojs…uclei/v3/pkg/js/utils…3/pkg/templates/types…lei/v3/pkg/utils/json…ei/v3/pkg/input/types…/model/types/severity…/operators/extractors…kg/operators/matchers…uclei/v3/pkg/progress…y/nuclei/v3/pkg/model…clei/v3/pkg/operators…ls/common/contextargs…ting/trackers/filters…y/nuclei/v3/pkg/types…v3/pkg/input/provider…v3/pkg/protocols/code…ols/common/generators…v3/pkg/protocols/file…/v3/pkg/protocols/ssl…3/pkg/protocols/whois…clei/v3/pkg/reporting…ry/nuclei/v3/pkg/scan…ry/nuclei/v3/pkg/fuzz…ols/common/interactsh…/v3/pkg/protocols/dns…/protocols/javascript…pkg/protocols/network…g/protocols/websocket…ocols/headless/engine…v3/pkg/protocols/http…kg/protocols/headless…clei/v3/pkg/templates…ry/nuclei/v3/pkg/core…scovery/nuclei/v3/lib…/nuclei/v3/pkg/output…clei/v3/pkg/protocols…v3/pkg/catalog/loader…ei/v3/internal/server…ei/v3/internal/runner…nuclei/v3/pkg/catalog1…nuclei/v3/pkg/js/gojs2…uclei/v3/pkg/js/utils3…3/pkg/templates/types4…lei/v3/pkg/utils/json5…ei/v3/pkg/input/types6…/model/types/severity7…/operators/extractors8…kg/operators/matchers9…uclei/v3/pkg/progress10…y/nuclei/v3/pkg/model11…clei/v3/pkg/operators12…ls/common/contextargs13…ting/trackers/filters14…y/nuclei/v3/pkg/types15…v3/pkg/input/provider16…v3/pkg/protocols/code17…ols/common/generators18…v3/pkg/protocols/file19…/v3/pkg/protocols/ssl20…3/pkg/protocols/whois21…clei/v3/pkg/reporting22…ry/nuclei/v3/pkg/scan23…ry/nuclei/v3/pkg/fuzz24…ols/common/interactsh25…/v3/pkg/protocols/dns26…/protocols/javascript27…pkg/protocols/network28…g/protocols/websocket29…ocols/headless/engine30…v3/pkg/protocols/http31…kg/protocols/headless32…clei/v3/pkg/templates33…ry/nuclei/v3/pkg/core34…scovery/nuclei/v3/lib35…/nuclei/v3/pkg/output36…clei/v3/pkg/protocols37…v3/pkg/catalog/loader38…ei/v3/internal/server39…ei/v3/internal/runner4012111113112111311111113321211121441111133111113324221211262511111125411111233111111253111112331231121212335411111212541513114111211121213119122112121131221312211113132212232111172111431211111121121132211211331+195 more modules (most-connected shown)

At a glance — Code Health · 81% · Adequate · gated by D1, D2

At a glance — Architecture · 100% · Exemplary

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

At a glance — Readiness · 74% · Strong

At a glance — Security · 53% · Adequate · gated by D29, D36

At a glance — Event-Driven · 100% · Exemplary

At a glance — Accessibility · 57% · Adequate · gated by AC3

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A03:2021 — Injection50High / Critical
A05:2021 — Security Misconfiguration31High / Critical
A02:2021 — Cryptographic Failures2High / Critical
A06:2021 — Vulnerable & Outdated Components1Medium

Roadmap

Begin by correcting the page structure to ensure proper semantic HTML and accessibility landmarks. Next, enforce accessibility checks within the existing test suite and gate them in CI to prevent regressions. Simultaneously, resolve the 49 high-priority static analysis findings, starting with performance and fuzzing configurations. Finally, document significant architectural decisions in a dedicated folder and add a testing section to the root README for clarity.

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

Do thisHelpsEffortDimension
Resolve the 1 No network policy finding(s) in Network Egress Confinement.+2.1 ptsLowNetwork Egress Confinement
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+4.2 ptsMediumPage structure
Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.+4.2 ptsMediumA11y enforcement
Resolve the 49 High finding(s) in Static Analysis (SAST) — start with perf-regression.yaml (6), flamegraph.yaml (5), fuzz.yaml (5).+3.5 ptsMediumStatic Analysis (SAST)
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 `NNNN-title.md` names is the most discoverable form).+3.1 ptsMediumArchitecture documentation
Add a 'Testing' section to the root README — how to run the test suite.+2.9 ptsMediumDocumentation (README)
Resolve the 1 Secret finding(s) in Secrets (history) — start with integration.go.+1.3 ptsLowSecrets (history)
Resolve the 5 High IaC finding(s) in IaC & Container Security — start with Dockerfile (2), Dockerfile.goreleaser, interactsh-deployment.yaml.+1.3 ptsLowIaC & Container Security

File quality

Per-file score 0–10 — a quality signature. Of 193 files carrying findings, judged against the Production bar: 2% slop · 71% mixed · 27% near-clean.

FileScoreBandWorst signal
helm/templates/interactsh-deployment.yaml1.8SlopIaC & Container Security: High IaC: KSV-0014
helm/templates/nuclei-cron.yaml1.9SlopIaC & Container Security: High IaC: KSV-0014
Dockerfile2.1SlopIaC & Container Security: High IaC: DS-0002
Dockerfile.goreleaser4.1MixedIaC & Container Security: High IaC: DS-0002
.github/workflows/perf-regression.yaml4.5MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
.github/workflows/flamegraph.yaml4.6MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
.github/workflows/fuzz.yaml4.6MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
.github/workflows/release.yaml4.6MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
.github/workflows/generate-docs.yaml4.8MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
.github/workflows/generate-pgo.yaml4.8MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
.github/workflows/memogen.yaml4.8MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
pkg/operators/extractors/extract.go5.0MixedStatic Analysis (SAST): High: go-unsafe-deserialization-interface
.github/workflows/govulncheck.yaml5.1MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
internal/fuzzplayground/db.go5.1MixedStatic Analysis (SAST): High: string-formatted-query
pkg/operators/extractors/compile.go5.7MixedCyclomatic Complexity: Extractor.CompileExtractors (cyclomatic 19)
.github/workflows/auto-merge.yaml5.8MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
.github/workflows/compat-checks.yaml5.8MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
.github/workflows/typos.yaml5.8MixedStatic Analysis (SAST): High: github-actions-mutable-action-tag
pkg/protocols/http/request.go7.0MixedCyclomatic Complexity: Request.executeRequest (cyclomatic 128)
pkg/catalog/loader/loader.go7.0MixedCyclomatic Complexity: Store.LoadTemplatesWithTags (cyclomatic 52)

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. 38 of 40 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 2 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.6 — 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 — 40 dimensions across the health lenses
D1D2D3D4D13D15D16D19D21D28D29D31D34D35D36D38D40D41AC2AC3AC6AC7AX5ED2ED3M1M2M3M4P1P3P4P6R1R10R2R3R4R7R9

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

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

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

Tools & methods

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

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
jscpdCode duplication✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.302✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.302✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivy · checkovSecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3 · 3.2.533✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurementLocal LLM◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 019fd630-36a0-78fa-9c9d-a9fb3f18deb7.

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

Run transparency — what happened this run

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

  • D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.

Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.

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.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity (jscpd) — 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.
  • 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.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • 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.
  • 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.
  • 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").
  • 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.
  • D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
  • D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
  • AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A clean result is "no unlabelled native control found", not a labelling proof.
  • AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
  • AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
  • AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
  • 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 (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These 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.

Dimensions

D1 · Cyclomatic Complexity3.8 / 10Weak✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 3.8 / 10 · rule-coverage 100% · ceiling Prevented

137 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Request.executeRequest at 128. A further 5 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being ldap.parseLdapEntry at 27 — they are counted neither in the figure above nor in this dimension's score.

main.main (cyclomatic 34) · ×2cmd/nuclei/main.go:57
Request.executeRequest (cyclomatic 128)pkg/protocols/http/request.go:677
runner.New (cyclomatic 74)internal/runner/runner.go:114
Request.Compile (cyclomatic 61)pkg/protocols/http/http.go:328
Runner.RunEnumeration (cyclomatic 56)internal/runner/runner.go:544

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

What to do

  1. Resolve the 2 main.main (cyclomatic 34) finding(s) in Cyclomatic Complexity — start with main.go (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Request.executeRequest (cyclomatic 128) finding(s) in Cyclomatic Complexity — start with request.go. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 runner.New (cyclomatic 74) finding(s) in Cyclomatic Complexity — start with runner.go. — One of this dimension's main actionable groups (1 warning-level).
  4. 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.

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 2.0 / 10 · rule-coverage 100% · ceiling Prevented

226 method(s) exceeded the cognitive complexity threshold of 15; the worst was Request.executeRequest at 231.

Request.executeRequestWithPayloads (cognitive 27) · ×2pkg/protocols/headless/request.go:134
Request.executeRequest (cognitive 231)pkg/protocols/http/request.go:677
main.main (cognitive 133)pkg/js/devtools/scrapefuncs/main.go:38
openapi.generateRequestsFromOp (cognitive 127)pkg/input/formats/openapi/generator.go:166
decoder.decode (cognitive 114)pkg/reporting/trackers/linear/jsonutil/jsonutil.go:74

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

What to do

  1. Resolve the 2 Request.executeRequestWithPayloads (cognitive 27) finding(s) in Cognitive Complexity — start with request.go, js.go. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Request.executeRequest (cognitive 231) finding(s) in Cognitive Complexity — start with request.go. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 main.main (cognitive 133) finding(s) in Cognitive Complexity — start with main.go. — One of this dimension's main actionable groups (1 warning-level).
  4. 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.

D3 · God Classes9.4 / 10Exemplary✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Prevented

10 god class(es) detected.

FileTooLong: http/request.go · ×7pkg/protocols/http/request.go:0
TooManyMethods: Template · ×3pkg/templates/templates.go:36

✓ On the Gold path — maintain.

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

D4 · Code Duplication9.2 / 10Exemplary✓ Tool-verified

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.

Maturity: DocumentedVerifiedPrevented · effective 9.2 / 10 · rule-coverage 100% · ceiling Verified

136 duplicated block group(s) detected.

Duplicated block (8 lines × 2) · ×18cmd/tmc/main.go:242
Duplicated block (7 lines × 2) · ×15lib/sdk_private.go:123
Duplicated block (12 lines × 2) · ×13pkg/input/types/fuzz_harness.go:158
Duplicated block (10 lines × 2) · ×13pkg/js/libs/postgres/postgres.go:49
Duplicated block (5 lines × 2) · ×12cmd/tmc/main.go:266

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

✓ On the Gold path — maintain.

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

D13 · Secret Scanning10.0 / 10Exemplary○ Nothing flagged

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

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

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

D15 · Churn × Complexity Hotspots9.4 / 10Exemplary✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 9.4 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: internal/runner/runner.go (14×74=1036); pkg/protocols/http/request.go (5×128=640); pkg/catalog/loader/loader.go (8×52=416)

Hotspot: internal/runner/runner.go · ×10internal/runner/runner.go

✓ On the Gold path — maintain.

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

D16 · Bus Factor9.6 / 10Exemplary✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: DocumentedVerifiedPrevented · effective 9.6 / 10 · rule-coverage 100% · ceiling Documented

14 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is pkg/js/libs/dcerpc/dcerpc.go.

Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)

✓ On the Gold path — maintain.

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

D19 · Documentation Quality / 10Exemplary◐ Sampled · advisory

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.

Maturity: DocumentedVerifiedPrevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Documented

The project's documentation is comprehensive and well-structured: the main README covers Get Started, CLI usage, templates, a library/SDK example, multi-protocol execution, flow orchestration, input providers, and JS devtools (bindgen, scrapefuncs), with each of these topics documented in its own file. The README also links to localized versions and an ISSUE_TEMPLATE_REFERENCES folder for maintainers, which is excellent for triage.

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D21 · Naming Consistency / 10Exemplary◐ Sampled · 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.

Maturity: DocumentedVerifiedPrevented · effective Exemplary / 10 · rule-coverage 100% · ceiling Verified

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D28 · Secrets (history)9.0 / 10Exemplary✓ Tool-verified

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

Method: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.

Maturity: DocumentedVerifiedPrevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

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

Secret: private-keyv2/pkg/testutils/integration.go:105detected by gitleaks finding
Rotate the exposed credentials — git history can't be un-committed

✓ On the Gold path — maintain.

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

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

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

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

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

Maturity: DocumentedVerifiedPrevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

66 finding(s): 0 critical, 49 high, 10 medium, 7 low.

High: dependabot-missing-cooldown · ×49.github/dependabot.yml:3detected by semgrep finding
Medium: use-of-sha1cmd/generate-checksum/main.go:44detected by semgrep finding

What to do

  1. Resolve the 49 High finding(s) in Static Analysis (SAST) — start with perf-regression.yaml (6), flamegraph.yaml (5), fuzz.yaml (5). — One of this dimension's main actionable groups (49 issue-level).
  2. Resolve the 1 Medium finding(s) in Static Analysis (SAST) — start with main.go. — One of this dimension's main actionable groups (1 warning-level).

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

D31 · IaC & Container Security6.6 / 10Adequate✓ Tool-verified

What it measures: Whether Dockerfiles / Terraform / Kubernetes config follow security best practices.

Method: IaC/container misconfiguration scan via trivy config (Dockerfile/Terraform/K8s/Helm/CloudFormation); severity rules to 0-10 moderate normalizer. NotApplicable without manifests. Exhaustive, deterministic.

Maturity: DocumentedVerifiedPrevented · effective 6.6 / 10 · rule-coverage 100% · ceiling Documented

31 finding(s): 0 critical, 5 high, 14 medium, 12 low.

High IaC: DS-0002 · ×5Dockerfiledetected by trivy finding
Medium IaC: DS-0001 · ×14Dockerfiledetected by trivy finding
Low IaC: KSV-0003 · ×12helm/templates/interactsh-deployment.yamldetected by trivy finding

What to do

  1. Resolve the 5 High IaC finding(s) in IaC & Container Security — start with Dockerfile (2), Dockerfile.goreleaser, interactsh-deployment.yaml. — One of this dimension's main actionable groups (5 issue-level).
  2. Resolve the 14 Medium IaC finding(s) in IaC & Container Security — start with interactsh-deployment.yaml (5), nuclei-cron.yaml (4), Dockerfile (3). — One of this dimension's main actionable groups (14 warning-level).
  3. Resolve the 12 Low IaC finding(s) in IaC & Container Security — start with interactsh-deployment.yaml (6), nuclei-cron.yaml (6). — One of this dimension's main actionable groups (12 recommendation-level).

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

D34 · Knowledge Freshness9.0 / 10Strong✓ Tool-verified

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

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

Maturity: DocumentedVerifiedPrevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

32 of 318 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is pkg/templates/signer/handler.go.

Further orphaned files (smaller)

What to do

  1. Resolve the 1 Further orphaned files (smaller) finding(s) in Knowledge Freshness. — One of this dimension's main actionable groups (1 recommendation-level).

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

D35 · Change Coupling10.0 / 10Exemplary✓ Tool-verified

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

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

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling; coupling through a build step, config, or non-source file isn't seen.

Maturity: DocumentedVerifiedPrevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: compile.go↔extract.go 60%

Change coupling: compile.go ↔ extract.gopkg/operators/extractors/compile.go

✓ On the Gold path — maintain.

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

D36 · Supply-chain Provenance & Signing0.0 / 10Critical✓ Tool-verified

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.

Maturity: DocumentedVerifiedPrevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

0/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

Unpinned build actions
PR-triggered workflow without a permissions block
No build provenance
No artifact signing
No SBOM

What to do

  1. Resolve the 1 Unpinned build actions finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 PR-triggered workflow without a permissions block finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 No build provenance finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

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

D38 · OSV Dependency Vulnerabilities9.8 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies have known published vulnerabilities (CVEs) per the OSV database — read natively from whatever lockfile the repository ships (Cargo, npm, Go, Python, Maven, RubyGems, …). D33 and D30 add ecosystem-specific scanners on top for npm and .NET.

Method: Multi-ecosystem dependency-CVE scan via osv-scanner --recursive (queries the osv.dev database + parses lockfiles natively across ecosystems: npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven/Gradle pom.xml/gradle.lockfile, PyPI requirements.txt/poetry.lock/Pipfile.lock, Composer composer.lock, RubyGems Gemfile.lock, Hex mix.lock, pub pubspec.lock, Swift Package.resolved); severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer (8.0). NotApplicable only when the repo declares no supported non-.NET dependency lockfile (a NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain); coverage needs a resolved lockfile. Additive to D33 (trivy fs); exhaustive + deterministic, DB kept fresh.

Maturity: DocumentedVerifiedPrevented · effective 9.8 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 0 high, 1 medium, 0 low.

Medium vulnerability: GO-2026-5932go.moddetected by osv-scanner finding

✓ On the Gold path — maintain.

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

D40 · Network Egress Confinement6.0 / 10Adequate✓ Tool-verified

What it measures: Whether Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.

Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

0/2 network-egress controls present (network policy, egress restriction).

No network policy

What to do

  1. Resolve the 1 No network policy finding(s) in Network Egress Confinement. — One of this dimension's main actionable groups (1 recommendation-level).

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

D41 · Kernel & Syscall Confinement6.0 / 10Adequate✓ Tool-verified

What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.

Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.

Maturity: DocumentedVerifiedPrevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

0/2 syscall-confinement controls present (seccomp, AppArmor/SELinux).

No seccomp profile
No AppArmor/SELinux confinement

What to do

  1. Resolve the 1 No seccomp profile finding(s) in Kernel & Syscall Confinement. — One of this dimension's main actionable groups (1 recommendation-level).
  2. Resolve the 1 No AppArmor/SELinux confinement finding(s) in Kernel & Syscall Confinement. — One of this dimension's main actionable groups (1 recommendation-level).

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

Frontend & cross-cutting dimensions

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

AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged

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

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

AC3 · Page structure2.7 / 10Weak✓ Tool-verified

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

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

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

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

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

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

AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified

Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.

Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.

  • No accessibility enforcement found — no automated accessibility check runs over the HTML your app renders. Assert the accessibility invariants over that HTML in the test suite you already have (parse the output and assert, or drive a browser), and gate that test in CI so a regression blocks the merge.

What to do

  • Enforce accessibility in the test suite you already have: assert the accessibility invariants over the HTML your app renders — parse the rendered output in an existing test, or drive a real browser from one — and gate that test in CI so a regression blocks the merge.
AX5 · Architecture & structure10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.

Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.

ED2 · Event/command shape10.0 / 10Exemplary✓ Tool-verified

Other · Event-Driven — Whether commands have a single handler (one owner of the decision) and fan-out is modelled with events.

Method: Roslyn scan (event-driven gated): command-shaped messages identified by convention; handler count per command checked for the exactly-one rule. Deterministic, hard fact.

ED3 · Event naming10.0 / 10Exemplary✓ Tool-verified

Other · Event-Driven — Whether events are named in the past tense (a clarity nudge — low weight).

Method: Roslyn scan (event-driven gated): domain and integration events checked for past-tense naming (-ed/-en suffix or irregular set). Naming nudge, low-weight advisory.

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

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.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no `NNNN-title.md` documents 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 `NNNN-title.md` names is the most discoverable form).
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

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

M4 · Documentation accuracy8.0 / 10Strong◐ Sampled · advisory

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.

  • README advertises Terraform / IaC, but no Terraform configuration exists

What to do

  • Reconcile the README with reality: README advertises Terraform / IaC, but no Terraform configuration exists.
P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

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.

P3 · Security & performance tooling9.0 / 10Exemplary✓ Tool-verified

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

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

What to do

  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback8.0 / 10Strong✓ Tool-verified

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.

What to do

  • Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

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

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

What to do

  • Stamp a version in your build/package manifest (e.g. csproj <Version>, package.json, pyproject.toml, Cargo.toml, or a VERSION file) or tag releases with semver so builds and releases are traceable.
R1 · Type Safety8.9 / 10Strong✓ Tool-verified

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

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

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication9.8 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm over JS/TS tokens, D-386).

Method: Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm run over JS/TS tokens). Deterministic.

  • pkg/js/libs/structs/smbexploit.js:5 · pkg/js/libs/structs/smbexploit.js:10 · pkg/js/libs/structs/smbexploit.js:21 · pkg/js/libs/structs/smbexploit.js:27 · +3 more site(s) not listed — all 7 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — smbexploit.js:5
  • pkg/js/libs/structs/smbexploit.js:18 · pkg/js/libs/structs/smbexploit.js:56 — 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. — smbexploit.js:18

What to do

  • Extract the duplicated blocks into shared functions/components.
R2 · Cyclomatic Complexity9.0 / 10Exemplary✓ Tool-verified

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

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

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files8.9 / 10Strong✓ Tool-verified

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

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

What to do

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

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

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

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R7 · Dead Code8.6 / 10Strong✓ Tool-verified

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

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

  • Unreachable from the 1 application, 0 tooling and 0 test entry point(s) detected in this repo. Gate removals on your build/type-check — an undetected custom entry would make these reachable.
  • no import path from any entry point (1 application, 0 tooling, 0 test roots considered) (×4) — smbexploit.js, active_directory.js, dump.js, …

What to do

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

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

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

WCAG coverage — what static analysis assessed

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

DimensionWCAG 2.2 A/AA criteriaCoverage
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

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

Reference — by lens

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

LensScoreRatingImpact
Code Health81%Adequate — gated by D1, D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture100%ExemplarySolid.
Maturity61%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness74%StrongSolid.
Security53%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Event-Driven100%ExemplaryStrongest area.
Accessibility57%Adequate — gated by AC3Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not included — 69 check(s) not relevant to this codebase

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

  • AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
  • AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
  • AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
  • AX1 Captive dependencies — no DI registrations detected
  • AX10 Code composition — not assessed — code composition is computed by ROLE over a document set 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
  • AX2 Stateful singletons — no singleton implementations detected
  • 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 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
  • AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
  • 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 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
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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.
  • 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.
  • D10 Test Quality — ~38695 lines of test source are present (.go) but the test-quality collector reads C# only, so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not included
  • D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
  • D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Go module (go.mod/go.sum)), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
  • D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
  • 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.
  • D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
  • D22 Internal API Consistency — No exposed public API
  • D23 Boundary Type-Coupling — Production source is present (.go, .java, .ts) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. 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 — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Go module (go.mod/go.sum) — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
  • D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
  • D33 JS/npm Dependency Vulnerabilities — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • 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.
  • D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
  • D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
  • D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is mostly .go, .java, .ts, which this pass does not read, so cohesion was not assessed for this repository. Not scored — this is a gap in the analyzer, not a finding 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
  • D9 Test Distribution — Test source is present (.go) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • DM1 Domain Modelling — applicable but not scored (2 of 2 signals for this style — below the bar we score at): 10 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 1 domain event(s)
  • ED1 Handler temporal coupling — no event handlers detected — temporal-coupling check not applicable
  • ED4 Outbox / dual-write — no persistence writes or publishes observed in handlers — atomicity not assessable
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows only 1 of the 3 signals this check looks for (14 Go aggregate(s) recording domain events (own events-slice append / raise-record))
  • GD1 Unfinished & placeholder code — no source files
  • 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
  • P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
  • P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, 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
  • P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
  • P8 Schema migrations — not assessed — schema-migration practice is read from 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
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
  • PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D33 (JS/npm Dependency Vulnerabilities)
  • R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
  • R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
  • 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.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • 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
  • 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
  • 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
  • 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

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.

Issue — 55 finding(s)
D29 · Static Analysis (SAST) · High · ×49
  • High: dependabot-missing-cooldown .github/dependabot.yml:3 — This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or unstable. Add a `cooldown` block with `default-days: 7` to each `package-ecosystem` entry under `updates` to wait 7 days before proposing updates to newly published package versions. Reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown. This is a semgrep security-AUDIT rule reporting a POLICY that is absent or weaker than its recommendation, not an exploitable defect. Confirm whether the current setting is a deliberate decision for this repository — and apply the change where it is not; where it is (a policy your release process already enforces elsewhere, or one this repository has consciously opted out of), record the decision and leave the configuration as it is. This configuration file has 2 such entries; one cooldown decision clears them all — reported once.
  • High: github-actions-mutable-action-tag .github/workflows/auto-merge.yaml:21 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/pr/approve@<40-character SHA>`. This step references `projectdiscovery/actions/pr/approve@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/pr/approve` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/pr/approve` path in `uses:` and query only `projectdiscovery/actions`.
  • High: github-actions-mutable-action-tag .github/workflows/auto-merge.yaml:22 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/pr/merge@<40-character SHA>`. This step references `projectdiscovery/actions/pr/merge@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/pr/merge` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/pr/merge` path in `uses:` and query only `projectdiscovery/actions`.
  • High: github-actions-mutable-action-tag .github/workflows/compat-checks.yaml:16 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v7`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v7 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/compat-checks.yaml:17 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/setup/go/compat-checks@<40-character SHA>`. This step references `projectdiscovery/actions/setup/go/compat-checks@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/setup/go/compat-checks` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/setup/go/compat-checks` path in `uses:` and query only `projectdiscovery/actions`.
  • High: github-actions-mutable-action-tag .github/workflows/flamegraph.yaml:15 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v7`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v7 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/flamegraph.yaml:16 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/setup/go@<40-character SHA>`. This step references `projectdiscovery/actions/setup/go@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/setup/go` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/setup/go` path in `uses:` and query only `projectdiscovery/actions`.
  • High: github-actions-mutable-action-tag .github/workflows/flamegraph.yaml:17 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/nuclei-action/cache@<40-character SHA>`. This step references `projectdiscovery/nuclei-action/cache@v3`; resolve the SHA it points at today with `gh api repos/projectdiscovery/nuclei-action/commits/v3 --jq .sha`. `projectdiscovery/nuclei-action/cache` is hosted INSIDE the `projectdiscovery/nuclei-action` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/nuclei-action/cache` path in `uses:` and query only `projectdiscovery/nuclei-action`.
  • High: github-actions-mutable-action-tag .github/workflows/flamegraph.yaml:46 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/flamegraph@<40-character SHA>`. This step references `projectdiscovery/actions/flamegraph@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/flamegraph` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/flamegraph` path in `uses:` and query only `projectdiscovery/actions`.
  • High: github-actions-mutable-action-tag .github/workflows/flamegraph.yaml:52 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/flamegraph@<40-character SHA>`. This step references `projectdiscovery/actions/flamegraph@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/flamegraph` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/flamegraph` path in `uses:` and query only `projectdiscovery/actions`.
  • High: github-actions-mutable-action-tag .github/workflows/fuzz.yaml:20 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v7`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v7 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/fuzz.yaml:21 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/setup/go@<40-character SHA>`. This step references `projectdiscovery/actions/setup/go@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/setup/go` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/setup/go` path in `uses:` and query only `projectdiscovery/actions`.
  • High: github-actions-mutable-action-tag .github/workflows/fuzz.yaml:40 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v7`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v7 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/fuzz.yaml:41 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/setup/go@<40-character SHA>`. This step references `projectdiscovery/actions/setup/go@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/setup/go` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/setup/go` path in `uses:` and query only `projectdiscovery/actions`.
  • High: github-actions-mutable-action-tag .github/workflows/fuzz.yaml:48 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/generate-docs.yaml:14 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v7`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v7 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/generate-docs.yaml:15 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/setup/go@<40-character SHA>`. This step references `projectdiscovery/actions/setup/go@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/setup/go` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/setup/go` path in `uses:` and query only `projectdiscovery/actions`.
  • High: github-actions-mutable-action-tag .github/workflows/generate-docs.yaml:16 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/setup/git@<40-character SHA>`. This step references `projectdiscovery/actions/setup/git@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/setup/git` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/setup/git` path in `uses:` and query only `projectdiscovery/actions`.
  • High: github-actions-mutable-action-tag .github/workflows/generate-docs.yaml:20 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/commit@<40-character SHA>`. This step references `projectdiscovery/actions/commit@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/commit` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/commit` path in `uses:` and query only `projectdiscovery/actions`.
  • High: github-actions-mutable-action-tag .github/workflows/generate-pgo.yaml:21 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v7`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v7 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/generate-pgo.yaml:22 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/setup/go@<40-character SHA>`. This step references `projectdiscovery/actions/setup/go@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/setup/go` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/setup/go` path in `uses:` and query only `projectdiscovery/actions`.
  • High: github-actions-mutable-action-tag .github/workflows/generate-pgo.yaml:23 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/nuclei-action/cache@<40-character SHA>`. This step references `projectdiscovery/nuclei-action/cache@v3`; resolve the SHA it points at today with `gh api repos/projectdiscovery/nuclei-action/commits/v3 --jq .sha`. `projectdiscovery/nuclei-action/cache` is hosted INSIDE the `projectdiscovery/nuclei-action` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/nuclei-action/cache` path in `uses:` and query only `projectdiscovery/nuclei-action`.
  • High: github-actions-mutable-action-tag .github/workflows/generate-pgo.yaml:46 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v7`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v7 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/govulncheck.yaml:19 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v7`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v7 --jq .sha`.
  • High: github-actions-mutable-action-tag .github/workflows/govulncheck.yaml:20 — GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: projectdiscovery/actions/setup/go@<40-character SHA>`. This step references `projectdiscovery/actions/setup/go@v1`; resolve the SHA it points at today with `gh api repos/projectdiscovery/actions/commits/v1 --jq .sha`. `projectdiscovery/actions/setup/go` is hosted INSIDE the `projectdiscovery/actions` repository (a subdirectory action or a reusable workflow), so the SHA to pin is that repository's commit — keep the full `projectdiscovery/actions/setup/go` path in `uses:` and query only `projectdiscovery/actions`.
  • + 24 more in this group — see findings.md.
D31 · IaC & Container Security · High IaC · ×5
  • High IaC: DS-0002 Dockerfile — Image user should not be 'root' A container that starts as root runs your process with root's capabilities inside the namespace, so a compromise of the process starts from there. The step: create an unprivileged account in the image (`RUN adduser -S -D app`), give it ownership of the paths the process writes at runtime (`COPY --chown=` on those layers, or a `RUN chown -R`), and end the final stage with `USER app` so it is the default at start. Build stages that only compile can stay root; it is the stage that RUNS that needs the account. If the process genuinely requires root — it manages the container runtime, ptraces another process or opens raw devices — say so here rather than making a change that breaks it.
  • High IaC: DS-0025 Dockerfile — 'apk add' is missing '--no-cache' The install step leaves the package manager's index and downloaded packages behind in that layer, so every pull carries them and every CVE in them is attributed to your image. The step: this file installs with `apk`, so end the SAME `RUN` that installs with `&& apk cache clean` — a later `RUN` cannot help, because the cache is already committed to the earlier layer. (The rule's title names the command for a different package manager; the defect it measures is the same one.) Where the builder supports it, `RUN --mount=type=cache` is the alternative: the cache is mounted for the step and never enters a layer at all.
  • High IaC: DS-0002 Dockerfile.goreleaser — Image user should not be 'root' A container that starts as root runs your process with root's capabilities inside the namespace, so a compromise of the process starts from there. The step: create an unprivileged account in the image (`RUN adduser -S -D app`), give it ownership of the paths the process writes at runtime (`COPY --chown=` on those layers, or a `RUN chown -R`), and end the final stage with `USER app` so it is the default at start. Build stages that only compile can stay root; it is the stage that RUNS that needs the account. If the process genuinely requires root — it manages the container runtime, ptraces another process or opens raw devices — say so here rather than making a change that breaks it.
  • High IaC: KSV-0014 helm/templates/interactsh-deployment.yaml — Root file system is not read-only This file is a Helm chart TEMPLATE and it already renders its `securityContext` from the chart's values (`.Values.securityContext`), so it is not the file to edit — writing the block in here would override whatever the chart's users pass in. The value that ships is the one in `helm/values.yaml`: set `securityContext` there and every installation gets it by default.
  • High IaC: KSV-0014 helm/templates/nuclei-cron.yaml — Root file system is not read-only
D28 · Secrets (history) · Secret · ×1
  • Secret: private-key v2/pkg/testutils/integration.go:105 — matched rule 'private-key'
Warning — 538 finding(s)
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×18
  • Duplicated block (8 lines × 2) cmd/tmc/main.go:242 — cmd/tmc/main.go:242-249 | cmd/tmc/main.go:276-283 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/tmc/main.go:242` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) internal/fuzzplayground/server.go:289 — internal/fuzzplayground/server.go:289-296 | internal/server/server.go:368-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. Read the line range as the matched WINDOW rather than a finished unit: at `internal/fuzzplayground/server.go:289` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (8 lines × 2) pkg/catalog/loader/loader.go:472 — pkg/catalog/loader/loader.go:472-479 | pkg/catalog/loader/loader.go:538-547 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/catalog/loader/loader.go:472` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) pkg/operators/extractors/fuzz_harness.go:288 — pkg/operators/extractors/fuzz_harness.go:288-295 | pkg/operators/matchers/fuzz_harness.go:243-250 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) pkg/protocols/headless/engine/page_actions.go:490 — pkg/protocols/headless/engine/page_actions.go:490-497 | pkg/protocols/headless/engine/page_actions.go:515-522 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/headless/engine/page_actions.go:490` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) pkg/protocols/ssl/ssl.go:438 — pkg/protocols/ssl/ssl.go:438-445 | pkg/protocols/websocket/websocket.go:451-458 — 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 (8 lines × 2) pkg/protocols/websocket/websocket.go:183 — pkg/protocols/websocket/websocket.go:183-190 | pkg/protocols/whois/whois.go:94-101 — 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 (8 lines × 2) pkg/reporting/trackers/linear/jsonutil/jsonutil.go:93 — pkg/reporting/trackers/linear/jsonutil/jsonutil.go:93-100 | pkg/reporting/trackers/linear/jsonutil/jsonutil.go:123-130 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/reporting/trackers/linear/jsonutil/jsonutil.go:93` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) pkg/templates/cluster.go:65 — pkg/templates/cluster.go:65-73 | pkg/templates/cluster.go:76-83 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/templates/cluster.go:65` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) pkg/utils/telnetmini/smb.go:534 — pkg/utils/telnetmini/smb.go:534-541 | pkg/utils/telnetmini/smb.go:610-617 — 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) pkg/js/global/scripts.go:87 — pkg/js/global/scripts.go:87-94 | pkg/tmplexec/flow/vm.go:70-77 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/global/scripts.go:87` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) pkg/js/libs/kerberos/sendtokdc.go:85 — pkg/js/libs/kerberos/sendtokdc.go:85-92 | pkg/js/libs/kerberos/sendtokdc.go:126-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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (8 lines × 2) pkg/js/libs/smb/smb_share.go:24 — pkg/js/libs/smb/smb_share.go:24-31 | pkg/js/libs/smb/smb_share.go:50-57 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (8 lines × 2) pkg/operators/extractors/compile.go:58 — pkg/operators/extractors/compile.go:58-65 | pkg/operators/matchers/compile.go:71-78 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/operators/extractors/compile.go:58` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) pkg/protocols/common/generators/load.go:23 — pkg/protocols/common/generators/load.go:23-30 | pkg/protocols/common/generators/load.go:40-47 — 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) pkg/protocols/dns/request.go:243 — pkg/protocols/dns/request.go:243-250 | pkg/protocols/http/request.go:1337-1344 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/dns/request.go:243` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (8 lines × 2) pkg/protocols/file/operators.go:17 — pkg/protocols/file/operators.go:17-24 | pkg/protocols/network/operators.go:18-25 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/file/operators.go:17` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 2) pkg/templates/compile.go:455 — pkg/templates/compile.go:455-462 | pkg/templates/compile.go:488-498 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/templates/compile.go:455` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×15
  • Duplicated block (7 lines × 2) lib/sdk_private.go:123 — lib/sdk_private.go:123-130 | lib/sdk_private.go:290-296 — 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) pkg/authprovider/authx/dynamic.go:134 — pkg/authprovider/authx/dynamic.go:134-140 | pkg/authprovider/authx/dynamic.go:159-165 — 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) pkg/authprovider/file.go:78 — pkg/authprovider/file.go:78-84 | pkg/authprovider/file.go:111-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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/authprovider/file.go:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) pkg/catalog/index/filter.go:304 — pkg/catalog/index/filter.go:304-310 | pkg/catalog/index/filter.go:314-320 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/catalog/index/filter.go:304` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) pkg/input/formats/openapi/generator.go:221 — pkg/input/formats/openapi/generator.go:221-227 | pkg/input/formats/openapi/generator.go:237-243 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/input/formats/openapi/generator.go:221` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) pkg/input/types/fuzz_harness.go:132 — pkg/input/types/fuzz_harness.go:132-138 | pkg/protocols/http/raw/fuzz_harness.go:169-175 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) pkg/js/libs/mssql/fingerprint.go:117 — pkg/js/libs/mssql/fingerprint.go:117-123 | pkg/js/libs/mysql/mysql.go:139-145 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (7 lines × 2) pkg/protocols/code/code.go:422 — pkg/protocols/code/code.go:422-428 | pkg/protocols/websocket/websocket.go:443-449 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/code/code.go:422` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) pkg/protocols/http/httpclientpool/clientpool.go:374 — pkg/protocols/http/httpclientpool/clientpool.go:374-380 | pkg/protocols/headless/engine/http_client.go:51-57 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) pkg/protocols/javascript/js.go:700 — pkg/protocols/javascript/js.go:700-706 | pkg/protocols/network/request.go:472-478 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/javascript/js.go:700` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) pkg/protocols/javascript/js.go:917 — pkg/protocols/javascript/js.go:917-923 | pkg/protocols/network/operators.go:105-111 — 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) pkg/protocols/ssl/ssl.go:226 — pkg/protocols/ssl/ssl.go:226-232 | pkg/protocols/whois/whois.go:103-109 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/ssl/ssl.go:226` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (7 lines × 2) pkg/utils/telnetmini/smb.go:482 — pkg/utils/telnetmini/smb.go:482-488 | pkg/utils/telnetmini/smb.go:531-537 — 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) pkg/utils/yaml/yaml_decode_wrapper.go:165 — pkg/utils/yaml/yaml_decode_wrapper.go:165-171 | internal/runner/options.go:147-153 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/utils/yaml/yaml_decode_wrapper.go:165` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (7 lines × 2) pkg/protocols/headless/operators.go:153 — pkg/protocols/headless/operators.go:153-159 | pkg/protocols/network/operators.go:114-120 — 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.
D31 · IaC & Container Security · Medium IaC · ×14
  • Medium IaC: DS-0001 Dockerfile — ':latest' tag used A `:latest` base pins nothing: the stage rebuilds against whatever that tag points at on the day, so the same commit produces different images and a change you did not make arrives without a diff. The step: pin the base to a concrete release and, where the registry offers one, its digest — `FROM alpine:3.21@sha256:…` — then bump it deliberately, which is a review a bot can raise. A build stage that only compiles is worth pinning for the same reason: it decides what ends up in the layers you ship.
  • Medium IaC: DS-0001 Dockerfile.goreleaser — ':latest' tag used A `:latest` base pins nothing: the stage rebuilds against whatever that tag points at on the day, so the same commit produces different images and a change you did not make arrives without a diff. The step: pin the base to a concrete release and, where the registry offers one, its digest — `FROM alpine:3.21@sha256:…` — then bump it deliberately, which is a review a bot can raise. A build stage that only compiles is worth pinning for the same reason: it decides what ends up in the layers you ship.
  • Medium IaC: KSV-0001 helm/templates/interactsh-deployment.yaml — Can elevate its own privileges This file is a Helm chart TEMPLATE and it already renders its `securityContext` from the chart's values (`.Values.securityContext`), so it is not the file to edit — writing the block in here would override whatever the chart's users pass in. The value that ships is the one in `helm/values.yaml`: set `securityContext` there and every installation gets it by default.
  • Medium IaC: KSV-0012 helm/templates/interactsh-deployment.yaml — Runs as root user One securityContext edit clears this facet's near-duplicate rules together: KSV-0012, KSV-0020, KSV-0021. This file is a Helm chart TEMPLATE and it already renders its `securityContext` from the chart's values (`.Values.securityContext`), so it is not the file to edit — writing the block in here would override whatever the chart's users pass in. The value that ships is the one in `helm/values.yaml`: set `securityContext` there and every installation gets it by default.
  • Medium IaC: KSV-0104 helm/templates/interactsh-deployment.yaml — Seccomp policies disabled One securityContext edit clears this facet's near-duplicate rules together: KSV-0030, KSV-0104. This file is a Helm chart TEMPLATE and it already renders its `securityContext` from the chart's values (`.Values.securityContext`), so it is not the file to edit — writing the block in here would override whatever the chart's users pass in. The value that ships is the one in `helm/values.yaml`: set `securityContext` there and every installation gets it by default.
  • Medium IaC: KSV-0117 helm/templates/interactsh-deployment.yaml — Prevent binding to privileged ports
  • Medium IaC: KSV-0125 helm/templates/interactsh-deployment.yaml — Restrict container images to trusted registries
  • Medium IaC: KSV-0001 helm/templates/nuclei-cron.yaml — Can elevate its own privileges
  • Medium IaC: KSV-0012 helm/templates/nuclei-cron.yaml — Runs as root user One securityContext edit clears this facet's near-duplicate rules together: KSV-0012, KSV-0020, KSV-0021.
  • Medium IaC: KSV-0104 helm/templates/nuclei-cron.yaml — Seccomp policies disabled One securityContext edit clears this facet's near-duplicate rules together: KSV-0030, KSV-0104.
  • Medium IaC: KSV-0125 helm/templates/nuclei-cron.yaml — Restrict container images to trusted registries
  • Medium IaC: CKV_DOCKER_7 Dockerfile.goreleaser:1 — Ensure the base image uses a non latest version tag
  • Medium IaC: CKV_DOCKER_7 Dockerfile:11 — Ensure the base image uses a non latest version tag
  • Medium IaC: CKV_DOCKER_3 Dockerfile:1 — Ensure that a user for the container has been created
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×13
  • Duplicated block (12 lines × 2) pkg/input/types/fuzz_harness.go:158 — pkg/input/types/fuzz_harness.go:158-169 | pkg/protocols/http/raw/fuzz_harness.go:212-223 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/input/types/fuzz_harness.go:158` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) pkg/input/types/fuzz_harness.go:268 — pkg/input/types/fuzz_harness.go:268-279 | pkg/protocols/http/raw/fuzz_harness.go:335-346 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/input/types/fuzz_harness.go:268` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) pkg/js/libs/mssql/mssql.go:86 — pkg/js/libs/mssql/mssql.go:86-97 | pkg/js/libs/postgres/postgres.go:228-239 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/libs/mssql/mssql.go:86` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) pkg/js/libs/rdp/rdp.go:215 — pkg/js/libs/rdp/rdp.go:215-226 | pkg/js/libs/rdp/rdp.go: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 (12 lines × 2) pkg/operators/extractors/fuzz_harness.go:256 — pkg/operators/extractors/fuzz_harness.go:256-267 | pkg/operators/matchers/fuzz_harness.go:211-222 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/operators/extractors/fuzz_harness.go:256` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) pkg/operators/extractors/fuzz_harness.go:274 — pkg/operators/extractors/fuzz_harness.go:274-285 | pkg/operators/matchers/fuzz_harness.go:229-240 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/operators/extractors/fuzz_harness.go:274` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) pkg/protocols/file/request.go:182 — pkg/protocols/file/request.go:182-193 | pkg/protocols/file/request.go:202-213 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/file/request.go:182` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) pkg/protocols/headless/engine/page_actions.go:643 — pkg/protocols/headless/engine/page_actions.go:643-654 | pkg/protocols/headless/engine/page_actions.go:665-676 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/headless/engine/page_actions.go:643` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) pkg/protocols/protocols.go:431 — pkg/protocols/protocols.go:431-442 | pkg/protocols/file/operators.go:48-59 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/protocols.go:431` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (12 lines × 2) pkg/utils/telnetmini/ntlm.go:193 — pkg/utils/telnetmini/ntlm.go:193-204 | pkg/utils/telnetmini/ntlm.go:206-217 — 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) pkg/catalog/disk/find.go:223 — pkg/catalog/disk/find.go:223-234 | pkg/catalog/disk/find.go:247-258 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/catalog/disk/find.go:223` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) pkg/protocols/http/operators.go:86 — pkg/protocols/http/operators.go:86-97 | pkg/protocols/offlinehttp/operators.go:81-92 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/http/operators.go:86` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) pkg/protocols/network/operators.go:43 — pkg/protocols/network/operators.go:43-55 | pkg/protocols/offlinehttp/operators.go:65-76 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×13
  • Duplicated block (10 lines × 2) pkg/js/libs/postgres/postgres.go:49 — pkg/js/libs/postgres/postgres.go:49-58 | pkg/js/libs/redis/redis.go:155-164 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/libs/postgres/postgres.go:49` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (10 lines × 2) pkg/js/libs/rdp/rdp.go:54 — pkg/js/libs/rdp/rdp.go:54-63 | pkg/js/libs/rdp/rdp.go:112-121 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (10 lines × 2) pkg/protocols/file/request.go:75 — pkg/protocols/file/request.go:75-84 | pkg/protocols/file/request.go:178-189 — 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) pkg/protocols/headless/engine/page_actions.go:792 — pkg/protocols/headless/engine/page_actions.go:792-801 | pkg/protocols/headless/engine/page_actions.go:816-825 — 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) pkg/protocols/headless/headless.go:144 — pkg/protocols/headless/headless.go:144-153 | pkg/protocols/http/http.go:429-440 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/headless/headless.go:144` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) pkg/protocols/headless/headless.go:156 — pkg/protocols/headless/headless.go:156-165 | pkg/protocols/http/http.go:521-530 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/headless/headless.go:156` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) pkg/protocols/ssl/ssl.go:307 — pkg/protocols/ssl/ssl.go:307-316 | pkg/protocols/ssl/ssl.go:326-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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/ssl/ssl.go:307` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) pkg/tmplexec/flow/builtin/dedupe.go:19 — pkg/tmplexec/flow/builtin/dedupe.go:19-28 | pkg/tmplexec/flow/vm.go:84-93 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/tmplexec/flow/builtin/dedupe.go:19` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) pkg/utils/telnetmini/smb.go:396 — pkg/utils/telnetmini/smb.go:396-405 | pkg/utils/telnetmini/smb.go:408-417 — 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) pkg/core/executors.go:152 — pkg/core/executors.go:152-161 | pkg/core/executors.go:206-215 — 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) pkg/js/libs/kerberos/sendtokdc.go:94 — pkg/js/libs/kerberos/sendtokdc.go:94-103 | pkg/js/libs/kerberos/sendtokdc.go:135-145 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/libs/kerberos/sendtokdc.go:94` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (10 lines × 2) pkg/operators/extractors/compile.go:31 — pkg/operators/extractors/compile.go:31-40 | pkg/operators/matchers/compile.go:49-60 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/operators/extractors/compile.go:31` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) pkg/protocols/headless/operators.go:68 — pkg/protocols/headless/operators.go:68-77 | pkg/protocols/network/operators.go:43-52 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/headless/operators.go:68` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×12
  • Duplicated block (5 lines × 2) cmd/tmc/main.go:266 — cmd/tmc/main.go:266-270 | cmd/tmc/main.go:300-304 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/tmc/main.go:266` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) pkg/js/libs/scmr/scmr.go:66 — pkg/js/libs/scmr/scmr.go:66-70 | pkg/js/libs/tsch/tsch.go:73-77 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/libs/scmr/scmr.go:66` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) pkg/js/libs/tsch/tsch.go:64 — pkg/js/libs/tsch/tsch.go:64-68 | pkg/js/libs/tsch/tsch.go:70-74 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/libs/tsch/tsch.go:64` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) pkg/js/libs/wmi/wmi.go:84 — pkg/js/libs/wmi/wmi.go:84-88 | pkg/js/libs/wmi/wmi.go:89-93 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/libs/wmi/wmi.go:84` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) pkg/js/libs/wmi/wmi.go:94 — pkg/js/libs/wmi/wmi.go:94-98 | pkg/js/libs/wmi/wmi.go:101-105 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (5 lines × 2) pkg/protocols/file/request.go:308 — pkg/protocols/file/request.go:308-313 | pkg/protocols/network/request.go:461-465 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) pkg/protocols/javascript/js.go:684 — pkg/protocols/javascript/js.go:684-688 | pkg/protocols/ssl/ssl.go:271-275 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/javascript/js.go:684` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) pkg/core/workflow_execute.go:37 — pkg/core/workflow_execute.go:37-41 | pkg/core/workflow_execute.go:142-146 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/core/workflow_execute.go:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) pkg/protocols/file/operators.go:105 — pkg/protocols/file/operators.go:105-109 | pkg/protocols/offlinehttp/operators.go:145-149 — 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 (5 lines × 2) pkg/protocols/headless/operators.go:134 — pkg/protocols/headless/operators.go:134-138 | pkg/protocols/http/operators.go:164-168 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/headless/operators.go:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (5 lines × 2) pkg/protocols/headless/request.go:64 — pkg/protocols/headless/request.go:64-68 | pkg/protocols/network/request.go:165-172 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (5 lines × 2) pkg/protocols/http/operators.go:129 — pkg/protocols/http/operators.go:129-134 | pkg/protocols/offlinehttp/operators.go:124-128 — 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×10
  • Hotspot: internal/runner/runner.go internal/runner/runner.go — internal/runner/runner.go changed 14 times in last 90 days, max complexity 74. 3 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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.
  • Hotspot: pkg/protocols/http/request.go pkg/protocols/http/request.go — pkg/protocols/http/request.go changed 5 times in last 90 days, max complexity 128. 2 of those changes were fix/bug commits, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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.
  • Hotspot: pkg/catalog/loader/loader.go pkg/catalog/loader/loader.go — pkg/catalog/loader/loader.go changed 8 times in last 90 days, max complexity 52. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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.
  • Hotspot: pkg/protocols/http/http.go pkg/protocols/http/http.go — pkg/protocols/http/http.go changed 5 times in last 90 days, max complexity 61. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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.
  • Hotspot: cmd/nuclei/main.go cmd/nuclei/main.go — cmd/nuclei/main.go changed 6 times in last 90 days, max complexity 49. 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, cover the area it touches with tests, 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.
  • Hotspot: lib/sdk_private.go lib/sdk_private.go — lib/sdk_private.go changed 6 times in last 90 days, max complexity 46. 1 of those changes was a fix/bug commit, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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.
  • Hotspot: pkg/protocols/headless/engine/page_actions.go pkg/protocols/headless/engine/page_actions.go — pkg/protocols/headless/engine/page_actions.go changed 5 times in last 90 days, max complexity 40. 1 of those changes was a fix/bug commit, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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.
  • Hotspot: pkg/protocols/javascript/js.go pkg/protocols/javascript/js.go — pkg/protocols/javascript/js.go changed 4 times in last 90 days, max complexity 35. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
  • Hotspot: pkg/templates/templates.go pkg/templates/templates.go — pkg/templates/templates.go changed 4 times in last 90 days, max complexity 31. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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.
  • Hotspot: pkg/protocols/http/httpclientpool/clientpool.go pkg/protocols/http/httpclientpool/clientpool.go — pkg/protocols/http/httpclientpool/clientpool.go changed 3 times in last 90 days, max complexity 40. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×10
  • Duplicated block (11 lines × 2) pkg/input/provider/list/hmap.go:532 — pkg/input/provider/list/hmap.go:532-542 | pkg/input/provider/list/hmap.go:591-601 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) pkg/js/libs/mssql/mssql.go:60 — pkg/js/libs/mssql/mssql.go:60-70 | pkg/js/libs/postgres/postgres.go:188-199 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) pkg/protocols/dns/dns.go:168 — pkg/protocols/dns/dns.go:168-178 | pkg/protocols/headless/headless.go:109-119 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/dns/dns.go:168` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) pkg/protocols/http/httpclientpool/clientpool.go:395 — pkg/protocols/http/httpclientpool/clientpool.go:395-406 | pkg/protocols/headless/engine/http_client.go:68-78 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/http/httpclientpool/clientpool.go:395` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) pkg/protocols/javascript/js.go:468 — pkg/protocols/javascript/js.go:468-478 | pkg/protocols/headless/request.go:95-105 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/javascript/js.go:468` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (11 lines × 2) pkg/tmplexec/generic/exec.go:45 — pkg/tmplexec/generic/exec.go:45-55 | pkg/tmplexec/multiproto/multi.go:82-98 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/tmplexec/generic/exec.go:45` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (11 lines × 2) pkg/types/interfaces.go:34 — pkg/types/interfaces.go:34-44 | pkg/utils/insertion_ordered_map.go:65-75 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/types/interfaces.go:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (11 lines × 2) pkg/js/libs/redis/redis.go:70 — pkg/js/libs/redis/redis.go:70-80 | pkg/js/libs/redis/redis.go:185-195 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/libs/redis/redis.go:70` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (11 lines × 2) pkg/protocols/http/request.go:178 — pkg/protocols/http/request.go:178-189 | pkg/protocols/http/request.go:492-502 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/http/request.go:178` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (11 lines × 2) pkg/protocols/http/request_fuzz.go:69 — pkg/protocols/http/request_fuzz.go:69-79 | pkg/protocols/http/request_fuzz.go:102-112 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/http/request_fuzz.go:69` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×10
  • Duplicated block (9 lines × 2) pkg/input/formats/openapi/generator.go:365 — pkg/input/formats/openapi/generator.go:365-373 | pkg/input/formats/openapi/generator.go:382-390 — 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) pkg/input/provider/list/hmap.go:145 — pkg/input/provider/list/hmap.go:145-153 | pkg/input/provider/list/hmap.go:392-400 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/input/provider/list/hmap.go:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) pkg/js/libs/oracle/oracle.go:66 — pkg/js/libs/oracle/oracle.go:66-74 | pkg/js/libs/pop3/pop3.go:52-60 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (9 lines × 2) pkg/js/libs/postgres/postgres.go:85 — pkg/js/libs/postgres/postgres.go:85-93 | pkg/js/libs/postgres/postgres.go:173-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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) pkg/js/libs/telnet/telnet.go:91 — pkg/js/libs/telnet/telnet.go:91-99 | pkg/js/libs/vnc/vnc.go:135-143 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (9 lines × 2) pkg/protocols/http/httpclientpool/perhost_ratelimit_pool.go:104 — pkg/protocols/http/httpclientpool/perhost_ratelimit_pool.go:104-113 | pkg/protocols/http/httpclientpool/perhost_ratelimit_pool.go:138-146 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/http/httpclientpool/perhost_ratelimit_pool.go:104` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) pkg/reporting/exporters/es/elasticsearch.go:116 — pkg/reporting/exporters/es/elasticsearch.go:116-124 | pkg/reporting/exporters/splunk/splunkhec.go:103-111 — 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) pkg/js/libs/kerberos/sendtokdc.go:67 — pkg/js/libs/kerberos/sendtokdc.go:67-76 | pkg/js/libs/kerberos/sendtokdc.go:109-117 — 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) pkg/protocols/http/request.go:285 — pkg/protocols/http/request.go:285-293 | pkg/protocols/http/request.go:591-599 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (9 lines × 2) pkg/protocols/network/request.go:110 — pkg/protocols/network/request.go:110-118 | pkg/protocols/network/request.go:176-184 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/network/request.go:110` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D3 · God Classes · FileTooLong · ×7
  • FileTooLong: http/request.go pkg/protocols/http/request.go:0 — FileTooLong — 846 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: runner/runner.go internal/runner/runner.go:0 — FileTooLong — 724 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: engine/page_actions.go pkg/protocols/headless/engine/page_actions.go:0 — FileTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: nuclei/main.go cmd/nuclei/main.go:0 — FileTooLong — 608 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: types/types.go pkg/types/types.go:0 — FileTooLong — 600 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: loader/loader.go pkg/catalog/loader/loader.go:0 — FileTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: javascript/js.go pkg/protocols/javascript/js.go:0 — FileTooLong — 581 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×7
  • Duplicated block (15 lines × 2) pkg/js/libs/mssql/mssql.go:162 — pkg/js/libs/mssql/mssql.go:162-177 | pkg/js/libs/mysql/mysql.go:224-238 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (15 lines × 2) pkg/js/libs/rsync/rsync.go:132 — pkg/js/libs/rsync/rsync.go:132-146 | pkg/js/libs/rsync/rsync.go:172-186 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/libs/rsync/rsync.go:132` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) pkg/protocols/headless/engine/page_actions.go:302 — pkg/protocols/headless/engine/page_actions.go:302-316 | pkg/protocols/headless/engine/page_actions.go:330-344 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/headless/engine/page_actions.go:302` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (15 lines × 2) pkg/tmplexec/flow/flow_executor.go:143 — pkg/tmplexec/flow/flow_executor.go:143-157 | pkg/tmplexec/multiproto/multi.go:44-58 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15 lines × 2) pkg/js/libs/redis/redis.go:36 — pkg/js/libs/redis/redis.go:36-50 | pkg/js/libs/redis/redis.go:118-132 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/libs/redis/redis.go:36` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (15 lines × 2) pkg/js/libs/redis/redis.go:117 — pkg/js/libs/redis/redis.go:117-131 | pkg/js/libs/redis/redis.go:192-206 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/libs/redis/redis.go:117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (15 lines × 2) pkg/protocols/dns/request.go:72 — pkg/protocols/dns/request.go:72-86 | pkg/protocols/network/request.go:240-254 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/dns/request.go:72` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×6
  • Duplicated block (14 lines × 2) pkg/input/formats/openapi/downloader.go:34 — pkg/input/formats/openapi/downloader.go:34-47 | pkg/input/formats/swagger/downloader.go:43-56 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/input/formats/openapi/downloader.go:34` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) pkg/js/gojs/gojs.go:83 — pkg/js/gojs/gojs.go:83-97 | pkg/js/gojs/set.go:58-71 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/gojs/gojs.go:83` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) pkg/operators/extractors/fuzz_harness.go:339 — pkg/operators/extractors/fuzz_harness.go:339-352 | pkg/operators/matchers/fuzz_harness.go:280-293 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/operators/extractors/fuzz_harness.go:339` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (14 lines × 2) pkg/protocols/utils/fields.go:35 — pkg/protocols/utils/fields.go:35-48 | pkg/protocols/utils/fields.go:67-80 — 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) pkg/reporting/exporters/es/elasticsearch.go:71 — pkg/reporting/exporters/es/elasticsearch.go:71-84 | pkg/reporting/exporters/splunk/splunkhec.go:63-76 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/reporting/exporters/es/elasticsearch.go:71` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (14 lines × 2) pkg/protocols/file/find.go:37 — pkg/protocols/file/find.go:37-50 | pkg/protocols/offlinehttp/find.go:21-37 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/file/find.go:37` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×6
  • Duplicated block (6 lines × 2) cmd/nuclei/main.go:851 — cmd/nuclei/main.go:851-857 | internal/runner/options.go:93-98 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/nuclei/main.go:851` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) cmd/tmc/main.go:259 — cmd/tmc/main.go:259-264 | cmd/tmc/main.go:293-298 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/tmc/main.go:259` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) pkg/protocols/dns/dns.go:180 — pkg/protocols/dns/dns.go:180-185 | pkg/protocols/network/network.go:252-257 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/dns/dns.go:180` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) pkg/protocols/websocket/websocket.go:446 — pkg/protocols/websocket/websocket.go:446-451 | pkg/protocols/whois/whois.go:195-200 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) pkg/protocols/dns/operators.go:114 — pkg/protocols/dns/operators.go:114-119 | pkg/protocols/offlinehttp/operators.go:143-148 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/dns/operators.go:114` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) pkg/tmplexec/flow/flow_internal.go:39 — pkg/tmplexec/flow/flow_internal.go:39-44 | pkg/tmplexec/flow/flow_internal.go:76-81 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/tmplexec/flow/flow_internal.go:39` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×5
  • Duplicated block (16 lines × 2) pkg/input/provider/list/hmap.go:197 — pkg/input/provider/list/hmap.go:197-212 | pkg/input/provider/list/hmap.go:444-459 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/input/provider/list/hmap.go:197` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) pkg/protocols/common/variables/variables.go:93 — pkg/protocols/common/variables/variables.go:93-108 | pkg/protocols/common/variables/variables.go:146-161 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/common/variables/variables.go:93` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (16 lines × 2) pkg/utils/telnetmini/smb.go:223 — pkg/utils/telnetmini/smb.go:223-238 | pkg/utils/telnetmini/smb.go:313-328 — 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 (16 lines × 2) pkg/utils/telnetmini/smb.go:637 — pkg/utils/telnetmini/smb.go:637-653 | pkg/utils/telnetmini/smb.go:666-681 — 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 (16 lines × 2) pkg/templates/compile.go:126 — pkg/templates/compile.go:126-141 | pkg/templates/compile.go:210-225 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/templates/compile.go:126` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×5
  • Duplicated block (13 lines × 2) pkg/input/provider/list/hmap.go:168 — pkg/input/provider/list/hmap.go:168-180 | pkg/input/provider/list/hmap.go:415-427 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/input/provider/list/hmap.go:168` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) pkg/input/types/fuzz_harness.go:230 — pkg/input/types/fuzz_harness.go:230-242 | pkg/protocols/http/raw/fuzz_harness.go:286-298 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/input/types/fuzz_harness.go:230` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) pkg/js/libs/rdp/rdp.go:301 — pkg/js/libs/rdp/rdp.go:301-313 | pkg/js/libs/rdp/rdp.go:334-346 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/libs/rdp/rdp.go:301` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (13 lines × 2) pkg/model/types/severity/severities.go:40 — pkg/model/types/severity/severities.go:40-52 | pkg/model/types/severity/severities.go:57-69 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/model/types/severity/severities.go:40` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (13 lines × 2) pkg/js/global/scripts.go:124 — pkg/js/global/scripts.go:124-136 | pkg/js/global/scripts.go:155-167 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/js/global/scripts.go:124` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×4
  • Duplicated block (8 lines × 3) pkg/input/types/fuzz_harness.go:172 — pkg/input/types/fuzz_harness.go:172-179 | pkg/protocols/http/raw/fuzz_harness.go:226-233 | pkg/templates/fuzz_harness.go:316-323 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
  • Duplicated block (8 lines × 3) pkg/js/libs/dcerpc/dcerpc.go:314 — pkg/js/libs/dcerpc/dcerpc.go:314-321 | pkg/js/libs/dcerpc/dcerpc.go:379-386 | pkg/js/libs/dcerpc/wmiexec.go:49-56 — 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 3) pkg/protocols/protocols.go:461 — pkg/protocols/protocols.go:461-468 | pkg/protocols/file/operators.go:25-32 | pkg/protocols/offlinehttp/operators.go:36-43 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/protocols.go:461` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (8 lines × 3) pkg/protocols/headless/operators.go:33 — pkg/protocols/headless/operators.go:33-40 | pkg/protocols/http/operators.go:37-44 | pkg/protocols/network/operators.go:26-33 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/protocols/headless/operators.go:33` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: Template pkg/templates/templates.go:36 — TooManyMethods — 49 methods, declared across 4 files: templates/templates.go (19), templates/templates_utils.go (16), templates/compile.go (8), templates/capability.go (6). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Request pkg/protocols/http/http.go:33 — TooManyMethods — 48 methods, declared across 9 files: http/request.go (17), http/http.go (10), http/operators.go (9), http/request_fuzz.go (6), +5 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Page pkg/protocols/headless/engine/page.go:27 — TooManyMethods — 43 methods, declared across 3 files: engine/page_actions.go (30), engine/page.go (11), engine/rules.go (2). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D1 · Cyclomatic Complexity · main.main (cyclomatic 34) · ×2
  • main.main (cyclomatic 34) cmd/nuclei/main.go:57 — main.main has cyclomatic complexity 34 (threshold 15). Of this number, 19 points are the body's own statements and 15 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • main.main (cyclomatic 34) pkg/js/devtools/scrapefuncs/main.go:38 — main.main has cyclomatic complexity 34 (threshold 15). Most of this is not in the body itself: 14 of the 34 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 83, 148, 45). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Request.executeRequestWithPayloads (cognitive 27) · ×2
  • Request.executeRequestWithPayloads (cognitive 27) pkg/protocols/headless/request.go:134 — Request.executeRequestWithPayloads has cognitive complexity 27 (threshold 15). Drivers by points: if/else 20, boolean chains 5, loops 2 (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.
  • Request.executeRequestWithPayloads (cognitive 27) pkg/protocols/javascript/js.go:616 — Request.executeRequestWithPayloads has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21, boolean chains 6 (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.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×2
  • Duplicated block (7 lines × 3) pkg/reporting/trackers/gitea/gitea.go:95 — pkg/reporting/trackers/gitea/gitea.go:95-101 | pkg/reporting/trackers/github/github.go:91-98 | pkg/reporting/trackers/gitlab/gitlab.go:81-87 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 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 3 times. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 3) pkg/scan/charts/echarts.go:118 — pkg/scan/charts/echarts.go:118-124 | pkg/scan/charts/echarts.go:280-286 | pkg/scan/charts/echarts.go:367-373 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/scan/charts/echarts.go:118` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D1 · Cyclomatic Complexity · Request.executeRequest (cyclomatic 128) · ×1
  • Request.executeRequest (cyclomatic 128) pkg/protocols/http/request.go:677 — Request.executeRequest has cyclomatic complexity 128 (threshold 15). Of this number, 125 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runner.New (cyclomatic 74) · ×1
  • runner.New (cyclomatic 74) internal/runner/runner.go:114 — runner.New has cyclomatic complexity 74 (threshold 15). Of this number, 69 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.Compile (cyclomatic 61) · ×1
  • Request.Compile (cyclomatic 61) pkg/protocols/http/http.go:328 — Request.Compile 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.
D1 · Cyclomatic Complexity · Runner.RunEnumeration (cyclomatic 56) · ×1
  • Runner.RunEnumeration (cyclomatic 56) internal/runner/runner.go:544 — Runner.RunEnumeration has cyclomatic complexity 56 (threshold 15). Of this number, 55 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · openapi.generateRequestsFromOp (cyclomatic 53) · ×1
  • openapi.generateRequestsFromOp (cyclomatic 53) pkg/input/formats/openapi/generator.go:166 — openapi.generateRequestsFromOp has cyclomatic complexity 53 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Store.LoadTemplatesWithTags (cyclomatic 52) · ×1
  • Store.LoadTemplatesWithTags (cyclomatic 52) pkg/catalog/loader/loader.go:785 — Store.LoadTemplatesWithTags has cyclomatic complexity 52 (threshold 15). Most of this is not in the body itself: 6 of the 52 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 862, 797, 827). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · main.readConfig (cyclomatic 49) · ×1
  • main.readConfig (cyclomatic 49) cmd/nuclei/main.go:251 — main.readConfig 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.
D1 · Cyclomatic Complexity · openapi.openAPIExample (cyclomatic 48) · ×1
  • openapi.openAPIExample (cyclomatic 48) pkg/input/formats/openapi/examples.go:105 — openapi.openAPIExample has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NucleiEngine.init (cyclomatic 46) · ×1
  • NucleiEngine.init (cyclomatic 46) lib/sdk_private.go:146 — NucleiEngine.init has cyclomatic complexity 46 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Request.executeParallelHTTP (cyclomatic 46) · ×1
  • Request.executeParallelHTTP (cyclomatic 46) pkg/protocols/http/request.go:205 — Request.executeParallelHTTP has cyclomatic complexity 46 (threshold 15). Of this number, 24 points are the body's own statements and 22 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runner.preflightResolveAndPortScan (cyclomatic 43) · ×1
  • Runner.preflightResolveAndPortScan (cyclomatic 43) internal/runner/preflight_portscan.go:71 — Runner.preflightResolveAndPortScan has cyclomatic complexity 43 (threshold 15). Of this number, 20 points are the body's own statements and 23 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Page.ExecuteActions (cyclomatic 40) · ×1
  • Page.ExecuteActions (cyclomatic 40) pkg/protocols/headless/engine/page_actions.go:49 — Page.ExecuteActions has cyclomatic complexity 40 (threshold 15). Of this number, 38 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · httpclientpool.wrappedGet (cyclomatic 40) · ×1
  • httpclientpool.wrappedGet (cyclomatic 40) pkg/protocols/http/httpclientpool/clientpool.go:289 — httpclientpool.wrappedGet has cyclomatic complexity 40 (threshold 15). Of this number, 20 points are the body's own statements and 20 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · decoder.decode (cyclomatic 40) · ×1
  • decoder.decode (cyclomatic 40) pkg/reporting/trackers/linear/jsonutil/jsonutil.go:74 — decoder.decode has cyclomatic complexity 40 (threshold 15). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D1 · Cyclomatic Complexity · runner.ValidateOptions (cyclomatic 38) · ×1
  • runner.ValidateOptions (cyclomatic 38) internal/runner/options.go:144 — runner.ValidateOptions has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Request.ExecuteWithResults (cyclomatic 38) · ×1
  • Request.ExecuteWithResults (cyclomatic 38) pkg/protocols/code/code.go:180 — Request.ExecuteWithResults has cyclomatic complexity 38 (threshold 15). Of this number, 36 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · EntityParser.Parse (cyclomatic 37) · ×1
  • EntityParser.Parse (cyclomatic 37) pkg/js/devtools/tsgen/parser.go:63 — EntityParser.Parse has cyclomatic complexity 37 (threshold 15). Of this number, 26 points are the body's own statements and 11 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.ExecuteWithResults (cyclomatic 36) · ×1
  • Request.ExecuteWithResults (cyclomatic 36) pkg/protocols/http/request.go:517 — Request.ExecuteWithResults has cyclomatic complexity 36 (threshold 15). Of this number, 16 points are the body's own statements and 20 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.Compile (cyclomatic 35) · ×1
  • Request.Compile (cyclomatic 35) pkg/protocols/javascript/js.go:104 — Request.Compile has cyclomatic complexity 35 (threshold 15). Of this number, 28 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Operators.Execute (cyclomatic 34) · ×1
  • Operators.Execute (cyclomatic 34) pkg/operators/operators.go:232 — Operators.Execute has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.executeWithResults (cyclomatic 33) · ×1
  • Request.executeWithResults (cyclomatic 33) pkg/protocols/javascript/js.go:318 — Request.executeWithResults has cyclomatic complexity 33 (threshold 15). Of this number, 31 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.executeRequestWithPayloads (cyclomatic 33) · ×1
  • Request.executeRequestWithPayloads (cyclomatic 33) pkg/protocols/network/request.go:311 — Request.executeRequestWithPayloads has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.ExecuteWithResults (cyclomatic 33) · ×1
  • Request.ExecuteWithResults (cyclomatic 33) pkg/protocols/ssl/ssl.go:204 — Request.ExecuteWithResults has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · reporting.New (cyclomatic 33) · ×1
  • reporting.New (cyclomatic 33) pkg/reporting/reporting.go:76 — reporting.New has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Engine.runWorkflowStep (cyclomatic 31) · ×1
  • Engine.runWorkflowStep (cyclomatic 31) pkg/core/workflow_execute.go:50 — Engine.runWorkflowStep has cyclomatic complexity 31 (threshold 15). Of this number, 16 points are the body's own statements and 15 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Helper.convertInputToType (cyclomatic 31) · ×1
  • Helper.convertInputToType (cyclomatic 31) pkg/input/transform.go:69 — Helper.convertInputToType has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Template.validateAllRequestIDs (cyclomatic 31) · ×1
  • Template.validateAllRequestIDs (cyclomatic 31) pkg/templates/templates.go:250 — Template.validateAllRequestIDs has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · requestGenerator.generateRawRequest (cyclomatic 29) · ×1
  • requestGenerator.generateRawRequest (cyclomatic 29) pkg/protocols/http/build_request.go:414 — requestGenerator.generateRawRequest has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · templates.NewTagFilter (cyclomatic 29) · ×1
  • templates.NewTagFilter (cyclomatic 29) pkg/templates/tag_filter.go:367 — templates.NewTagFilter has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Instance.Run (cyclomatic 28) · ×1
  • Instance.Run (cyclomatic 28) pkg/protocols/headless/engine/page.go:59 — Instance.Run has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Request.Compile (cyclomatic 28) · ×1
  • Request.Compile (cyclomatic 28) pkg/protocols/network/network.go:171 — Request.Compile 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.
D1 · Cyclomatic Complexity · Secret.Validate (cyclomatic 27) · ×1
  • Secret.Validate (cyclomatic 27) pkg/authprovider/authx/file.go:84 — Secret.Validate 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.
D1 · Cyclomatic Complexity · xss.AnalyzeReflectionContext (cyclomatic 27) · ×1
  • xss.AnalyzeReflectionContext (cyclomatic 27) pkg/fuzz/analyzers/xss/analyzer.go:233 — xss.AnalyzeReflectionContext 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.
D1 · Cyclomatic Complexity · Template.ImportFileRefs (cyclomatic 27) · ×1
  • Template.ImportFileRefs (cyclomatic 27) pkg/templates/templates.go:420 — Template.ImportFileRefs has cyclomatic complexity 27 (threshold 15). Of this number, 25 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.ExecuteWithResults (cyclomatic 26) · ×1
  • Request.ExecuteWithResults (cyclomatic 26) pkg/protocols/file/request.go:52 — Request.ExecuteWithResults has cyclomatic complexity 26 (threshold 15). Most of this is not in the body itself: 4 of the 26 points are its own statements and the rest belongs to one function literal inside it that branches (line 60). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · loader.New (cyclomatic 25) · ×1
  • loader.New (cyclomatic 25) pkg/catalog/loader/loader.go:145 — loader.New has cyclomatic complexity 25 (threshold 15). Of this number, 19 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · mssql.parsePreloginResponse (cyclomatic 25) · ×1
  • mssql.parsePreloginResponse (cyclomatic 25) pkg/js/libs/mssql/fingerprint.go:178 — mssql.parsePreloginResponse 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.
D1 · Cyclomatic Complexity · Client.processInteractionForRequest (cyclomatic 25) · ×1
  • Client.processInteractionForRequest (cyclomatic 25) pkg/protocols/common/interactsh/interactsh.go:154 — Client.processInteractionForRequest has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · protocolstate.initDialers (cyclomatic 25) · ×1
  • protocolstate.initDialers (cyclomatic 25) pkg/protocols/common/protocolstate/state.go:90 — protocolstate.initDialers has cyclomatic complexity 25 (threshold 15). Of this number, 22 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.executeRaceRequest (cyclomatic 25) · ×1
  • Request.executeRaceRequest (cyclomatic 25) pkg/protocols/http/request.go:92 — Request.executeRaceRequest has cyclomatic complexity 25 (threshold 15). Of this number, 19 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · NucleiEngine.applyRequiredDefaults (cyclomatic 24) · ×1
  • NucleiEngine.applyRequiredDefaults (cyclomatic 24) lib/sdk_private.go:44 — NucleiEngine.applyRequiredDefaults has cyclomatic complexity 24 (threshold 15). Of this number, 20 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Rule.Compile (cyclomatic 24) · ×1
  • Rule.Compile (cyclomatic 24) pkg/fuzz/execute.go:455 — Rule.Compile has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · global.initBuiltInFunc (cyclomatic 24) · ×1
  • global.initBuiltInFunc (cyclomatic 24) pkg/js/global/scripts.go:45 — global.initBuiltInFunc has cyclomatic complexity 24 (threshold 15). Most of this is not in the body itself: 1 of the 24 points is its own statement and the rest belongs to 8 function literals inside it that branch (lines 120, 151, 182, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Matcher.CompileMatchers (cyclomatic 24) · ×1
  • Matcher.CompileMatchers (cyclomatic 24) pkg/operators/matchers/compile.go:15 — Matcher.CompileMatchers has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.executeTurboHTTP (cyclomatic 24) · ×1
  • Request.executeTurboHTTP (cyclomatic 24) pkg/protocols/http/request.go:397 — Request.executeTurboHTTP has cyclomatic complexity 24 (threshold 15). Of this number, 18 points are the body's own statements and 6 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · raw.Parse (cyclomatic 24) · ×1
  • raw.Parse (cyclomatic 24) pkg/protocols/http/raw/raw.go:35 — raw.Parse has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · requestGenerator.fillRequest (cyclomatic 24) · ×1
  • requestGenerator.fillRequest (cyclomatic 24) pkg/protocols/http/build_request.go:527 — requestGenerator.fillRequest has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · format.CreateReportDescription (cyclomatic 24) · ×1
  • format.CreateReportDescription (cyclomatic 24) pkg/reporting/format/format_utils.go:45 — format.CreateReportDescription has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · templates.tryCollectConditionsMatchinfo (cyclomatic 24) · ×1
  • templates.tryCollectConditionsMatchinfo (cyclomatic 24) pkg/templates/tag_filter.go:195 — templates.tryCollectConditionsMatchinfo has cyclomatic complexity 24 (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.
D1 · Cyclomatic Complexity · Client.readUntil (cyclomatic 24) · ×1
  • Client.readUntil (cyclomatic 24) pkg/utils/telnetmini/telnet.go:264 — Client.readUntil has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Rule.Execute (cyclomatic 23) · ×1
  • Rule.Execute (cyclomatic 23) pkg/fuzz/execute.go:92 — Rule.Execute 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.
D1 · Cyclomatic Complexity · SwaggerDownloader.Download (cyclomatic 23) · ×1
  • SwaggerDownloader.Download (cyclomatic 23) pkg/input/formats/swagger/downloader.go:29 — SwaggerDownloader.Download has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · goexec.MergeOptions (cyclomatic 23) · ×1
  • goexec.MergeOptions (cyclomatic 23) pkg/js/libs/goexec/options.go:43 — goexec.MergeOptions has cyclomatic complexity 23 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Client.do (cyclomatic 23) · ×1
  • Client.do (cyclomatic 23) pkg/js/libs/http/http.go:249 — Client.do has cyclomatic complexity 23 (threshold 15). Of this number, 20 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Request.executeRequestParallel (cyclomatic 23) · ×1
  • Request.executeRequestParallel (cyclomatic 23) pkg/protocols/javascript/js.go:501 — Request.executeRequestParallel has cyclomatic complexity 23 (threshold 15). Of this number, 13 points are the body's own statements and 10 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.executeRequestWithPayloads (cyclomatic 23) · ×1
  • Request.executeRequestWithPayloads (cyclomatic 23) pkg/protocols/javascript/js.go:616 — Request.executeRequestWithPayloads 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.
D1 · Cyclomatic Complexity · TemplateExecuter.Execute (cyclomatic 23) · ×1
  • TemplateExecuter.Execute (cyclomatic 23) pkg/tmplexec/exec.go:101 — TemplateExecuter.Execute has cyclomatic complexity 23 (threshold 15). Most of this is not in the body itself: 8 of the 23 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 150, 141). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · telnetmini.parseTargetInfo (cyclomatic 23) · ×1
  • telnetmini.parseTargetInfo (cyclomatic 23) pkg/utils/telnetmini/ntlm.go:102 — telnetmini.parseTargetInfo 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.
D1 · Cyclomatic Complexity · main.process (cyclomatic 22) · ×1
  • main.process (cyclomatic 22) cmd/tmc/main.go:133 — main.process has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Form.Encode (cyclomatic 22) · ×1
  • Form.Encode (cyclomatic 22) pkg/fuzz/dataformat/form.go:48 — Form.Encode has cyclomatic complexity 22 (threshold 15). Of this number, 18 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ListInputProvider.Set (cyclomatic 22) · ×1
  • ListInputProvider.Set (cyclomatic 22) pkg/input/provider/list/hmap.go:143 — ListInputProvider.Set has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ListInputProvider.Del (cyclomatic 22) · ×1
  • ListInputProvider.Del (cyclomatic 22) pkg/input/provider/list/hmap.go:390 — ListInputProvider.Del has cyclomatic complexity 22 (threshold 15). Of this number, 21 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TemplateManager.writeTemplatesToDisk (cyclomatic 22) · ×1
  • TemplateManager.writeTemplatesToDisk (cyclomatic 22) pkg/installer/template.go:322 — TemplateManager.writeTemplatesToDisk has cyclomatic complexity 22 (threshold 15). Of this number, 13 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Client.DCSync (cyclomatic 22) · ×1
  • Client.DCSync (cyclomatic 22) pkg/js/libs/secretsdump/secretsdump.go:106 — Client.DCSync has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · dsl.init (cyclomatic 22) · ×1
  • dsl.init (cyclomatic 22) pkg/operators/common/dsl/dsl.go:24 — dsl.init has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 28, 105). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · StandardWriter.Write (cyclomatic 22) · ×1
  • StandardWriter.Write (cyclomatic 22) pkg/output/output.go:321 — StandardWriter.Write has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Page.routingRuleHandler (cyclomatic 22) · ×1
  • Page.routingRuleHandler (cyclomatic 22) pkg/protocols/headless/engine/rules.go:16 — Page.routingRuleHandler has cyclomatic complexity 22 (threshold 15). Most of this is not in the body itself: 1 of the 22 points is its own statement and the rest belongs to one function literal inside it that branches (line 17). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Request.executeRequestWithPayloads (cyclomatic 22) · ×1
  • Request.executeRequestWithPayloads (cyclomatic 22) pkg/protocols/headless/request.go:134 — Request.executeRequestWithPayloads has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · raw.readRawRequest (cyclomatic 22) · ×1
  • raw.readRawRequest (cyclomatic 22) pkg/protocols/http/raw/raw.go:174 — raw.readRawRequest has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · utils.generateVariables (cyclomatic 22) · ×1
  • utils.generateVariables (cyclomatic 22) pkg/protocols/utils/variables.go:137 — utils.generateVariables has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · runner.GetLazyAuthFetchCallback (cyclomatic 21) · ×1
  • runner.GetLazyAuthFetchCallback (cyclomatic 21) internal/runner/lazy.go:68 — runner.GetLazyAuthFetchCallback has cyclomatic complexity 21 (threshold 15). Most of this is not in the body itself: 1 of the 21 points is its own statement and the rest belongs to one function literal inside it that branches (line 69). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · runner.ParseOptions (cyclomatic 21) · ×1
  • runner.ParseOptions (cyclomatic 21) internal/runner/options.go:59 — runner.ParseOptions has cyclomatic complexity 21 (threshold 15). Of this number, 16 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Runner.displayExecutionInfo (cyclomatic 21) · ×1
  • Runner.displayExecutionInfo (cyclomatic 21) internal/runner/runner.go:939 — Runner.displayExecutionInfo has cyclomatic complexity 21 (threshold 15). Of this number, 20 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Store.LoadTemplatesOnlyMetadata (cyclomatic 21) · ×1
  • Store.LoadTemplatesOnlyMetadata (cyclomatic 21) pkg/catalog/loader/loader.go:512 — Store.LoadTemplatesOnlyMetadata has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · mysql.enrichMySQLHandshake (cyclomatic 21) · ×1
  • mysql.enrichMySQLHandshake (cyclomatic 21) pkg/js/libs/mysql/fingerprint.go:254 — mysql.enrichMySQLHandshake has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · rdp.checkRDPEncryption (cyclomatic 21) · ×1
  • rdp.checkRDPEncryption (cyclomatic 21) pkg/js/libs/rdp/rdp.go:195 — rdp.checkRDPEncryption has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.findMatchesWithReader (cyclomatic 21) · ×1
  • Request.findMatchesWithReader (cyclomatic 21) pkg/protocols/file/request.go:258 — Request.findMatchesWithReader has cyclomatic complexity 21 (threshold 15). Of this number, 19 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runner.preflightOneResolved (cyclomatic 20) · ×1
  • Runner.preflightOneResolved (cyclomatic 20) internal/runner/preflight_portscan.go:344 — Runner.preflightOneResolved has cyclomatic complexity 20 (threshold 15). Of this number, 11 points are the body's own statements and 9 belong to 2 function literals inside it that branch. To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Engine.executeTemplateWithTargets (cyclomatic 20) · ×1
  • Engine.executeTemplateWithTargets (cyclomatic 20) pkg/core/executors.go:50 — Engine.executeTemplateWithTargets has cyclomatic complexity 20 (threshold 15). Most of this is not in the body itself: 7 of the 20 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 121, 97). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · OpenAPIDownloader.Download (cyclomatic 20) · ×1
  • OpenAPIDownloader.Download (cyclomatic 20) pkg/input/formats/openapi/downloader.go:28 — OpenAPIDownloader.Download has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · fuzzMatcherCandidate.applyLines (cyclomatic 20) · ×1
  • fuzzMatcherCandidate.applyLines (cyclomatic 20) pkg/operators/matchers/fuzz_harness.go:65 — fuzzMatcherCandidate.applyLines has cyclomatic complexity 20 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · StandardWriter.formatScreen (cyclomatic 20) · ×1
  • StandardWriter.formatScreen (cyclomatic 20) pkg/output/format_screen.go:13 — StandardWriter.formatScreen has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.execute (cyclomatic 20) · ×1
  • Request.execute (cyclomatic 20) pkg/protocols/dns/request.go:113 — Request.execute has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Request.Compile (cyclomatic 20) · ×1
  • Request.Compile (cyclomatic 20) pkg/protocols/headless/headless.go:103 — Request.Compile has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.executeGeneratedFuzzingRequest (cyclomatic 20) · ×1
  • Request.executeGeneratedFuzzingRequest (cyclomatic 20) pkg/protocols/http/request_fuzz.go:178 — Request.executeGeneratedFuzzingRequest has cyclomatic complexity 20 (threshold 15). Of this number, 12 points are the body's own statements and 8 belong to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Request.executeRequestWithPayloads (cyclomatic 20) · ×1
  • Request.executeRequestWithPayloads (cyclomatic 20) pkg/protocols/websocket/websocket.go:173 — Request.executeRequestWithPayloads has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FileAuthProvider.init (cyclomatic 19) · ×1
  • FileAuthProvider.init (cyclomatic 19) pkg/authprovider/file.go:57 — FileAuthProvider.init has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · openapi.GenerateRequestsFromSchema (cyclomatic 19) · ×1
  • openapi.GenerateRequestsFromSchema (cyclomatic 19) pkg/input/formats/openapi/generator.go:35 — openapi.GenerateRequestsFromSchema has cyclomatic complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ListInputProvider.initializeInputSources (cyclomatic 19) · ×1
  • ListInputProvider.initializeInputSources (cyclomatic 19) pkg/input/provider/list/hmap.go:279 — ListInputProvider.initializeInputSources has cyclomatic complexity 19 (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.
D1 · Cyclomatic Complexity · types.ParseRawRequest (cyclomatic 19) · ×1
  • types.ParseRawRequest (cyclomatic 19) pkg/input/types/http.go:225 — types.ParseRawRequest has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Extractor.CompileExtractors (cyclomatic 19) · ×1
  • Extractor.CompileExtractors (cyclomatic 19) pkg/operators/extractors/compile.go:15 — Extractor.CompileExtractors has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Client.debugPrintInteraction (cyclomatic 19) · ×1
  • Client.debugPrintInteraction (cyclomatic 19) pkg/protocols/common/interactsh/interactsh.go:408 — Client.debugPrintInteraction has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.ExecuteWithResults (cyclomatic 19) · ×1
  • Request.ExecuteWithResults (cyclomatic 19) pkg/protocols/headless/request.go:41 — Request.ExecuteWithResults has cyclomatic complexity 19 (threshold 15). Of this number, 17 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · requestGenerator.makeSelfContainedRequest (cyclomatic 19) · ×1
  • requestGenerator.makeSelfContainedRequest (cyclomatic 19) pkg/protocols/http/build_request.go:275 — requestGenerator.makeSelfContainedRequest has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · templates.parseWorkflowTemplate (cyclomatic 19) · ×1
  • templates.parseWorkflowTemplate (cyclomatic 19) pkg/templates/workflows.go:60 — templates.parseWorkflowTemplate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ClusterExecuter.Execute (cyclomatic 19) · ×1
  • ClusterExecuter.Execute (cyclomatic 19) pkg/templates/cluster.go:250 — ClusterExecuter.Execute has cyclomatic complexity 19 (threshold 15). Of this number, 10 points are the body's own statements and 9 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Store.LoadTemplateTags (cyclomatic 18) · ×1
  • Store.LoadTemplateTags (cyclomatic 18) pkg/catalog/loader/loader.go:435 — Store.LoadTemplateTags has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · provider.NewInputProvider (cyclomatic 18) · ×1
  • provider.NewInputProvider (cyclomatic 18) pkg/input/provider/interface.go:90 — provider.NewInputProvider has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · TemplateManager.cleanupOrphanedTemplates (cyclomatic 18) · ×1
  • TemplateManager.cleanupOrphanedTemplates (cyclomatic 18) pkg/installer/template.go:437 — TemplateManager.cleanupOrphanedTemplates has cyclomatic complexity 18 (threshold 15). Of this number, 12 points are the body's own statements and 6 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ldap.NewClient (cyclomatic 18) · ×1
  • ldap.NewClient (cyclomatic 18) pkg/js/libs/ldap/ldap.go:69 — ldap.NewClient has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · smbsession.listTree (cyclomatic 18) · ×1
  • smbsession.listTree (cyclomatic 18) pkg/js/libs/smbsession/session.go:255 — smbsession.listTree has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 7 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 275). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Matcher.MatchRegex (cyclomatic 18) · ×1
  • Matcher.MatchRegex (cyclomatic 18) pkg/operators/matchers/match.go:110 — Matcher.MatchRegex has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · uncover.GetUncoverTargetsFromMetadata (cyclomatic 18) · ×1
  • uncover.GetUncoverTargetsFromMetadata (cyclomatic 18) pkg/protocols/common/uncover/uncover.go:73 — uncover.GetUncoverTargetsFromMetadata has cyclomatic complexity 18 (threshold 15). Most of this is not in the body itself: 8 of the 18 points are its own statements and the rest belongs to one function literal inside it that branches (line 106). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · engine.New (cyclomatic 18) · ×1
  • engine.New (cyclomatic 18) pkg/protocols/headless/engine/engine.go:35 — engine.New has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · http.enrichEventWithTLSMetadata (cyclomatic 18) · ×1
  • http.enrichEventWithTLSMetadata (cyclomatic 18) pkg/protocols/http/tls_metadata.go:24 — http.enrichEventWithTLSMetadata has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Integration.CreateNewIssue (cyclomatic 18) · ×1
  • Integration.CreateNewIssue (cyclomatic 18) pkg/reporting/trackers/jira/jira.go:269 — Integration.CreateNewIssue has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Template.compileProtocolRequests (cyclomatic 18) · ×1
  • Template.compileProtocolRequests (cyclomatic 18) pkg/templates/compile.go:301 — Template.compileProtocolRequests has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Template.UnmarshalYAML (cyclomatic 18) · ×1
  • Template.UnmarshalYAML (cyclomatic 18) pkg/templates/templates.go:344 — Template.UnmarshalYAML has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FlowExecutor.Compile (cyclomatic 18) · ×1
  • FlowExecutor.Compile (cyclomatic 18) pkg/tmplexec/flow/flow_executor.go:111 — FlowExecutor.Compile has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · UploadWriter.autoCommit (cyclomatic 17) · ×1
  • UploadWriter.autoCommit (cyclomatic 17) internal/pdcp/writer.go:126 — UploadWriter.autoCommit has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Runner.Close (cyclomatic 17) · ×1
  • Runner.Close (cyclomatic 17) internal/runner/runner.go:435 — Runner.Close has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · NucleiEngine.closeInternal (cyclomatic 17) · ×1
  • NucleiEngine.closeInternal (cyclomatic 17) lib/sdk.go:237 — NucleiEngine.closeInternal has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Dynamic.applyValuesToSecret (cyclomatic 17) · ×1
  • Dynamic.applyValuesToSecret (cyclomatic 17) pkg/authprovider/authx/dynamic.go:131 — Dynamic.applyValuesToSecret has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MultiPartForm.Encode (cyclomatic 17) · ×1
  • MultiPartForm.Encode (cyclomatic 17) pkg/fuzz/dataformat/multipart.go:62 — MultiPartForm.Encode has cyclomatic complexity 17 (threshold 15). Most of this is not in the body itself: 3 of the 17 points are its own statements and the rest belongs to one function literal inside it that branches (line 70). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · generator.CreateTemplateData (cyclomatic 17) · ×1
  • generator.CreateTemplateData (cyclomatic 17) pkg/js/devtools/bindgen/generator.go:117 — generator.CreateTemplateData has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · redis.RunLuaScript (cyclomatic 17) · ×1
  • redis.RunLuaScript (cyclomatic 17) pkg/js/libs/redis/redis.go:183 — redis.RunLuaScript has cyclomatic complexity 17 (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.
D1 · Cyclomatic Complexity · fuzzExtractorCandidate.applyLines (cyclomatic 17) · ×1
  • fuzzExtractorCandidate.applyLines (cyclomatic 17) pkg/operators/extractors/fuzz_harness.go:67 — fuzzExtractorCandidate.applyLines has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · code.registerPreConditionFunctions (cyclomatic 17) · ×1
  • code.registerPreConditionFunctions (cyclomatic 17) pkg/protocols/code/helpers.go:12 — code.registerPreConditionFunctions has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Request.Compile (cyclomatic 17) · ×1
  • Request.Compile (cyclomatic 17) pkg/protocols/code/code.go:86 — Request.Compile has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · templates.applyTemplateVerification (cyclomatic 17) · ×1
  • templates.applyTemplateVerification (cyclomatic 17) pkg/templates/compile.go:636 — templates.applyTemplateVerification has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · FlowExecutor.requestExecutor (cyclomatic 17) · ×1
  • FlowExecutor.requestExecutor (cyclomatic 17) pkg/tmplexec/flow/flow_internal.go:17 — FlowExecutor.requestExecutor has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · MultiProtocol.ExecuteWithResults (cyclomatic 17) · ×1
  • MultiProtocol.ExecuteWithResults (cyclomatic 17) pkg/tmplexec/multiproto/multi.go:66 — MultiProtocol.ExecuteWithResults has cyclomatic complexity 17 (threshold 15). Of this number, 10 points are the body's own statements and 7 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · customTemplateGitLabRepo.Download (cyclomatic 16) · ×1
  • customTemplateGitLabRepo.Download (cyclomatic 16) pkg/external/customtemplates/gitlab.go:65 — customTemplateGitLabRepo.Download has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · tsgen.recursiveScrapeType (cyclomatic 16) · ×1
  • tsgen.recursiveScrapeType (cyclomatic 16) pkg/js/devtools/tsgen/scrape.go:80 — tsgen.recursiveScrapeType has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · main.main (cyclomatic 16) · ×1
  • main.main (cyclomatic 16) pkg/js/devtools/tsgen/cmd/tsgen/main.go:31 — main.main has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 7 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 60, 39). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Matcher.MatchWords (cyclomatic 16) · ×1
  • Matcher.MatchWords (cyclomatic 16) pkg/operators/matchers/match.go:56 — Matcher.MatchWords has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Matcher.Validate (cyclomatic 16) · ×1
  • Matcher.Validate (cyclomatic 16) pkg/operators/matchers/validate.go:16 — Matcher.Validate has cyclomatic complexity 16 (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.
D1 · Cyclomatic Complexity · StatsTicker.makePrintCallback (cyclomatic 16) · ×1
  • StatsTicker.makePrintCallback (cyclomatic 16) pkg/progress/progress.go:145 — StatsTicker.makePrintCallback has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 1 of the 16 points is its own statement and the rest belongs to one function literal inside it that branches (line 146). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D1 · Cyclomatic Complexity · Page.Screenshot (cyclomatic 16) · ×1
  • Page.Screenshot (cyclomatic 16) pkg/protocols/headless/engine/page_actions.go:529 — Page.Screenshot has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · Request.executeOnTarget (cyclomatic 16) · ×1
  • Request.executeOnTarget (cyclomatic 16) pkg/protocols/network/request.go:137 — Request.executeOnTarget has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Request.executeAddress (cyclomatic 16) · ×1
  • Request.executeAddress (cyclomatic 16) pkg/protocols/network/request.go:215 — Request.executeAddress has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ReportingClient.CreateIssue (cyclomatic 16) · ×1
  • ReportingClient.CreateIssue (cyclomatic 16) pkg/reporting/reporting.go:289 — ReportingClient.CreateIssue has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · templates.Cluster (cyclomatic 16) · ×1
  • templates.Cluster (cyclomatic 16) pkg/templates/cluster.go:46 — templates.Cluster has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · templates.parseTemplateNoVerify (cyclomatic 16) · ×1
  • templates.parseTemplateNoVerify (cyclomatic 16) pkg/templates/compile.go:524 — templates.parseTemplateNoVerify has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Parser.ParseTemplate (cyclomatic 16) · ×1
  • Parser.ParseTemplate (cyclomatic 16) pkg/templates/parser.go:138 — Parser.ParseTemplate 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.
D2 · Cognitive Complexity · Request.executeRequest (cognitive 231) · ×1
  • Request.executeRequest (cognitive 231) pkg/protocols/http/request.go:677 — Request.executeRequest has cognitive complexity 231 (threshold 15). Drivers by points: if/else 202, boolean chains 25, loops 4 (nesting depth added 110). Of this number, 227 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.main (cognitive 133) · ×1
  • main.main (cognitive 133) pkg/js/devtools/scrapefuncs/main.go:38 — main.main has cognitive complexity 133 (threshold 15). Drivers by points: if/else 79, loops 41, match/switch 13 (nesting depth added 102). Of this number, 28 points are the body's own statements and 105 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openapi.generateRequestsFromOp (cognitive 127) · ×1
  • openapi.generateRequestsFromOp (cognitive 127) pkg/input/formats/openapi/generator.go:166 — openapi.generateRequestsFromOp has cognitive complexity 127 (threshold 15). Drivers by points: if/else 104, loops 13, boolean chains 5, match/switch 5 (nesting depth added 75). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · decoder.decode (cognitive 114) · ×1
  • decoder.decode (cognitive 114) pkg/reporting/trackers/linear/jsonutil/jsonutil.go:74 — decoder.decode has cognitive complexity 114 (threshold 15). Drivers by points: if/else 76, loops 27, match/switch 7, boolean chains 4 (nesting depth added 79). This file's own header attributes it to another copyright holder, so it is code this repository carries rather than code it wrote: restructuring the body in place forks it from upstream and turns every future re-sync into a manual merge. The performable moves are to leave the body as close to its upstream form as possible and keep it behind a narrow interface of your own, and to re-sync it when upstream changes — or, if it has already diverged far enough that you maintain it here, adopt it deliberately and then split the body into named stages.
D2 · Cognitive Complexity · Store.LoadTemplatesWithTags (cognitive 112) · ×1
  • Store.LoadTemplatesWithTags (cognitive 112) pkg/catalog/loader/loader.go:785 — Store.LoadTemplatesWithTags has cognitive complexity 112 (threshold 15). Drivers by points: if/else 98, boolean chains 13, loops 1 (nesting depth added 61). Most of this is not in the body itself: 5 of the 112 points are its own statements and the rest belongs to 3 function literals inside it that branch (lines 862, 797, 827). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · main.readConfig (cognitive 110) · ×1
  • main.readConfig (cognitive 110) cmd/nuclei/main.go:251 — main.readConfig has cognitive complexity 110 (threshold 15). Drivers by points: if/else 94, loops 13, boolean chains 3 (nesting depth added 58). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · runner.New (cognitive 103) · ×1
  • runner.New (cognitive 103) internal/runner/runner.go:114 — runner.New has cognitive complexity 103 (threshold 15). Drivers by points: if/else 90, boolean chains 13 (nesting depth added 29). Of this number, 96 points are the body's own statements and 7 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Engine.runWorkflowStep (cognitive 98) · ×1
  • Engine.runWorkflowStep (cognitive 98) pkg/core/workflow_execute.go:50 — Engine.runWorkflowStep has cognitive complexity 98 (threshold 15). Drivers by points: if/else 61, loops 29, match/switch 6, boolean chains 2 (nesting depth added 65). Of this number, 38 points are the body's own statements and 60 belong to 3 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Request.Compile (cognitive 97) · ×1
  • Request.Compile (cognitive 97) pkg/protocols/http/http.go:328 — Request.Compile has cognitive complexity 97 (threshold 15). Drivers by points: if/else 68, loops 19, boolean chains 9, match/switch 1 (nesting depth added 36). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · openapi.openAPIExample (cognitive 95) · ×1
  • openapi.openAPIExample (cognitive 95) pkg/input/formats/openapi/examples.go:105 — openapi.openAPIExample has cognitive complexity 95 (threshold 15). Drivers by points: if/else 75, loops 13, boolean chains 6, match/switch 1 (nesting depth added 47). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EntityParser.Parse (cognitive 87) · ×1
  • EntityParser.Parse (cognitive 87) pkg/js/devtools/tsgen/parser.go:63 — EntityParser.Parse has cognitive complexity 87 (threshold 15). Drivers by points: if/else 69, loops 14, boolean chains 2, jumps 2 (nesting depth added 48). Of this number, 52 points are the body's own statements and 35 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.RunEnumeration (cognitive 73) · ×1
  • Runner.RunEnumeration (cognitive 73) internal/runner/runner.go:544 — Runner.RunEnumeration has cognitive complexity 73 (threshold 15). Drivers by points: if/else 64, boolean chains 7, loops 2 (nesting depth added 19). Of this number, 71 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Form.Encode (cognitive 71) · ×1
  • Form.Encode (cognitive 71) pkg/fuzz/dataformat/form.go:48 — Form.Encode has cognitive complexity 71 (threshold 15). Drivers by points: if/else 58, loops 10, boolean chains 3 (nesting depth added 48). Of this number, 58 points are the body's own statements and 13 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Runner.preflightResolveAndPortScan (cognitive 70) · ×1
  • Runner.preflightResolveAndPortScan (cognitive 70) internal/runner/preflight_portscan.go:71 — Runner.preflightResolveAndPortScan has cognitive complexity 70 (threshold 15). Drivers by points: if/else 47, loops 13, boolean chains 5, match/switch 5 (nesting depth added 30). Of this number, 27 points are the body's own statements and 43 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Operators.Execute (cognitive 65) · ×1
  • Operators.Execute (cognitive 65) pkg/operators/operators.go:232 — Operators.Execute has cognitive complexity 65 (threshold 15). Drivers by points: if/else 49, loops 10, boolean chains 6 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Request.executeParallelHTTP (cognitive 63) · ×1
  • Request.executeParallelHTTP (cognitive 63) pkg/protocols/http/request.go:205 — Request.executeParallelHTTP has cognitive complexity 63 (threshold 15). Drivers by points: if/else 37, boolean chains 11, match/switch 8, loops 7 (nesting depth added 25). Of this number, 40 points are the body's own statements and 23 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Request.Compile (cognitive 63) · ×1
  • Request.Compile (cognitive 63) pkg/protocols/javascript/js.go:104 — Request.Compile has cognitive complexity 63 (threshold 15). Drivers by points: if/else 53, boolean chains 5, loops 5 (nesting depth added 27). Of this number, 47 points are the body's own statements and 16 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Client.readUntil (cognitive 63) · ×1
  • Client.readUntil (cognitive 63) pkg/utils/telnetmini/telnet.go:264 — Client.readUntil has cognitive complexity 63 (threshold 15). Drivers by points: if/else 50, loops 8, match/switch 3, boolean chains 2 (nesting depth added 41). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NucleiEngine.init (cognitive 60) · ×1
  • NucleiEngine.init (cognitive 60) lib/sdk_private.go:146 — NucleiEngine.init has cognitive complexity 60 (threshold 15). Drivers by points: if/else 55, boolean chains 5 (nesting depth added 13). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Template.validateAllRequestIDs (cognitive 60) · ×1
  • Template.validateAllRequestIDs (cognitive 60) pkg/templates/templates.go:250 — Template.validateAllRequestIDs has cognitive complexity 60 (threshold 15). Drivers by points: if/else 40, loops 20 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Request.findMatchesWithReader (cognitive 59) · ×1
  • Request.findMatchesWithReader (cognitive 59) pkg/protocols/file/request.go:258 — Request.findMatchesWithReader has cognitive complexity 59 (threshold 15). Drivers by points: if/else 29, loops 28, boolean chains 2 (nesting depth added 37). Of this number, 55 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Request.executeWithResults (cognitive 59) · ×1
  • Request.executeWithResults (cognitive 59) pkg/protocols/javascript/js.go:318 — Request.executeWithResults has cognitive complexity 59 (threshold 15). Drivers by points: if/else 43, boolean chains 8, loops 5, match/switch 3 (nesting depth added 25). Of this number, 55 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Request.ExecuteWithResults (cognitive 58) · ×1
  • Request.ExecuteWithResults (cognitive 58) pkg/protocols/file/request.go:52 — Request.ExecuteWithResults has cognitive complexity 58 (threshold 15). Drivers by points: if/else 55, match/switch 3 (nesting depth added 34). Most of this is not in the body itself: 3 of the 58 points are its own statements and the rest belongs to one function literal inside it that branches (line 60). The decisions are inside the literal, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literal's work into a named function or method at the enclosing scope and have the literal call it, then reduce whichever part then reads as the largest.
D2 · Cognitive Complexity · Template.ImportFileRefs (cognitive 58) · ×1
  • Template.ImportFileRefs (cognitive 58) pkg/templates/templates.go:420 — Template.ImportFileRefs has cognitive complexity 58 (threshold 15). Drivers by points: if/else 46, boolean chains 6, loops 6 (nesting depth added 30). Of this number, 53 points are the body's own statements and 5 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FileAuthProvider.init (cognitive 56) · ×1
  • FileAuthProvider.init (cognitive 56) pkg/authprovider/file.go:57 — FileAuthProvider.init has cognitive complexity 56 (threshold 15). Drivers by points: if/else 44, loops 12 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Request.ExecuteWithResults (cognitive 55) · ×1
  • Request.ExecuteWithResults (cognitive 55) pkg/protocols/http/request.go:517 — Request.ExecuteWithResults has cognitive complexity 55 (threshold 15). Drivers by points: if/else 40, boolean chains 12, match/switch 2, loops 1 (nesting depth added 19). Of this number, 21 points are the body's own statements and 34 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.main (cognitive 54) · ×1
  • main.main (cognitive 54) cmd/nuclei/main.go:57 — main.main has cognitive complexity 54 (threshold 15). Drivers by points: if/else 49, loops 4, boolean chains 1 (nesting depth added 20). Of this number, 27 points are the body's own statements and 27 belong to 6 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · main.process (cognitive 54) · ×1
  • main.process (cognitive 54) cmd/tmc/main.go:133 — main.process has cognitive complexity 54 (threshold 15). Drivers by points: if/else 53, loops 1 (nesting depth added 30). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Store.LoadTemplatesOnlyMetadata (cognitive 53) · ×1
  • Store.LoadTemplatesOnlyMetadata (cognitive 53) pkg/catalog/loader/loader.go:512 — Store.LoadTemplatesOnlyMetadata has cognitive complexity 53 (threshold 15). Drivers by points: if/else 50, loops 2, boolean chains 1 (nesting depth added 32). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · httpclientpool.wrappedGet (cognitive 52) · ×1
  • httpclientpool.wrappedGet (cognitive 52) pkg/protocols/http/httpclientpool/clientpool.go:289 — httpclientpool.wrappedGet has cognitive complexity 52 (threshold 15). Drivers by points: if/else 44, boolean chains 6, match/switch 2 (nesting depth added 13). Of this number, 23 points are the body's own statements and 29 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · templates.NewTagFilter (cognitive 51) · ×1
  • templates.NewTagFilter (cognitive 51) pkg/templates/tag_filter.go:367 — templates.NewTagFilter has cognitive complexity 51 (threshold 15). Drivers by points: if/else 28, loops 23 (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.
D2 · Cognitive Complexity · xss.AnalyzeReflectionContext (cognitive 50) · ×1
  • xss.AnalyzeReflectionContext (cognitive 50) pkg/fuzz/analyzers/xss/analyzer.go:233 — xss.AnalyzeReflectionContext has cognitive complexity 50 (threshold 15). Drivers by points: if/else 39, boolean chains 5, match/switch 5, loops 1 (nesting depth added 29). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Request.executeRequestWithPayloads (cognitive 49) · ×1
  • Request.executeRequestWithPayloads (cognitive 49) pkg/protocols/network/request.go:311 — Request.executeRequestWithPayloads has cognitive complexity 49 (threshold 15). Drivers by points: if/else 45, boolean chains 3, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Request.ExecuteWithResults (cognitive 47) · ×1
  • Request.ExecuteWithResults (cognitive 47) pkg/protocols/code/code.go:180 — Request.ExecuteWithResults has cognitive complexity 47 (threshold 15). Drivers by points: if/else 37, boolean chains 8, loops 2 (nesting depth added 11). Of this number, 45 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Request.Compile (cognitive 47) · ×1
  • Request.Compile (cognitive 47) pkg/protocols/network/network.go:171 — Request.Compile has cognitive complexity 47 (threshold 15). Drivers by points: if/else 37, loops 7, boolean chains 3 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ListInputProvider.Set (cognitive 46) · ×1
  • ListInputProvider.Set (cognitive 46) pkg/input/provider/list/hmap.go:143 — ListInputProvider.Set has cognitive complexity 46 (threshold 15). Drivers by points: if/else 38, loops 5, boolean chains 3 (nesting depth added 21). Of this number, 44 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ListInputProvider.Del (cognitive 46) · ×1
  • ListInputProvider.Del (cognitive 46) pkg/input/provider/list/hmap.go:390 — ListInputProvider.Del has cognitive complexity 46 (threshold 15). Drivers by points: if/else 38, loops 5, boolean chains 3 (nesting depth added 21). Of this number, 44 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Request.executeRequestParallel (cognitive 46) · ×1
  • Request.executeRequestParallel (cognitive 46) pkg/protocols/javascript/js.go:501 — Request.executeRequestParallel has cognitive complexity 46 (threshold 15). Drivers by points: if/else 35, boolean chains 4, match/switch 3, jumps 2, loops 2 (nesting depth added 23). Of this number, 25 points are the body's own statements and 21 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Secret.Validate (cognitive 45) · ×1
  • Secret.Validate (cognitive 45) pkg/authprovider/authx/file.go:84 — Secret.Validate has cognitive complexity 45 (threshold 15). Drivers by points: if/else 34, loops 8, boolean chains 2, match/switch 1 (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.
D2 · Cognitive Complexity · reporting.New (cognitive 45) · ×1
  • reporting.New (cognitive 45) pkg/reporting/reporting.go:76 — reporting.New has cognitive complexity 45 (threshold 15). Drivers by points: if/else 43, boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · raw.Parse (cognitive 44) · ×1
  • raw.Parse (cognitive 44) pkg/protocols/http/raw/raw.go:35 — raw.Parse has cognitive complexity 44 (threshold 15). Drivers by points: if/else 38, boolean chains 5, match/switch 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · requestGenerator.generateRawRequest (cognitive 43) · ×1
  • requestGenerator.generateRawRequest (cognitive 43) pkg/protocols/http/build_request.go:414 — requestGenerator.generateRawRequest has cognitive complexity 43 (threshold 15). Drivers by points: if/else 37, boolean chains 5, loops 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · UploadWriter.autoCommit (cognitive 42) · ×1
  • UploadWriter.autoCommit (cognitive 42) internal/pdcp/writer.go:126 — UploadWriter.autoCommit has cognitive complexity 42 (threshold 15). Drivers by points: if/else 38, loops 2, match/switch 2 (nesting depth added 26). Of this number, 37 points are the body's own statements and 5 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Store.LoadTemplateTags (cognitive 42) · ×1
  • Store.LoadTemplateTags (cognitive 42) pkg/catalog/loader/loader.go:435 — Store.LoadTemplateTags has cognitive complexity 42 (threshold 15). Drivers by points: if/else 32, loops 8, 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.
D2 · Cognitive Complexity · Helper.convertInputToType (cognitive 42) · ×1
  • Helper.convertInputToType (cognitive 42) pkg/input/transform.go:69 — Helper.convertInputToType has cognitive complexity 42 (threshold 15). Drivers by points: if/else 33, boolean chains 8, match/switch 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · NucleiEngine.applyRequiredDefaults (cognitive 41) · ×1
  • NucleiEngine.applyRequiredDefaults (cognitive 41) lib/sdk_private.go:44 — NucleiEngine.applyRequiredDefaults has cognitive complexity 41 (threshold 15). Drivers by points: if/else 37, boolean chains 2, loops 2 ...

    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.