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

hyperlight-dev/hyperlight

Measured 14 November 2026, 19:52 UTC, at code version d652690

Code coverage is not measured: Suite not runnable in-image.

Test reliability is not measured: No test run produced results.

CAI score 69out of 100 Strong
CriticalWeakAdequateStrongExemplary
Down 3 since the last survey

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

A medium codebase: 83,630 lines of product code in 14 projects, tests not counted · Estimated rebuild effort: about 0.9 person-years · Weakest lens: Architecture, 65

Findings by how serious they are

56 critical 208 serious 37 minor

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

This survey was produced by

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

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

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

43of 43 dimensions measured by tools.
274of 301 findings point to an exact file and line, so you can open each one in the code. The other 27 concern the repository as a whole, such as missing documentation.
43dimensions across 6 lenses, read from 83,630 lines of product code in 14 projects.
Chapters

Executive summary

hyperlight-dev/hyperlight meets our standard for a preview release. It scores 69 out of 100 and is rated Strong, and 53 of its 56 critical findings are security problems in the build pipeline.

Architecture, at 65, is the weakest lens by a small margin, and the weakest lens counts most in the score. The best first step is fixing the set of files in separate parts that keep changing together, worth about 2 points. Fixing the two projects that are hard to change and widely used comes next, worth about 1 point.

Thirty-one secrets can leak from the build pipeline. Twenty-one pipeline steps put outside input straight into a shell command, so an attacker can run commands in the build pipeline. Limiting each secret to its own step and passing outside input through environment variables would close both risks. The pipeline step that installs packages without pinning their versions needs the packages it installs pinned to exact versions. The part of the code nobody has worked on for a long time needs someone to learn and document it before anyone changes it.

The product code is 83,630 lines, about €120,000 to rebuild.

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

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

The weakest lenses score close to each other, so improving any of them moves the score.

