Executive summary
⚠ A critical security finding caps this grade — resolve it before relying on the score below; see the Security lens.
The system holds a 62% health score, placing it in the At Risk category. While the code is technically sound and easy to rebuild, the organization faces significant exposure in security and operational maturity. This standing suggests a system that is fragile under pressure, not because of complexity, but due to gaps in how it is secured and understood.
The asset is small, comprising roughly 13,500 lines of production code with a rebuild cost of approximately €20,000. This low barrier to replacement means the primary value at stake is not the code itself, but the business logic it encapsulates. The system is composed entirely of straight-line logic with no boilerplate, indicating a straightforward structure that is easy to comprehend but potentially rigid. The small size and low rebuild cost imply that the risk is manageable, provided the right immediate actions are taken to secure the foundation.
The most critical theme is Security Exposure. With a security score of 57%, the system lacks adequate safeguards against modern threats. This is not a minor oversight; it represents a direct vulnerability that could lead to data breaches or unauthorized access. Given the system’s small size, addressing this is the highest-leverage activity, as it protects the entire asset with minimal effort. Ignoring this leaves the business open to significant financial and reputational damage.
A second theme is Operational Maturity. The readiness and maturity scores of 61% indicate that the system is difficult to operate and maintain over time. There is insufficient documentation and testing to ensure that new team members can pick up the work or that changes do not introduce defects. This lack of structure leads to slower delivery speeds and higher long-term costs, as engineers spend more time understanding the system than building new features.
On the positive side, the code health and architecture scores are excellent at 93% and 92% respectively. The performance is perfect, and the domain modeling is not measured, suggesting no obvious structural flaws. The system is clean, efficient, and well-organized, which is a strong foundation to build upon.
Focus first on recording significant decisions in a centralized document tree. This single action will improve maturity and security by clarifying context and constraints. Extend structured logging to all modules to enhance observability. These steps provide the highest return on effort, stabilizing the system without requiring a rewrite. The picture is partial, as some areas like domain modeling were not measured, but the current risks are clear and actionable.
No single dominant problem — the weakest areas are close, so progress on any of them moves the score.
New since the last scan (37+)
- D1 · Lowering::condition (cyclomatic 25) rust/rules/src/lower.rs
- D1 · Metadata::read (cyclomatic 21) rust/rules/src/source.rs
- D1 · magika_cli::main (cyclomatic 16) rust/cli/src/main.rs
- D2 · Metadata::read (cognitive 32) rust/rules/src/source.rs
- D2 · Lowering::condition (cognitive 27) rust/rules/src/lower.rs
- D2 · magika_cli::main (cognitive 16) rust/cli/src/main.rs
- D4 · Duplicated block (11 lines × 2) python/scripts/sync.py
- D5 · Off the main sequence: magika
- D5 · Off the main sequence: magika-tract-runtime
- D8 · Coverage not measured — JavaScript/TypeScript suite
- D17 · FixmeComment python/src/magika/magika.py
- D17 · FixmeComment python/src/magika/magika.py
- D17 · FixmeComment python/src/magika/magika.py
- D17 · FixmeComment python/src/magika/magika.py
- D17 · FixmeComment python/src/magika/magika.py
- D17 · FixmeComment rust/pyo3/src/lib.rs
- D17 · FixmeComment rust/pyo3/src/lib.rs
- D17 · FixmeComment rust/pyo3/src/lib.rs
- D22 · InferredType exposes both a public property `content_type` of type String and a method `content_type()` returning ContentType. This is a direct signature conflict where the same name refers to two different types and access patterns (field vs method).
- D22 · InferredType has a property `inferred_type` returning ContentType and a method `content_type()` also returning ContentType. These appear to provide the same semantic information (the inferred content type) under different names, causing confusion about which to use.
- D29 · REDACTED
- D29 · REDACTED
- D30 · REDACTED
- D30 · REDACTED
- D30 · REDACTED
- D30 · REDACTED
- D30 · REDACTED
- D30 · REDACTED
- D30 · REDACTED
- D30 · REDACTED
- R10 · Duplicated block (21 lines × 2 locations) js/magika-cli.ts
- R10 · Duplicated block (6 lines × 2 locations) website-ng/src/components/MagikaDemo.svelte
- R10 · Duplicated block (5 lines × 2 locations) website-ng/src/lib/utils.ts
- R4 · This test file cannot be loaded js/test/inference-vs-reference.test.ts
- R4 · This test file cannot be loaded js/test/magika.test.ts
- R4 · No test reaches this file js/src/prediction-mode.ts
- R6 · The declared test suite includes a file that cannot be loaded js/test/inference-vs-reference.test.ts
Rebuild cost & value ~ Modeled — €6,500–€33,000
| Cost to rebuild | €6,500–€33,000 |
|---|---|
| Domain complexity | Standard |
| Quality factor | 0.8× (at 62% quality) |
| Size & shape | Small · effort split not classified for 14,309 line(s) outside the .NET model (the tier breakdown is a C#-only syntax walk) |
This codebase represents roughly ~0.1 person-years of build effort (about ~€20,000 to rebuild). Its weakest lens is Security at 57% — the part of that asset most exposed by the findings below.
Top priorities
Diagnosis — what's actually going on
Architecture — module dependency graph
Architecture — module dependency matrix
| depends on → | 1 gen | 2 github.com/google/magika/go/onnx | 3 js.src.content-type-label | 4 js.src.magika-options | 5 js.src.model-features | 6 js.src.overwrite-reason | 7 js.src.status | 8 magika_rules.error | 9 magika_tract_runtime.loader | 10 github.com/google/magika/go/magika | 11 js.src.content-type-info | 12 js.src.model-config | 13 js.src.model-prediction | 14 magika.file | 15 magika.input | 16 magika_rules.source | 17 js.src.magika-prediction | 18 js.src.model | 19 js.src.model-config-node | 20 magika.content | 21 magika.session | 22 magika_pyo3 | 23 magika_rules.matcher | 24 js.src.magika-result | 25 js.src.model-node | 26 magika_rules.ir | 27 magika_rules.lower | 28 magika_tract_bench | 29 js.magika | 30 magika_rules | 31 magika_rules.source.metadata | 32 magika_tract_runtime | 33 js.magika-node | 34 magika.backend | 35 magika_rules.eval | 36 magika.builder | 37 magika.runtime | 38 ffi | 39 magika_cli | 40 ffi.content |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 gen | ||||||||||||||||||||||||||||||||||||||||
| 2 github.com/google/magika/go/onnx | ||||||||||||||||||||||||||||||||||||||||
| 3 js.src.content-type-label | ||||||||||||||||||||||||||||||||||||||||
| 4 js.src.magika-options | ||||||||||||||||||||||||||||||||||||||||
| 5 js.src.model-features | ||||||||||||||||||||||||||||||||||||||||
| 6 js.src.overwrite-reason | ||||||||||||||||||||||||||||||||||||||||
| 7 js.src.status | ||||||||||||||||||||||||||||||||||||||||
| 8 magika_rules.error | ||||||||||||||||||||||||||||||||||||||||
| 9 magika_tract_runtime.loader | ||||||||||||||||||||||||||||||||||||||||
| 10 github.com/google/magika/go/magika | 1 | |||||||||||||||||||||||||||||||||||||||
| 11 js.src.content-type-info | 1 | |||||||||||||||||||||||||||||||||||||||
| 12 js.src.model-config | 1 | |||||||||||||||||||||||||||||||||||||||
| 13 js.src.model-prediction | 1 | |||||||||||||||||||||||||||||||||||||||
| 14 magika.file | 2 | |||||||||||||||||||||||||||||||||||||||
| 15 magika.input | 1 | |||||||||||||||||||||||||||||||||||||||
| 16 magika_rules.source | 2 | |||||||||||||||||||||||||||||||||||||||
| 17 js.src.magika-prediction | 1 | 1 | 1 | |||||||||||||||||||||||||||||||||||||
| 18 js.src.model | 1 | 1 | 1 | |||||||||||||||||||||||||||||||||||||
| 19 js.src.model-config-node | 1 | |||||||||||||||||||||||||||||||||||||||
| 20 magika.content | 1 | |||||||||||||||||||||||||||||||||||||||
| 21 magika.session | 1 | 1 | ||||||||||||||||||||||||||||||||||||||
| 22 magika_pyo3 | 1 | 1 | ||||||||||||||||||||||||||||||||||||||
| 23 magika_rules.matcher | 1 | |||||||||||||||||||||||||||||||||||||||
| 24 js.src.magika-result | 1 | 1 | ||||||||||||||||||||||||||||||||||||||
| 25 js.src.model-node | 1 | |||||||||||||||||||||||||||||||||||||||
| 26 magika_rules.ir | 1 | |||||||||||||||||||||||||||||||||||||||
| 27 magika_rules.lower | 1 | 1 | 1 | |||||||||||||||||||||||||||||||||||||
| 28 magika_tract_bench | 1 | 1 | ||||||||||||||||||||||||||||||||||||||
| 29 js.magika | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | ||||||||||||||||||||||||||||||
| 30 magika_rules | 1 | 2 | 1 | |||||||||||||||||||||||||||||||||||||
| 31 magika_rules.source.metadata | 2 | 1 | ||||||||||||||||||||||||||||||||||||||
| 32 magika_tract_runtime | 1 | 3 | ||||||||||||||||||||||||||||||||||||||
| 33 js.magika-node | 1 | 1 | 1 | 1 | 1 | |||||||||||||||||||||||||||||||||||
| 34 magika.backend | 1 | |||||||||||||||||||||||||||||||||||||||
| 35 magika_rules.eval | 1 | 4 | 1 | |||||||||||||||||||||||||||||||||||||
| 36 magika.builder | 1 | |||||||||||||||||||||||||||||||||||||||
| 37 magika.runtime | 1 | 1 | 1 | |||||||||||||||||||||||||||||||||||||
| 38 ffi | 1 | 1 | 1 | 1 | ||||||||||||||||||||||||||||||||||||
| 39 magika_cli | 1 | 2 | 1 | 1 | 1 | |||||||||||||||||||||||||||||||||||
| 40 ffi.content | 1 | 1 |
10→2 github.com/google/magika/go/magika depends on github.com/google/magika/go/onnx✕
- Type pairs
- 1 distinct (type in github.com/google/magika/go/magika → type in github.com/google/magika/go/onnx) reference.
- Which types
github.com/google/magika/go/magika.Scanner→github.com/google/magika/go/onnx.Onnx
- Direction
- github.com/google/magika/go/magika uses github.com/google/magika/go/onnx. Changing github.com/google/magika/go/onnx can break github.com/google/magika/go/magika, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
11→3 js.src.content-type-info depends on js.src.content-type-label✕
- Type pairs
- 1 distinct (type in js.src.content-type-info → type in js.src.content-type-label) reference.
- Which types
js.src.content-type-info.ContentTypeInfo→js.src.content-type-label.ContentTypeLabel
- Direction
- js.src.content-type-info uses js.src.content-type-label. Changing js.src.content-type-label can break js.src.content-type-info, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
12→3 js.src.model-config depends on js.src.content-type-label✕
- Type pairs
- 1 distinct (type in js.src.model-config → type in js.src.content-type-label) reference.
- Which types
js.src.model-config.ModelConfig→js.src.content-type-label.ContentTypeLabel
- Direction
- js.src.model-config uses js.src.content-type-label. Changing js.src.content-type-label can break js.src.model-config, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
13→3 js.src.model-prediction depends on js.src.content-type-label✕
- Type pairs
- 1 distinct (type in js.src.model-prediction → type in js.src.content-type-label) reference.
- Which types
js.src.model-prediction.ModelPrediction→js.src.content-type-label.ContentTypeLabel
- Direction
- js.src.model-prediction uses js.src.content-type-label. Changing js.src.content-type-label can break js.src.model-prediction, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
14→1 magika.file depends on gen✕
- Type pairs
- 2 distinct (type in magika.file → type in gen) references.
- Which types
magika.file.FileType→gen.ContentTypemagika.file.InferredType→gen.ContentType
- Direction
- magika.file uses gen. Changing gen can break magika.file, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
15→1 magika.input depends on gen✕
- Type pairs
- 1 distinct (type in magika.input → type in gen) reference.
- Which types
magika.input.input$module→gen.ModelConfig
- Direction
- magika.input uses gen. Changing gen can break magika.input, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
16→26 magika_rules.source depends on magika_rules.ir cycle✕
- Type pairs
- 2 distinct (type in magika_rules.source → type in magika_rules.ir) references.
- Which types
magika_rules.source.Source→magika_rules.ir.Rulemagika_rules.source.source$module→magika_rules.ir.Rule
- Direction
- magika_rules.source uses magika_rules.ir. Changing magika_rules.ir can break magika_rules.source, not the reverse.
- Position
- Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
17→3 js.src.magika-prediction depends on js.src.content-type-label✕
- Type pairs
- 1 distinct (type in js.src.magika-prediction → type in js.src.content-type-label) reference.
- Which types
js.src.magika-prediction.MagikaPrediction→js.src.content-type-label.ContentTypeLabel
- Direction
- js.src.magika-prediction uses js.src.content-type-label. Changing js.src.content-type-label can break js.src.magika-prediction, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
17→6 js.src.magika-prediction depends on js.src.overwrite-reason✕
- Type pairs
- 1 distinct (type in js.src.magika-prediction → type in js.src.overwrite-reason) reference.
- Which types
js.src.magika-prediction.MagikaPrediction→js.src.overwrite-reason.OverwriteReason
- Direction
- js.src.magika-prediction uses js.src.overwrite-reason. Changing js.src.overwrite-reason can break js.src.magika-prediction, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
17→11 js.src.magika-prediction depends on js.src.content-type-info✕
- Type pairs
- 1 distinct (type in js.src.magika-prediction → type in js.src.content-type-info) reference.
- Which types
js.src.magika-prediction.MagikaPrediction→js.src.content-type-info.ContentTypeInfo
- Direction
- js.src.magika-prediction uses js.src.content-type-info. Changing js.src.content-type-info can break js.src.magika-prediction, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
18→5 js.src.model depends on js.src.model-features✕
- Type pairs
- 1 distinct (type in js.src.model → type in js.src.model-features) reference.
- Which types
js.src.model.Model→js.src.model-features.ModelFeatures
- Direction
- js.src.model uses js.src.model-features. Changing js.src.model-features can break js.src.model, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
18→12 js.src.model depends on js.src.model-config✕
- Type pairs
- 1 distinct (type in js.src.model → type in js.src.model-config) reference.
- Which types
js.src.model.Model→js.src.model-config.ModelConfig
- Direction
- js.src.model uses js.src.model-config. Changing js.src.model-config can break js.src.model, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
18→13 js.src.model depends on js.src.model-prediction✕
- Type pairs
- 1 distinct (type in js.src.model → type in js.src.model-prediction) reference.
- Which types
js.src.model.Model→js.src.model-prediction.ModelPrediction
- Direction
- js.src.model uses js.src.model-prediction. Changing js.src.model-prediction can break js.src.model, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
19→12 js.src.model-config-node depends on js.src.model-config✕
- Type pairs
- 1 distinct (type in js.src.model-config-node → type in js.src.model-config) reference.
- Which types
js.src.model-config-node.ModelConfigNode→js.src.model-config.ModelConfig
- Direction
- js.src.model-config-node uses js.src.model-config. Changing js.src.model-config can break js.src.model-config-node, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
20→14 magika.content depends on magika.file✕
- Type pairs
- 1 distinct (type in magika.content → type in magika.file) reference.
- Which types
magika.content.ContentType→magika.file.TypeInfo
- Direction
- magika.content uses magika.file. Changing magika.file can break magika.content, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
21→15 magika.session depends on magika.input✕
- Type pairs
- 1 distinct (type in magika.session → type in magika.input) reference.
- Which types
magika.session.Session→magika.input.Features
- Direction
- magika.session uses magika.input. Changing magika.input can break magika.session, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
21→34 magika.session depends on magika.backend cycle✕
- Type pairs
- 1 distinct (type in magika.session → type in magika.backend) reference.
- Which types
magika.session.Session→magika.backend.BackendInfo
- Direction
- magika.session uses magika.backend. Changing magika.backend can break magika.session, not the reverse.
- Position
- Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
22→8 magika_pyo3 depends on magika_rules.error✕
- Type pairs
- 1 distinct (type in magika_pyo3 → type in magika_rules.error) reference.
- Which types
magika_pyo3.magika_pyo3$module→magika_rules.error.Error
- Direction
- magika_pyo3 uses magika_rules.error. Changing magika_rules.error can break magika_pyo3, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
22→14 magika_pyo3 depends on magika.file✕
- Type pairs
- 1 distinct (type in magika_pyo3 → type in magika.file) reference.
- Which types
magika_pyo3.magika_pyo3$module→magika.file.FileType
- Direction
- magika_pyo3 uses magika.file. Changing magika.file can break magika_pyo3, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
23→16 magika_rules.matcher depends on magika_rules.source✕
- Type pairs
- 1 distinct (type in magika_rules.matcher → type in magika_rules.source) reference.
- Which types
magika_rules.matcher.matcher$module→magika_rules.source.Class
- Direction
- magika_rules.matcher uses magika_rules.source. Changing magika_rules.source can break magika_rules.matcher, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
24→7 js.src.magika-result depends on js.src.status✕
- Type pairs
- 1 distinct (type in js.src.magika-result → type in js.src.status) reference.
- Which types
js.src.magika-result.MagikaResult→js.src.status.Status
- Direction
- js.src.magika-result uses js.src.status. Changing js.src.status can break js.src.magika-result, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
24→17 js.src.magika-result depends on js.src.magika-prediction✕
- Type pairs
- 1 distinct (type in js.src.magika-result → type in js.src.magika-prediction) reference.
- Which types
js.src.magika-result.MagikaResult→js.src.magika-prediction.MagikaPrediction
- Direction
- js.src.magika-result uses js.src.magika-prediction. Changing js.src.magika-prediction can break js.src.magika-result, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
25→18 js.src.model-node depends on js.src.model✕
- Type pairs
- 1 distinct (type in js.src.model-node → type in js.src.model) reference.
- Which types
js.src.model-node.ModelNode→js.src.model.Model
- Direction
- js.src.model-node uses js.src.model. Changing js.src.model can break js.src.model-node, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
26→23 magika_rules.ir depends on magika_rules.matcher✕
- Type pairs
- 1 distinct (type in magika_rules.ir → type in magika_rules.matcher) reference.
- Which types
magika_rules.ir.Program→magika_rules.matcher.Pattern
- Direction
- magika_rules.ir uses magika_rules.matcher. Changing magika_rules.matcher can break magika_rules.ir, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
27→8 magika_rules.lower depends on magika_rules.error✕
- Type pairs
- 1 distinct (type in magika_rules.lower → type in magika_rules.error) reference.
- Which types
magika_rules.lower.lower$module→magika_rules.error.Error
- Direction
- magika_rules.lower uses magika_rules.error. Changing magika_rules.error can break magika_rules.lower, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
27→16 magika_rules.lower depends on magika_rules.source✕
- Type pairs
- 1 distinct (type in magika_rules.lower → type in magika_rules.source) reference.
- Which types
magika_rules.lower.lower$module→magika_rules.source.Source
- Direction
- magika_rules.lower uses magika_rules.source. Changing magika_rules.source can break magika_rules.lower, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
27→23 magika_rules.lower depends on magika_rules.matcher✕
- Type pairs
- 1 distinct (type in magika_rules.lower → type in magika_rules.matcher) reference.
- Which types
magika_rules.lower.Lowering→magika_rules.matcher.Pattern
- Direction
- magika_rules.lower uses magika_rules.matcher. Changing magika_rules.matcher can break magika_rules.lower, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
28→21 magika_tract_bench depends on magika.session✕
- Type pairs
- 1 distinct (type in magika_tract_bench → type in magika.session) reference.
- Which types
magika_tract_bench.OrtSession→magika.session.Session
- Direction
- magika_tract_bench uses magika.session. Changing magika.session can break magika_tract_bench, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
28→34 magika_tract_bench depends on magika.backend cycle✕
- Type pairs
- 1 distinct (type in magika_tract_bench → type in magika.backend) reference.
- Which types
magika_tract_bench.magika_tract_bench$module→magika.backend.Backend
- Direction
- magika_tract_bench uses magika.backend. Changing magika.backend can break magika_tract_bench, not the reverse.
- Position
- Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
29→3 js.magika depends on js.src.content-type-label✕
- Type pairs
- 1 distinct (type in js.magika → type in js.src.content-type-label) reference.
- Which types
js.magika.Magika→js.src.content-type-label.ContentTypeLabel
- Direction
- js.magika uses js.src.content-type-label. Changing js.src.content-type-label can break js.magika, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
29→4 js.magika depends on js.src.magika-options✕
- Type pairs
- 1 distinct (type in js.magika → type in js.src.magika-options) reference.
- Which types
js.magika.Magika→js.src.magika-options.MagikaOptions
- Direction
- js.magika uses js.src.magika-options. Changing js.src.magika-options can break js.magika, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
29→5 js.magika depends on js.src.model-features✕
- Type pairs
- 1 distinct (type in js.magika → type in js.src.model-features) reference.
- Which types
js.magika.Magika→js.src.model-features.ModelFeatures
- Direction
- js.magika uses js.src.model-features. Changing js.src.model-features can break js.magika, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
29→6 js.magika depends on js.src.overwrite-reason✕
- Type pairs
- 1 distinct (type in js.magika → type in js.src.overwrite-reason) reference.
- Which types
js.magika.Magika→js.src.overwrite-reason.OverwriteReason
- Direction
- js.magika uses js.src.overwrite-reason. Changing js.src.overwrite-reason can break js.magika, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
29→7 js.magika depends on js.src.status✕
- Type pairs
- 1 distinct (type in js.magika → type in js.src.status) reference.
- Which types
js.magika.Magika→js.src.status.Status
- Direction
- js.magika uses js.src.status. Changing js.src.status can break js.magika, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
29→11 js.magika depends on js.src.content-type-info✕
- Type pairs
- 1 distinct (type in js.magika → type in js.src.content-type-info) reference.
- Which types
js.magika.Magika→js.src.content-type-info.ContentTypeInfo
- Direction
- js.magika uses js.src.content-type-info. Changing js.src.content-type-info can break js.magika, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
29→12 js.magika depends on js.src.model-config✕
- Type pairs
- 1 distinct (type in js.magika → type in js.src.model-config) reference.
- Which types
js.magika.Magika→js.src.model-config.ModelConfig
- Direction
- js.magika uses js.src.model-config. Changing js.src.model-config can break js.magika, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
29→13 js.magika depends on js.src.model-prediction✕
- Type pairs
- 1 distinct (type in js.magika → type in js.src.model-prediction) reference.
- Which types
js.magika.Magika→js.src.model-prediction.ModelPrediction
- Direction
- js.magika uses js.src.model-prediction. Changing js.src.model-prediction can break js.magika, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
29→18 js.magika depends on js.src.model✕
- Type pairs
- 1 distinct (type in js.magika → type in js.src.model) reference.
- Which types
js.magika.Magika→js.src.model.Model
- Direction
- js.magika uses js.src.model. Changing js.src.model can break js.magika, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
29→24 js.magika depends on js.src.magika-result✕
- Type pairs
- 1 distinct (type in js.magika → type in js.src.magika-result) reference.
- Which types
js.magika.Magika→js.src.magika-result.MagikaResult
- Direction
- js.magika uses js.src.magika-result. Changing js.src.magika-result can break js.magika, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
30→15 magika_rules depends on magika.input✕
- Type pairs
- 1 distinct (type in magika_rules → type in magika.input) reference.
- Which types
magika_rules.RuleSet→magika.input.Input
- Direction
- magika_rules uses magika.input. Changing magika.input can break magika_rules, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
30→16 magika_rules depends on magika_rules.source✕
- Type pairs
- 2 distinct (type in magika_rules → type in magika_rules.source) references.
- Which types
magika_rules.RuleSet→magika_rules.source.RuleInfomagika_rules.RuleSet→magika_rules.source.Source
- Direction
- magika_rules uses magika_rules.source. Changing magika_rules.source can break magika_rules, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
30→26 magika_rules depends on magika_rules.ir✕
- Type pairs
- 1 distinct (type in magika_rules → type in magika_rules.ir) reference.
- Which types
magika_rules.RuleSet→magika_rules.ir.Program
- Direction
- magika_rules uses magika_rules.ir. Changing magika_rules.ir can break magika_rules, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
31→16 magika_rules.source.metadata depends on magika_rules.source✕
- Type pairs
- 2 distinct (type in magika_rules.source.metadata → type in magika_rules.source) references.
- Which types
magika_rules.source.metadata.Metadata→magika_rules.source.Bucketmagika_rules.source.metadata.Metadata→magika_rules.source.Class
- Direction
- magika_rules.source.metadata uses magika_rules.source. Changing magika_rules.source can break magika_rules.source.metadata, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
31→26 magika_rules.source.metadata depends on magika_rules.ir✕
- Type pairs
- 1 distinct (type in magika_rules.source.metadata → type in magika_rules.ir) reference.
- Which types
magika_rules.source.metadata.Metadata→magika_rules.ir.Rule
- Direction
- magika_rules.source.metadata uses magika_rules.ir. Changing magika_rules.ir can break magika_rules.source.metadata, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
32→28 magika_tract_runtime depends on magika_tract_bench✕
- Type pairs
- 1 distinct (type in magika_tract_runtime → type in magika_tract_bench) reference.
- Which types
magika_tract_runtime.Session→magika_tract_bench.InferenceSession
- Direction
- magika_tract_runtime uses magika_tract_bench. Changing magika_tract_bench can break magika_tract_runtime, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
32→34 magika_tract_runtime depends on magika.backend cycle✕
- Type pairs
- 3 distinct (type in magika_tract_runtime → type in magika.backend) references.
- Which types
magika_tract_runtime.BackendInfo→magika.backend.Backendmagika_tract_runtime.Runtime→magika.backend.BackendInfomagika_tract_runtime.Session→magika.backend.BackendInfo
- Direction
- magika_tract_runtime uses magika.backend. Changing magika.backend can break magika_tract_runtime, not the reverse.
- Position
- Above the diagonal — a cycle. Neither module can be changed, tested or deployed independently until one of these dependencies goes.
33→4 js.magika-node depends on js.src.magika-options✕
- Type pairs
- 1 distinct (type in js.magika-node → type in js.src.magika-options) reference.
- Which types
js.magika-node.MagikaNode→js.src.magika-options.MagikaOptions
- Direction
- js.magika-node uses js.src.magika-options. Changing js.src.magika-options can break js.magika-node, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
33→19 js.magika-node depends on js.src.model-config-node✕
- Type pairs
- 1 distinct (type in js.magika-node → type in js.src.model-config-node) reference.
- Which types
js.magika-node.MagikaNode→js.src.model-config-node.ModelConfigNode
- Direction
- js.magika-node uses js.src.model-config-node. Changing js.src.model-config-node can break js.magika-node, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
33→24 js.magika-node depends on js.src.magika-result✕
- Type pairs
- 1 distinct (type in js.magika-node → type in js.src.magika-result) reference.
- Which types
js.magika-node.MagikaNode→js.src.magika-result.MagikaResult
- Direction
- js.magika-node uses js.src.magika-result. Changing js.src.magika-result can break js.magika-node, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
33→25 js.magika-node depends on js.src.model-node✕
- Type pairs
- 1 distinct (type in js.magika-node → type in js.src.model-node) reference.
- Which types
js.magika-node.MagikaNode→js.src.model-node.ModelNode
- Direction
- js.magika-node uses js.src.model-node. Changing js.src.model-node can break js.magika-node, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
33→29 js.magika-node depends on js.magika✕
- Type pairs
- 1 distinct (type in js.magika-node → type in js.magika) reference.
- Which types
js.magika-node.MagikaNode→js.magika.Magika
- Direction
- js.magika-node uses js.magika. Changing js.magika can break js.magika-node, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
34→32 magika.backend depends on magika_tract_runtime✕
- Type pairs
- 1 distinct (type in magika.backend → type in magika_tract_runtime) reference.
- Which types
magika.backend.Backend→magika_tract_runtime.BackendRequest
- Direction
- magika.backend uses magika_tract_runtime. Changing magika_tract_runtime can break magika.backend, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
35→15 magika_rules.eval depends on magika.input✕
- Type pairs
- 1 distinct (type in magika_rules.eval → type in magika.input) reference.
- Which types
magika_rules.eval.eval$module→magika.input.Input
- Direction
- magika_rules.eval uses magika.input. Changing magika.input can break magika_rules.eval, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
35→26 magika_rules.eval depends on magika_rules.ir✕
- Type pairs
- 4 distinct (type in magika_rules.eval → type in magika_rules.ir) references.
- Which types
magika_rules.eval.Ctx→magika_rules.ir.Condmagika_rules.eval.Ctx→magika_rules.ir.Intmagika_rules.eval.Ctx→magika_rules.ir.Programmagika_rules.eval.eval$module→magika_rules.ir.Program
- Direction
- magika_rules.eval uses magika_rules.ir. Changing magika_rules.ir can break magika_rules.eval, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
35→30 magika_rules.eval depends on magika_rules✕
- Type pairs
- 1 distinct (type in magika_rules.eval → type in magika_rules) reference.
- Which types
magika_rules.eval.eval$module→magika_rules.Outcome
- Direction
- magika_rules.eval uses magika_rules. Changing magika_rules can break magika_rules.eval, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
36→34 magika.builder depends on magika.backend✕
- Type pairs
- 1 distinct (type in magika.builder → type in magika.backend) reference.
- Which types
magika.builder.Builder→magika.backend.Backend
- Direction
- magika.builder uses magika.backend. Changing magika.backend can break magika.builder, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
37→32 magika.runtime depends on magika_tract_runtime✕
- Type pairs
- 1 distinct (type in magika.runtime → type in magika_tract_runtime) reference.
- Which types
magika.runtime.Runtime→magika_tract_runtime.BackendRequest
- Direction
- magika.runtime uses magika_tract_runtime. Changing magika_tract_runtime can break magika.runtime, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
37→34 magika.runtime depends on magika.backend✕
- Type pairs
- 1 distinct (type in magika.runtime → type in magika.backend) reference.
- Which types
magika.runtime.Runtime→magika.backend.BackendInfo
- Direction
- magika.runtime uses magika.backend. Changing magika.backend can break magika.runtime, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
37→36 magika.runtime depends on magika.builder✕
- Type pairs
- 1 distinct (type in magika.runtime → type in magika.builder) reference.
- Which types
magika.runtime.Runtime→magika.builder.Builder
- Direction
- magika.runtime uses magika.builder. Changing magika.builder can break magika.runtime, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
38→14 ffi depends on magika.file✕
- Type pairs
- 1 distinct (type in ffi → type in magika.file) reference.
- Which types
ffi.ffi$module→magika.file.FileType
- Direction
- ffi uses magika.file. Changing magika.file can break ffi, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
38→15 ffi depends on magika.input✕
- Type pairs
- 1 distinct (type in ffi → type in magika.input) reference.
- Which types
ffi.MagikaFeatures→magika.input.Features
- Direction
- ffi uses magika.input. Changing magika.input can break ffi, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
38→21 ffi depends on magika.session✕
- Type pairs
- 1 distinct (type in ffi → type in magika.session) reference.
- Which types
ffi.MagikaSession→magika.session.Session
- Direction
- ffi uses magika.session. Changing magika.session can break ffi, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
38→37 ffi depends on magika.runtime✕
- Type pairs
- 1 distinct (type in ffi → type in magika.runtime) reference.
- Which types
ffi.MagikaRuntime→magika.runtime.Runtime
- Direction
- ffi uses magika.runtime. Changing magika.runtime can break ffi, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
39→8 magika_cli depends on magika_rules.error✕
- Type pairs
- 1 distinct (type in magika_cli → type in magika_rules.error) reference.
- Which types
magika_cli.JsonError→magika_rules.error.Error
- Direction
- magika_cli uses magika_rules.error. Changing magika_rules.error can break magika_cli, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
39→14 magika_cli depends on magika.file✕
- Type pairs
- 2 distinct (type in magika_cli → type in magika.file) references.
- Which types
magika_cli.JsonResult→magika.file.TypeInfomagika_cli.magika_cli$module→magika.file.FileType
- Direction
- magika_cli uses magika.file. Changing magika.file can break magika_cli, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
39→15 magika_cli depends on magika.input✕
- Type pairs
- 1 distinct (type in magika_cli → type in magika.input) reference.
- Which types
magika_cli.BatchItem→magika.input.Features
- Direction
- magika_cli uses magika.input. Changing magika.input can break magika_cli, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
39→34 magika_cli depends on magika.backend✕
- Type pairs
- 1 distinct (type in magika_cli → type in magika.backend) reference.
- Which types
magika_cli.magika_cli$module→magika.backend.Backend
- Direction
- magika_cli uses magika.backend. Changing magika.backend can break magika_cli, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
39→37 magika_cli depends on magika.runtime✕
- Type pairs
- 1 distinct (type in magika_cli → type in magika.runtime) reference.
- Which types
magika_cli.magika_cli$module→magika.runtime.Runtime
- Direction
- magika_cli uses magika.runtime. Changing magika.runtime can break magika_cli, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
40→1 ffi.content depends on gen✕
- Type pairs
- 1 distinct (type in ffi.content → type in gen) reference.
- Which types
ffi.content.content$module→gen.ContentType
- Direction
- ffi.content uses gen. Changing gen can break ffi.content, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
40→38 ffi.content depends on ffi✕
- Type pairs
- 1 distinct (type in ffi.content → type in ffi) reference.
- Which types
ffi.content.content$module→ffi.MagikaTypeInfo
- Direction
- ffi.content uses ffi. Changing ffi can break ffi.content, not the reverse.
- Position
- Below the diagonal — points down the layering, which is what you want.
At a glance — Code Health
At a glance — Architecture
At a glance — Maturity
At a glance — Readiness
At a glance — Security
At a glance — Accessibility
At a glance — Performance
Security & Compliance — OWASP Top-10 mapping
| OWASP category | Findings | Severity |
|---|---|---|
| A06:2021 — Vulnerable & Outdated Components | 39 | High / Critical |
| A03:2021 — Injection | 36 | High / Critical |
| A05:2021 — Security Misconfiguration | 6 | High / Critical |
Roadmap
First, establish a centralized repository for architecture decisions by documenting key context and consequences in a standard directory structure. Second, extend structured logging across all runnable modules to ensure full production diagnosability. Third, increase test coverage by adding tests for currently unreached production modules. Fourth, address the lack of existing architecture decision records to complete the documentation baseline. Finally, update the dependency automation configuration to include Go and Gradle ecosystems for consistent security and performance monitoring.
| Do this | Helps | Effort | Dimension |
|---|---|---|---|
| Resolve the 1 No ADRs found finding(s) in ADR Quality. | +2.6 pts | Low | ADR Quality |
| Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED. | +2.3 pts | Low | Static Analysis (SAST) |
| Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. | +1.5 pts | Low | Static Analysis (SAST) |
| Resolve the 2 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED, REDACTED. | +1.5 pts | Low | Dependency Vulnerabilities |
| Resolve the 2 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED, REDACTED. | +1.5 pts | Low | Dependency Vulnerabilities |
| Resolve the 3 High IaC finding(s) in IaC & Container Security — start with REDACTED (3). | +1.5 pts | Low | IaC & Container Security |
| Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form). | +2.8 pts | Medium | Architecture documentation |
| Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production. | +2.7 pts | Medium | Observability |
File quality
| File | Score | Band | Worst signal |
|---|---|---|---|
| REDACTED | 0.2 | Slop | Dependency Vulnerabilities: Critical CVE: REDACTED |
| REDACTED | 1.7 | Slop | Dependency Vulnerabilities: High CVE: REDACTED |
| REDACTED | 2.0 | Slop | IaC & Container Security: High IaC: REDACTED |
| REDACTED | 2.3 | Slop | Static Analysis (SAST): High: REDACTED |
| REDACTED | 2.3 | Slop | Dependency Vulnerabilities: Critical CVE: REDACTED |
| REDACTED | 5.1 | Mixed | Static Analysis (SAST): High: REDACTED |
| REDACTED | 5.8 | Mixed | Static Analysis (SAST): High: REDACTED |
| REDACTED | 5.8 | Mixed | Static Analysis (SAST): High: REDACTED |
| python/src/magika/magika.py | 6.5 | Mixed | Explicit Debt: FixmeComment |
| python/scripts/sync.py | 6.7 | Mixed | Explicit Debt: FixmeComment |
| rust/pyo3/src/lib.rs | 6.9 | Mixed | Explicit Debt: FixmeComment |
| rust/tract-runtime/src/direct_conv.rs | 7.0 | Mixed | Cyclomatic Complexity: FusionPattern::find (cyclomatic 33) |
| rust/cli/src/main.rs | 7.0 | Mixed | Cyclomatic Complexity: Response::format (cyclomatic 21) |
| rust/tract-runtime/src/layer_norm.rs | 7.2 | Mixed | Cyclomatic Complexity: FusionPattern::match_squeezed_statistics (cyclomatic 18) |
| REDACTED | 7.2 | Mixed | Static Analysis (SAST): High: REDACTED |
| REDACTED | 7.2 | Mixed | Static Analysis (SAST): High: REDACTED |
| REDACTED | 7.2 | Mixed | Static Analysis (SAST): High: REDACTED |
| REDACTED | 7.2 | Mixed | Static Analysis (SAST): High: REDACTED |
| REDACTED | 7.2 | Mixed | Static Analysis (SAST): High: REDACTED |
| REDACTED | 7.2 | Mixed | Dependency Vulnerabilities: High vulnerability: REDACTED |
How the grades work
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.
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.
Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.
Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.
Methodology & how to trust this report
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 73 of 77 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 4 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 1.0 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
What we checked — 77 dimensions across the health lenses
- 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, 188 of 210 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line.
- Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
- Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
Tools & methods
| Method | Backs | Version | Evaluator |
|---|---|---|---|
| Roslyn static analysis | Complexity, cohesion, coupling, dead code, API surface, layering | 5.3.0 | ✓ deterministic |
| Native secret scanner | Hardcoded secrets / credentials | 1.0.0 | ✓ deterministic |
| Watchdog duplication detector (in-process) | Code duplication | 1.0.0 | ✓ deterministic |
| Coverage (coverlet / dotnet-coverage) | Line & branch coverage | 10.0.400 | ✓ deterministic |
| NuGet / dotnet | Outdated, vulnerable & deprecated dependencies | 10.0.400 | ✓ deterministic |
| git / LibGit2Sharp | Churn hotspots, knowledge concentration, history | 2.43.0 · 0.31.0 | ✓ deterministic |
| gitleaks · semgrep · trivy · checkov | Secrets in history, SAST, CVEs, IaC & container, PII / GDPR | 1.86.0 · 0.69.3 · 3.2.533 | ✓ deterministic |
| LLM (sampled · advisory) | Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement | Local LLM | ◐ LLM · sampled · advisory |
Run transparency — what happened this run
- D6 Cohesion (LCOM4) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
- D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 13 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 19 test source file(s) (.go, .py, .rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
- D12 Dependency Hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Dependency Hygiene ran out of its 5-minute budget before it had finished, so what it reports here is a floor rather than a complete count. The rows above are real and stand; what is not known is how many more there are. This is a limit of the analysis run, not a finding about this repository.
- D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
- D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Go module (REDACTED/go.sum), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Go dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
- D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares package.json, but the licence verdict published here was taken over its crate dependencies. Nothing was read about its npm dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
- D44 Platform End-of-Life — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (REDACTED, a Gemfile's ruby directive, a REDACTED) is simply not read here yet.
- C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
- C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
- C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
- C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
- C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
- P10 Library API & versioning — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads NuGet packaging and C# public API only, and no .NET project was loaded for this repository, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
- PF1 Benchmark discipline — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- PF2 Allocation hygiene — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- PF3 Async & latency hygiene — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Those languages colour their functions async, so blocking inside them is the same defect this card counts elsewhere, but their blocking vocabulary is not modelled yet. That is a gap in this analyzer's language reach — not a finding that the code is free of it.
- S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
- X10 Duplicated predicate — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X24 Document value interpolated into markup unescaped — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This 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.
- X27 Collection changed while being enumerated — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This 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.
- X5 Nullable reference types — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This 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 the project graph and a reference-free parse supplies 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.
- X6 Hand-rolled structured-format parsing — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X7 Silent fallback defaults — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check is implemented over the C# syntax tree, and no C# was loaded on this run, so it had nothing to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
- 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.
- D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
- D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
- D11 Test Reliability: Flakiness is inferred from history/markers — Watchdog runs the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
- 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 is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement. Its critique rows are drawn from a closed category vocabulary and each row means the same thing in every run, so two scans can be compared row by row; the SET that fires is still a sample, and does not repeat exactly. Measured on one frozen input, six scans at one engine SHA: 2-5 critique rows per scan, 8 distinct rows across the six, 3 of those 8 seen in only one scan. So a D19 row is evidence about the documentation, but a COUNT of D19 rows is not a quantity — never read a change in it as an improvement or a regression.
- D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
- D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
- D22 Internal API Consistency: API-surface coherence is an LLM judgement over a sample of the public surface — consistency of intent across the whole API is approximated, not exhaustively verified.
- D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
- D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
- D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
- D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
- D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
- D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
- D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
- AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
- AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
- AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
- AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
- AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
- AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
- AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
- M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
- P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
- P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
Dimensions
D1 · Cyclomatic Complexity
9 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was FusionPattern::find at 33. A further 1 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being Op::build at 23 — they are counted neither in the figure above nor in this dimension's score. 1 file carries no cyclomatic complexity row at all for this reason — every one of its over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: rust/tract-runtime/src/loader.rs (Op::build at 23). 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.
What to do
- Resolve the 2 FusionPattern finding(s) in Cyclomatic Complexity — start with direct_conv.rs, layer_norm.rs. — One of this dimension's main actionable groups (2 warning-level).
- Resolve the 1 pre_release_check.main (cyclomatic 26) finding(s) in Cyclomatic Complexity — start with pre_release_check.py. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 Lowering finding(s) in Cyclomatic Complexity — start with lower.rs. — One of this dimension's main actionable groups (1 warning-level).
- Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D2 · Cognitive Complexity
17 method(s) exceeded the cognitive complexity threshold of 15; the worst was FusionPattern::find at 62.
What to do
- Resolve the 3 magika_cli finding(s) in Cognitive Complexity — start with main.rs (3). — One of this dimension's main actionable groups (3 warning-level).
- Resolve the 2 FusionPattern finding(s) in Cognitive Complexity — start with direct_conv.rs, layer_norm.rs. — One of this dimension's main actionable groups (2 warning-level).
- Resolve the 1 magika_tract_bench finding(s) in Cognitive Complexity — start with convert_model.rs. — One of this dimension's main actionable groups (1 warning-level).
- Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D3 · God Classes
5 over-large unit(s) detected — types, modules or files that carry too much.
What to do
- Resolve the 2 FileTooLong finding(s) in God Classes — start with direct_conv.rs, main.rs. — One of this dimension's main actionable groups (2 warning-level).
- Resolve the 2 MethodTooLong finding(s) in God Classes — start with direct_conv.rs (2). — One of this dimension's main actionable groups (2 warning-level).
- Resolve the 1 FunctionTooLong finding(s) in God Classes — start with main.rs. — One of this dimension's main actionable groups (1 warning-level).
- Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D4 · Code Duplication
9 duplicated block group(s) detected.
What to do
- Resolve the 2 Duplicated block (8 lines × 2) finding(s) in Code Duplication — start with layer_norm.rs, lib.rs. — One of this dimension's main actionable groups (2 warning-level).
- Resolve the 2 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with direct_conv.rs (2). — One of this dimension's main actionable groups (2 warning-level).
- Resolve the 1 Duplicated block (15–16 lines × 2) finding(s) in Code Duplication — start with layer_norm.rs. — One of this dimension's main actionable groups (1 warning-level).
- Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
D5 · Coupling
11 production modules (Gradle+Cargo+npm+Go+Python), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; edges a convention plugin adds from buildSrc or build-logic are not visible there; 2 module(s) off the main sequence, with abstractness counted on 9 of the 11 (the rest declare no modelled class or interface, export only macros, or are not Gradle/Maven modules or Cargo crates).
What to do
- Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
- Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D9 · Test Distribution
140 test methods: 110 unit, 30 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 13 `it`/`test` case(s) across 5 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 79 `#[test]` function(s) across 23 file(s) declaring at least one; its unit/integration split is Cargo's own — 8 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 41 test function(s) across 1 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only. The Go suite contributes 7 test case(s) across 4 `_test.go` file(s) declaring at least one — every `func Test…(t *testing.T)` that `go test` would collect, plus the suite methods a testify-style runner reaches; a table-driven case list counts once, so this is a floor. Its tier split is INFERRED from file names, paths and build constraints, not declared: 1 of those file(s) use Go's external test package (`package x_test`), which is a visibility boundary rather than a pyramid tier and was not read as one.
D10 · Test Quality
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 13 tests. Measured on the JavaScript/TypeScript suite only — at least 19 test source file(s) (.go, .py, .rs) went unread, so its test quality is unmeasured and is not in these counts.
D11 · Test Reliability
0 flaky across 3 measured tier(s). JavaScript/TypeScript (jest via `yarn install --frozen-lockfile --ignore-scripts` in js/ (4 tests)): measured (0 flaky); Rust (rust/lib, 23 test files): measured (0 flaky); Python (python, 2 test files): measured (0 flaky).
D13 · Secret Scanning
Secret scan ran and found no leaked secrets.
D14 · License Compliance
0 of 185 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. This repository publishes itself under Apache-2.0, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), a Go module (REDACTED/go.sum) and package.json, and the licences of those dependency graphs were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.
D15 · Churn × Complexity Hotspots
Top hotspots: rust/cli/src/main.rs (5×16=80)
What to do
- Resolve the 1 Hotspot finding(s) in Churn × Complexity Hotspots — start with main.rs. — One of this dimension's main actionable groups (1 warning-level).
D16 · Bus Factor
6 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is python/src/magika/magika.py. Counted over 38 of the 105 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
What to do
- Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
D17 · Explicit Debt
10 deducted task-comment markers across 12775 LoC (0.1/KLoC) → score 9.9. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
What to do
- Resolve the 9 FixmeComment finding(s) in Explicit Debt — start with magika.py (5), lib.rs (3), sync.py. — One of this dimension's main actionable groups (9 warning-level).
- Resolve the 1 TodoComment finding(s) in Explicit Debt — start with test_magika_python_module.py. — One of this dimension's main actionable groups (1 warning-level).
- Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D19 · Documentation Quality
The repository's root README and the go/README.md describe Magika as an AI-powered file type detection tool with a custom optimized model that achieves ~99% accuracy on a ~100M dataset. The architecture/Docs directory (27 markdown files) provides detailed documentation for each tier: the go/README.md covers installation, usage of the Go library and its C API, the js/README.md explains how to install MagikaJS in Node and the browser, the python/README.md describes the Python package with an overview, CLI examples, and a rust/cli README covering installation from crates.io and git. The root README also links to the architecture docs (e.g., magika-rules) for bounded format rules. The project is well documented with a strong README for each release directory (e.g. tract-bench/README.md, tract-runtime/README.md) describing what the crate does and how to use its tools, plus architecture/design docs for model content types. The repository is well documented with a README for each directory (26 test/README files plus 27 architecture/docs markdowns), covering Magika as an AI-powered file-type detection tool and its command-line interface. The Magika README provides clear installation and usage examples (pip install, magika examples/*, --help) and a detailed output-table mapping every index to content-type label, while the standard_v3_3 README lists all outputs by index with labels for each entry in a table. Both are complete and well-structured.
What to do
- Improve Documentation Quality — currently 8.5/10. — The repository's root README and the go/README.md describe Magika as an AI-powered file type detection tool with a custom optimized model that achieves ~99% accuracy on a ~100M dataset. The architecture/Docs directory (27 markdown files) provides detailed documentation for each tier: the go/README.md covers installation, usage of the Go library and its C API, the js/README.md explains how to install MagikaJS in Node and the browser, the python/README.md describes the Python package with an overview, CLI examples, and a rust/cli README covering installation from crates.io and git. The root README also links to the architecture docs (e.g., magika-rules) for bounded format rules. The project is well documented with a strong README for each release directory (e.g. tract-bench/README.md, tract-runtime/README.md) describing what the crate does and how to use its tools, plus architecture/design docs for model content types. The repository is well documented with a README for each directory (26 test/README files plus 27 architecture/docs markdowns), covering Magika as an AI-powered file-type detection tool and its command-line interface. The Magika README provides clear installation and usage examples (pip install, magika examples/*, --help) and a detailed output-table mapping every index to content-type label, while the standard_v3_3 README lists all outputs by index with labels for each entry in a table. Both are complete and well-structured.
D20 · ADR Quality
No architecture decision records were found.
What to do
- Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).
D21 · Naming Consistency
0 naming inconsistencies across 0 sampled symbols.
D22 · Internal API Consistency
2 API inconsistencies across 27 exposed types.
What to do
- Resolve the 1 InferredType exposes both a public property `content_type` of type… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 InferredType has a property `inferred_type` returning ContentType and a… finding(s) in Internal API Consistency. — One of this dimension's main actionable groups (1 warning-level).
D28 · Secrets (history)
gitleaks scanned the full history AND the current working tree and found no secrets.
D29 · Static Analysis (SAST)
36 finding(s): 0 critical, 33 high, 3 medium, 0 low. 17 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. Separately, one or more rules could not re-parse an embedded snippet in 7 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.
What to do
- Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (9 issue-level).
- Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (3 issue-level).
- No action in Static Analysis (SAST) — all 17 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (17 issue-level, 0 of them charged here).
D30 · Dependency Vulnerabilities
39 finding(s): 3 critical, 23 high, 11 medium, 2 low.
What to do
- Resolve the 21 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (14), REDACTED (5), REDACTED (2). — One of this dimension's main actionable groups (21 issue-level).
- Resolve the 2 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
- Resolve the 2 High vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
D31 · IaC & Container Security
6 finding(s): 0 critical, 3 high, 3 medium, 0 low.
What to do
- Resolve the 3 High IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
- Resolve the 3 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
D34 · Knowledge Freshness
2 of 38 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is go/magika/features.go. Counted over 38 of the 105 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
D35 · Change Coupling
No strong hidden change-coupling between production files.
D36 · Supply-chain Provenance & Signing
2/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).
What to do
- Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
- Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
- 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).
D43 · Malicious Dependencies
No dependency in any ecosystem this repository declares is published as malicious.
Frontend & cross-cutting dimensions
AC2 · Forms & labels
- This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label for>, a wrapping <label>, or aria-label. — website-ng/src/components/MagikaDemo.svelte:178
- This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×3) — website-ng/src/lib/components/ui/input/input.svelte:23, website-ng/src/lib/components/ui/input/input.svelte:38, website-ng/src/lib/components/ui/textarea/textarea.svelte:14
What to do
- Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure
AC5 · ARIA correctness
AC6 · Visual & motion safety
AC7 · A11y enforcement
- No accessibility enforcement found — no a11y linter (eslint-plugin-svelte (a11y rules are built in)) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time. What was searched, so you can tell an absence from a miss: the 20 markup file(s) this pass actually assessed, the linter configuration checked in beside them, and this repository's test and CI files — matched by name against the accessibility checkers this dimension carries. An audit run outside the repository, a hosted scanner, or a check whose name is not one of those, is not seen here.
What to do
- Enforce accessibility in the toolchain: add eslint-plugin-svelte (a11y rules are built in), then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
AX10 · Code composition
What to do
- The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles
AX4 · Dependency direction
AX9 · CQS / query purity
GD1 · Unfinished & placeholder code
IC1 · Incompleteness & stubs
M1 · Documentation (README)
What to do
- Add a 'Testing' section to the root README — how to run the test suite.
- Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
- Add a README to the 6 of 18 project(s) that lack one — worth up to 0.7 pts.
M2 · Architecture documentation
- 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.
- No C4/Structurizr/PlantUML/Mermaid/Graphviz/D2 diagram, no drawn diagram named for the architecture, no file named `architecture` or `design` in any markup this check reads, and nothing in the README, docs or contributor guides that announces the shape — no `## Architecture` heading, no "architecture overview"/"high-level design" phrasing, no "the architecture is …" introduction, no guided code tour. A shape laid out in prose that never names itself as the architecture is not visible to this check, and neither is one kept outside the repository, so this row reports the absence of a re-findable shape document — not evidence that nobody wrote the shape down.
What to do
- Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree, with each file named `NNNN-title` in whatever markup those docs already use, is the most discoverable form).
- Add a C4 context/container diagram (Structurizr, PlantUML or Mermaid) or an architecture.md overview.
M3 · Folder & project structure
M4 · Documentation accuracy
P1 · CI/CD gates
P2 · Observability
- Only 1/6 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `go`, `js`, `rust/cli`, `rust/gen`, `rust/tract-bench`.
What to do
- Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling
What to do
- Dependabot is configured but does not watch `gomod`, `gradle` — add those `package-ecosystem` entries to REDACTED 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 & Rollback
P6 · Release Hygiene
PF3 · Async & latency hygiene
R1 · Type Safety
What to do
- Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication
- js/magika-cli.ts:88 · js/magika-cli.ts:109 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — js/magika-cli.ts:88
- website-ng/src/components/MagikaDemo.svelte:83 · website-ng/src/components/MagikaDemo.svelte:130 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — website-ng/src/components/MagikaDemo.svelte:83
- website-ng/src/lib/utils.ts:4 · website-ng/src/lib/utils/utils.ts:8 — the 2 copies are spread across 2 files, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — website-ng/src/lib/utils.ts:4
What to do
- Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R2 · Cyclomatic Complexity
- setConfig has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — js/src/model-config.ts:43
R3 · Large Files
R4 · Test Coverage
- js/test/inference-vs-reference.test.ts:21 imports '../src/content-type-label', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — js/test/inference-vs-reference.test.ts
- js/test/magika.test.ts:37 imports '../src/content-type-label', which names no file in this repository — and no rule in its .gitignore chain could cover one, so no build writes it either. The import throws as the runner collects this file, so none of its test cases run and nothing it was written to verify is verified. Restore the missing module or delete the test. It is excluded from the reachability measured above, because a file that cannot load reaches nothing. — js/test/magika.test.ts
- No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×36) — website-ng/src/components/MagikaDemo.svelte, js/magika-cli.ts, website-ng/src/lib/components/ui/file-drop-zone/file-drop-zone.svelte, …
What to do
- Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness
What to do
- Bump outdated dependencies to current versions to limit upgrade debt.
R6 · Tooling
- This repository declares test tooling, and the ✓ above records that declaration — but js/test/inference-vs-reference.test.ts and 1 other test file(s) in this workspace cannot be loaded at all: it imports a module that names no file in this repository, so the runner throws while collecting it and none of its cases execute. The wiring is present and the suite it points at does not run as written, which is why the tooling tick must not be read as a statement that the tests pass. Fix the unloadable file(s) — each one is reported with its failing import under Test Coverage — then the declared script exercises what it claims to. — js/test/inference-vs-reference.test.ts
R7 · Dead Code
- 1 file(s) (~16 LoC) were excluded from dead-code analysis — declare main/module/exports or a conventional entry (src/index.*, an index.html script) so reachability can see this package.
- Unreachable from the 11 application, 6 tooling and 8 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
- no import path from any entry point (11 application, 6 tooling, 8 test roots considered), but 1 in-repo import(s) from 1 other file(s) do name it (website-ng/src/lib/components/ui/input/index.ts) — every one of those referrers is itself unreachable, so this file is dead only as a member of that cluster: if any referrer is in fact alive, this row falls with it — website-ng/src/lib/components/ui/input/input.svelte
- no import path from any entry point (11 application, 6 tooling, 8 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make (×2) — website-ng/src/lib/components/ui/input/index.ts, website-ng/src/lib/components/ui/textarea/index.ts
- Nothing imports this binding — it is safe to review for removal. (×4) — website-ng/src/lib/components/ui/file-drop-zone/index.ts:19, website-ng/src/lib/components/ui/file-drop-zone/index.ts:25, website-ng/src/lib/components/ui/file-drop-zone/index.ts:26, …
What to do
- Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene
- Declared in website-ng/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)
What to do
- Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports
- website-ng/src/lib/components/ui/file-drop-zone/file-drop-zone.svelte → website-ng/src/lib/components/ui/file-drop-zone/index.ts → website-ng/src/lib/components/ui/file-drop-zone/file-drop-zone.svelte — website-ng/src/lib/components/ui/file-drop-zone/file-drop-zone.svelte
What to do
- Break each cycle by extracting the shared piece into a module both sides can import.
X1 · Async correctness
X12 · Unreachable branch
X13 · Undrained process stream
X14 · Bypassable address classification
X15 · Unvalidated length from an untrusted reader
X16 · Unfloored truncation loop
X17 · Uncapped recursion over a caller-supplied document
X18 · Disposal-pattern correctness
X19 · Unrestored process-global state
X20 · Mistyped argument guard
X21 · Side-effecting pattern guard
X22 · Contradicted release guard
X23 · Unguarded diagnostic materialisation
X25 · Inert configuration knob
X26 · Unsynchronised callback handoff
X28 · Index access outside its own emptiness guard
X29 · Per-element action decided by a fixed element
X3 · Exception handling
X30 · Support guard that admits what it rejects
X32 · Type resolved by simple name across every loaded assembly
X4 · Structured logging
WCAG coverage — what static analysis assessed
| Dimension | WCAG 2.2 A/AA criteria | Coverage |
|---|---|---|
| AC2 · Forms & labels | 1.3.1, 3.3.2, 4.1.2 | Partial signal |
| AC3 · Page structure | 1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2 | Partial signal |
| AC5 · ARIA correctness | 4.1.2 | Partial signal |
| AC6 · Visual & motion safety | 1.4.3, 2.4.7 | Partial — literal CSS only |
| AC7 · A11y enforcement | enforcement — no page criterion | Enforcement posture (process) |
Reference — by lens
| Lens | Score | Rating | Impact |
|---|---|---|---|
| Code Health | 93% | Exemplary | Solid. |
| Architecture | 92% | Exemplary | Solid. |
| Maturity | 61% | Adequate — gated by M2 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Readiness | 61% | Adequate — gated by R4 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Security | 57% | Adequate — gated by D29, D30 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Accessibility | 64% | Adequate — gated by AC2 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Performance | 100% | Exemplary | Strongest area. |
Unscored — 1 check(s) recorded observations but carry no score
- 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.
Not evidenced — 4 control(s) we could not find positive evidence for
- C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
- C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
- C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
- P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 52 check(s) not relevant to this codebase
- AC1 Text alternatives — No image/media element found in the parsed markup — AC1 not applicable here.
- AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
- 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 — no public interfaces
- AX7 Slice cohesion — not applicable — not a vertical-slice architecture
- AX8 Test isolation — no test/production split to check
- AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- AXR1 Runtime accessibility — docker build failed (exit 1) — DEPRECATED: The legacy builder is deprecated and will be removed in a future release. Install the buildx component to build images with BuildKit: https://docs.docker.com/go/bui…; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
- C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
- C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
- D12 Dependency Hygiene — Dependency Hygiene incomplete (time budget)
- D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
- D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout nor 2+ sibling source directories each declaring an aggregate root. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
- D24 Comment Value — No inline comments to assess — comment value is not applicable here.
- D25 ADR Conformance — no ADRs to check
- D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
- D27 Navigability — symbol resolution incomplete — too few calls resolved to assess navigability
- 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.
- D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
- D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
- 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.
- D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
- D6 Cohesion (LCOM4) — D6 reads a CS/VB/GO/SCALA/SWIFT/DART/JAVA/PY/KT/TS/TSX/MTS/CTS/JS/JSX/MJS/CJS/PHP class graph only — this repository's production source is .c, .clj, .erl, .exs, .f90, .groovy, .lua, .rb, .rs, .zig, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
- D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
- D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the jest suite in js/ ran and not one test passed (FAIL test/magika.test.ts), so the coverage would describe the failed run, not the code. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
- DM1 Domain Modelling — applicable but not scored (1 of 2 signals for this style — below the bar we score at): 10 value object(s)
- ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, which this analysis does not build from source alone for this language. Reported as guidance rather than measured
- 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
- P10 Library API & versioning — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the Go, JavaScript/TypeScript, Python, Rust source, so there is no service whose uptime a failing dependency could take down
- P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
- P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
- PF1 Benchmark discipline — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- PF2 Allocation hygiene — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
- S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
- SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- X10 Duplicated predicate — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- X2 Cancellation propagation — no async methods found
- X24 Document value interpolated into markup unescaped — 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.
- 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.
- X31 Test-only surface in a production module — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- X5 Nullable reference types — 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.
- X6 Hand-rolled structured-format parsing — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- X7 Silent fallback defaults — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
Critical — 67 finding(s)
- 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
- 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
- REDACTED
- <textarea> without a programmatic label website-ng/src/components/MagikaDemo.svelte:178
- <textarea> without a programmatic label website-ng/src/lib/components/ui/textarea/textarea.svelte:14
- <input> without a programmatic label website-ng/src/lib/components/ui/input/input.svelte:23
- <input> without a programmatic label website-ng/src/lib/components/ui/input/input.svelte:38
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- Import cycle (2 files) website-ng/src/lib/components/ui/file-drop-zone/file-drop-zone.svelte
Serious — 128 finding(s)
- No test reaches this file website-ng/src/components/MagikaDemo.svelte
- No test reaches this file js/magika-cli.ts
- No test reaches this file website-ng/src/lib/components/ui/file-drop-zone/file-drop-zone.svelte
- No test reaches this file website-ng/src/lib/components/ui/button/button.svelte
- No test reaches this file website-ng/src/lib/components/ui/file-drop-zone/index.ts
- No test reaches this file website-ng/src/lib/components/ui/card/index.ts
- No test reaches this file website-ng/src/lib/components/ui/progress/progress.svelte
- No test reaches this file website-ng/src/lib/utils/utils.ts
- No test reaches this file js/src/prediction-mode.ts
- No test reaches this file website-ng/src/lib/components/ui/input/input.svelte
- No test reaches this file js/simple_examples/browser-esmodule-example/index.js
- No test reaches this file website-ng/src/lib/components/ui/tabs/index.ts
- No test reaches this file js/postBuild.js
- No test reaches this file website-ng/src/lib/utils.ts
- No test reaches this file js/simple_examples/node-commonjs-example/index.js
- No test reaches this file website-ng/src/lib/components/ui/textarea/textarea.svelte
- No test reaches this file website-ng/src/pages/install.ps1.ts
- No test reaches this file website-ng/src/pages/install.sh.ts
- No test reaches this file js/simple_examples/typescript-esmodule-example/index.ts
- No test reaches this file website-ng/src/lib/components/ui/card/card-action.svelte
- No test reaches this file website-ng/src/lib/components/ui/card/card-content.svelte
- No test reaches this file website-ng/src/lib/components/ui/card/card-description.svelte
- No test reaches this file website-ng/src/lib/components/ui/card/card-footer.svelte
- No test reaches this file website-ng/src/lib/components/ui/card/card-header.svelte
- No test reaches this file website-ng/src/lib/components/ui/card/card-title.svelte
- FixmeComment python/scripts/sync.py:107
- FixmeComment python/src/magika/magika.py:93
- FixmeComment python/src/magika/magika.py:108
- FixmeComment python/src/magika/magika.py:158
- FixmeComment python/src/magika/magika.py:129
- FixmeComment python/src/magika/magika.py:288
- FixmeComment rust/pyo3/src/lib.rs:83
- FixmeComment rust/pyo3/src/lib.rs:132
- FixmeComment rust/pyo3/src/lib.rs:135
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- magika_cli::print (cognitive 19) rust/cli/src/main.rs:413
- magika_cli::process_path (cognitive 17) rust/cli/src/main.rs:595
- magika_cli::main (cognitive 16) rust/cli/src/main.rs:268
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- FusionPattern::find (cyclomatic 33) rust/tract-runtime/src/direct_conv.rs:126
- FusionPattern::match_squeezed_statistics (cyclomatic 18) rust/tract-runtime/src/layer_norm.rs:250
- FusionPattern::find (cognitive 62) rust/tract-runtime/src/direct_conv.rs:126
- FusionPattern::match_squeezed_statistics (cognitive 17) rust/tract-runtime/src/layer_norm.rs:250
- FileTooLong: src/direct_conv.rs rust/tract-runtime/src/direct_conv.rs
- FileTooLong: src/main.rs rust/cli/src/main.rs
- MethodTooLong: DirectFusedConvMax1D.new rust/tract-runtime/src/direct_conv.rs:279
- MethodTooLong: DirectFusedConvMax1D.eval rust/tract-runtime/src/direct_conv.rs:456
- Duplicated block (8 lines × 2) rust/tract-runtime/src/layer_norm.rs:132
- Duplicated block (8 lines × 2) rust/tract-runtime/src/lib.rs:252
- Duplicated block (6 lines × 2) rust/tract-runtime/src/direct_conv.rs:198
- Duplicated block (6 lines × 2) rust/tract-runtime/src/direct_conv.rs:1003
- Off the main sequence: magika
- Off the main sequence: magika-tract-runtime
- This test file cannot be loaded js/test/inference-vs-reference.test.ts
- This test file cannot be loaded js/test/magika.test.ts
- Dead file (~7 LoC) website-ng/src/lib/components/ui/input/index.ts
- Dead file (~7 LoC) website-ng/src/lib/components/ui/textarea/index.ts
- Accessibility enforcement below the top rung
- pre_release_check.main (cyclomatic 26) python/scripts/pre_release_check.py:59
- Lowering::condition (cyclomatic 25) rust/rules/src/lower.rs:106
- Response::format (cyclomatic 21) rust/cli/src/main.rs:732
- Metadata::read (cyclomatic 21) rust/rules/src/source.rs:162
- magika_tract_bench::bin::convert_model::find_one_hot_embedding (cyclomatic 21) rust/tract-bench/src/bin/convert_model.rs:281
- FoldPattern::find (cyclomatic 21) rust/tract-runtime/src/embedding.rs:62
- magika_cli::main (cyclomatic 16) rust/cli/src/main.rs:268
- Hotspot: rust/cli/src/main.rs rust/cli/src/main.rs:268
- TodoComment python/tests/test_magika_python_module.py:566
- magika_tract_bench::bin::convert_model::find_one_hot_embedding (cognitive 40) rust/tract-bench/src/bin/convert_model.rs:281
- check_documentation.extract_uris_infos_from_file (cognitive 38) python/scripts/check_documentation.py:225
- FoldPattern::find (cognitive 36) rust/tract-runtime/src/embedding.rs:62
- magika_tract_runtime::direct_conv::reduce_x86_64_gelu_max (cognitive 36) rust/tract-runtime/src/direct_conv.rs:595
- Metadata::read (cognitive 32) rust/rules/src/source.rs:162
- pre_release_check.main (cognitive 31) python/scripts/pre_release_check.py:59
- Lowering::condition (cognitive 27) rust/rules/src/lower.rs:106
- check_documentation.check_markdown_links (cognitive 24) python/scripts/check_documentation.py:168
- DirectFusedConvMax1D::new (cognitive 21) rust/tract-runtime/src/direct_conv.rs:279
- ConvPattern::find (cognitive 21) rust/tract-runtime/src/gpu_conv.rs:56
- pre_release_check.get_rust_cli_version (cognitive 19) python/scripts/pre_release_check.py:160
- Response::format (cognitive 16) rust/cli/src/main.rs:732
- InferredType exposes both a public property `content_type` of type String and a method `content_type()` returning ContentType. This is a direct signature conflict where the same name refers to two different types and access patterns (field vs method).
- InferredType has a property `inferred_type` returning ContentType and a method `content_type()` also returning ContentType. These appear to provide the same semantic information (the inferred content type) under different names, causing confusion about which to use.
- FunctionTooLong: magika_cli::main rust/cli/src/main.rs:268
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- Duplicated block (15–16 lines × 2) rust/tract-runtime/src/layer_norm.rs:200
- Duplicated block (11–12 lines × 2) rust/tract-runtime/src/direct_conv.rs:174
- Duplicated block (9 lines × 2) rust/tract-bench/src/bin/verify_model.rs:137
- Duplicated block (5 lines × 3) rust/tract-runtime/src/direct_conv.rs:998
- Duplicated block (11 lines × 2) python/scripts/sync.py:168
- Coverage not measured — JavaScript/TypeScript suite
- Coverage collected but not gated
- Duplicated block (21 lines × 2 locations) js/magika-cli.ts:88
- Duplicated block (6 lines × 2 locations) website-ng/src/components/MagikaDemo.svelte:83
- Duplicated block (5 lines × 2 locations) website-ng/src/lib/utils.ts:4
- Complex function setConfig (cyclomatic 12, cognitive 11) js/src/model-config.ts:43
- The declared test suite includes a file that cannot be loaded js/test/inference-vs-reference.test.ts
- Dead file (~19 LoC) website-ng/src/lib/components/ui/input/input.svelte
- Unused dependency 'class-variance-authority'
- Unused dependency 'highlight.js'
- Unused dependency 'sharp'
Minor — 15 finding(s)
- REDACTED
- REDACTED
- Off-boarding risk: anonymized user #1
- No ADRs found
- Orphaned files with no living knowledge
- REDACTED
- REDACTED
- REDACTED
- No ADRs
- No architecture diagram/doc
- Logging is not universal
- Unused export 'BYTE' website-ng/src/lib/components/ui/file-drop-zone/index.ts:19
- Unused export 'ACCEPT_IMAGE' website-ng/src/lib/components/ui/file-drop-zone/index.ts:25
- Unused export 'ACCEPT_VIDEO' website-ng/src/lib/components/ui/file-drop-zone/index.ts:26
- Unused export 'ACCEPT_AUDIO' website-ng/src/lib/components/ui/file-drop-zone/index.ts:27
Appendix B — Reproduction & audit trail
| Dimension | Tool | Version | Command | Findings | Raw output |
|---|---|---|---|---|---|
| D28 · Secrets (history) | gitleaks | — | gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-e2d8a2149a664265b9f9cc6a59334950/history.json --exit-code 0 --source . | 2 | artifacts/raw/gitleaks-history.json |
| D28 · Secrets (history) | gitleaks | — | gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-e2d8a2149a664265b9f9cc6a59334950/tree.json --exit-code 0 --source . | 1 | artifacts/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/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off . | 36 | artifacts/raw/semgrep.json |
| D30 · Dependency Vulnerabilities | trivy | — | trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update | 39 | artifacts/raw/trivy-fs.json |
| D31 · IaC & Container Security | trivy | — | trivy config --format json --quiet . | 6 | artifacts/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 | — |
| D37 · Vulnerability-disclosure Policy | disclosure | — | disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed. | 0 | — |
| D40 · Network Egress Confinement | runtime-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 Confinement | runtime-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 Enforcement | runtime-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 Dependencies | trivy | — | trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update | 0 | artifacts/raw/trivy-fs.json |