Code composition: what the lines of code are
Business logic 0%Supporting code 2%Tests 98%
New since the last survey: 77 findings

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

  • Cyclomatic Complexity · hyperlight_component_csharp::codec::write (cyclomatic 19) src/hyperlight_component_csharp/src/codec.rs
  • Cyclomatic Complexity · hyperlight_component_csharp::codec::read (cyclomatic 18) src/hyperlight_component_csharp/src/codec.rs
  • Cyclomatic Complexity · hyperlight_component_csharp::host::emit_component (cyclomatic 16) src/hyperlight_component_csharp/src/host.rs
  • Cognitive Complexity · hyperlight_component_csharp::host::emit_component (cognitive 21) src/hyperlight_component_csharp/src/host.rs
  • Cognitive Complexity · hyperlight_component_csharp::codec::read (cognitive 17) src/hyperlight_component_csharp/src/codec.rs
  • Cognitive Complexity · hyperlight_component_csharp::codec::emit_decl (cognitive 17) src/hyperlight_component_csharp/src/codec.rs
  • Cognitive Complexity · hyperlight_guest_bin::arch::amd64::exception::handle::try_handle_internal_pagefault (cognitive 17) src/hyperlight_guest_bin/src/arch/amd64/exception/handle.rs
  • Cognitive Complexity · hyperlight_component_csharp::codec::write (cognitive 16) src/hyperlight_component_csharp/src/codec.rs
  • God Classes · ClassTooLong: KvmVm src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/hyperlight_testing/src/logger.rs
  • Code Duplication · Edited copy of a member (60 corresponding lines) src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs
  • Code Duplication · Edited copy of a member (68 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs
  • Code Duplication · Edited copy of a member (36 corresponding lines) src/hyperlight_ci/src/remote.rs
  • Code Duplication · Edited copy of a member (25 corresponding lines) src/hyperlight_common/src/arch/aarch64/vmem.rs
  • Code Duplication · Edited copies of one member (3 members, 42+ corresponding lines) src/hyperlight_host/src/mem/shared_mem.rs
  • Code Duplication · Edited copy of a member (28 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs
  • Code Duplication · Edited copy of a member (29 corresponding lines) src/hyperlight_common/src/virtq/consumer.rs
  • Code Duplication · Edited copy of a member (34 corresponding lines) src/hyperlight_guest_bin/src/arch/aarch64/exception/handle.rs
  • Code Duplication · Edited copy of a member (21 corresponding lines) src/hyperlight_host/src/mem/shared_mem.rs
  • Code Duplication · Edited copy of a member (25 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/hyperlight_common/src/arch/aarch64/exn.rs
  • Code Duplication · Edited copy of a member (24 corresponding lines) src/hyperlight_common/src/arch/aarch64/vmem.rs
  • Code Duplication · Edited copy of a member (20 corresponding lines) src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs
  • Code Duplication · Edited copy of a member (22 corresponding lines) src/hyperlight_guest/src/arch/aarch64/prim_alloc.rs
  • Code Duplication · Edited copy of a member (24 corresponding lines) src/hyperlight_common/src/virtq/ring.rs
  • Code Duplication · Edited copy of a member (14 corresponding lines) src/hyperlight_component_macro/src/lib.rs
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs
  • Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs
  • Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) src/hyperlight_common/src/virtq/ring.rs
  • Code Duplication · Edited copy of a member (16 corresponding lines) src/hyperlight_common/src/virtq/ring.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/hyperlight_component_util/src/substitute.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/hyperlight_guest_bin/src/transport.rs
  • Code Duplication · Edited copy of a member (20 corresponding lines) src/hyperlight_guest_tracing/src/state.rs
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/hyperlight_component_util/src/guest.rs
  • Code Duplication · Edited copy of a member (19 corresponding lines) src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/hyperlight_component_util/src/elaborate.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/hyperlight_host/src/func/host_functions.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/hyperlight_common/src/flatbuffer_wrappers/function_types.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/hyperlight_guest/src/transport/mem.rs
  • Code Duplication · Edited copy of a member (17 corresponding lines) src/hyperlight_host/src/metrics/mod.rs
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/hyperlight_component_util/src/tv.rs
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/hyperlight_host/src/mem/mgr.rs
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/hyperlight_component_util/src/wf.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/hyperlight_common/src/virtq/consumer.rs
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/trace_dump/main.rs
  • Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs
  • Code Duplication · Edited copy of a member (15 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/hyperlight_common/src/virtq/consumer.rs
  • Code Duplication · Edited copy of a member (22 corresponding lines) src/hyperlight_guest_bin/src/arch/aarch64/exception/handle.rs
  • Code Duplication · Edited copy of a member (9 corresponding lines) src/hyperlight_component_util/src/substitute.rs
  • Code Duplication · Edited copy of a member (10 corresponding lines) src/hyperlight_guest_bin/src/lib.rs
  • Code Duplication · Edited copy of a member (11 corresponding lines) src/hyperlight_host/src/mem/shared_mem.rs
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs
  • Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs
  • Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs
  • Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs
  • Code Duplication · Edited copy of a member (7 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs
  • Code Duplication · Edited copy of a member (8 corresponding lines) src/hyperlight_guest/src/arch/aarch64/paging.rs
  • Code Duplication · Duplicated block (10–23 lines × 2) src/hyperlight_component_util/src/hl.rs
  • Code Duplication · Duplicated block (14–15 lines × 2) src/hyperlight_testing/src/logger.rs
  • Code Duplication · Duplicated block (13 lines × 2) src/hyperlight_guest/src/arch/aarch64/prim_alloc.rs
  • Code Duplication · Duplicated block (13 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs
  • Code Duplication · Duplicated block (10 lines × 2) src/hyperlight_common/src/arch/aarch64/vmem.rs
  • Code Duplication · Duplicated block (7 lines × 3) src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs
  • Code Duplication · Duplicated block (6 lines × 2) src/hyperlight_host/src/mem/mgr.rs
  • Code Duplication · Duplicated block (10 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs
  • Code Duplication · Duplicated block (7 lines × 2) src/hyperlight_component_csharp/src/types.rs
  • Code Duplication · Duplicated block (5 lines × 2) src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs
  • Code Duplication · Edited copy of a member (12 corresponding lines) src/hyperlight_host/src/sandbox/snapshot/memory/backing.rs
  • Code Duplication · Edited copy of a member (9 corresponding lines) fuzz/fuzz_targets/virtq_memory.rs
  • Code Duplication · Duplicated block (7 lines × 2) src/hyperlight_host/src/sandbox/initialized.rs
  • Churn × Complexity Hotspots · Hotspot: src/hyperlight_host/src/sandbox/snapshot/mod.rs src/hyperlight_host/src/sandbox/snapshot/mod.rs
  • Explicit Debt · FileScopedPragmaDisable src/hyperlight_component_csharp/src/Runtime.cs
  • Static Analysis (SAST) · REDACTED
  • Dependency Vulnerabilities · REDACTED
  • Change Coupling · Boundary-crossing change coupling: exit.rs ↔ call.rs src/hyperlight_guest/src/exit.rs

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

Fixed since the last survey: 85 findings

These 85 critical or serious findings were in the previous survey, on 28 October 2026, and are gone from this one.

  • Code Duplication · Duplicated block (10–23 lines × 2) src/hyperlight_component_util/src/hl.rs
  • Code Duplication · Duplicated block (8–10 lines × 3) src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs
  • Code Duplication · Duplicated block (10 lines × 2) src/hyperlight_common/src/arch/aarch64/vmem.rs
  • Code Duplication · Duplicated block (7–8 lines × 2) src/hyperlight_component_util/src/substitute.rs
  • Code Duplication · Duplicated block (8 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs
  • Code Duplication · Duplicated block (10 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs
  • Code Duplication · Duplicated block (7 lines × 2) src/hyperlight_host/src/sandbox/initialized.rs
  • Code Duplication · Duplicated block (7 lines × 2) src/hyperlight_host/src/sandbox/snapshot/file/transport.rs
  • Churn × Complexity Hotspots · Hotspot: src/hyperlight_host/src/sandbox/snapshot/file/config.rs src/hyperlight_host/src/sandbox/snapshot/file/config.rs
  • Churn × Complexity Hotspots · Hotspot: src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs
  • Churn × Complexity Hotspots · Hotspot: src/hyperlight_component_util/src/rtypes.rs src/hyperlight_component_util/src/rtypes.rs
  • Explicit Debt · TodoComment src/trace_dump/main.rs
  • Explicit Debt · TodoComment src/tests/rust_guests/witguest/src/main.rs
  • Explicit Debt · TodoComment src/tests/rust_guests/simpleguest/src/main.rs
  • Explicit Debt · TodoComment src/hyperlight_host/tests/integration_test.rs
  • Explicit Debt · TodoComment src/hyperlight_host/tests/integration_test.rs
  • Explicit Debt · TodoComment src/hyperlight_host/tests/integration_test.rs
  • Explicit Debt · TodoComment src/hyperlight_host/tests/integration_test.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/sandbox/config.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/sandbox/initialized.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/sandbox/uninitialized.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/sandbox/uninitialized.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/sandbox/snapshot/mod.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/sandbox/snapshot/mod.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/sandbox/snapshot/mod.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/sandbox/snapshot/file/config.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/mem/elf.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/mem/exe.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/mem/shared_mem.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/mem/shared_mem.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/mem/virtq/mem.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/virtual_machine/mod.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/virtual_machine/mshv/aarch64.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/virtual_machine/hvf/mod.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/virtual_machine/hvf/mod.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/regs/aarch64/mod.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/regs/aarch64/special_regs.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/hyperlight_vm/aarch64.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/hyperlight_vm/aarch64.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs
  • Explicit Debt · TodoComment src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs
  • Explicit Debt · TodoComment src/hyperlight_guest_tracing/src/invariant_tsc.rs
  • Explicit Debt · TodoComment src/hyperlight_guest_bin/src/arch/amd64/context.rs
  • Explicit Debt · TodoComment src/hyperlight_guest_bin/src/arch/amd64/context.rs
  • Explicit Debt · TodoComment src/hyperlight_guest_bin/src/arch/amd64/exception/handle.rs
  • Explicit Debt · TodoComment src/hyperlight_guest_bin/src/arch/amd64/exception/handle.rs
  • Explicit Debt · TodoComment src/hyperlight_guest_bin/src/arch/aarch64/exception/handle.rs
  • Explicit Debt · TodoComment src/hyperlight_guest_bin/src/arch/amd64/exception/handle.rs
  • Explicit Debt · TodoComment src/hyperlight_guest_bin/src/arch/amd64/exception/handle.rs
  • Explicit Debt · TodoComment src/hyperlight_guest_bin/src/arch/aarch64/mod.rs
  • Explicit Debt · TodoComment src/hyperlight_guest_bin/src/arch/aarch64/exception/handle.rs
  • Explicit Debt · TodoComment src/hyperlight_guest/src/arch/amd64/paging.rs
  • Explicit Debt · TodoComment src/hyperlight_guest/src/arch/aarch64/paging.rs
  • Explicit Debt · TodoComment src/hyperlight_guest/src/arch/amd64/paging.rs
  • Explicit Debt · TodoComment src/hyperlight_guest/src/arch/amd64/paging.rs
  • Explicit Debt · TodoComment src/hyperlight_guest/src/arch/aarch64/paging.rs
  • Explicit Debt · TodoComment src/hyperlight_guest/src/arch/aarch64/exit.rs
  • Explicit Debt · TodoComment src/hyperlight_guest/src/arch/aarch64/layout.rs
  • Explicit Debt · TodoComment src/hyperlight_guest/src/arch/aarch64/prim_alloc.rs
  • Explicit Debt · TodoComment src/hyperlight_component_util/src/component.rs
  • Explicit Debt · TodoComment src/hyperlight_component_util/src/component.rs
  • Explicit Debt · TodoComment src/hyperlight_component_util/src/guest.rs
  • Explicit Debt · TodoComment src/hyperlight_component_util/src/hl.rs
  • Explicit Debt · TodoComment src/hyperlight_component_util/src/hl.rs
  • Explicit Debt · TodoComment src/hyperlight_component_util/src/hl.rs
  • Explicit Debt · TodoComment src/hyperlight_component_util/src/hl.rs
  • Explicit Debt · TodoComment src/hyperlight_component_util/src/rtypes.rs
  • Explicit Debt · TodoComment src/hyperlight_component_util/src/rtypes.rs
  • Explicit Debt · TodoComment src/hyperlight_component_util/src/rtypes.rs
  • Explicit Debt · HackComment src/hyperlight_component_util/src/rtypes.rs
  • Explicit Debt · TodoComment src/hyperlight_component_util/src/rtypes.rs
  • Explicit Debt · TodoComment src/hyperlight_common/src/transport.rs
  • Explicit Debt · TodoComment src/hyperlight_common/src/transport.rs
  • Explicit Debt · TodoComment src/hyperlight_common/src/flatbuffer_wrappers/guest_log_level.rs
  • Explicit Debt · TodoComment src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs
  • Explicit Debt · TodoComment src/hyperlight_common/src/arch/amd64/vmem.rs
  • Explicit Debt · TodoComment src/hyperlight_common/src/arch/aarch64/layout.rs
  • Explicit Debt · TodoComment src/hyperlight_common/src/arch/aarch64/vmem.rs
  • Explicit Debt · TodoComment src/hyperlight_common/src/arch/aarch64/vmem.rs
  • Dependency Vulnerabilities · Medium vulnerability: RUSTSEC-2026-0344 REDACTED
  • Change Coupling · Change coupling: elf.rs ↔ mgr.rs src/hyperlight_host/src/mem/elf.rs
Rebuild cost: about €120,000 · Estimate
Cost to rebuild€41,000 to €210,000, for 690 to 2,189 hours of work, about 0.9 person-years for 1 to 2 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×1.0 at a score of 69. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeMedium: 83,630 lines of product code
Comment linesThe estimate prices 83,570 lines. Comment lines count towards the size of 83,630 lines but aren't priced as work.
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

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

Top priorities

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

1
Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with exit.rs.
Raises the score by about 2 points · Low effort · Change Coupling
2
Resolve the 2 Off the main sequence finding(s) in Coupling.
Raises the score by about 1 point · Low effort · Coupling
3
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
Raises the score by about 2 points · Medium effort · DR & Backup

Diagnosis: what the measurements show together

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

If you do one thing first · First action
Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling. Of all the actions in this report, it raises the score most for the work it takes: about 2 points for low effort, because it clears the 1 Change Coupling findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch hyperlight-ci hyperlight-ci hyperlight-common hyperlight-common hyperlight-component-csharp hyperlight-component-csharp hyperlight-component-util hyperlight-component-util hyperlight-component-csharp->hyperlight-component-util hyperlight-component-macro hyperlight-component-macro hyperlight-component-macro->hyperlight-component-util hyperlight-guest hyperlight-guest hyperlight-guest->hyperlight-common hyperlight-guest-tracing hyperlight-guest-tracing hyperlight-guest->hyperlight-guest-tracing hyperlight-guest-bin hyperlight-guest-bin hyperlight-guest-bin->hyperlight-common hyperlight-guest-bin->hyperlight-guest hyperlight-guest-macro hyperlight-guest-macro hyperlight-guest-bin->hyperlight-guest-macro hyperlight-guest-bin->hyperlight-guest-tracing hyperlight-libc hyperlight-libc hyperlight-guest-bin->hyperlight-libc hyperlight-guest-tracing->hyperlight-common hyperlight-host hyperlight-host hyperlight-host->hyperlight-common hyperlight-host->hyperlight-guest-tracing hyperlight-testing hyperlight-testing hyperlight_guest_capi hyperlight_guest_capi hyperlight_guest_capi->hyperlight-common hyperlight_guest_capi->hyperlight-guest hyperlight_guest_capi->hyperlight-guest-bin trace_dump trace_dump

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

187 modules, with 204 dependencies between them. 3 loops run through 7 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 147 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 hyperlight_ci.bench_report2 hyperlight_common.flatbuffer_wrappers.codec3 hyperlight_common.flatbuffer_wrappers.function_types4 hyperlight_common.virtq.pool.slot5 hyperlight_common.vmem6 hyperlight_component_util.etypes7 hyperlight_host.hypervisor.regs.aarch648 hyperlight_host.hypervisor.regs.aarch64.common_fpu9 hyperlight_host.hypervisor.regs.aarch64.common_regs10 hyperlight_host.hypervisor.regs.aarch64.special_regs11 hyperlight_host.hypervisor.wrappers12 hyperlight_common.flatbuffer_wrappers.function_call13 hyperlight_common.virtq14 hyperlight_component_util.emit15 hyperlight_host.hypervisor.virtual_machine16 hyperlight_host.mem.memory_region17 hyperlight_common.virtq.ring18 hyperlight_guest.error19 hyperlight_guest_capi.types.function_call20 hyperlight_host.hypervisor.hyperlight_vm.test_support21 hyperlight_host.hypervisor.surrogate_process22 hyperlight_host.hypervisor.virtual_machine.kvm.aarch6423 hyperlight_host.mem.layout24 hyperlight_host.mem.shared_mem25 hyperlight_common.virtq.consumer26 hyperlight_common.virtq.pool27 hyperlight_host.hypervisor.virtual_machine.hvf28 hyperlight_host.hypervisor.virtual_machine.whp.aarch6429 hyperlight_host.mem.virtq30 hyperlight_common.virtq.buffer31 hyperlight_common.transport32 hyperlight_common.virtq.access33 hyperlight_common.virtq.producer34 hyperlight_guest.transport.context35 hyperlight_host.mem.mgr36 hyperlight_host.hypervisor.gdb37 hyperlight_host.hypervisor.hyperlight_vm38 hyperlight_host.hypervisor.virtual_machine.kvm.x86_6439 hyperlight_host.hypervisor.virtual_machine.mshv.x86_6440 hyperlight_host.hypervisor.virtual_machine.whp.x86_64
1 hyperlight_ci.bench_report
2 hyperlight_common.flatbuffer_wrappers.codec
3 hyperlight_common.flatbuffer_wrappers.function_types
4 hyperlight_common.virtq.pool.slot
5 hyperlight_common.vmem
6 hyperlight_component_util.etypes
7 hyperlight_host.hypervisor.regs.aarch64
8 hyperlight_host.hypervisor.regs.aarch64.common_fpu
9 hyperlight_host.hypervisor.regs.aarch64.common_regs
10 hyperlight_host.hypervisor.regs.aarch64.special_regs
11 hyperlight_host.hypervisor.wrappers
12 hyperlight_common.flatbuffer_wrappers.function_call2
13 hyperlight_common.virtq11
14 hyperlight_component_util.emit2
15 hyperlight_host.hypervisor.virtual_machine1111
16 hyperlight_host.mem.memory_region1
17 hyperlight_common.virtq.ring2
18 hyperlight_guest.error1
19 hyperlight_guest_capi.types.function_call21
20 hyperlight_host.hypervisor.hyperlight_vm.test_support11112
21 hyperlight_host.hypervisor.surrogate_process12
22 hyperlight_host.hypervisor.virtual_machine.kvm.aarch6411111
23 hyperlight_host.mem.layout1
24 hyperlight_host.mem.shared_mem4
25 hyperlight_common.virtq.consumer184
26 hyperlight_common.virtq.pool1
27 hyperlight_host.hypervisor.virtual_machine.hvf122211
28 hyperlight_host.hypervisor.virtual_machine.whp.aarch64111111
29 hyperlight_host.mem.virtq222
30 hyperlight_common.virtq.buffer111
31 hyperlight_common.transport11
32 hyperlight_common.virtq.access1
33 hyperlight_common.virtq.producer3431
34 hyperlight_guest.transport.context4152
35 hyperlight_host.mem.mgr41112111
36 hyperlight_host.hypervisor.gdb11
37 hyperlight_host.hypervisor.hyperlight_vm111115
38 hyperlight_host.hypervisor.virtual_machine.kvm.x86_64111111
39 hyperlight_host.hypervisor.virtual_machine.mshv.x86_64111111
40 hyperlight_host.hypervisor.virtual_machine.whp.x86_6411111111
Uses a module listed above itPart of a loopThe module itself
1 hyperlight_ci.bench_report2 hyperlight_common.flatbuffer_wrappers.codec3 hyperlight_common.flatbuffer_wrappers.function_types4 hyperlight_common.virtq.pool.slot5 hyperlight_common.vmem6 hyperlight_component_util.etypes7 hyperlight_host.hypervisor.regs.aarch648 hyperlight_host.hypervisor.regs.aarch64.common_fpu9 hyperlight_host.hypervisor.regs.aarch64.common_regs10 hyperlight_host.hypervisor.regs.aarch64.special_regs11 hyperlight_host.hypervisor.wrappers12 hyperlight_common.flatbuffer_wrappers.function_call13 hyperlight_common.virtq14 hyperlight_component_util.emit15 hyperlight_host.hypervisor.virtual_machine16 hyperlight_host.mem.memory_region17 hyperlight_common.virtq.ring18 hyperlight_guest.error19 hyperlight_guest_capi.types.function_call20 hyperlight_host.hypervisor.hyperlight_vm.test_support21 hyperlight_host.hypervisor.surrogate_process22 hyperlight_host.hypervisor.virtual_machine.kvm.aarch6423 hyperlight_host.mem.layout24 hyperlight_host.mem.shared_mem25 hyperlight_common.virtq.consumer26 hyperlight_common.virtq.pool27 hyperlight_host.hypervisor.virtual_machine.hvf28 hyperlight_host.hypervisor.virtual_machine.whp.aarch6429 hyperlight_host.mem.virtq30 hyperlight_common.virtq.buffer31 hyperlight_common.transport32 hyperlight_common.virtq.access33 hyperlight_common.virtq.producer34 hyperlight_guest.transport.context35 hyperlight_host.mem.mgr36 hyperlight_host.hypervisor.gdb37 hyperlight_host.hypervisor.hyperlight_vm38 hyperlight_host.hypervisor.virtual_machine.kvm.x86_6439 hyperlight_host.hypervisor.virtual_machine.mshv.x86_6440 hyperlight_host.hypervisor.virtual_machine.whp.x86_64hyperlight_ci.bench_report1hyperlight_common.flatbuffer_wrappers.codec2hyperlight_common.flatbuffer_wrappers.function_types3hyperlight_common.virtq.pool.slot4hyperlight_common.vmem5hyperlight_component_util.etypes6hyperlight_host.hypervisor.regs.aarch647hyperlight_host.hypervisor.regs.aarch64.common_fpu8hyperlight_host.hypervisor.regs.aarch64.common_regs9hyperlight_host.hypervisor.regs.aarch64.special_regs10hyperlight_host.hypervisor.wrappers11hyperlight_common.flatbuffer_wrappers.function_call12hyperlight_common.virtq13hyperlight_component_util.emit14hyperlight_host.hypervisor.virtual_machine15hyperlight_host.mem.memory_region16hyperlight_common.virtq.ring17hyperlight_guest.error18hyperlight_guest_capi.types.function_call19hyperlight_host.hypervisor.hyperlight_vm.test_support20hyperlight_host.hypervisor.surrogate_process21hyperlight_host.hypervisor.virtual_machine.kvm.aarch6422hyperlight_host.mem.layout23hyperlight_host.mem.shared_mem24hyperlight_common.virtq.consumer25hyperlight_common.virtq.pool26hyperlight_host.hypervisor.virtual_machine.hvf27hyperlight_host.hypervisor.virtual_machine.whp.aarch6428hyperlight_host.mem.virtq29hyperlight_common.virtq.buffer30hyperlight_common.transport31hyperlight_common.virtq.access32hyperlight_common.virtq.producer33hyperlight_guest.transport.context34hyperlight_host.mem.mgr35hyperlight_host.hypervisor.gdb36hyperlight_host.hypervisor.hyperlight_vm37hyperlight_host.hypervisor.virtual_machine.kvm.x86_6438hyperlight_host.hypervisor.virtual_machine.mshv.x86_6439hyperlight_host.hypervisor.virtual_machine.whp.x86_6440211211111212111112121111114184112221111111122211111134314152411121111111111511111111111111111111+147 more modules (most-connected shown)

At a glance — Code Health · 87% · Exemplary ·

At a glance — Architecture · 65% · Adequate · gated by AX10 ·

At a glance — Maturity · 74% · Strong ·

At a glance — Readiness · 67% · Adequate · gated by P5 ·

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

At a glance — Performance · 94% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

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

OWASP categoryFindingsSeverity
A05:2025 — Injection54High / Critical
A03:2025 — Software Supply Chain Failures8Medium
A02:2025 — Security Misconfiguration8Medium

Roadmap

Top priorities: Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete; Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with exit.rs; Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.

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

Do thisHelpsEffortDimension
Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with exit.rs.+1.7 ptsLowChange Coupling
Resolve the 2 Off the main sequence finding(s) in Coupling.+1.3 ptsLowCoupling
Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.+2.0 ptsMediumDR & Backup
Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.+1.6 ptsMediumDeployment & Rollback
Resolve the 1 Unstable project hyperlight-guest-bin finding(s) in Coupling.+0.8 ptsLowCoupling
Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with guest_trace_data.rs.+0.5 ptsLowKnowledge Freshness
Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.+1.0 ptsMediumArchitecture documentation
Resolve the 1 FileScopedPragmaDisable finding(s) in Explicit Debt — start with Runtime.cs.+0.4 ptsLowExplicit Debt

File quality

Per-file score 0–10 — a quality signature. Of 81 files carrying findings, judged against the Preview bar: 2% slop · 14% mixed · 84% near-clean.

FileScoreBandWorst signal
REDACTED2.3SlopStatic Analysis (SAST): High: REDACTED
REDACTED2.7SlopStatic Analysis (SAST): High: REDACTED
REDACTED4.4MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.1MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): High: REDACTED
src/hyperlight_host/src/hypervisor/virtual_machine/hvf/mod.rs6.3MixedCognitive Complexity: HvfCpu::run (cognitive 27)
REDACTED6.9MixedDependency Vulnerabilities: Medium advisory (unmaintained): REDACTED
src/hyperlight_component_util/src/rtypes.rs7.0Near-cleanCyclomatic Complexity: hyperlight_component_util::rtypes::emit_value (cyclomatic 25)
src/hyperlight_component_util/src/hl.rs7.0Near-cleanCyclomatic Complexity: hyperlight_component_util::hl::emit_hl_unmarshal_value (cyclomatic 24)
src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs7.0Near-cleanCyclomatic Complexity: MshvVm::run_vcpu (cyclomatic 23)
src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs7.0Near-cleanCognitive Complexity: WhpVm::run_vcpu (cognitive 22)
src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs7.0Near-cleanCognitive Complexity: KvmVm::run_vcpu_hw_interrupts (cognitive 19)
src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs7.0Near-cleanCyclomatic Complexity: WhpVm::run_vcpu (cyclomatic 18)
src/hyperlight_common/src/arch/aarch64/vmem.rs7.0Near-cleanCode Duplication: Edited copy of a member (25 corresponding lines)

How the grades work

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

Critical — 56

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

Serious — 208

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

Minor — 37

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

Could not be resolved — 10

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

Methodology & how to trust this report

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

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

What we checked — 43 dimensions across the health lenses
D1D2D3D4D5D6D12D13D14D15D16D17D19D28D29D30D31D34D35D36D37D43D44AX10AX3AX4AX8AX9GD1M1M2M3M4P1P10P2P3P4P5P6PF1PF3X5

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, 274 of 301 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 01a1db9e-2af5-723c-af7a-416ed0f6512e.

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

Run transparency — what happened this run

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

  • D8 Code Coverage — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Coverage NOT READ here — but this repository measures it: a coverage step in CI (`Coverage Report`) shows that coverage is collected and tracked in your own CI. The suite could not be built/run in-image, so the number could not be read here — it is excluded from the score rather than treated as unmeasured-by-the-team. To have it measured, make the suite runnable without services we do not provision (a database, a broker). For context only, test code is ≈ 17% of production LoC (14,410 test / 83,220 production) — a rough proxy, NOT a coverage measurement. You can widen what we reach: optional: make the suite runnable without a database, broker or other service we do not provision, and real coverage is measured on the next scan.
  • D11 Test Reliability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT MEASURED: the test run produced no results for any test tier, so no test ever ran and flakiness could not be exercised. The cause could not be attributed, so it is excluded from the score rather than read as an absence of tests.
  • D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The C# workspace loaded this repository's projects but reported a load failure, and the dead-code reference search is unreliable over a graph that did not load cleanly, so it was skipped. The other debt markers on this row were read; dead symbols were not, and their absence from the score is not a finding that the code has none. First load diagnostic: Failure: Msbuild failed when processing the file 'src/tests/csharp_host/ComponentTests.csproj' with message: could not download file from 'https://static.rust-lang.org/dist/channel-rust-1.99.1.toml.sha256' to '/usr/local/rustup/tmp/na9475lmpmmx8gjr_file': error downloading file: error sending request for url (https://static.rust-lang.org/dist/ch….
  • D17 Explicit Debt — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 1 deducted marker(s) and the 0.4/KLoC density on this row were taken over this repository's .NET projects ALONE: .rs (81,893 lines, 99% of production source) went unread, because every marker collector on this path is reached through a C# workspace. A read-only sweep of that source finds at least 72 task marker(s) (TODO/FIXME/HACK/XXX) across 42 file(s) that this score does not count — a floor, since only line comments are read there and D17's other eight marker kinds (suppressions, NoWarn, editorconfig severities, empty catches, commented-out code, Obsolete, dead code, preprocessor branches) need a compiler we do not have for that language. The debt in that source is UNMEASURED — its absence from the score above is a gap in this analyzer's language coverage, not a finding that the code carries none.
  • D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Each source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
  • D27 Navigability — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • AX6 Interface segregation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — 2 | RUN rustup toolchain install 1.86 && rustup default 1.86 3 | -------------------- ERROR: failed to solve: dependabot/dependabot-script: failed to resolve source metadata for docker.io/dependabot/dependabot-script:latest: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed; runtime evidence skipped.
  • IC1 Incompleteness & stubs — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
  • X12 Unreachable branch — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X16 Unfloored truncation loop — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
  • X27 Collection changed while being enumerated — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's C# was parsed (it ships no .sln or .csproj, so it was read as syntax-only projects), but this check proves its findings from resolved symbols and a reference-free parse resolves none. It abstained rather than report a clean bill it could not earn. That is a gap in this analyzer's reach into build-less repositories — not a finding that the repository is free of what this check looks for.
  • X3 Exception handling — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.

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

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • 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.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a REDACTED (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
  • 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".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity8.4 / 10Strong✓ Tool-verified

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

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

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

12 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was HyperlightVm::run at 27. A further 10 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 hyperlight_host::hypervisor::virtual_machine::whp::x86_64::msr_to_whv_register_name at 76 — they are counted neither in the figure above nor in this dimension's score. 7 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: src/hyperlight_common/src/outb.rs (Exception::try_from at 24), src/hyperlight_host/src/hypervisor/regs/x86_64/standard_regs.rs (CommonRegisters::try_from at 23), src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs (CommonSpecialRegisters::try_from at 22), src/hyperlight_component_util/src/wf.rs (Ctx::wf_value at 21), src/hyperlight_component_util/src/substitute.rs (Substitution::value at 20), and 2 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

hyperlight_component_util::rtypes::emit_value (cyclomatic 25) · ×4src/hyperlight_component_util/src/rtypes.rs:317
hyperlight_component_csharp::codec::write (cyclomatic 19) · ×3src/hyperlight_component_csharp/src/codec.rs:151
HyperlightVm::run (cyclomatic 27)src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs:622
Ctx::subtype_value (cyclomatic 24)src/hyperlight_component_util/src/subtype.rs:50
MshvVm::run_vcpu (cyclomatic 23)src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:255

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

What to do

  1. Bring the 12 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with HyperlightVm::run (cyclomatic 27), hyperlight_component_util::rtypes::emit_value (cyclomatic 25), Ctx::subtype_value (cyclomatic 24). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 12 together lifts Cyclomatic Complexity from 8.4 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.

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

D2 · Cognitive Complexity6.7 / 10Adequate✓ Tool-verified

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

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

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

28 method(s) exceeded the cognitive complexity threshold of 15; the worst was hyperlight_component_util::component::read_component_single_exported_type at 54.

hyperlight_component_util::component::read_component_single_exported_type (cognitive 54) · ×8src/hyperlight_component_util/src/component.rs:70
hyperlight_component_csharp::host::emit_component (cognitive 21) · ×4src/hyperlight_component_csharp/src/host.rs:436
MshvVm::run_vcpu (cognitive 52) · ×2src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:255
HyperlightVm::run (cognitive 43) · ×2src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs:622
WhpVm::run_vcpu (cognitive 31) · ×2src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:530

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

What to do

  1. Bring the 5 bodies over 30 down to 30 or less in Cognitive Complexity — start with hyperlight_component_util::component::read_component_single_exported_type (cognitive 54), MshvVm::run_vcpu (cognitive 52), HyperlightVm::run (cognitive 43). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 5 together lifts Cognitive Complexity from 6.7 to about 7.3/10, projected with the scoring formula itself and assuming each lands exactly at 30; a cleaner split scores higher.

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

D3 · God Classes8.8 / 10Strong✓ Tool-verified

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

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

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

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

FileTooLong: whp/x86_64.rs · ×14src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs
MethodTooLong: FunctionCall.encode · ×6src/hyperlight_common/src/flatbuffer_wrappers/function_call.rs:66
ClassTooLong: WhpVm · ×4src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:237
TooManyMethods: Ctx · ×3src/hyperlight_component_util/src/etypes.rs:430
FunctionTooLong: hyperlight_component_util::hl::emit_hl_unmarshal_value · ×3src/hyperlight_component_util/src/hl.rs:188

What to do

  1. Resolve the 14 FileTooLong finding(s) in God Classes — start with x86_64.rs (3), mod.rs (2), shared_mem.rs. — One of this dimension's main actionable groups (14 warning-level).
  2. Resolve the 6 MethodTooLong finding(s) in God Classes — start with x86_64.rs (3), function_call.rs, guest_trace_data.rs. — One of this dimension's main actionable groups (6 warning-level).
  3. Resolve the 4 ClassTooLong finding(s) in God Classes — start with x86_64.rs (3), mgr.rs. — One of this dimension's main actionable groups (4 warning-level).

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

D4 · Code Duplication8.6 / 10Strong✓ Tool-verified

What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.

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

71 duplicated block group(s) detected. 3.6 % of the production lines (3,011 of 83,220) are in a reported copy. A further 53 rows report members as variants of one another; the share counts each copied line once, however many rows cite it. 4 of the 124 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (7 lines × 2) · ×10src/hyperlight_guest_bin/src/memory.rs:128
Duplicated block (6 lines × 2) · ×7src/hyperlight_component_macro/src/lib.rs:57
Edited copy of a member (15 corresponding lines) · ×6src/hyperlight_common/src/arch/aarch64/exn.rs:21
Duplicated block (5 lines × 2) · ×6src/hyperlight_component_util/src/hl.rs:309
Edited copy of a member (12 corresponding lines) · ×5src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:262

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

What to do

  1. Resolve the 10 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with x86_64.rs (5), memory.rs, paging.rs. — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 7 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with lib.rs, rtypes.rs, mgr.rs. — One of this dimension's main actionable groups (7 warning-level).
  3. Resolve the 6 Edited copy of a member (15 corresponding lines) finding(s) in Code Duplication — start with exn.rs, elaborate.rs, host_functions.rs. — One of this dimension's main actionable groups (6 warning-level).

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

D5 · Coupling8.1 / 10Strong✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

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

14 production modules (Cargo), 0 dependency cycle(s), 1 unstable depended-on module(s). Read from the build's own module declarations; 3 module(s) off the main sequence, with abstractness counted on 11 of the 14 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: hyperlight-component-util · ×2
Unstable project hyperlight-guest-bin
Off the main sequence: hyperlight-common

What to do

  1. Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 Unstable project hyperlight-guest-bin finding(s) in Coupling. — One of this dimension's main actionable groups (1 warning-level).

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

D6 · Cohesion (LCOM4)9.8 / 10Stronggated by 2 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

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

2 of 136 classes have LCOM4 above 3.

Low cohesion: HvfVm (LCOM4 5) · ×2src/hyperlight_host/src/hypervisor/virtual_machine/hvf/mod.rs:701

What to do

  1. Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with mod.rs, ptr_offset.rs. — One of this dimension's main actionable groups (2 warning-level).

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

D12 · Dependency Hygiene9.6 / 10Exemplary✓ Tool-verified

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

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

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

8 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: cc · ×8

✓ On the Gold path — maintain.

Detailed fixes: d12_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: Documented → Verified → Prevented · 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.

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

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

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

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

0 of 375 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. A further 6 crate(s) in the closure resolve from git, a path or a private registry and publish no licence this pass can read; they are outside this verdict. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.9 / 10Stronggated by 3 serious findings✓ Tool-verified

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

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

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

Top hotspots: src/hyperlight_host/src/sandbox/snapshot/mod.rs (12×31=372); src/hyperlight_host/src/sandbox/snapshot/file/mod.rs (11×24=264); src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs (7×27=189)

Hotspot: src/hyperlight_host/src/sandbox/snapshot/mod.rs · ×3src/hyperlight_host/src/sandbox/snapshot/mod.rs:726

What to do

  1. Resolve the 3 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (3). — One of this dimension's main actionable groups (3 warning-level).

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

D16 · Bus Factor8.9 / 10Strong✓ 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: Documented → Verified → Prevented · effective 8.9 / 10 · rule-coverage 100% · ceiling Documented

17 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/hyperlight_common/src/virtq/producer.rs. Counted over 155 of the 223 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

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

What to do

  1. Resolve the 3 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (3 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

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

D17 · Explicit Debt9.2 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

1 deducted debt markers + unmeasured dead symbols across 0 LoC in the .NET projects (0.4/KLoC) → score 9.3. Dead code not measured: the solution did not load cleanly, so the reference search was skipped. Measured on the .NET source only: .rs (99% of production source) was not read, and carries at least 72 uncounted task marker(s) in 42 file(s).

FileScopedPragmaDisablesrc/hyperlight_component_csharp/src/Runtime.cs:9

What to do

  1. Resolve the 1 FileScopedPragmaDisable finding(s) in Explicit Debt — start with Runtime.cs. — One of this dimension's main actionable groups (1 issue-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D28 · Secrets (history)10.0 / 10Exemplary○ Nothing flagged

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

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

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

gitleaks scanned the full history AND the current working tree and found no secrets.

✓ On the Gold path — maintain.

Detailed fixes: d28_recommendation.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: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

54 finding(s): 0 critical, 53 high, 1 medium, 0 low. semgrep hit a parse error in 5 file(s) — `hack/update-actions.sh` (line 55), `src/hyperlight_guest_capi/src/dispatch.rs` (line 42, line 45, line 52, …), `src/hyperlight_guest_capi/src/error.rs` (line 30, line 35), `src/hyperlight_host/src/hypervisor/mod.rs` (line 467), `src/hyperlight_host/src/mem/shared_mem.rs` (line 626, lines 647–648) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 17 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED

What to do

  1. Resolve the 31 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (9), REDACTED (5), REDACTED (4). — One of this dimension's main actionable groups (31 issue-level).
  2. Resolve the 21 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (11), REDACTED (4), REDACTED (2). — One of this dimension's main actionable groups (21 issue-level).
  3. Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).

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

D30 · Dependency Vulnerabilities9.6 / 10Stronggated by 2 serious findings✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

  1. Resolve the 1 Medium advisory (unmaintained) finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D31 · IaC & Container Security9.7 / 10Stronggated by 1 serious finding✓ Tool-verified

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

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

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

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

REDACTED
REDACTED

What to do

  1. Resolve the 7 Low IaC finding(s) in IaC & Container Security — start with REDACTED (7). — One of this dimension's main actionable groups (7 recommendation-level).
  2. Resolve the 1 Medium IaC finding(s) in IaC & Container Security — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).

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

D34 · Knowledge Freshness9.7 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

4 of 155 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs. Counted over 155 of the 223 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned knowledgesrc/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:1
Orphaned file · ×3src/hyperlight_common/src/log_level.rs:1
Further orphaned files (smaller)

What to do

  1. Resolve the 1 Orphaned knowledge finding(s) in Knowledge Freshness — start with guest_trace_data.rs. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 3 Orphaned file finding(s) in Knowledge Freshness — start with log_level.rs, event_loop.rs, guest_estimate_trace_event.rs. — One of this dimension's main actionable groups (3 recommendation-level).
  3. 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 Coupling9.9 / 10Adequategated by 1 critical finding✓ Tool-verified

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

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

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

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

Strongest change-coupling: exit.rs↔call.rs 50%

Boundary-crossing change coupling: exit.rs ↔ call.rssrc/hyperlight_guest/src/exit.rs:1

What to do

  1. Resolve the 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with exit.rs. — One of this dimension's main actionable groups (1 issue-level).

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

D36 · Supply-chain Provenance & Signing2.5 / 10Weak✓ 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: Documented → Verified → Prevented · effective 2.5 / 10 · rule-coverage 100% · ceiling Documented

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

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

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

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
  3. Resolve the 1 REDACTED 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.

D37 · Vulnerability-disclosure Policy10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.

Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.

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

A vulnerability-disclosure policy (SECURITY.md) is published with a reporting contact.

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life10.0 / 10Exemplary✓ Tool-verified

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d44_recommendation.md.

Frontend & cross-cutting dimensions

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

AX10 · Code composition0.0 / 10Critical✓ Tool-verified

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

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

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

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

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

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

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

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

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

AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

GD1 · Unfinished & placeholder code10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.

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

M1 · Documentation (README)7.9 / 10Strong✓ Tool-verified

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

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

What to do

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

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

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

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

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

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

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

M4 · Documentation accuracy8.2 / 10Exemplary✓ Tool-verified

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

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

  • docs/README.md links to `./debugging-hyperlight.md`, but `docs/debugging-hyperlight.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong. — docs/README.md:46

What to do

  • Reconcile the README with reality: docs/README.md links to `./debugging-hyperlight.md`, but `docs/debugging-hyperlight.md` does not exist.
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.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language's code model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability8.2 / 10Exemplary✓ Tool-verified

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

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

  • Only 8/11 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `src/hyperlight_ci`, `src/hyperlight_guest_macro`, `src/trace_dump`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
  • Add a health-check endpoint (a /health route on your axum/actix router) so orchestrators and load balancers can probe liveness/readiness.
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.

  • `.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `nuget`, `gitsubmodule`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list. — .github/dependabot.yml:2

What to do

  • Dependabot is configured but does not watch `nuget`, `gitsubmodule` — add those `package-ecosystem` entries to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback5.0 / 10Adequate✓ 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.

  • The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.

What to do

  • Nothing pauses a release for a human: publish as a draft release (or gate the release job on a protected tag/manual dispatch) so a bad build can be stopped before users can download it.
P5 · DR & Backup3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Enable purge protection / soft-delete (and prevent_destroy on critical resources) so data stores can't be lost to an accidental or malicious delete.
P6 · Release Hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

PF1 · Benchmark discipline9.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

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

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

X5 · Nullable reference types9.2 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.

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

  • ~1.0 `!` suppressions per 1k syntax nodes — 2 suppression(s) across the 2026 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.

What to do

  • Put every file in a nullable-enabled context — `#nullable enable` at its top, or commit a project file with <Nullable>enable</Nullable> — and resolve warnings rather than suppressing with `!`.

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 Health87%ExemplarySolid.
Architecture65%Adequate — gated by AX10Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Maturity74%StrongSolid.
Readiness67%Adequate — gated by P5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security70%Adequate — gated by D29, D36Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance94%ExemplaryStrongest area.
Unscored — 2 check(s) recorded observations but carry no score

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

  • P12 CI test-gate honesty — 1 observation(s) recorded · Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • X9 Subsumed condition operand — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not included — 72 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 web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — no DI registrations detected
  • AX2 Stateful singletons — no singleton implementations detected
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — AX6 reached only 0% of this repository's production lines — rust (82,842 lines), c (410 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — docker build failed (exit 1) — 2 | RUN rustup toolchain install 1.86 && rustup default 1.86 3 | -------------------- ERROR: failed to solve: dependabot/dependabot-script: failed to resolve source metadata for docker.io/dependabot/dependabot-script:latest: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C2 Access Controls — No access-control surface detected in the analyzed source — no web/app surface to authorize (no HTTP API or web-UI project) and no authorization code at all (no [Authorize]/policies, no imperative guard methods). Access control is therefore N/A here — this is a library/CLI, which is authorized by its CALLER, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
  • C3 Audit Trail — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C4 Data Retention — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • C5 Data-Subject Rights — No personal data detected in the analyzed source — no PII-typed entity/column names (Email, FirstName, DateOfBirth, …), no ASP.NET Identity / user-account model, and no stored user credentials. GDPR data-protection controls are therefore N/A here. If this is intentional, record the no-PII posture in an ADR; if the app does process personal data, name those fields conventionally so this dimension activates.
  • D10 Test Quality — ~14410 lines of test source are present (.rs) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D11 Test Reliability — Test reliability not measured — no test run produced results
  • D18 Solution Shape — D18 scores the shape of a .NET solution, but this repository's production source is mostly .c, .rs — the .NET project files present are an immaterial minority — 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.
  • D21 Naming Consistency — N/A — too few peers to establish a naming convention (6689 declarations, no unit with a dominant convention).
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust surface was not measured.
  • D23 Boundary Type-Coupling — single shared-core project — no cross-context coupling to assess
  • D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .rs source were not judged.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — This repository is one project, `ComponentTests` (0 LoC, 10 public types across 1 namespaces), within the size bounds. Not scored: a single unit of this size gives project cohesion nothing to grade.
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D32 Data Compliance (PII/GDPR) — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
  • D8 Code Coverage — Coverage not measured
  • DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (51 value object(s))
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable (this repository commits no MSBuild project, so its C# was read as syntax-only projects — a handler marked ONLY by an interface from a package is not visible without a build)
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • IC1 Incompleteness & stubs — IC1 reached only 0% of this repository's production lines — rust (82,842 lines), c (410 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
  • P8 Schema migrations — no EF Core usage detected
  • P9 Domain vs controller coverage — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
  • PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
  • S1 Web-Security Posture — No web surface detected in the analyzed source — no HTTP API or web-UI project (no controllers/minimal-API endpoints, no Razor/Blazor views) and no web middleware (HTTPS redirection, HSTS, security headers, cookies). Transport security, security headers, secure cookies, CSRF/input-validation and middleware-order controls are therefore N/A here — this is a library/CLI/worker, not a web app. Crypto hygiene was still checked and found nothing to flag. If this codebase becomes web-facing, the dimension reactivates automatically.
  • X1 Async correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X10 Duplicated predicate — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X12 Unreachable branch — X12 reached only 0% of this repository's production lines — rust (82,842 lines), c (410 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X13 Undrained process stream — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X16 Unfloored truncation loop — X16 reached only 0% of this repository's production lines — rust (82,842 lines), c (410 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X19 Unrestored process-global state — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X2 Cancellation propagation — no async method does work a token could cancel
  • X20 Mistyped argument guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X24 Document value interpolated into markup unescaped — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X27 Collection changed while being enumerated — This check needs a compiled C# program and this repository commits no project file to compile, so only its syntax could be read. That is a limit of the analyzer, not a finding about your code.
  • X28 Index access outside its own emptiness guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X3 Exception handling — X3 reached only 0% of this repository's production lines — rust (82,842 lines), c (410 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
  • X30 Support guard that admits what it rejects — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X32 Type resolved by simple name across every loaded assembly — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X4 Structured logging — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

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

Critical — 56 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • + 6 more in this group — see findings.md.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D17 · Explicit Debt · FileScopedPragmaDisable · ×1
  • FileScopedPragmaDisable src/hyperlight_component_csharp/src/Runtime.cs:9 — #pragma warning disable CS1591 — the disable has no matching restore anywhere in this file, so it does not end with the construct that needed it: it runs to the end of the file and silences the rule for everything written below, including code added years later that nobody weighed against it. Close it with the matching restore directive immediately after the construct it covers — that alone turns a standing exemption into a scoped one — or fix the cause and drop the directive entirely.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned knowledge · ×1
  • Orphaned knowledge src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:1 — No living knowledge remains for this large file — its last meaningful change has decayed away, so if it breaks, no one currently understands it. It does carry its own tests, so the behaviour is pinned even though the understanding is gone: schedule a read-through, using those tests as the specification, before the next change lands here.
D35 · Change Coupling · Boundary-crossing change coupling · ×1
  • Boundary-crossing change coupling: exit.rs ↔ call.rs src/hyperlight_guest/src/exit.rs:1 — `src/hyperlight_guest/src/exit.rs` (context hyperlight_guest) and `src/hyperlight_guest_bin/src/guest_function/call.rs` (context hyperlight_guest_bin) sit in DIFFERENT parts of the tree yet change together 50% of the time (6 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `c61769a0` amd64: slightly improve TLB flushing; `f83a04ff` Fix guest call to `halt` not dropping allocated trace data leading to…; `a11b54ed` [trace-guest] update guest crates to add trace instrumentation — run `git show` on any of them.
Serious — 208 finding(s)
D3 · God Classes · FileTooLong · ×14
  • FileTooLong: whp/x86_64.rs src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs — FileTooLong — 888 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: WhpVm (6 blocks, 237-1451). The bar is 500 significant lines; this is 388 over it, 1.78× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: mem/shared_mem.rs src/hyperlight_host/src/mem/shared_mem.rs — FileTooLong — 887 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 387 over it, 1.77× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: mem/mgr.rs src/hyperlight_host/src/mem/mgr.rs — FileTooLong — 842 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 62% of them inside a single declaration: SandboxMemoryManager (5 blocks, 370-1305). The bar is 500 significant lines; this is 342 over it, 1.68× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: hvf/mod.rs src/hyperlight_host/src/hypervisor/virtual_machine/hvf/mod.rs — FileTooLong — 786 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 286 over it, 1.57× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: virtq/ring.rs src/hyperlight_common/src/virtq/ring.rs — FileTooLong — 738 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 238 over it, 1.48× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: trace_dump/main.rs src/trace_dump/main.rs — FileTooLong — 660 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 160 over it, 1.32× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: mshv/x86_64.rs src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs — FileTooLong — 642 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 85% of them inside a single declaration: MshvVm (5 blocks, 150-1018). The bar is 500 significant lines; this is 142 over it, 1.28× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/rtypes.rs src/hyperlight_component_util/src/rtypes.rs — FileTooLong — 612 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 112 over it, 1.22× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: whp/aarch64.rs src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs — FileTooLong — 599 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 64% of them inside a single declaration: WhpVm (4 blocks, 324-878). The bar is 500 significant lines; this is 99 over it, 1.20× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: flatbuffer_wrappers/function_types.rs src/hyperlight_common/src/flatbuffer_wrappers/function_types.rs — FileTooLong — 575 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 75 over it, 1.15× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: virtq/producer.rs src/hyperlight_common/src/virtq/producer.rs — FileTooLong — 549 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 49 over it, 1.10× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/emit.rs src/hyperlight_component_util/src/emit.rs — FileTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 42 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: hyperlight_vm/x86_64.rs src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs — FileTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 42 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: hyperlight_vm/mod.rs src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs — FileTooLong — 539 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 39 over it, 1.08× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×10
  • Duplicated block (7 lines × 2) src/hyperlight_guest_bin/src/memory.rs:128 — src/hyperlight_guest_bin/src/memory.rs:128-136 | src/hyperlight_guest_bin/src/memory.rs:162-168 — 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 `src/hyperlight_guest_bin/src/memory.rs:128` 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) src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:842 — src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:842-848 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:1056-1062 — 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 `src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:842` 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) src/hyperlight_guest/src/arch/aarch64/paging.rs:22 — src/hyperlight_guest/src/arch/aarch64/paging.rs:22-28 | src/hyperlight_guest/src/arch/amd64/paging.rs:30-36 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:460 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:460-466 | src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:448-454 — `src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs` and `src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:476 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:476-484 | src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:464-470 — `src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs` and `src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:496 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:496-502 | src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:480-486 — `src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs` and `src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:515 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:515-521 | src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:499-505 — `src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs` and `src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 30 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (7 lines × 2) src/hyperlight_component_util/src/rtypes.rs:364 — src/hyperlight_component_util/src/rtypes.rs:364-370 | src/hyperlight_component_util/src/rtypes.rs:386-392 — 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 `src/hyperlight_component_util/src/rtypes.rs:364` 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) src/hyperlight_component_csharp/src/types.rs:179 — src/hyperlight_component_csharp/src/types.rs:179-185 | src/hyperlight_component_csharp/src/types.rs:256-262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) src/hyperlight_host/src/sandbox/initialized.rs:1076 — src/hyperlight_host/src/sandbox/initialized.rs:1076-1084 | src/hyperlight_host/src/sandbox/uninitialized.rs:256-262 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_host/src/sandbox/initialized.rs:1076` 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.
D2 · Cognitive Complexity · hyperlight_component_util · ×8
  • hyperlight_component_util::component::read_component_single_exported_type (cognitive 54) src/hyperlight_component_util/src/component.rs:70 — hyperlight_component_util::component::read_component_single_exported_type has cognitive complexity 54 (threshold 15). Drivers by points: if/else 6 (25 pts), match/switch 7 (19 pts), loops 4 (10 pts) (nesting depth added 37). 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.
  • hyperlight_component_util::rtypes::emit_value (cognitive 33) src/hyperlight_component_util/src/rtypes.rs:317 — hyperlight_component_util::rtypes::emit_value has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (28 pts), match/switch 3 (5 pts) (nesting depth added 18). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • hyperlight_component_util::rtypes::try_find_local_var_id (cognitive 30) src/hyperlight_component_util/src/rtypes.rs:174 — hyperlight_component_util::rtypes::try_find_local_var_id has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (19 pts), match/switch 2 (6 pts), loops 1 (4 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • hyperlight_component_util::hl::emit_hl_unmarshal_value (cognitive 25) src/hyperlight_component_util/src/hl.rs:188 — hyperlight_component_util::hl::emit_hl_unmarshal_value has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (hyperlight_component_util::hl::emit_hl_marshal_value) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • hyperlight_component_util::hl::emit_hl_marshal_value (cognitive 25) src/hyperlight_component_util/src/hl.rs:523 — hyperlight_component_util::hl::emit_hl_marshal_value has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (24 pts), match/switch 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: one other method here (hyperlight_component_util::hl::emit_hl_unmarshal_value) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • hyperlight_component_util::rtypes::emit_value_toplevel (cognitive 24) src/hyperlight_component_util/src/rtypes.rs:407 — hyperlight_component_util::rtypes::emit_value_toplevel has cognitive complexity 24 (threshold 15). Drivers by points: if/else 14 (21 pts), match/switch 2 (3 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • hyperlight_component_util::rtypes::emit_resource_ref (cognitive 21) src/hyperlight_component_util/src/rtypes.rs:78 — hyperlight_component_util::rtypes::emit_resource_ref has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • hyperlight_component_util::rtypes::emit_extern_decl (cognitive 18) src/hyperlight_component_util/src/rtypes.rs:679 — hyperlight_component_util::rtypes::emit_extern_decl has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 4 (9 pts), if/else 4 (6 pts), loops 1 (3 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×7
  • Duplicated block (6 lines × 2) src/hyperlight_component_macro/src/lib.rs:57 — src/hyperlight_component_macro/src/lib.rs:57-62 | src/hyperlight_component_macro/src/lib.rs:80-85 — 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 `src/hyperlight_component_macro/src/lib.rs:57` 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) src/hyperlight_component_util/src/rtypes.rs:354 — src/hyperlight_component_util/src/rtypes.rs:354-359 | src/hyperlight_component_util/src/rtypes.rs:376-381 — 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 `src/hyperlight_component_util/src/rtypes.rs:354` 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) src/hyperlight_host/src/mem/mgr.rs:202 — src/hyperlight_host/src/mem/mgr.rs:202-207 | src/hyperlight_host/src/mem/mgr.rs:244-249 — 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 `src/hyperlight_host/src/mem/mgr.rs:202` 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) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:112 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:112-117 | src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:423-428 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:112` 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) src/hyperlight_testing/src/logger.rs:33 — src/hyperlight_testing/src/logger.rs:33-38 | src/hyperlight_testing/src/simplelogger.rs:31-36 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) src/hyperlight_common/src/arch/aarch64/vmem.rs:44 — src/hyperlight_common/src/arch/aarch64/vmem.rs:44-49 | src/hyperlight_common/src/arch/amd64/vmem.rs:166-171 — `src/hyperlight_common/src/arch/aarch64/vmem.rs` and `src/hyperlight_common/src/arch/amd64/vmem.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
  • Duplicated block (6 lines × 2) src/hyperlight_host/src/sandbox/file_mapping.rs:224 — src/hyperlight_host/src/sandbox/file_mapping.rs:224-229 | src/hyperlight_host/src/sandbox/file_mapping.rs:300-305 — 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 `src/hyperlight_host/src/sandbox/file_mapping.rs:224` 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.
D3 · God Classes · MethodTooLong · ×6
  • MethodTooLong: FunctionCall.encode src/hyperlight_common/src/flatbuffer_wrappers/function_call.rs:66 — MethodTooLong — encode runs 127 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MshvVm.run_vcpu src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:255 — MethodTooLong — run_vcpu runs 126 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 26 over it, 1.26× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: EventsBatchEncoderGeneric.encode src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:357 — MethodTooLong — encode runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MshvVm.set_batched_registers src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:620 — MethodTooLong — set_batched_registers runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: WhpVm.run_vcpu src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:530 — MethodTooLong — run_vcpu runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: HyperlightVm.run src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs:622 — MethodTooLong — run runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Edited copy of a member (15 corresponding lines) · ×6
  • Edited copy of a member (15 corresponding lines) src/hyperlight_common/src/arch/aarch64/exn.rs:21 — src/hyperlight_common/src/arch/aarch64/exn.rs:21-35 | src/hyperlight_common/src/arch/aarch64/exn.rs:80-94 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/hyperlight_component_util/src/elaborate.rs:134 — src/hyperlight_component_util/src/elaborate.rs:134-148 | src/hyperlight_component_util/src/elaborate.rs:195-212 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/hyperlight_host/src/func/host_functions.rs:30 — src/hyperlight_host/src/func/host_functions.rs:30-44 | src/hyperlight_host/src/func/host_functions.rs:71-90 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/hyperlight_common/src/flatbuffer_wrappers/function_types.rs:360 — src/hyperlight_common/src/flatbuffer_wrappers/function_types.rs:360-374 | src/hyperlight_common/src/flatbuffer_wrappers/function_types.rs:382-396 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/hyperlight_guest/src/transport/mem.rs:129 — src/hyperlight_guest/src/transport/mem.rs:129-143 | src/hyperlight_guest/src/transport/mem.rs:145-159 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (15 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:863 — src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:863-877 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:1430-1450 — These two members are one piece of code written twice and then edited apart: 15 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×6
  • Duplicated block (5 lines × 2) src/hyperlight_component_util/src/hl.rs:309 — src/hyperlight_component_util/src/hl.rs:309-313 | src/hyperlight_component_util/src/hl.rs:337-341 — 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 `src/hyperlight_component_util/src/hl.rs:309` 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) src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:398 — src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:398-402 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:639-643 — `src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs` and `src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:398` 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) src/hyperlight_component_util/src/emit.rs:975 — src/hyperlight_component_util/src/emit.rs:975-979 | src/hyperlight_component_util/src/emit.rs:982-988 — 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 `src/hyperlight_component_util/src/emit.rs:975` 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 (5 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:886 — src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:886-890 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:912-916 — 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 `src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:886` 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) src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs:67 — src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs:67-71 | src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs:76-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs:67` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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) src/hyperlight_component_util/src/hl.rs:547 — src/hyperlight_component_util/src/hl.rs:547-551 | src/hyperlight_component_util/src/hl.rs:561-565 — 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 `src/hyperlight_component_util/src/hl.rs:547` 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 · Edited copy of a member (12 corresponding lines) · ×5
  • Edited copy of a member (12 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:262 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:262-274 | src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:288-299 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/hyperlight_component_util/src/substitute.rs:441 — src/hyperlight_component_util/src/substitute.rs:441-452 | src/hyperlight_component_util/src/substitute.rs:453-464 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/hyperlight_guest_bin/src/transport.rs:73 — src/hyperlight_guest_bin/src/transport.rs:73-84 | src/hyperlight_guest_bin/src/transport.rs:86-97 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/hyperlight_common/src/virtq/consumer.rs:113 — src/hyperlight_common/src/virtq/consumer.rs:113-124 | src/hyperlight_common/src/virtq/producer.rs:971-986 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (12 corresponding lines) src/hyperlight_host/src/sandbox/snapshot/memory/backing.rs:144 — src/hyperlight_host/src/sandbox/snapshot/memory/backing.rs:144-157 | src/hyperlight_host/src/sandbox/snapshot/memory/backing.rs:196-207 — These two members are one piece of code written twice and then edited apart: 12 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (10 corresponding lines) · ×5
  • Edited copy of a member (10 corresponding lines) src/hyperlight_component_util/src/tv.rs:77 — src/hyperlight_component_util/src/tv.rs:77-86 | src/hyperlight_component_util/src/tv.rs:96-105 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/hyperlight_host/src/mem/mgr.rs:720 — src/hyperlight_host/src/mem/mgr.rs:720-729 | src/hyperlight_host/src/mem/mgr.rs:732-741 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/hyperlight_component_util/src/wf.rs:142 — src/hyperlight_component_util/src/wf.rs:142-151 | src/hyperlight_component_util/src/wf.rs:156-165 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/hyperlight_common/src/virtq/consumer.rs:697 — src/hyperlight_common/src/virtq/consumer.rs:697-706 | src/hyperlight_common/src/virtq/producer.rs:475-484 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (10 corresponding lines) src/hyperlight_guest_bin/src/lib.rs:61 — src/hyperlight_guest_bin/src/lib.rs:61-70 | src/hyperlight_guest_bin/src/lib.rs:80-89 — These two members are one piece of code written twice and then edited apart: 10 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×5
  • Duplicated block (16 lines × 2) src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:175 — src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:175-190 | src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:280-295 — 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 `src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:175` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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) src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs:392 — src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs:392-407 | src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs:434-449 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (16 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:895 — src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:895-910 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:946-961 — 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 `src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:895` 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 (16 lines × 2) src/hyperlight_host/src/mem/shared_mem.rs:1370 — src/hyperlight_host/src/mem/shared_mem.rs:1370-1385 | src/hyperlight_host/src/mem/shared_mem.rs:1418-1433 — 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 `src/hyperlight_host/src/mem/shared_mem.rs:1370` 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 first that the copies are not typed on the same thing: the declarations holding them bind `slice` to `&mut [u8]` in one and `&[u8]` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
  • Duplicated block (16 lines × 2) src/hyperlight_common/src/arch/aarch64/vmem.rs:450 — src/hyperlight_common/src/arch/aarch64/vmem.rs:450-465 | src/hyperlight_common/src/arch/amd64/vmem.rs:388-403 — `src/hyperlight_common/src/arch/aarch64/vmem.rs` and `src/hyperlight_common/src/arch/amd64/vmem.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×5
  • Duplicated block (13 lines × 2) src/hyperlight_component_util/src/hl.rs:641 — src/hyperlight_component_util/src/hl.rs:641-653 | src/hyperlight_component_util/src/hl.rs:662-674 — 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 `src/hyperlight_component_util/src/hl.rs:641` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/hyperlight_component_util/src/hl.rs:675` calls `lend`, `push` and `src/hyperlight_component_util/src/hl.rs:654` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (13 lines × 2) src/hyperlight_guest/src/arch/aarch64/prim_alloc.rs:23 — src/hyperlight_guest/src/arch/aarch64/prim_alloc.rs:23-35 | src/hyperlight_guest/src/arch/amd64/prim_alloc.rs:20-32 — 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 `src/hyperlight_guest/src/arch/aarch64/prim_alloc.rs:23` 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) src/hyperlight_guest_macro/src/lib.rs:81 — src/hyperlight_guest_macro/src/lib.rs:81-93 | src/hyperlight_guest_macro/src/lib.rs:210-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:465 — src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:465-477 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:402-414 — before extracting anything, compare `src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs` and `src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) src/hyperlight_guest/src/arch/aarch64/paging.rs:108 — src/hyperlight_guest/src/arch/aarch64/paging.rs:108-120 | src/hyperlight_guest/src/arch/amd64/paging.rs:114-126 — 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.
D1 · Cyclomatic Complexity · hyperlight_component_util · ×4
  • hyperlight_component_util::rtypes::emit_value (cyclomatic 25) src/hyperlight_component_util/src/rtypes.rs:317 — hyperlight_component_util::rtypes::emit_value 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.
  • hyperlight_component_util::hl::emit_hl_unmarshal_value (cyclomatic 24) src/hyperlight_component_util/src/hl.rs:188 — hyperlight_component_util::hl::emit_hl_unmarshal_value 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. This shape REPEATS in the file: one other method here (hyperlight_component_util::hl::emit_hl_marshal_value) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • hyperlight_component_util::hl::emit_hl_marshal_value (cyclomatic 24) src/hyperlight_component_util/src/hl.rs:523 — hyperlight_component_util::hl::emit_hl_marshal_value 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. This shape REPEATS in the file: one other method here (hyperlight_component_util::hl::emit_hl_unmarshal_value) has the same decision points, in the same order, at the same nesting depths — so this is one pattern written twice rather than two separate problems. Splitting this body alone leaves the other exactly as it is. Where these are variations on one operation, the change that clears both is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • hyperlight_component_util::component::read_component_single_exported_type (cyclomatic 20) src/hyperlight_component_util/src/component.rs:70 — hyperlight_component_util::component::read_component_single_exported_type 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.
D2 · Cognitive Complexity · hyperlight_component_csharp · ×4
  • hyperlight_component_csharp::host::emit_component (cognitive 21) src/hyperlight_component_csharp/src/host.rs:436 — hyperlight_component_csharp::host::emit_component has cognitive complexity 21 (threshold 15). Drivers by points: if/else 11 (13 pts), loops 4 (5 pts), match/switch 1 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, 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.
  • hyperlight_component_csharp::codec::read (cognitive 17) src/hyperlight_component_csharp/src/codec.rs:253 — hyperlight_component_csharp::codec::read has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • hyperlight_component_csharp::codec::emit_decl (cognitive 17) src/hyperlight_component_csharp/src/codec.rs:381 — hyperlight_component_csharp::codec::emit_decl has cognitive complexity 17 (threshold 15). Drivers by points: loops 4 (8 pts), if/else 2 (5 pts), match/switch 2 (4 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • hyperlight_component_csharp::codec::write (cognitive 16) src/hyperlight_component_csharp/src/codec.rs:151 — hyperlight_component_csharp::codec::write has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D3 · God Classes · ClassTooLong · ×4
  • ClassTooLong: WhpVm src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:237 — ClassTooLong — 720 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 11 methods, 6 blocks, lines 237-1451. The bar is 400 significant lines; this is 320 over it, 1.80× the bar. 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.
  • ClassTooLong: MshvVm src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:150 — ClassTooLong — 543 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 4 methods, 5 blocks, lines 150-1018. The bar is 400 significant lines; this is 143 over it, 1.36× the bar. 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.
  • ClassTooLong: SandboxMemoryManager src/hyperlight_host/src/mem/mgr.rs:370 — ClassTooLong — 524 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 30 methods, 5 blocks, lines 370-1305. The bar is 400 significant lines; this is 124 over it, 1.31× the bar. 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.
  • ClassTooLong: KvmVm src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:94 — ClassTooLong — 419 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 6 methods, 5 blocks, lines 94-809. The bar is 400 significant lines; this is 19 over it, 1.05× the bar. 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.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×4
  • Duplicated block (12 lines × 2) src/hyperlight_component_util/src/hl.rs:375 — src/hyperlight_component_util/src/hl.rs:375-386 | src/hyperlight_component_util/src/hl.rs:682-693 — 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 `src/hyperlight_component_util/src/hl.rs:375` 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) src/hyperlight_host/src/func/host_functions.rs:31 — src/hyperlight_host/src/func/host_functions.rs:31-42 | src/hyperlight_host/src/func/host_functions.rs:72-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.
  • Duplicated block (12 lines × 2) src/hyperlight_host/src/hypervisor/regs/x86_64/debug_regs.rs:146 — src/hyperlight_host/src/hypervisor/regs/x86_64/debug_regs.rs:146-157 | src/hyperlight_host/src/hypervisor/regs/x86_64/standard_regs.rs:268-279 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_host/src/hypervisor/regs/x86_64/debug_regs.rs:146` 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) src/hyperlight_host/src/hypervisor/surrogate_process.rs:135 — src/hyperlight_host/src/hypervisor/surrogate_process.rs:135-146 | src/hyperlight_host/src/hypervisor/surrogate_process.rs:151-162 — 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.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×4
  • Duplicated block (10 lines × 2) src/hyperlight_common/src/arch/aarch64/vmem.rs:490 — src/hyperlight_common/src/arch/aarch64/vmem.rs:490-499 | src/hyperlight_common/src/arch/amd64/vmem.rs:426-435 — `src/hyperlight_common/src/arch/aarch64/vmem.rs` and `src/hyperlight_common/src/arch/amd64/vmem.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_common/src/arch/aarch64/vmem.rs:490` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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) src/hyperlight_common/src/virtq/ring.rs:614 — src/hyperlight_common/src/virtq/ring.rs:614-623 | src/hyperlight_common/src/virtq/ring.rs:742-752 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:122 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:122-131 | src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:433-442 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:122` 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) src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:842 — src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:842-851 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:1205-1214 — `src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs` and `src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×4
  • Duplicated block (9 lines × 2) src/hyperlight_ci/src/remote.rs:352 — src/hyperlight_ci/src/remote.rs:352-360 | src/hyperlight_ci/src/remote.rs:418-426 — 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 `src/hyperlight_ci/src/remote.rs:352` 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) src/hyperlight_component_util/src/hl.rs:43 — src/hyperlight_component_util/src/hl.rs:43-51 | src/hyperlight_component_util/src/hl.rs:408-416 — 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 `src/hyperlight_component_util/src/hl.rs:43` 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) src/hyperlight_guest/src/transport/mem.rs:130 — src/hyperlight_guest/src/transport/mem.rs:130-138 | src/hyperlight_guest/src/transport/mem.rs:146-154 — 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 (9 lines × 2) src/hyperlight_host/src/hypervisor/regs/x86_64/fpu.rs:260 — src/hyperlight_host/src/hypervisor/regs/x86_64/fpu.rs:260-268 | src/hyperlight_host/src/hypervisor/regs/x86_64/fpu.rs:283-291 — 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 `src/hyperlight_host/src/hypervisor/regs/x86_64/fpu.rs:260` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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.
D1 · Cyclomatic Complexity · hyperlight_component_csharp · ×3
  • hyperlight_component_csharp::codec::write (cyclomatic 19) src/hyperlight_component_csharp/src/codec.rs:151 — hyperlight_component_csharp::codec::write has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • hyperlight_component_csharp::codec::read (cyclomatic 18) src/hyperlight_component_csharp/src/codec.rs:253 — hyperlight_component_csharp::codec::read 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.
  • hyperlight_component_csharp::host::emit_component (cyclomatic 16) src/hyperlight_component_csharp/src/host.rs:436 — hyperlight_component_csharp::host::emit_component 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×3
  • Hotspot: src/hyperlight_host/src/sandbox/snapshot/mod.rs src/hyperlight_host/src/sandbox/snapshot/mod.rs:726 — src/hyperlight_host/src/sandbox/snapshot/mod.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in Snapshot::new at line 726. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:43:40 +00:00' --until='2026-11-12 22:43:40 +00:00' --full-history --no-merges -- src/hyperlight_host/src/sandbox/snapshot/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/hyperlight_host/src/sandbox/snapshot/file/mod.rs src/hyperlight_host/src/sandbox/snapshot/file/mod.rs:764 — src/hyperlight_host/src/sandbox/snapshot/file/mod.rs changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in Snapshot::load_inner at line 764. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:43:40 +00:00' --until='2026-11-12 22:43:40 +00:00' --full-history --no-merges -- src/hyperlight_host/src/sandbox/snapshot/file/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs:622 — src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in HyperlightVm::run at line 622. 1 of those changes was a fix/bug commit, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-08-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 22:43:40 +00:00' --until='2026-11-12 22:43:40 +00:00' --full-history --no-merges -- src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
D3 · God Classes · TooManyMethods · ×3
  • TooManyMethods: Ctx src/hyperlight_component_util/src/etypes.rs:430 — TooManyMethods — 53 methods, declared across 5 files: src/elaborate.rs (20), src/wf.rs (14), src/subtype.rs (11), src/tv.rs (6), +1 more file(s). The bar is 30 methods; this is 23 over it, 1.77× the bar. 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: HyperlightVm src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs:358 — TooManyMethods — 37 methods, declared across 4 files: hyperlight_vm/mod.rs (15), hyperlight_vm/x86_64.rs (13), hyperlight_vm/aarch64.rs (7), hyperlight_vm/test_support.rs (2). The bar is 30 methods; this is 7 over it, 1.23× the bar. 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: SandboxMemoryLayout src/hyperlight_host/src/mem/layout.rs:69 — TooManyMethods — 36 methods. The bar is 30 methods; this is 6 over it, 1.20× the bar. 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.
D3 · God Classes · FunctionTooLong · ×3
  • FunctionTooLong: hyperlight_component_util::hl::emit_hl_unmarshal_value src/hyperlight_component_util/src/hl.rs:188 — FunctionTooLong — hyperlight_component_util::hl::emit_hl_unmarshal_value runs 145 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 45 over it, 1.45× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: hyperlight_component_util::hl::emit_hl_marshal_value src/hyperlight_component_util/src/hl.rs:523 — FunctionTooLong — hyperlight_component_util::hl::emit_hl_marshal_value runs 134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: hyperlight_component_util::rtypes::emit_value_toplevel src/hyperlight_component_util/src/rtypes.rs:407 — FunctionTooLong — hyperlight_component_util::rtypes::emit_value_toplevel runs 119 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 19 over it, 1.19× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D4 · Code Duplication · Edited copy of a member (16 corresponding lines) · ×3
  • Edited copy of a member (16 corresponding lines) src/hyperlight_testing/src/logger.rs:74 — src/hyperlight_testing/src/logger.rs:74-103 | src/hyperlight_testing/src/simplelogger.rs:79-104 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:884 — src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:884-899 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:910-925 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (16 corresponding lines) src/hyperlight_common/src/virtq/ring.rs:935 — src/hyperlight_common/src/virtq/ring.rs:935-950 | src/hyperlight_common/src/virtq/ring.rs:1390-1406 — These two members are one piece of code written twice and then edited apart: 16 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 7+ corresponding lines) · ×3
  • Edited copies of one member (3 members, 7+ corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:468 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:468-474 | src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:456-462 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:724-730 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:486 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:486-494 | src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:472-478 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:753-759 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
  • Edited copies of one member (3 members, 7+ corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:523 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:523-529 | src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:507-513 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:882-888 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 7 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D2 · Cognitive Complexity · MshvVm · ×2
  • MshvVm::run_vcpu (cognitive 52) src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:255 — MshvVm::run_vcpu has cognitive complexity 52 (threshold 15). Drivers by points: if/else 10 (34 pts), match/switch 5 (16 pts), boolean chains 1, loops 1 (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • MshvVm::handle_hw_io_out (cognitive 19) src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:951 — MshvVm::handle_hw_io_out has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (19 pts) (nesting depth added 12). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · HyperlightVm · ×2
  • HyperlightVm::run (cognitive 43) src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs:622 — HyperlightVm::run has cognitive complexity 43 (threshold 15). Drivers by points: if/else 11 (30 pts), match/switch 4 (9 pts), boolean chains 3, loops 1 (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.
  • HyperlightVm::handle_debug (cognitive 25) src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs:377 — HyperlightVm::handle_debug has cognitive complexity 25 (threshold 15). Drivers by points: match/switch 4 (11 pts), if/else 4 (10 pts), loops 2 (4 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WhpVm · ×2
  • WhpVm::run_vcpu (cognitive 31) src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:530 — WhpVm::run_vcpu has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (24 pts), match/switch 2 (5 pts), boolean chains 1, loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • WhpVm::run_vcpu (cognitive 22) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:566 — WhpVm::run_vcpu has cognitive complexity 22 (threshold 15). Drivers by points: if/else 9 (20 pts), boolean chains 1, match/switch 1 (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · KvmVm · ×2
  • KvmVm::run_vcpu_hw_interrupts (cognitive 19) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:268 — KvmVm::run_vcpu_hw_interrupts has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (13 pts), match/switch 2 (5 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • KvmVm::run_vcpu (cognitive 18) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:133 — KvmVm::run_vcpu has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (3 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Edited copy of a member (25 corresponding lines) · ×2
  • Edited copy of a member (25 corresponding lines) src/hyperlight_common/src/arch/aarch64/vmem.rs:475 — src/hyperlight_common/src/arch/aarch64/vmem.rs:475-499 | src/hyperlight_common/src/arch/amd64/vmem.rs:411-435 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (25 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:515 — src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:515-541 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:814-838 — These two members are one piece of code written twice and then edited apart: 25 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (24 corresponding lines) · ×2
  • Edited copy of a member (24 corresponding lines) src/hyperlight_common/src/arch/aarch64/vmem.rs:311 — src/hyperlight_common/src/arch/aarch64/vmem.rs:311-337 | src/hyperlight_common/src/arch/amd64/vmem.rs:208-231 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (24 corresponding lines) src/hyperlight_common/src/virtq/ring.rs:541 — src/hyperlight_common/src/virtq/ring.rs:541-568 | src/hyperlight_common/src/virtq/ring.rs:1046-1069 — These two members are one piece of code written twice and then edited apart: 24 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (20 corresponding lines) · ×2
  • Edited copy of a member (20 corresponding lines) src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs:762 — src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs:762-781 | src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs:790-812 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (20 corresponding lines) src/hyperlight_guest_tracing/src/state.rs:130 — src/hyperlight_guest_tracing/src/state.rs:130-157 | src/hyperlight_guest_tracing/src/state.rs:160-179 — These two members are one piece of code written twice and then edited apart: 20 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (22 corresponding lines) · ×2
  • Edited copy of a member (22 corresponding lines) src/hyperlight_guest/src/arch/aarch64/prim_alloc.rs:11 — src/hyperlight_guest/src/arch/aarch64/prim_alloc.rs:11-35 | src/hyperlight_guest/src/arch/amd64/prim_alloc.rs:11-32 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (22 corresponding lines) src/hyperlight_guest_bin/src/arch/aarch64/exception/handle.rs:25 — src/hyperlight_guest_bin/src/arch/aarch64/exception/handle.rs:25-46 | src/hyperlight_guest_bin/src/arch/amd64/exception/handle.rs:56-79 — These two members are one piece of code written twice and then edited apart: 22 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (11 corresponding lines) · ×2
  • Edited copy of a member (11 corresponding lines) src/hyperlight_component_util/src/guest.rs:243 — src/hyperlight_component_util/src/guest.rs:243-253 | src/hyperlight_component_util/src/host.rs:313-325 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (11 corresponding lines) src/hyperlight_host/src/mem/shared_mem.rs:266 — src/hyperlight_host/src/mem/shared_mem.rs:266-276 | src/hyperlight_host/src/mem/shared_mem.rs:279-294 — These two members are one piece of code written twice and then edited apart: 11 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (8 corresponding lines) · ×2
  • Edited copy of a member (8 corresponding lines) src/trace_dump/main.rs:500 — src/trace_dump/main.rs:500-507 | src/trace_dump/main.rs:516-530 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (8 corresponding lines) src/hyperlight_guest/src/arch/aarch64/paging.rs:65 — src/hyperlight_guest/src/arch/aarch64/paging.rs:65-85 | src/hyperlight_guest/src/arch/amd64/paging.rs:83-90 — These two members are one piece of code written twice and then edited apart: 8 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (9 corresponding lines) · ×2
  • Edited copy of a member (9 corresponding lines) src/hyperlight_component_util/src/substitute.rs:392 — src/hyperlight_component_util/src/substitute.rs:392-400 | src/hyperlight_component_util/src/substitute.rs:401-409 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (9 corresponding lines) fuzz/fuzz_targets/virtq_memory.rs:90 — fuzz/fuzz_targets/virtq_memory.rs:90-98 | fuzz/fuzz_targets/virtq_memory.rs:100-110 — These two members are one piece of code written twice and then edited apart: 9 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (7 corresponding lines) · ×2
  • Edited copy of a member (7 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:507 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:507-513 | src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:491-497 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
  • Edited copy of a member (7 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:615 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:615-625 | src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:572-578 — These two members are one piece of code written twice and then edited apart: 7 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×2
  • Duplicated block (21 lines × 2) src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs:106 — src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs:106-126 | src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs:158-178 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
  • Duplicated block (21 lines × 2) src/hyperlight_host/src/hypervisor/regs/x86_64/standard_regs.rs:35 — src/hyperlight_host/src/hypervisor/regs/x86_64/standard_regs.rs:35-55 | src/hyperlight_host/src/hypervisor/regs/x86_64/standard_regs.rs:89-109 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (19 lines × 2) · ×2
  • Duplicated block (19 lines × 2) src/hyperlight_common/src/arch/aarch64/vmem.rs:181 — src/hyperlight_common/src/arch/aarch64/vmem.rs:181-199 | src/hyperlight_common/src/arch/amd64/vmem.rs:284-302 — `src/hyperlight_common/src/arch/aarch64/vmem.rs` and `src/hyperlight_common/src/arch/amd64/vmem.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_common/src/arch/aarch64/vmem.rs:181` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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 (19 lines × 2) src/trace_dump/main.rs:324 — src/trace_dump/main.rs:324-342 | src/trace_dump/main.rs:422-440 — 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.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×2
  • Duplicated block (9 lines × 3) src/hyperlight_component_util/src/rtypes.rs:425 — src/hyperlight_component_util/src/rtypes.rs:425-433 | src/hyperlight_component_util/src/rtypes.rs:503-511 | src/hyperlight_component_util/src/rtypes.rs:537-545 — 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 `src/hyperlight_component_util/src/rtypes.rs:425` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/hyperlight_component_util/src/rtypes.rs:422` calls `emit_value` and `src/hyperlight_component_util/src/rtypes.rs:534` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
  • Duplicated block (9 lines × 3) src/hyperlight_guest_macro/src/lib.rs:78 — src/hyperlight_guest_macro/src/lib.rs:78-86 | src/hyperlight_guest_macro/src/lib.rs:207-215 | src/hyperlight_guest_macro/src/lib.rs:281-289 — 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 `src/hyperlight_guest_macro/src/lib.rs: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.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×2
  • Duplicated block (8 lines × 2) src/hyperlight_common/src/virtq/ring.rs:774 — src/hyperlight_common/src/virtq/ring.rs:774-781 | src/hyperlight_common/src/virtq/ring.rs:1087-1094 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) src/hyperlight_component_util/src/elaborate.rs:529 — src/hyperlight_component_util/src/elaborate.rs:529-536 | src/hyperlight_component_util/src/elaborate.rs:634-641 — 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 `src/hyperlight_component_util/src/elaborate.rs:529` 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.
D5 · Coupling · Off the main sequence · ×2
  • Off the main sequence: hyperlight-component-util — hyperlight-component-util: abstractness 0.09, instability 0.00, distance 0.91 — zone of pain — concrete and depended on by 2 project(s), so it's rigid to change.
  • Off the main sequence: hyperlight-guest-tracing — hyperlight-guest-tracing: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: HvfVm (LCOM4 5) src/hyperlight_host/src/hypervisor/virtual_machine/hvf/mod.rs:701 — HvfVm's methods fall into 5 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 5 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: Offset (LCOM4 4) src/hyperlight_host/src/mem/ptr_offset.rs:17 — Offset's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D1 · Cyclomatic Complexity · HyperlightVm · ×1
  • HyperlightVm::run (cyclomatic 27) src/hyperlight_host/src/hypervisor/hyperlight_vm/mod.rs:622 — HyperlightVm::run 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 · Ctx · ×1
  • Ctx::subtype_value (cyclomatic 24) src/hyperlight_component_util/src/subtype.rs:50 — Ctx::subtype_value has cyclomatic complexity 24 (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 · MshvVm · ×1
  • MshvVm::run_vcpu (cyclomatic 23) src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:255 — MshvVm::run_vcpu 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 · WhpVm · ×1
  • WhpVm::run_vcpu (cyclomatic 18) src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:530 — WhpVm::run_vcpu 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. This is NOT this file's highest cyclomatic complexity: hyperlight_host::hypervisor::virtual_machine::whp::x86_64::msr_to_whv_register_name (cyclomatic 76) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · hyperlight_common · ×1
  • hyperlight_common::virtq::ring::canonical::validate_canon_image (cyclomatic 16) src/hyperlight_common/src/virtq/ring/canonical.rs:163 — hyperlight_common::virtq::ring::canonical::validate_canon_image 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 · hyperlight_common · ×1
  • hyperlight_common::virtq::ring::canonical::validate_canon_image (cognitive 30) src/hyperlight_common/src/virtq/ring/canonical.rs:163 — hyperlight_common::virtq::ring::canonical::validate_canon_image has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (24 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HvfCpu · ×1
  • HvfCpu::run (cognitive 27) src/hyperlight_host/src/hypervisor/virtual_machine/hvf/mod.rs:610 — HvfCpu::run has cognitive complexity 27 (threshold 15). Drivers by points: if/else 9 (23 pts), match/switch 2 (3 pts), boolean chains 1 (nesting depth added 15). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · BindgenInputParams · ×1
  • BindgenInputParams::parse (cognitive 19) src/hyperlight_component_macro/src/lib.rs:145 — BindgenInputParams::parse has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 2 (5 pts), loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · EventsBatchEncoderGeneric · ×1
  • EventsBatchEncoderGeneric::encode (cognitive 17) src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:357 — EventsBatchEncoderGeneric::encode has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), loops 3 (6 pts), match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · hyperlight_guest_bin · ×1
  • hyperlight_guest_bin::arch::amd64::exception::handle::try_handle_internal_pagefault (cognitive 17) src/hyperlight_guest_bin/src/arch/amd64/exception/handle.rs:116 — hyperlight_guest_bin::arch::amd64::exception::handle::try_handle_internal_pagefault has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 4 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · GuestEvent · ×1
  • GuestEvent::try_from (cognitive 16) src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:174 — GuestEvent::try_from has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (9 pts), if/else 3 (6 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · SurrogateProcess · ×1
  • SurrogateProcess::map (cognitive 16) src/hyperlight_host/src/hypervisor/surrogate_process.rs:62 — SurrogateProcess::map has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), match/switch 3 (4 pts) (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · trace_dump · ×1
  • trace_dump::read_file (cognitive 16) src/trace_dump/main.rs:532 — trace_dump::read_file has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (13 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×1
  • REDACTED
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×1
  • REDACTED
D31 · IaC & Container Security · Medium IaC · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×1
  • Members sharing a duplicated core (4 members, 50+ identical tokens) src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:337 — src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:337-357 | src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:363-383 | src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:391-411 | src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:417-437 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Edited copy of a member (60 corresponding lines) · ×1
  • Edited copy of a member (60 corresponding lines) src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs:305 — src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs:305-366 | src/hyperlight_host/src/hypervisor/regs/x86_64/standard_regs.rs:263-322 — These two members are one piece of code written twice and then edited apart: 60 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (68 corresponding lines) · ×1
  • Edited copy of a member (68 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:464 — src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:464-531 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:401-495 — These two members are one piece of code written twice and then edited apart: 68 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (36 corresponding lines) · ×1
  • Edited copy of a member (36 corresponding lines) src/hyperlight_ci/src/remote.rs:341 — src/hyperlight_ci/src/remote.rs:341-376 | src/hyperlight_ci/src/remote.rs:407-448 — These two members are one piece of code written twice and then edited apart: 36 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 42+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 42+ corresponding lines) src/hyperlight_host/src/mem/shared_mem.rs:1369 — src/hyperlight_host/src/mem/shared_mem.rs:1369-1413 | src/hyperlight_host/src/mem/shared_mem.rs:1417-1461 | src/hyperlight_host/src/mem/shared_mem.rs:1465-1506 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 42 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (28 corresponding lines) · ×1
  • Edited copy of a member (28 corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:536 — src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:536-564 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:500-527 — These two members are one piece of code written twice and then edited apart: 28 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (29 corresponding lines) · ×1
  • Edited copy of a member (29 corresponding lines) src/hyperlight_common/src/virtq/consumer.rs:78 — src/hyperlight_common/src/virtq/consumer.rs:78-109 | src/hyperlight_common/src/virtq/consumer.rs:302-330 — These two members are one piece of code written twice and then edited apart: 29 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (34 corresponding lines) · ×1
  • Edited copy of a member (34 corresponding lines) src/hyperlight_guest_bin/src/arch/aarch64/exception/handle.rs:48 — src/hyperlight_guest_bin/src/arch/aarch64/exception/handle.rs:48-85 | src/hyperlight_guest_bin/src/arch/amd64/exception/handle.rs:81-114 — These two members are one piece of code written twice and then edited apart: 34 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) src/hyperlight_host/src/mem/shared_mem.rs:1303 — src/hyperlight_host/src/mem/shared_mem.rs:1303-1323 | src/hyperlight_host/src/mem/shared_mem.rs:1331-1352 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (14 corresponding lines) · ×1
  • Edited copy of a member (14 corresponding lines) src/hyperlight_component_macro/src/lib.rs:56 — src/hyperlight_component_macro/src/lib.rs:56-69 | src/hyperlight_component_macro/src/lib.rs:79-98 — These two members are one piece of code written twice and then edited apart: 14 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 20+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 20+ corresponding lines) src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:703 — src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:703-722 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:732-751 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:761-780 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 20 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Edited copies of one member (4 members, 17+ corresponding lines) · ×1
  • Edited copies of one member (4 members, 17+ corresponding lines) src/hyperlight_common/src/virtq/ring.rs:887 — src/hyperlight_common/src/virtq/ring.rs:887-904 | src/hyperlight_common/src/virtq/ring.rs:907-923 | src/hyperlight_common/src/virtq/ring.rs:1346-1362 | src/hyperlight_common/src/virtq/ring.rs:1365-1381 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 17 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication · Edited copy of a member (19 corresponding lines) · ×1
  • Edited copy of a member (19 corresponding lines) src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:145 — src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:145-163 | src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:169-190 — These two members are one piece of code written twice and then edited apart: 19 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copy of a member (17 corresponding lines) · ×1
  • Edited copy of a member (17 corresponding lines) src/hyperlight_host/src/metrics/mod.rs:34 — src/hyperlight_host/src/metrics/mod.rs:34-50 | src/hyperlight_host/src/metrics/mod.rs:61-77 — These two members are one piece of code written twice and then edited apart: 17 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Edited copies of one member (3 members, 15+ corresponding lines) · ×1
  • Edited copies of one member (3 members, 15+ corresponding lines) src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:66 — src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:66-82 | src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:92-106 | src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:455-474 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 15 lines, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below: the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain. Factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication · Duplicated block (23–24 lines × 2) · ×1
  • Duplicated block (23–24 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:854 — src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:854-876 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:1217-1240 — `src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs` and `src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (10–23 lines × 2) · ×1
  • Duplicated block (10–23 lines × 2) src/hyperlight_component_util/src/hl.rs:316 — src/hyperlight_component_util/src/hl.rs:316-325 | src/hyperlight_component_util/src/hl.rs:344-366 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_component_util/src/hl.rs:316` 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 (18–21 lines × 2) · ×1
  • Duplicated block (18–21 lines × 2) src/hyperlight_guest_bin/src/arch/aarch64/exception/handle.rs:55 — src/hyperlight_guest_bin/src/arch/aarch64/exception/handle.rs:55-72 | src/hyperlight_guest_bin/src/arch/amd64/exception/handle.rs:89-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 `src/hyperlight_guest_bin/src/arch/aarch64/exception/handle.rs:55` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:879 — src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs:879-898 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:1244-1264 — `src/hyperlight_host/src/hypervisor/virtual_machine/mshv/x86_64.rs` and `src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 4 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
D4 · Code Duplication · Duplicated block (19–20 lines × 3) · ×1
  • Duplicated block (19–20 lines × 3) src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:382 — src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:382-401 | src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:449-467 | src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:489-508 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:378` calls `create_string` and `src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:444` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (18–19 lines × 2) · ×1
  • Duplicated block (18–19 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:547 — src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:547-564 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:509-527 — before extracting anything, compare `src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs` and `src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:547` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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 (11–17 lines × 3) · ×1
  • Duplicated block (11–17 lines × 3) src/hyperlight_host/src/hypervisor/regs/x86_64/debug_regs.rs:174 — src/hyperlight_host/src/hypervisor/regs/x86_64/debug_regs.rs:174-190 | src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs:356-366 | src/hyperlight_host/src/hypervisor/regs/x86_64/standard_regs.rs:312-322 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_host/src/hypervisor/regs/x86_64/debug_regs.rs:174` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/hyperlight_host/src/hypervisor/regs/x86_64/special_regs.rs:348` calls `default` and `src/hyperlight_host/src/hypervisor/regs/x86_64/standard_regs.rs:304` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (16 lines × 4) · ×1
  • Duplicated block (16 lines × 4) src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:342 — src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:342-357 | src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:368-383 | src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:396-411 | src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:422-437 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_host/src/hypervisor/gdb/x86_64_target.rs:342` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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–15 lines × 2) · ×1
  • Duplicated block (14–15 lines × 2) src/hyperlight_testing/src/logger.rs:85 — src/hyperlight_testing/src/logger.rs:85-99 | src/hyperlight_testing/src/simplelogger.rs:86-99 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_testing/src/logger.rs:85` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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 (14 lines × 2) · ×1
  • Duplicated block (14 lines × 2) src/hyperlight_host/src/mem/shared_mem.rs:1308 — src/hyperlight_host/src/mem/shared_mem.rs:1308-1321 | src/hyperlight_host/src/mem/shared_mem.rs:1336-1349 — 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.
D4 · Code Duplication · Duplicated block (11–12 lines × 2) · ×1
  • Duplicated block (11–12 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:250 — src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:250-260 | src/hyperlight_host/src/hypervisor/virtual_machine/kvm/x86_64.rs:345-356 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_host/src/hypervisor/virtual_machine/kvm/aarch64.rs:250` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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 (11 lines × 2) · ×1
  • Duplicated block (11 lines × 2) src/hyperlight_component_util/src/guest.rs:33 — src/hyperlight_component_util/src/guest.rs:33-43 | src/hyperlight_component_util/src/host.rs:31-41 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `src/hyperlight_component_util/src/host.rs:29` calls `kebab_to_fn`, `Plain` and `src/hyperlight_component_util/src/guest.rs:32` does not — after which the two agree again for 3 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×1
  • Duplicated block (10–11 lines × 2) src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:488 — src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:488-497 | src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs:437-447 — before extracting anything, compare `src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs` and `src/hyperlight_host/src/hypervisor/virtual_machine/whp/x86_64.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_host/src/hypervisor/virtual_machine/whp/aarch64.rs:488` 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–10 lines × 2) · ×1
  • Duplicated block (9–10 lines × 2) src/hyperlight_common/src/virtq/consumer.rs:81 — src/hyperlight_common/src/virtq/consumer.rs:81-90 | src/hyperlight_common/src/virtq/consumer.rs:304-312 — 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 `src/hyperlight_common/src/virtq/consumer.rs:81` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/hyperlight_common/src/virtq/consumer.rs:91` calls `split_at_mut` and `src/hyperlight_common/src/virtq/consumer.rs:314` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
D4 · Code Duplication · Duplicated block (7–10 lines × 2) · ×1
  • Duplicated block (7–10 lines × 2) src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs:766 — src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs:766-772 | src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs:794-803 — 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 `src/hyperlight_host/src/hypervisor/hyperlight_vm/x86_64.rs:766` 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.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) src/hyperlight_common/src/arch/aarch64/vmem.rs:280 — src/hyperlight_common/src/arch/aarch64/vmem.rs:280-288 | src/hyperlight_common/src/arch/amd64/vmem.rs:453-460 — `src/hyperlight_common/src/arch/aarch64/vmem.rs` and `src/hyperlight_common/src/arch/amd64/vmem.rs` are one unit implemented once per sibling directory, so they are most likely parallel implementations of one contract rather than a copy of each other — this scan matched 5 separate duplicated blocks between them, totalling at least 60 lines. If both are selected at run time, neither can be retired in favour of the other, and the lines that DIFFER between them are the reason both exist. The move that pays here is to hoist the identical part into a shared location the whole family can reach and give what differs a parameter or a seam, so a change lands once instead of once per sibling; extracting one helper per block leaves every sibling to drift on its own. Read the line range as the matched WINDOW rather than a finished unit: at `src/hyperlight_common/src/arch/aarch64/vmem.rs:280` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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 (7–8 lines × 2) · ×1
  • Duplicated block (7–8 lines × 2) src/hyperlight_component_util/src/guest.rs:139 — src/hyperlight_component_util/src/guest.rs:139-145 | src/hyperlight_component_util/src/host.rs:284-291 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once. 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 (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:195 — src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:195-201 | src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:237-243 | src/hyperlight_common/src/flatbuffer_wrappers/guest_trace_data.rs:259-265 — 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.
D5 · Coupling · Unstable project hyperlight-guest-bin · ×1
  • Unstable project hyperlight-guest-bin — hyperlight-guest-bin has instability 0.83 with 1 dependents.
P12 · CI test-gate honesty · Coverage collected but not gated · ×1
  • Coverage collected but not gated — CI collects a coverage report but no step enforces a minimum — coverage could halve and CI stays green. Add a step that fails the build when coverage drops below a floor (your coverage tool's minimum-threshold flag, or a coverage-gate action) so the number guards something. What was searched, so you can tell an absence from a miss: this repository's CI files AND its coverage configuration — the well-known coverage and test-runner config files, read at the repository root and inside workspace package directories two levels down, so a floor declared beside the tests rather than in the pipeline is credited — matched against the threshold settings this check knows by name. A floor set in your coverage service's web UI rather than in a committed file, or under a setting whose name is not one of those, is not seen here.
Minor — 28 finding(s)
D31 · IaC & Container Security · Low IaC · ×7
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D16 · Bus Factor · Off-boarding risk · ×3
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 7 significant file(s) lose their only recent owner: src/hyperlight_common/src/virtq/producer.rs, src/hyperlight_common/src/virtq/consumer.rs, src/hyperlight_common/src/virtq/pool/slot.rs, src/hyperlight_common/src/virtq/pool/tests.rs, src/hyperlight_common/src/virtq/desc.rs, src/hyperlight_guest/src/transport/backing.rs, src/hyperlight_guest_bin/src/transport.rs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 5 significant file(s) lose their only recent owner: src/hyperlight_ci/src/bench_report.rs, src/hyperlight_ci/src/remote.rs, src/hyperlight_ci/src/config.rs, src/hyperlight_ci/src/baseline.rs, src/hyperlight_ci/src/manifest.rs. Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #3 — If anonymized user #3 becomes unavailable, 3 significant file(s) lose their only recent owner: src/hyperlight_guest_bin/src/arch/amd64/machine.rs, src/hyperlight_common/src/arch/aarch64/exn.rs, src/hyperlight_common/src/component.rs. Pair on, review, or document these before any departure.
D34 · Knowledge Freshness · Orphaned file · ×3
  • Orphaned file src/hyperlight_common/src/log_level.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file src/hyperlight_host/src/hypervisor/gdb/event_loop.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file fuzz/fuzz_targets/guest_estimate_trace_event.rs:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X9 · Subsumed condition operand · Subsumed condition operand · ×2
  • Subsumed condition operand src/hyperlight_host/src/sandbox/snapshot/file_tests.rs:981 — `msg.contains("architecture")` can never decide this `||` — every value satisfying `msg.contains("architecture")` also satisfies `msg.contains("arch")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
  • Subsumed condition operand src/hyperlight_host/src/sandbox/snapshot/file_tests.rs:2694 — `msg.contains("architecture")` can never decide this `||` — every value satisfying `msg.contains("architecture")` also satisfies `msg.contains("arch")`, so the `||` chain is already decided by the latter. The expression is equivalent to the chain without it, which means it is wider than it reads. Delete the dead operand, or narrow the surviving one if IT is the accident.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (17 single-owned of 155 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 155 of the 223 production source files in this repository met that bar). They are anonymized user #4 (2 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: src/hyperlight_host/src/hypervisor/regs/x86_64/msrs.rs, src/hyperlight_host/src/hypervisor/hyperlight_vm/test_support.rs.
D34 · Knowledge Freshness · Further orphaned files (smaller) · ×1
  • Further orphaned files (smaller) — 3 smaller file(s) also have no living knowledge — folded into the freshness score and metrics rather than raised one row each — most significant first: src/hyperlight_common/src/log_level.rs, src/hyperlight_host/src/hypervisor/gdb/event_loop.rs, fuzz/fuzz_targets/guest_estimate_trace_event.rs (4 orphaned of 155 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 155 of the 223 production source files in this repository met that bar). Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
M4 · Documentation accuracy · README/code drift · ×1
  • README/code drift docs/README.md:46 — docs/README.md links to `./debugging-hyperlight.md`, but `docs/debugging-hyperlight.md` does not exist. Checked without a model against the repository: its files and folders, the scripts and dependencies of every package.json, the projects, namespaces, package references and target frameworks of the .NET build, the SDK and Node pins, and the identifiers of every file that is not a document; the documents' own text never counts. A footprint generated at build time, read only by a platform, or living outside this repository is not seen, and this row is then wrong.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 8/11 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `src/hyperlight_ci`, `src/hyperlight_guest_macro`, `src/trace_dump`.
P3 · Security & performance tooling · Dependabot does not watch nuget/gitsubmodule · ×1
  • Dependabot does not watch nuget/gitsubmodule .github/dependabot.yml:2 — `.github/dependabot.yml` schedules updates, but no `package-ecosystem` entry covers `nuget`, `gitsubmodule`, which this tree depends on — so those dependencies get no update pull requests and no advisory pressure, however complete the dep-scan credit looks. Add the missing entries to the `updates:` list.
P4 · Deployment & Rollback · No release approval gate · ×1
  • No release approval gate — The release is automated and no gate that pauses it for a human is DECLARED IN THIS REPOSITORY'S PIPELINE FILES. What was read: every file under `.github/workflows/`, `.forgejo/workflows/`, `.gitea/workflows/`, `.azuredevops/` and `.azure-pipelines/`, plus `.gitlab-ci*` and `azure-pipelines*` — with comment text stripped, so documenting a gate is not declaring one. What would have counted: GitLab's `when: manual`, CircleCI's `type: approval`, an Azure `ManualValidation@` task or an `approvals:` block, a Jenkins `input` step, a `uses:` step naming an approval action, an `environment:` paired with `reviewers` / `required_reviewers` / `protection` / `wait-timer` / `deployment_branch_policy`, a draft-release step, a `workflow_dispatch` promotion, or a release-event gate. ★ What this cannot see, because none of it is a file: a GitHub environment whose required reviewers are configured in repo SETTINGS, a branch protection rule, or an organisation deployment policy — all of them real, enforced gates that live outside the repository. If yours is one of those, this row is wrong and nothing in the tree could have told us. Otherwise: whatever the release trigger points at is published to users unreviewed, so a mistagged or unverified commit ships and the only remedy is a follow-up release.
X5 · Nullable reference types · Null-forgiving operator (`!`) suppressions override nullable warnings · ×1
  • Null-forgiving operator (`!`) suppressions override nullable warnings — ~1.0 `!` suppressions per 1k syntax nodes — 2 suppression(s) across the 2026 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Minor — 9 finding(s)
D12 · Dependency Hygiene · Outdated · ×8
  • Outdated: cc — `cc` is locked at 1.11.0 but 1.11.2 is the current stable release on crates.io, and it already satisfies the `"1.2"` requirement declared in src/hyperlight_host/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p cc` and commit the updated REDACTED.
  • Outdated: fixedbitset — `fixedbitset` is locked at 0.5.7 but 0.5.9 is the current stable release on crates.io, and it already satisfies the `"0.5.7"` requirement declared in src/hyperlight_common/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p fixedbitset` and commit the updated REDACTED.
  • Outdated: linkme — `linkme` is locked at 0.3.37 but 0.3.38 is the current stable release on crates.io, and it already satisfies the `"0.3.36"` requirement declared in src/hyperlight_guest_bin/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p linkme` and commit the updated REDACTED.
  • Outdated: smallvec — `smallvec` is locked at 1.16.4 but 1.16.5 is the current stable release on crates.io, and it already satisfies the `"1.15.1"` requirement declared in src/hyperlight_common/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p smallvec` and commit the updated REDACTED.
  • Outdated: syn — `syn` is locked at 3.0.9 but 3.0.10 is the current stable release on crates.io, and it already satisfies the `"3.0.1"` requirement declared in src/hyperlight_component_macro/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p syn` and commit the updated REDACTED.
  • Outdated: toml — `toml` is locked at 1.2.0+spec-1.1.0 but 1.2.1+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in src/hyperlight_ci/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml` and commit the updated REDACTED.
  • Outdated: uuid — `uuid` is locked at 1.28.0 but 1.29.2 is the current stable release on crates.io, and it already satisfies the `"1.23.3"` requirement declared in src/hyperlight_host/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p uuid` and commit the updated REDACTED.
  • Outdated: wat — `wat` is locked at 1.262.0 but 1.263.0 is the current stable release on crates.io, and it already satisfies the `"1.256.0"` requirement declared in src/hyperlight_component_util/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wat` and commit the updated REDACTED.
D5 · Coupling · Off the main sequence · ×1
  • Off the main sequence: hyperlight-common — hyperlight-common: abstractness 0.21, instability 0.00, distance 0.79 — the shape a shared-kernel / building-block library has BY DESIGN — concrete and widely depended-on is what makes it useful, and this dimension does not penalise it (the distance is reported for completeness, not as a defect). Worth a look only if it has grown past one coherent kernel into an everything-bucket.

Appendix B — Reproduction & audit trail

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

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-5d0b5b73d56e44f5a0460ced9ef6396b/history.json --exit-code 0 --source .0artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-5d0b5b73d56e44f5a0460ced9ef6396b/tree.json --exit-code 0 --source .0artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude src/hyperlight_common/src/flatbuffers --exclude src/tests/rust_guests/callbackguest .54artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .2artifacts/raw/osv-scanner.json
D31 · IaC & Container Securitytrivy—trivy config --format json --quiet .8artifacts/raw/trivy-config.json
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciesosv-scanner—osv-scanner --format json --recursive --experimental-disable-plugins transitivedependency/requirements --experimental-disable-plugins dotnet/csproj --experimental-disable-plugins dotnet/nugetcpm .0artifacts/raw/osv-scanner.json

Run 01a1db9e-2af5-723c-af7a-416ed0f6512e · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

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

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