Public report — ArchiSteamFarm, published 5 Aug 2026.
Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version;
ask the repo owner for the full report.
246findings with an exact file:lineof 258 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
59/97dimensions across the health lenses35995 LoC · 9 projects — wide & deep
Executive summary
Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.
JustArchiNET/ArchiSteamFarm is in a workable but fragile state (64%). It is not in crisis, but it carries material risk that makes change slower and incidents harder to contain if left unaddressed.
It is strongest in Architecture (95%) — the structure is clean and changes stay contained. Readiness (78%) is solid too.
The area that most needs attention is Maturity (54%) — onboarding is slow — key decisions and the architecture aren't written down, so contributors have to reverse-engineer the intent. Code Health (69%) is the next concern — changes there are slower and more error-prone.
Leadership focus, highest impact first: build/run (quick start) section to the root README (Documentation (README)); Record significant decisions one document per decision (Architecture documentation); 1 No ADRs found finding(s) in ADR Quality (ADR Quality).
For scale: Medium (~35,995 production lines); rebuilding it from scratch would take roughly ~1.7 person-years (~1–4 engineers). Approximate, ±~30%.
It builds on a genuinely strong Architecture foundation (95%); the priorities above are the highest-leverage way to bring the rest up to that level.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
This codebase represents roughly ~1.7 person-years of build effort (about ~€250,000 to rebuild). Its weakest lens is Maturity at 54% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.2) — service/app, high decision density × a 0.9× quality factor, at €60–95/h; indicative, ±~30%. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 1 No ADRs found finding(s) in ADR Quality.
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 1.1–6.9 engineer-days every year, paid as drag on the ~8,363 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 2–31 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 5–12% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 2,062 line(s) changed over a 90-day window ⇒ ~8,363/year · D1/D2/D4/D6 code quality: averaging 5.8/10 ⇒ a 5–12% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 31 months.
Value concentrated against a weak lens · Medium · Value at risk
This is a Medium asset (~1.7 person-years to rebuild), and its weakest lens is Maturity at 54%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Maturity first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Add a build/run (quick start) section to the root README — the first thing a newcomer needs. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 5.8/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 5–12% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4/D6 code quality: averaging 5.8/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
Architecture — module dependency graph
Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways — a layering smell or cycle. A clean layered graph has none.
Architecture — module dependency matrix
50 modules, 120 dependencies — 1 dependency cycle, shown as the red cell(s) above the diagonal. Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
At a glance — Code Health · 69% · Adequate · gated by D1, D2
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2021 — Injection
5
High / Critical
A05:2021 — Security Misconfiguration
4
High / Critical
A06:2021 — Vulnerable & Outdated Components
1
High / Critical
Roadmap
First, add a build and run quick-start section to the root README to immediately assist new contributors. Next, establish a structured approach to architecture documentation by creating dated decision records that capture context and consequences. Concurrently, address the lack of architectural records by resolving the missing ADRs and improving overall documentation quality, which is currently low. Finally, reorganize the repository by grouping production code under a src/ directory to separate it from tooling and test code.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
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. 56 of 59 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 3 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.7 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 59 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 246 of 258 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D24 Comment Value — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity (jscpd) — it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
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.
D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
D18 Solution Shape: Build integrity reflects whether the solution compiled in this environment — a build that needs a private feed, a specific SDK, or a generated file absent from the repo can read as broken when it is merely unreproducible here.
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.
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.
D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and the advisory database — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen.
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.
AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (4): D19, D20, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
76 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was Commands.Response at 123. 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 SteamUtilities.ToSteamClientLanguage at 30 — they are counted neither in the figure above nor in this dimension's score.
+ 69 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 ArchiWebHandler.UrlPostToJsonObjectWithSession (cyclomatic 31) finding(s) in Cyclomatic Complexity — start with ArchiWebHandler.cs (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 Commands.HandleMessage (cyclomatic 18) finding(s) in Cyclomatic Complexity — start with Commands.cs (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 Commands.Response (cyclomatic 123) finding(s) in Cyclomatic Complexity — start with Commands.cs. — 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.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 79 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 2 ArchiWebHandler.UrlPostToJsonObjectWithSession (cognitive 42) finding(s) in Cognitive Complexity — start with ArchiWebHandler.cs (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 Commands.HandleMessage (cognitive 29) finding(s) in Cognitive Complexity — start with Commands.cs (2). — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 RemoteCommunication.MatchActively (cognitive 370) finding(s) in Cognitive Complexity — start with RemoteCommunication.cs. — 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.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.3 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 10 FileTooLong finding(s) in God Classes — start with Bot.cs, Commands.cs, ArchiWebHandler.cs. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 10 TooManyMethods finding(s) in God Classes — start with Commands.cs, Bot.cs, ArchiWebHandler.cs. — One of this dimension's main actionable groups (10 warning-level).
Resolve the 3 ClassTooLong finding(s) in God Classes — start with RemoteCommunication.cs, CardsFarmer.cs, WebBrowser.cs. — One of this dimension's main actionable groups (3 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.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
+ 10 more group(s) — more in Appendix A; the complete list is findings.md.
✓ On the Gold path — maintain.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling9.1 / 10Exemplary✓ Tool-verified
What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.
Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.
Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.
What it measures: Whether a class's methods are focused on a single responsibility.
Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.
Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.
Resolve the 3 Low cohesion finding(s) in Cohesion (LCOM4) — start with BotDatabase.cs, ArchiHandler.cs, GlobalDatabase.cs. — One of this dimension's main actionable groups (3 warning-level).
Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.
Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.
76 test methods: 76 unit, 0 integration, 0 BDD, 0 e2e.
✓ On the Gold path — maintain.
Detailed fixes: d9_recommendation.md.
Do you agree with this assessment?
D10 · Test Quality9.4 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests truly assert behaviour rather than just running the code.
Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.
0 skipped, 3 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 76 tests.
No assertions: ConcurrentDictionarySupportsWritingDuringLinq · ×3ArchiSteamFarm.Tests/ConcurrentTests.cs:36
✓ On the Gold path — maintain.
Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D11 · Test Reliability10.0 / 10Exemplary✓ Tool-verified
What it measures: Whether the tests pass reliably, with no flakiness.
Method: Suite re-run N times within tiered wall-clock budgets (unit to e2e); tests failing non-deterministically across runs flagged; guarded tests retried when #if guards detected.
What it measures: Whether dependencies are current, secure, and not bloated.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Whether the licenses of third-party packages are compatible with your policy.
Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Resolve the 10 Hotspot finding(s) in Churn × Complexity Hotspots — start with RemoteCommunication.cs, Commands.cs, ArchiWebHandler.cs. — One of this dimension's main actionable groups (10 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor5.8 / 10Adequate✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
55 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is ArchiSteamFarm/Steam/Interaction/Commands.cs.
Off-boarding risk: anonymized user #1
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).
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D17 · Explicit Debt8.5 / 10Strong✓ Tool-verified
What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.
Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.
BareSuppressMessage repeated across 45 filesArchiSteamFarm.CustomPlugins.ExamplePlugin/MeowResponse.cs:31
What to do
Resolve the 4 NoWarnInCsproj finding(s) in Explicit Debt — start with Directory.Build.props (3), ArchiSteamFarm.csproj. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 4 TodoComment finding(s) in Explicit Debt — start with ASF.cs, ArchiKestrel.cs, Bot.cs. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 BareSuppressMessage repeated across 45 files finding(s) in Explicit Debt — start with MeowResponse.cs. — One of this dimension's main actionable groups (1 warning-level).
Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the solution is laid out in a sensible, conventional structure.
Method: Solution structure: project count, decomposition, shell-project detection, build success (confirmed failures cap the score); traced to actual .sln files and binaries. Deterministic.
What it measures: Whether the project's documentation is clear, complete, and useful.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.
The ArchiSteamFarm project has a strong README with branding, GitHub status badges, and links to an ASF WebConfigGenerator CI/CD site, but it is thin on content. The main document (ArchiSteamFarm) is clipped mid-sentence in the summary; only the zip_exec README gives any concrete usage (setting executable flags inside ZIP archives), while all other docs are localization notes directing readers to the wiki's Localization section for translation changes. There is no architecture or API reference, and the 8% XML-doc coverage indicates most of the project remains undocumented.
Improve Documentation Quality — currently 4.0/10. — The ArchiSteamFarm project has a strong README with branding, GitHub status badges, and links to an ASF WebConfigGenerator CI/CD site, but it is thin on content. The main document (ArchiSteamFarm) is clipped mid-sentence in the summary; only the zip_exec README gives any concrete usage (setting executable flags inside ZIP archives), while all other docs are localization notes directing readers to the wiki's Localization section for translation changes. There is no architecture or API reference, and the 8% XML-doc coverage indicates most of the project remains undocumented.
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
What it measures: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
90 % of calls cross a namespace and 1 % go through an interface, but 100 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: medium — clean/modular boundaries expected.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
High: run-shell-injection · ×3.github/workflows/docker-publish-latest.yml:45detected by semgrep finding
Medium: use_ecb_modeArchiSteamFarm/Helpers/ArchiCryptoHelper.cs:256detected by semgrep finding
Low: stacktrace-disclosureArchiSteamFarm/IPC/ArchiKestrel.cs:135detected by semgrep finding
What to do
Resolve the 3 High finding(s) in Static Analysis (SAST) — start with docker-publish-latest.yml, docker-publish-released.yml, docker-publish-stable.yml. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 Medium finding(s) in Static Analysis (SAST) — start with ArchiCryptoHelper.cs. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Low finding(s) in Static Analysis (SAST) — start with ArchiKestrel.cs. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any dependencies have known published vulnerabilities (CVEs), direct or transitive.
Method: NuGet CVE scan via dotnet list package --vulnerable including transitive; severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer. Exhaustive, deterministic; degrades when absent.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling; coupling through a build step, config, or non-source file isn't seen.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
A vulnerability-disclosure policy (.github/SECURITY.md) is published with a reporting contact.
✓ On the Gold path — maintain.
Detailed fixes: d37_recommendation.md.
Do you agree with this assessment?
D39 · IL Efficiency9.9 / 10Exemplary✓ Tool-verified
Method: IL instruction count per method, read from the BUILT first-party assemblies via Mono.Cecil (the target is compiled on a deep run); scored on the fraction of methods whose emitted IL body exceeds the size threshold. Sees compiler-generated bloat source can't; not-applicable when the target fails to build. Deterministic.
Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified.
Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.
Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.
What to do
The domain core is a small share of production code — check that business logic isn't leaking into the application/infrastructure layers (a thin domain is the anemic-domain smell).
Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).
Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.
Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.
Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.
Other · Architecture — Whether the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').
Method: Roslyn scan: public interface member counts; fat-interface threshold (over 15 members) flagged per type. Deterministic, type-level.
Do you agree with this assessment?
AX8 · Test isolation10.0 / 10Exemplary✓ Tool-verified
Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.
Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.
Do you agree with this assessment?
C1 · Data Protection6.5 / 10Adequate✓ Tool-verified
Other · Security — Whether sensitive data is encrypted at rest and in transit and keys are vaulted.
Method: Roslyn plus filesystem scan: encryption presence (EF ColumnEncryption, key-vault references, HTTPS enforcement) and key-derivation KDF detection. Deterministic.
No in-app HTTPS enforcement, but ForwardedHeaders / 127.0.0.1 binding indicates a reverse-proxy topology — adding UseHttpsRedirection in the app would be wrong in this layout. Verify the reverse proxy enforces TLS. — ArchiKestrel.cs:139
What to do
Strengthen data-at-rest protection: vault your keys (Azure Key Vault / AWS KMS / IDataProtector key ring) and encrypt the most sensitive columns (EF HasConversion encryption or provider-native column encryption) — partial coverage still leaves gaps.
Do you agree with this assessment?
C2 · Access Controls7.0 / 10Strong✓ Tool-verified
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
Authorization IS enforced here (by an auth-gate middleware that short-circuits unauthorized requests) — this is NOT a claim that the code is unprotected. What's missing is a NAMED rule set: the middleware encodes the access rules inline, so the rules can't be listed, reviewed or tested apart from the middleware body that applies them. Recommendation, not a defect.
What to do
Name the access rules — give each one a named predicate/policy object your middleware consults, so the rule set can be reviewed and unit-tested independently of the pipeline that enforces it.
Other · Code Health — Unreviewed-generation residue: shipped members still throwing NotImplementedException, and placeholder string literals left in non-test, non-generated code. Scored as a quality signature, never as a claim about authorship.
Method: Roslyn syntax scan: NotImplementedException throws and placeholder string literals in non-test, non-generated shipped code. Deterministic, code-shape signature.
Other · Code Health — Unfinished work detected by code SHAPE, not keywords: members that only throw a "not implemented" exception, methods that take inputs and return a constant, async methods that never await, dead `if (false)` / `#if false` branches, and skeleton types most of whose members are holes. A real, objective slice of technical debt.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
230 code files changed in the last 6 months but the README was not touched — it may no longer reflect the system.
What to do
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
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 9 of 9 project(s) that lack one — worth up to 2 pts.
Review the README against recent changes; refresh the parts that drifted.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no `NNNN-title.md` documents and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Production code isn't grouped under a src/ folder — it's spread across several top-level directories, so there's no one place that says 'this is the product'.
What to do
Group production code under src/ (or split deliberately, e.g. backend/ + frontend/) so production and tooling code aren't mixed at the root.
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Only 7/8 service-like projects use logging (pure contract/DTO projects are excluded — they have nothing to log). Of those 8, 1 ship a process this repository operates; the rest are libraries their consumer hosts, where the logging decision belongs to the host.
What to do
Extend structured logging across the projects you operate, and give the library ones a diagnostics seam instead — an `EventSource`/`ActivitySource` the host can subscribe to, or an optional logger on your options object — rather than taking a logging dependency on your consumers' behalf.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Do you agree with this assessment?
P6 · Release Hygiene8.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
A changelog exists but has few versioned entries — keep it current with each release.
What to do
Keep the changelog current — add a versioned entry (Keep-a-Changelog ## [x.y.z]) for each release so the history isn't a stub.
Readiness · Performance — Whether the library protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.
Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.
No benchmark suite was found. Where code is performance-sensitive, a benchmark guards against silent regressions — but it's a bonus here, not a deduction.
What to do
Add a benchmarking harness for the hot paths and run it in CI to catch regressions (for .NET, a BenchmarkDotNet project with [MemoryDiagnoser] to track allocations).
Readiness · Performance — Whether the code is written to minimise allocations so it doesn't pressure its host's memory manager — buffer/slice views over copies, object pooling, stack or value-type allocation, and buffer writers. Reward-only: credited where present, never penalised where a simpler style is fine.
Raise allocation-aware density on the hot paths — currently 27 use(s) across 33,828 production line(s) (~0.8/1k). More Span/Memory, pooling (ArrayPool/ObjectPool), stackalloc and ValueTask on the allocation-heavy paths climbs this toward 10.
Readiness · Performance — Whether asynchronous code keeps its host responsive — a library awaits with ConfigureAwait(false) (so it never captures and stalls the host's context) and avoids sync-over-async blocking (.Wait()/.GetAwaiter().GetResult()) that wastes threads and risks deadlock.
Method: Production-source scan: sync-over-async blocking (.Wait()/.GetAwaiter().GetResult()) counted everywhere, and — for a library with ≥5 awaits — the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.
Other · Security — Transport security, security headers, secure cookies, input validation, middleware order and crypto hygiene (presence, not runtime).
No Content-Security-Policy / X-Frame-Options / X-Content-Type-Options configuration found — defense in depth, even when a reverse proxy could set them. (−2.0 on this card.)
What to do
Add security response headers (Content-Security-Policy, X-Frame-Options, X-Content-Type-Options) — defense in depth, even when a reverse proxy could set them.
Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.
Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.
`async void` can't be awaited and its exceptions crash the process instead of propagating. Return `Task` — or, where the delegate contract requires void (timer/event/callback registrations), make this a thin void shim that awaits a Task-returning inner method inside try/catch so exceptions are contained. (×25) — RemoteCommunication.cs:946, RemoteCommunication.cs:1691, SteamTokenDumperPlugin.cs:281, …
Other · Code Health — Whether async methods accept a CancellationToken so work can be cancelled (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage.
Only 50/503 async methods accept a CancellationToken, so in-flight work can't be stopped early when the caller gives up — whatever ends it in your host (shutdown signal, timeout, abandoned request, user cancel). Thread a token through the call chain and honour it at each await and loop; where a method genuinely cannot be interrupted, omitting it is a deliberate choice — judge against your hosting model.
No CancellationToken parameter — the body observes an ambient token instead (a field or a context object), so the work does stop on cancellation, but a caller cannot cancel this call independently of the owner that created that token. — CatController.cs:43
No CancellationToken parameter — this work can't be stopped early once started. (×24) — SignInWithSteamController.cs:44, Backend.cs:46, Backend.cs:77, …
What to do
Thread a CancellationToken through async methods so work stops promptly on cancellation.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. Deterministic.
Logging an interpolated string (`$"..."`) collapses the event to plain text — you lose the named, queryable properties structured logging exists for. Use a message template with placeholders: `LogInformation("User {UserId} did {Action}", id, action)`. If these calls go through a logging wrapper that only accepts a pre-formatted string, give the wrapper a template+args overload that forwards to the underlying logger, then migrate call sites to it. (×23) — ExamplePlugin.cs:134, PeriodicGCPlugin.cs:53, PeriodicGCPlugin.cs:63, …
Other · Code Health — Whether nullable reference types are enabled and not undermined by heavy `!` suppression.
Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.
~0.3 `!` suppressions per 1k syntax nodes — 62 suppression(s) across the 202532 syntax node(s) in code where nullable warnings are ENABLED, which is the only code a `!` can suppress anything in (a `!` under `#nullable disable` is inert and is not counted, and its file's nodes are not in the denominator). Each one tells the compiler to trust you about null, suppressing the very safety NRTs provide.
What to do
Enable <Nullable>enable</Nullable> across all projects and resolve warnings rather than suppressing with `!`.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Not included — 38 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AC2 Forms & labels — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AC3 Page structure — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AC4 Keyboard semantics — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AC5 ARIA correctness — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AC6 Visual & motion safety — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AC7 A11y enforcement — Frontend below the scale floor (15 DOM element(s) < 25) — too little surface to assess accessibility.
AX1 Captive dependencies — no DI registrations detected
AX2 Stateful singletons — no singleton implementations detected
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C3 Audit Trail — Repo shows no audit-logging mechanism (IAuditable, an immutable audit log, an EF SaveChanges interceptor) for sensitive changes — absence of evidence is not evidence of a working control. Record an audit trail in code (or document where it lives) so this dimension can be scored.
C4 Data Retention — Repo shows no data-retention / TTL / cleanup mechanism for personal data — absence of evidence is not evidence of a working control. Define retention periods and a purge/cleanup job (or TTL) in code, or document where retention is enforced, so this dimension can be scored.
C5 Data-Subject Rights — Repo shows no corroborated data-subject-rights mechanism (erasure / export-portability / consent) tied to a subject id or GDPR vocabulary — absence of evidence is not evidence of a working control. Implement erasure, data export/portability and consent tracking over the subject's records.
D22 Internal API Consistency — No exposed public API
D23 Boundary Type-Coupling — Bounded contexts not declared
D24 Comment Value — LLM evaluation failed
D25 ADR Conformance — no ADRs to check
D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
D33 JS/npm Dependency Vulnerabilities — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
D38 OSV Dependency Vulnerabilities — No supported non-.NET dependency lockfile found outside build output (npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven pom.xml, Gradle lockfiles, Python requirements.txt/poetry.lock/Pipfile.lock/pdm.lock, PHP composer.lock, Ruby Gemfile.lock, Elixir mix.lock, Dart pubspec.lock, Swift Package.resolved); nothing for OSV to scan. A NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D7 Architectural Integrity — no checkable ADRs and no dependency cycles — architectural integrity not assessed
D8 Code Coverage — Coverage not measured — no coverage collector is wired up
DM1 Domain Modelling — not scored — this repository shows none of the 3 signals this check looks for
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this check looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this check looks for
P12 CI test-gate honesty — 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.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
P8 Schema migrations — no EF Core usage detected
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (Cobertura — `dotnet test --collect:"XPlat Code Coverage"` with a `coverlet.collector` PackageReference) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X6 Hand-rolled structured-format parsing — Reported, not scored — this card publishes what it found rather than grading it. Its content is the findings and the key metric above.
X7 Silent fallback defaults — Reported, not scored — this card publishes what it found rather than grading it. Its content is the findings and the key metric above.
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
NoWarnInCsproj ArchiSteamFarm/ArchiSteamFarm.csproj:9— CA1515 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:21— CA1028 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:21— CA1031 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
NoWarnInCsproj Directory.Build.props:21— CS1591 — this warning is switched off for the WHOLE project, in every file it builds, including code written years from now: nothing at the call site records that the rule was ever silenced, so the next reader has no reason to look here. Fix what the rule is reporting and drop the code from the list, or — if some occurrences really are legitimate — narrow the suppression to those sites and give each one its reason, so the rule keeps protecting the rest of the project.
High: run-shell-injection .github/workflows/docker-publish-latest.yml:45— Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
High: run-shell-injection .github/workflows/docker-publish-released.yml:46— Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
High: run-shell-injection .github/workflows/docker-publish-stable.yml:45— Using variable interpolation `${{...}}` with `github` context data in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. `github` context data can have arbitrary user input and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
High IaC: DS-0002 Dockerfile— Image user should not be 'root' A container that starts as root runs your process with root's capabilities inside the namespace, so a compromise of the process starts from there. The step: create an unprivileged account in the image (`RUN useradd -r -M app` — or whatever this base image's account tooling is, `adduser` and `useradd` are not both present everywhere`), give it ownership of the paths the process writes at runtime (`COPY --chown=` on those layers, or a `RUN chown -R`), and end the final stage with `USER app` so it is the default at start. Build stages that only compile can stay root; it is the stage that RUNS that needs the account. If the process genuinely requires root — it manages the container runtime, ptraces another process or opens raw devices — say so here rather than making a change that breaks it.
High IaC: DS-0002 Dockerfile.Service— Image user should not be 'root' A container that starts as root runs your process with root's capabilities inside the namespace, so a compromise of the process starts from there. The step: create an unprivileged account in the image (`RUN useradd -r -M app` — or whatever this base image's account tooling is, `adduser` and `useradd` are not both present everywhere`), give it ownership of the paths the process writes at runtime (`COPY --chown=` on those layers, or a `RUN chown -R`), and end the final stage with `USER app` so it is the default at start. Build stages that only compile can stay root; it is the stage that RUNS that needs the account. If the process genuinely requires root — it manages the container runtime, ptraces another process or opens raw devices — say so here rather than making a change that breaks it.
High CVE: Microsoft.OpenApi 2.0.0 — Microsoft.OpenApi 2.0.0 (transitive) has a High advisory; affects 9 projects — one upgrade fixes all. https://github.com/advisories/[GHSA redacted]
Hotspot: ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs— ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs changed 6 times in last 90 days, max complexity 109. 2 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: ArchiSteamFarm/Steam/Interaction/Commands.cs ArchiSteamFarm/Steam/Interaction/Commands.cs— ArchiSteamFarm/Steam/Interaction/Commands.cs changed 4 times in last 90 days, max complexity 123. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
Hotspot: ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs— ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs changed 7 times in last 90 days, max complexity 43. 1 of those changes was a fix/bug commit, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: ArchiSteamFarm/Steam/Integration/ArchiHandler.cs ArchiSteamFarm/Steam/Integration/ArchiHandler.cs— ArchiSteamFarm/Steam/Integration/ArchiHandler.cs changed 3 times in last 90 days, max complexity 37. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
Hotspot: ArchiSteamFarm/Steam/Exchange/Trading.cs ArchiSteamFarm/Steam/Exchange/Trading.cs— ArchiSteamFarm/Steam/Exchange/Trading.cs changed 3 times in last 90 days, max complexity 34. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
Hotspot: ArchiSteamFarm/Steam/Interaction/Actions.cs ArchiSteamFarm/Steam/Interaction/Actions.cs— ArchiSteamFarm/Steam/Interaction/Actions.cs changed 4 times in last 90 days, max complexity 25. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
Hotspot: ArchiSteamFarm/Steam/Cards/CardsFarmer.cs ArchiSteamFarm/Steam/Cards/CardsFarmer.cs— ArchiSteamFarm/Steam/Cards/CardsFarmer.cs changed 2 times in last 90 days, max complexity 46. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
Hotspot: ArchiSteamFarm/Web/WebBrowser.cs ArchiSteamFarm/Web/WebBrowser.cs— ArchiSteamFarm/Web/WebBrowser.cs changed 2 times in last 90 days, max complexity 40. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
Hotspot: ArchiSteamFarm/IPC/ArchiKestrel.cs ArchiSteamFarm/IPC/ArchiKestrel.cs— ArchiSteamFarm/IPC/ArchiKestrel.cs changed 2 times in last 90 days, max complexity 21. 1 of those changes was a fix/bug commit, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: ArchiSteamFarm/Storage/GlobalConfig.cs ArchiSteamFarm/Storage/GlobalConfig.cs— ArchiSteamFarm/Storage/GlobalConfig.cs changed 2 times in last 90 days, max complexity 17. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, behind tests written first.
FileTooLong: Steam/Bot.cs ArchiSteamFarm/Steam/Bot.cs:0— FileTooLong — 2357 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Interaction/Commands.cs ArchiSteamFarm/Steam/Interaction/Commands.cs:0— FileTooLong — 2111 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Integration/ArchiWebHandler.cs ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:0— FileTooLong — 1314 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs:0— FileTooLong — 931 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Cards/CardsFarmer.cs ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:0— FileTooLong — 799 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Integration/ArchiHandler.cs ArchiSteamFarm/Steam/Integration/ArchiHandler.cs:0— FileTooLong — 694 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Core/ASF.cs ArchiSteamFarm/Core/ASF.cs:0— FileTooLong — 533 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Web/WebBrowser.cs ArchiSteamFarm/Web/WebBrowser.cs:0— FileTooLong — 521 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Plugins/PluginsCore.cs ArchiSteamFarm/Plugins/PluginsCore.cs:0— FileTooLong — 512 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: Storage/BotConfig.cs ArchiSteamFarm/Steam/Storage/BotConfig.cs:0— FileTooLong — 505 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
TooManyMethods: Commands ArchiSteamFarm/Steam/Interaction/Commands.cs:0— TooManyMethods — 2087 significant lines (blank, comment-only and punctuation-only lines excluded), 118 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: Bot ArchiSteamFarm/Steam/Bot.cs:0— TooManyMethods — 2318 significant lines (blank, comment-only and punctuation-only lines excluded), 107 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ArchiWebHandler ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:0— TooManyMethods — 1287 significant lines (blank, comment-only and punctuation-only lines excluded), 52 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: BotConfig ArchiSteamFarm/Steam/Storage/BotConfig.cs:0— TooManyMethods — 482 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: GlobalConfig ArchiSteamFarm/Storage/GlobalConfig.cs:0— TooManyMethods — 377 significant lines (blank, comment-only and punctuation-only lines excluded), 40 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ArchiHandler ArchiSteamFarm/Steam/Integration/ArchiHandler.cs:0— TooManyMethods — 665 significant lines (blank, comment-only and punctuation-only lines excluded), 37 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ASF ArchiSteamFarm/Core/ASF.cs:0— TooManyMethods — 504 significant lines (blank, comment-only and punctuation-only lines excluded), 35 methods. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: Actions ArchiSteamFarm/Steam/Interaction/Actions.cs:0— TooManyMethods — 364 significant lines (blank, comment-only and punctuation-only lines excluded), 34 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: PluginsCore ArchiSteamFarm/Plugins/PluginsCore.cs:0— TooManyMethods — 482 significant lines (blank, comment-only and punctuation-only lines excluded), 33 methods. The type holds no instance state, so there is no shared data to group its members by. To reduce it, split it by area instead: give each cohesive family of members its own smaller type, so no one type has to be read whole to change one of them.
TooManyMethods: BotDatabase ArchiSteamFarm/Steam/Storage/BotDatabase.cs:0— TooManyMethods — 230 significant lines (blank, comment-only and punctuation-only lines excluded), 31 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TodoComment ArchiSteamFarm/Core/ASF.cs:946— // TODO: This is a total hack, I wish we could get to the bottom of this hole and find out what is really going on there in regards to the above — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ArchiSteamFarm/IPC/ArchiKestrel.cs:151— // TODO: Maybe eventually we can get rid of this, https://github.com/aspnet/AspNetCore/issues/5898
TodoComment ArchiSteamFarm/Steam/Bot.cs:2435— // TODO: Old call should be removed eventually when Steam stops supporting both systems at once — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
TodoComment ArchiSteamFarm/Steam/Integration/Callbacks/UserNotificationsCallback.cs:44— // TODO: Check if this workaround is still needed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
No assertions: ConcurrentDictionarySupportsWritingDuringLinq ArchiSteamFarm.Tests/ConcurrentTests.cs:36— Test method exercises code but verifies nothing — add an assertion.
No assertions: ConcurrentHashSetSupportsWritingDuringLinq ArchiSteamFarm.Tests/ConcurrentTests.cs:55— Test method exercises code but verifies nothing — add an assertion.
No assertions: ConcurrentListSupportsWritingDuringLinq ArchiSteamFarm.Tests/ConcurrentTests.cs:74— Test method exercises code but verifies nothing — add an assertion.
ClassTooLong: RemoteCommunication ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs:0— ClassTooLong — 904 significant lines (blank, comment-only and punctuation-only lines excluded), 11 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: CardsFarmer ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:0— ClassTooLong — 774 significant lines (blank, comment-only and punctuation-only lines excluded), 28 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
ClassTooLong: WebBrowser ArchiSteamFarm/Web/WebBrowser.cs:0— ClassTooLong — 500 significant lines (blank, comment-only and punctuation-only lines excluded), 16 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Duplicated block (11 lines × 2) ArchiSteamFarm.CustomPlugins.SignInWithSteam/SignInWithSteamController.cs:69— ArchiSteamFarm.CustomPlugins.SignInWithSteam/SignInWithSteamController.cs:69-79 | ArchiSteamFarm.CustomPlugins.SignInWithSteam/SignInWithSteamController.cs:85-95 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm.CustomPlugins.SignInWithSteam/SignInWithSteamController.cs:69` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) ArchiSteamFarm/IPC/Integration/SwaggerSecurityCriticalAttribute.cs:42— ArchiSteamFarm/IPC/Integration/SwaggerSecurityCriticalAttribute.cs:42-52 | ArchiSteamFarm/IPC/Integration/SwaggerValidValuesAttribute.cs:59-69 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm/IPC/Integration/SwaggerSecurityCriticalAttribute.cs:42` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 2) ArchiSteamFarm/Steam/Interaction/Commands.cs:631— ArchiSteamFarm/Steam/Interaction/Commands.cs:631-641 | ArchiSteamFarm/Steam/Interaction/Commands.cs:2978-2988 — 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.
Low cohesion: BotDatabase (LCOM4 8) ArchiSteamFarm/Steam/Storage/BotDatabase.cs:41— BotDatabase's methods form 8 groups that share no state and don't call each other — a sign it may have several responsibilities. Review whether it splits into focused classes.
Low cohesion: ArchiHandler (LCOM4 7) ArchiSteamFarm/Steam/Integration/ArchiHandler.cs:55— ArchiHandler's methods form 7 groups that share no state and don't call each other — a sign it may have several responsibilities. Review whether it splits into focused classes.
Low cohesion: GlobalDatabase (LCOM4 4) ArchiSteamFarm/Storage/GlobalDatabase.cs:43— GlobalDatabase's methods form 4 groups that share no state and don't call each other — a sign it may have several responsibilities. Review whether it splits into focused classes.
ArchiWebHandler.UrlPostToJsonObjectWithSession (cyclomatic 31) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1119— ArchiWebHandler.UrlPostToJsonObjectWithSession has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiWebHandler.UrlPostToJsonObjectWithSession (cyclomatic 31) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1229— ArchiWebHandler.UrlPostToJsonObjectWithSession has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Commands.HandleMessage (cyclomatic 18) ArchiSteamFarm/Steam/Interaction/Commands.cs:373— Commands.HandleMessage has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Commands.HandleMessage (cyclomatic 18) ArchiSteamFarm/Steam/Interaction/Commands.cs:438— Commands.HandleMessage has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Prerelease dependency: Microsoft.CodeAnalysis.ResxSourceGenerator — Microsoft.CodeAnalysis.ResxSourceGenerator resolves to 5.0.0-1.25277.114, a prerelease build. Prerelease packages carry no support policy, may change breaking between previews and can be unlisted — pin a stable release before shipping, or record the reason this preview is required.
Prerelease dependency: OpenTelemetry.Exporter.Prometheus.AspNetCore — OpenTelemetry.Exporter.Prometheus.AspNetCore resolves to 1.17.0-beta.1, a prerelease build. Prerelease packages carry no support policy, may change breaking between previews and can be unlisted — pin a stable release before shipping, or record the reason this preview is required.
ArchiWebHandler.UrlPostToJsonObjectWithSession (cognitive 42) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1119— ArchiWebHandler.UrlPostToJsonObjectWithSession has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchiWebHandler.UrlPostToJsonObjectWithSession (cognitive 42) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1229— ArchiWebHandler.UrlPostToJsonObjectWithSession has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Commands.HandleMessage (cognitive 29) ArchiSteamFarm/Steam/Interaction/Commands.cs:373— Commands.HandleMessage has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Commands.HandleMessage (cognitive 29) ArchiSteamFarm/Steam/Interaction/Commands.cs:438— Commands.HandleMessage has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Duplicated block (18 lines × 2) ArchiSteamFarm/Core/ASF.cs:463— ArchiSteamFarm/Core/ASF.cs:463-480 | ArchiSteamFarm/Core/ASF.cs:502-519 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm/Core/ASF.cs:463` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (18 lines × 2) ArchiSteamFarm/Web/GitHub/Data/ReleaseResponse.cs:42— ArchiSteamFarm/Web/GitHub/Data/ReleaseResponse.cs:42-59 | ArchiSteamFarm/Web/GitHub/Data/ReleaseResponse.cs:65-86 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) ArchiSteamFarm.OfficialPlugins.ItemsMatcher/MatchingUtilities.cs:71— ArchiSteamFarm.OfficialPlugins.ItemsMatcher/MatchingUtilities.cs:71-80 | ArchiSteamFarm/Steam/Exchange/Trading.cs:264-273 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm.OfficialPlugins.ItemsMatcher/MatchingUtilities.cs:71` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:81— ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:81-90 | ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:187-196 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:81` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Commands.Response (cyclomatic 123) ArchiSteamFarm/Steam/Interaction/Commands.cs:109— Commands.Response has cyclomatic complexity 123 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
RemoteCommunication.OnPersonaState (cyclomatic 109) ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs:185— RemoteCommunication.OnPersonaState has cyclomatic complexity 109 (threshold 15). Of this number, 105 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RemoteCommunication.MatchActively (cyclomatic 102) ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs:1230— RemoteCommunication.MatchActively has cyclomatic complexity 102 (threshold 15). Of this number, 89 points are the body's own statements and 13 belong to 6 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Commands.ResponseRedeem (cyclomatic 100) ArchiSteamFarm/Steam/Interaction/Commands.cs:2569— Commands.ResponseRedeem has cyclomatic complexity 100 (threshold 15). Of this number, 86 points are the body's own statements and 14 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Bot.GetAppDataForIdling (cyclomatic 58) ArchiSteamFarm/Steam/Bot.cs:1106— Bot.GetAppDataForIdling has cyclomatic complexity 58 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RemoteCommunication.MatchActively (cyclomatic 55) ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs:946— RemoteCommunication.MatchActively has cyclomatic complexity 55 (threshold 15). Of this number, 51 points are the body's own statements and 4 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CardsFarmer.CheckPage (cyclomatic 46) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:455— CardsFarmer.CheckPage has cyclomatic complexity 46 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiWebHandler.GetInventoryAsync (cyclomatic 43) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:285— ArchiWebHandler.GetInventoryAsync has cyclomatic complexity 43 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Bot.HandleLoginResult (cyclomatic 42) ArchiSteamFarm/Steam/Bot.cs:2226— Bot.HandleLoginResult has cyclomatic complexity 42 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
WebBrowser.InternalRequest (cyclomatic 40) ArchiSteamFarm/Web/WebBrowser.cs:723— WebBrowser.InternalRequest has cyclomatic complexity 40 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Bot.RedeemGamesInBackground (cyclomatic 38) ArchiSteamFarm/Steam/Bot.cs:3650— Bot.RedeemGamesInBackground has cyclomatic complexity 38 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiHandler.GetMyInventoryAsync (cyclomatic 37) ArchiSteamFarm/Steam/Integration/ArchiHandler.cs:185— ArchiHandler.GetMyInventoryAsync has cyclomatic complexity 37 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SteamTokenDumperPlugin.Refresh (cyclomatic 35) ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs:316— SteamTokenDumperPlugin.Refresh has cyclomatic complexity 35 (threshold 15). Of this number, 32 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiWebHandler.GetTradeOffers (cyclomatic 35) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:503— ArchiWebHandler.GetTradeOffers has cyclomatic complexity 35 (threshold 15). Of this number, 31 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
BotConfig.CheckValidation (cyclomatic 35) ArchiSteamFarm/Steam/Storage/BotConfig.cs:497— BotConfig.CheckValidation has cyclomatic complexity 35 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Trading.ShouldAcceptTrade (cyclomatic 34) ArchiSteamFarm/Steam/Exchange/Trading.cs:416— Trading.ShouldAcceptTrade has cyclomatic complexity 34 (threshold 15). Of this number, 32 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Program.ParseArgs (cyclomatic 32) ArchiSteamFarm/Program.cs:542— Program.ParseArgs has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SteamUtilities.TryParseGameIdentifier (cyclomatic 32) ArchiSteamFarm/Steam/Integration/SteamUtilities.cs:149— SteamUtilities.TryParseGameIdentifier has cyclomatic complexity 32 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiWebHandler.UrlPostToHtmlDocumentWithSession (cyclomatic 31) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1009— ArchiWebHandler.UrlPostToHtmlDocumentWithSession has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiWebHandler.UrlPostWithSession (cyclomatic 31) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1342— ArchiWebHandler.UrlPostWithSession has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CardsFarmer.SortGamesToFarm (cyclomatic 30) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:1451— CardsFarmer.SortGamesToFarm has cyclomatic complexity 30 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
ArchiWebHandler.SendTradeOffer (cyclomatic 29) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:645— ArchiWebHandler.SendTradeOffer has cyclomatic complexity 29 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ASF.UpdateASF (cyclomatic 28) ArchiSteamFarm/Core/ASF.cs:743— ASF.UpdateASF has cyclomatic complexity 28 (threshold 15). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Commands.ResponseOwns (cyclomatic 27) ArchiSteamFarm/Steam/Interaction/Commands.cs:2054— Commands.ResponseOwns has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Commands.ResponsePrivacy (cyclomatic 27) ArchiSteamFarm/Steam/Interaction/Commands.cs:2416— Commands.ResponsePrivacy has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
PluginsCore.InitPlugins (cyclomatic 26) ArchiSteamFarm/Plugins/PluginsCore.cs:174— PluginsCore.InitPlugins has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Bot.GetBots (cyclomatic 26) ArchiSteamFarm/Steam/Bot.cs:524— Bot.GetBots has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Bot.OnLoggedOn (cyclomatic 26) ArchiSteamFarm/Steam/Bot.cs:3372— Bot.OnLoggedOn has cyclomatic complexity 26 (threshold 15). Of this number, 25 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SteamTokenDumperPlugin.SubmitData (cyclomatic 25) ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs:576— SteamTokenDumperPlugin.SubmitData has cyclomatic complexity 25 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Actions.HandleTwoFactorAuthenticationConfirmations (cyclomatic 25) ArchiSteamFarm/Steam/Interaction/Actions.cs:219— Actions.HandleTwoFactorAuthenticationConfirmations has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebBrowser.UrlGetToJsonObject (cyclomatic 25) ArchiSteamFarm/Web/WebBrowser.cs:297— WebBrowser.UrlGetToJsonObject has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebBrowser.UrlPostToJsonObject (cyclomatic 25) ArchiSteamFarm/Web/WebBrowser.cs:570— WebBrowser.UrlPostToJsonObject has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Utilities.MoveAllUpdateFiles (cyclomatic 24) ArchiSteamFarm/Core/Utilities.cs:404— Utilities.MoveAllUpdateFiles has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiWebHandler.UrlGetToHtmlDocumentWithSession (cyclomatic 23) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:763— ArchiWebHandler.UrlGetToHtmlDocumentWithSession has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiWebHandler.UrlGetToJsonObjectWithSession (cyclomatic 23) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:845— ArchiWebHandler.UrlGetToJsonObjectWithSession has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiWebHandler.UrlHeadWithSession (cyclomatic 23) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:927— ArchiWebHandler.UrlHeadWithSession has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SchemaTransformer.ApplyEnumDefinition (cyclomatic 22) ArchiSteamFarm/IPC/OpenApi/SchemaTransformer.cs:61— SchemaTransformer.ApplyEnumDefinition has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
CardsFarmer.StartFarming (cyclomatic 22) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:318— CardsFarmer.StartFarming has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebBrowser.UrlGetToBinary (cyclomatic 22) ArchiSteamFarm/Web/WebBrowser.cs:129— WebBrowser.UrlGetToBinary has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiKestrel.ConfigureApp (cyclomatic 21) ArchiSteamFarm/IPC/ArchiKestrel.cs:123— ArchiKestrel.ConfigureApp has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ApiAuthenticationMiddleware.GetAuthenticationStatus (cyclomatic 21) ArchiSteamFarm/IPC/Integration/ApiAuthenticationMiddleware.cs:107— ApiAuthenticationMiddleware.GetAuthenticationStatus has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Bot.InitModules (cyclomatic 21) ArchiSteamFarm/Steam/Bot.cs:2488— Bot.InitModules has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Bot.OnConnected (cyclomatic 21) ArchiSteamFarm/Steam/Bot.cs:2727— Bot.OnConnected has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Trading.ParseActiveTrades (cyclomatic 21) ArchiSteamFarm/Steam/Exchange/Trading.cs:276— Trading.ParseActiveTrades has cyclomatic complexity 21 (threshold 15). Of this number, 17 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SteamChatMessage.GetMessageParts (cyclomatic 21) ArchiSteamFarm/Steam/Integration/SteamChatMessage.cs:44— SteamChatMessage.GetMessageParts has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Bot.GetPackagesData (cyclomatic 20) ArchiSteamFarm/Steam/Bot.cs:1317— Bot.GetPackagesData has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CardsFarmer.GetGameCardsInfo (cyclomatic 20) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:1033— CardsFarmer.GetGameCardsInfo has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Trading.IsTradeNeutralOrBetter (cyclomatic 20) ArchiSteamFarm/Steam/Exchange/Trading.cs:116— Trading.IsTradeNeutralOrBetter has cyclomatic complexity 20 (threshold 15). Of this number, 18 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebBrowser.UrlGetToHtmlDocument (cyclomatic 20) ArchiSteamFarm/Web/WebBrowser.cs:235— WebBrowser.UrlGetToHtmlDocument has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebBrowser.UrlPostToHtmlDocument (cyclomatic 20) ArchiSteamFarm/Web/WebBrowser.cs:508— WebBrowser.UrlPostToHtmlDocument has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
RemoteCommunication.OnHeartBeatTimer (cyclomatic 19) ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs:1691— RemoteCommunication.OnHeartBeatTimer has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Logging.GetUserInput (cyclomatic 19) ArchiSteamFarm/NLog/Logging.cs:77— Logging.GetUserInput has cyclomatic complexity 19 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function, or replace a long branch ladder over a single value with a data-driven lookup or dispatch table.
Program.InitCore (cyclomatic 19) ArchiSteamFarm/Program.cs:211— Program.InitCore has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Bot.OnDisconnected (cyclomatic 19) ArchiSteamFarm/Steam/Bot.cs:2904— Bot.OnDisconnected has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Bot.OnLicenseList (cyclomatic 19) ArchiSteamFarm/Steam/Bot.cs:3237— Bot.OnLicenseList has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CardsFarmer.IsAnythingToFarm (cyclomatic 19) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:1159— CardsFarmer.IsAnythingToFarm has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
Actions.SendInventory (cyclomatic 19) ArchiSteamFarm/Steam/Interaction/Actions.cs:425— Actions.SendInventory has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
CrossProcessFileBasedSemaphore.EnsureFileExists (cyclomatic 18) ArchiSteamFarm/Helpers/CrossProcessFileBasedSemaphore.cs:193— CrossProcessFileBasedSemaphore.EnsureFileExists has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiKestrel.ConfigureServices (cyclomatic 18) ArchiSteamFarm/IPC/ArchiKestrel.cs:290— ArchiKestrel.ConfigureServices has cyclomatic complexity 18 (threshold 15). Of this number, 14 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Bot.ResetGamesPlayed (cyclomatic 18) ArchiSteamFarm/Steam/Bot.cs:3824— Bot.ResetGamesPlayed has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
SteamTokenDumperPlugin.OnASFInit (cyclomatic 17) ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs:74— SteamTokenDumperPlugin.OnASFInit has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Bot.SendMessagePart (cyclomatic 17) ArchiSteamFarm/Steam/Bot.cs:3965— Bot.SendMessagePart has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
CardsFarmer.IsAnythingToFarmRisky (cyclomatic 17) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:1269— CardsFarmer.IsAnythingToFarmRisky has cyclomatic complexity 17 (threshold 15). Of this number, 14 points are the body's own statements and 3 belong to one function literal inside it that branches. To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiWebHandler.AddFreeLicense (cyclomatic 17) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1534— ArchiWebHandler.AddFreeLicense has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
GlobalConfig.CheckValidation (cyclomatic 17) ArchiSteamFarm/Storage/GlobalConfig.cs:481— GlobalConfig.CheckValidation has cyclomatic complexity 17 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BotController.BotPost (cyclomatic 16) ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:111— BotController.BotPost has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TypeController.TypeGet (cyclomatic 16) ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs:42— TypeController.TypeGet has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IGitHubPluginUpdates.GetTargetReleaseURL (cyclomatic 16) ArchiSteamFarm/Plugins/Interfaces/IGitHubPluginUpdates.cs:154— IGitHubPluginUpdates.GetTargetReleaseURL has cyclomatic complexity 16 (threshold 15). Of this number, 14 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
Bot.SetUserInput (cyclomatic 16) ArchiSteamFarm/Steam/Bot.cs:936— Bot.SetUserInput has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
Bot.SendCompletedSets (cyclomatic 16) ArchiSteamFarm/Steam/Bot.cs:3866— Bot.SendCompletedSets has cyclomatic complexity 16 (threshold 15). Of this number, 15 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ArchiWebHandler.GetAppList (cyclomatic 16) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1642— ArchiWebHandler.GetAppList has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ArchiWebHandler.GetCombinedTradeHoldDurationAgainstUser (cyclomatic 16) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1771— ArchiWebHandler.GetCombinedTradeHoldDurationAgainstUser has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
BareSuppressMessage repeated across 45 files ArchiSteamFarm.CustomPlugins.ExamplePlugin/MeowResponse.cs:31— The identical BareSuppressMessage (`SuppressMessage`) appears in 45 files (48 occurrences) — a single repo-wide policy (e.g. a Directory.Build.props decision or an idiomatic suppression), not 48 independent debts. Decide it once centrally rather than file-by-file. (Every occurrence still counts toward the score and metrics.)
RemoteCommunication.MatchActively (cognitive 370) ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs:1230— RemoteCommunication.MatchActively has cognitive complexity 370 (threshold 15). Of this number, 361 points are the body's own statements and 9 belong to 6 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Commands.ResponseRedeem (cognitive 244) ArchiSteamFarm/Steam/Interaction/Commands.cs:2569— Commands.ResponseRedeem has cognitive complexity 244 (threshold 15). Of this number, 236 points are the body's own statements and 8 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
RemoteCommunication.OnPersonaState (cognitive 205) ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs:185— RemoteCommunication.OnPersonaState has cognitive complexity 205 (threshold 15). Of this number, 202 points are the body's own statements and 3 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CardsFarmer.CheckPage (cognitive 99) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:455— CardsFarmer.CheckPage has cognitive complexity 99 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Bot.GetAppDataForIdling (cognitive 94) ArchiSteamFarm/Steam/Bot.cs:1106— Bot.GetAppDataForIdling has cognitive complexity 94 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
WebBrowser.InternalRequest (cognitive 77) ArchiSteamFarm/Web/WebBrowser.cs:723— WebBrowser.InternalRequest has cognitive complexity 77 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
RemoteCommunication.MatchActively (cognitive 75) ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs:946— RemoteCommunication.MatchActively has cognitive complexity 75 (threshold 15). Of this number, 73 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchiWebHandler.GetInventoryAsync (cognitive 73) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:285— ArchiWebHandler.GetInventoryAsync has cognitive complexity 73 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Commands.ResponseOwns (cognitive 72) ArchiSteamFarm/Steam/Interaction/Commands.cs:2054— Commands.ResponseOwns has cognitive complexity 72 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SteamTokenDumperPlugin.Refresh (cognitive 56) ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs:316— SteamTokenDumperPlugin.Refresh has cognitive complexity 56 (threshold 15). Of this number, 53 points are the body's own statements and 3 belong to 2 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CardsFarmer.Farm (cognitive 55) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:783— CardsFarmer.Farm has cognitive complexity 55 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Bot.RedeemGamesInBackground (cognitive 53) ArchiSteamFarm/Steam/Bot.cs:3650— Bot.RedeemGamesInBackground has cognitive complexity 53 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ArchiWebHandler.SendTradeOffer (cognitive 52) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:645— ArchiWebHandler.SendTradeOffer has cognitive complexity 52 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ArchiHandler.GetMyInventoryAsync (cognitive 51) ArchiSteamFarm/Steam/Integration/ArchiHandler.cs:185— ArchiHandler.GetMyInventoryAsync has cognitive complexity 51 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchiWebHandler.GetTradeOffers (cognitive 47) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:503— ArchiWebHandler.GetTradeOffers has cognitive complexity 47 (threshold 15). Of this number, 43 points are the body's own statements and 4 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebBrowser.UrlGetToBinary (cognitive 46) ArchiSteamFarm/Web/WebBrowser.cs:129— WebBrowser.UrlGetToBinary has cognitive complexity 46 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebBrowser.UrlGetToJsonObject (cognitive 45) ArchiSteamFarm/Web/WebBrowser.cs:297— WebBrowser.UrlGetToJsonObject has cognitive complexity 45 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebBrowser.UrlPostToJsonObject (cognitive 45) ArchiSteamFarm/Web/WebBrowser.cs:570— WebBrowser.UrlPostToJsonObject has cognitive complexity 45 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SteamChatMessage.GetMessageParts (cognitive 44) ArchiSteamFarm/Steam/Integration/SteamChatMessage.cs:44— SteamChatMessage.GetMessageParts has cognitive complexity 44 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
BotConfig.CheckValidation (cognitive 44) ArchiSteamFarm/Steam/Storage/BotConfig.cs:497— BotConfig.CheckValidation has cognitive complexity 44 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Actions.HandleTwoFactorAuthenticationConfirmations (cognitive 43) ArchiSteamFarm/Steam/Interaction/Actions.cs:219— Actions.HandleTwoFactorAuthenticationConfirmations has cognitive complexity 43 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Bot.GetBots (cognitive 42) ArchiSteamFarm/Steam/Bot.cs:524— Bot.GetBots has cognitive complexity 42 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ArchiWebHandler.UrlPostToHtmlDocumentWithSession (cognitive 42) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1009— ArchiWebHandler.UrlPostToHtmlDocumentWithSession has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchiWebHandler.UrlPostWithSession (cognitive 42) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1342— ArchiWebHandler.UrlPostWithSession has cognitive complexity 42 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Bot.OnLoggedOn (cognitive 41) ArchiSteamFarm/Steam/Bot.cs:3372— Bot.OnLoggedOn has cognitive complexity 41 (threshold 15). Of this number, 39 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Trading.ShouldAcceptTrade (cognitive 39) ArchiSteamFarm/Steam/Exchange/Trading.cs:416— Trading.ShouldAcceptTrade has cognitive complexity 39 (threshold 15). Of this number, 37 points are the body's own statements and 2 belong to 2 function literals inside it that branch. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebBrowser.UrlGetToHtmlDocument (cognitive 37) ArchiSteamFarm/Web/WebBrowser.cs:235— WebBrowser.UrlGetToHtmlDocument has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebBrowser.UrlPostToHtmlDocument (cognitive 37) ArchiSteamFarm/Web/WebBrowser.cs:508— WebBrowser.UrlPostToHtmlDocument has cognitive complexity 37 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Trading.ParseActiveTrades (cognitive 36) ArchiSteamFarm/Steam/Exchange/Trading.cs:276— Trading.ParseActiveTrades has cognitive complexity 36 (threshold 15). Of this number, 32 points are the body's own statements and 4 belong to 3 function literals inside it that branch. To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Program.ParseArgs (cognitive 35) ArchiSteamFarm/Program.cs:542— Program.ParseArgs has cognitive complexity 35 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ArchiWebHandler.UrlGetToHtmlDocumentWithSession (cognitive 35) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:763— ArchiWebHandler.UrlGetToHtmlDocumentWithSession has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchiWebHandler.UrlGetToJsonObjectWithSession (cognitive 35) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:845— ArchiWebHandler.UrlGetToJsonObjectWithSession has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchiWebHandler.UrlHeadWithSession (cognitive 35) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:927— ArchiWebHandler.UrlHeadWithSession has cognitive complexity 35 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SteamUtilities.TryParseGameIdentifier (cognitive 34) ArchiSteamFarm/Steam/Integration/SteamUtilities.cs:149— SteamUtilities.TryParseGameIdentifier has cognitive complexity 34 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CardsFarmer.IsAnythingToFarm (cognitive 33) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:1159— CardsFarmer.IsAnythingToFarm has cognitive complexity 33 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Trading.IsTradeNeutralOrBetter (cognitive 33) ArchiSteamFarm/Steam/Exchange/Trading.cs:116— Trading.IsTradeNeutralOrBetter has cognitive complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Utilities.MoveAllUpdateFiles (cognitive 32) ArchiSteamFarm/Core/Utilities.cs:404— Utilities.MoveAllUpdateFiles has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Commands.ResponsePrivacy (cognitive 32) ArchiSteamFarm/Steam/Interaction/Commands.cs:2416— Commands.ResponsePrivacy has cognitive complexity 32 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CrossProcessFileBasedSemaphore.EnsureFileExists (cognitive 31) ArchiSteamFarm/Helpers/CrossProcessFileBasedSemaphore.cs:193— CrossProcessFileBasedSemaphore.EnsureFileExists has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
BotController.BotPost (cognitive 31) ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:111— BotController.BotPost has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ApiAuthenticationMiddleware.GetAuthenticationStatus (cognitive 31) ArchiSteamFarm/IPC/Integration/ApiAuthenticationMiddleware.cs:107— ApiAuthenticationMiddleware.GetAuthenticationStatus has cognitive complexity 31 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ASF.UpdateASF (cognitive 30) ArchiSteamFarm/Core/ASF.cs:743— ASF.UpdateASF has cognitive complexity 30 (threshold 15). Of this number, 29 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ArchiKestrel.ConfigureApp (cognitive 30) ArchiSteamFarm/IPC/ArchiKestrel.cs:123— ArchiKestrel.ConfigureApp has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TypeController.TypeGet (cognitive 30) ArchiSteamFarm/IPC/Controllers/Api/TypeController.cs:42— TypeController.TypeGet has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Bot.OnConnected (cognitive 30) ArchiSteamFarm/Steam/Bot.cs:2727— Bot.OnConnected has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Bot.OnFriendsList (cognitive 30) ArchiSteamFarm/Steam/Bot.cs:3014— Bot.OnFriendsList has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CardsFarmer.SortGamesToFarm (cognitive 30) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:1451— CardsFarmer.SortGamesToFarm has cognitive complexity 30 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
ArchiWebHandler.GetAppList (cognitive 30) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1642— ArchiWebHandler.GetAppList has cognitive complexity 30 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Bot.GetPackagesData (cognitive 29) ArchiSteamFarm/Steam/Bot.cs:1317— Bot.GetPackagesData has cognitive complexity 29 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
PluginsCore.InitPlugins (cognitive 28) ArchiSteamFarm/Plugins/PluginsCore.cs:174— PluginsCore.InitPlugins has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Program.InitCore (cognitive 28) ArchiSteamFarm/Program.cs:211— Program.InitCore has cognitive complexity 28 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Bot.InitModules (cognitive 26) ArchiSteamFarm/Steam/Bot.cs:2488— Bot.InitModules has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CardsFarmer.StartFarming (cognitive 26) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:318— CardsFarmer.StartFarming has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CardsFarmer.GetGameCardsInfo (cognitive 26) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:1033— CardsFarmer.GetGameCardsInfo has cognitive complexity 26 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Bot.OnLicenseList (cognitive 24) ArchiSteamFarm/Steam/Bot.cs:3237— Bot.OnLicenseList has cognitive complexity 24 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Logging.HandleConsoleInteractively (cognitive 23) ArchiSteamFarm/NLog/Logging.cs:411— Logging.HandleConsoleInteractively has cognitive complexity 23 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Bot.GetItemsForFullSets (cognitive 23) ArchiSteamFarm/Steam/Bot.cs:681— Bot.GetItemsForFullSets has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
Bot.ResetGamesPlayed (cognitive 23) ArchiSteamFarm/Steam/Bot.cs:3824— Bot.ResetGamesPlayed has cognitive complexity 23 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
CardsFarmer.IsAnythingToFarmRisky (cognitive 23) ArchiSteamFarm/Steam/Cards/CardsFarmer.cs:1269— CardsFarmer.IsAnythingToFarmRisky has cognitive complexity 23 (threshold 15). Of this number, 21 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MatchingUtilities.GetTradableItemsFromInventory (cognitive 22) ArchiSteamFarm.OfficialPlugins.ItemsMatcher/MatchingUtilities.cs:83— MatchingUtilities.GetTradableItemsFromInventory has cognitive complexity 22 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SteamTokenDumperPlugin.OnASFInit (cognitive 22) ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs:74— SteamTokenDumperPlugin.OnASFInit has cognitive complexity 22 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SteamTokenDumperPlugin.SubmitData (cognitive 22) ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs:576— SteamTokenDumperPlugin.SubmitData has cognitive complexity 22 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
ArchiKestrel.ConfigureServices (cognitive 22) ArchiSteamFarm/IPC/ArchiKestrel.cs:290— ArchiKestrel.ConfigureServices has cognitive complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 3 function literals inside it that branch. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
Bot.GetPossiblyCompletedBadgeAppIDs (cognitive 22) ArchiSteamFarm/Steam/Bot.cs:738— Bot.GetPossiblyCompletedBadgeAppIDs has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Actions.SendInventory (cognitive 22) ArchiSteamFarm/Steam/Interaction/Actions.cs:425— Actions.SendInventory has cognitive complexity 22 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
WebBrowser.UrlGetToStream (cognitive 22) ArchiSteamFarm/Web/WebBrowser.cs:375— WebBrowser.UrlGetToStream has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebBrowser.UrlHead (cognitive 22) ArchiSteamFarm/Web/WebBrowser.cs:420— WebBrowser.UrlHead has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebBrowser.UrlPost (cognitive 22) ArchiSteamFarm/Web/WebBrowser.cs:464— WebBrowser.UrlPost has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebBrowser.UrlPostToStream (cognitive 22) ArchiSteamFarm/Web/WebBrowser.cs:648— WebBrowser.UrlPostToStream has cognitive complexity 22 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Commands.ResponseAddLicense (cognitive 21) ArchiSteamFarm/Steam/Interaction/Commands.cs:624— Commands.ResponseAddLicense has cognitive complexity 21 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Bot.HandleLoginResult (cognitive 20) ArchiSteamFarm/Steam/Bot.cs:2226— Bot.HandleLoginResult has cognitive complexity 20 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RemoteCommunication.OnHeartBeatTimer (cognitive 19) ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs:1691— RemoteCommunication.OnHeartBeatTimer has cognitive complexity 19 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
Bot.SendCompletedSets (cognitive 19) ArchiSteamFarm/Steam/Bot.cs:3866— Bot.SendCompletedSets has cognitive complexity 19 (threshold 15). Of this number, 18 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ArchiWebHandler.GetCombinedTradeHoldDurationAgainstUser (cognitive 19) ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs:1771— ArchiWebHandler.GetCombinedTradeHoldDurationAgainstUser has cognitive complexity 19 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CrossProcessFileBasedSemaphore.WaitAsync (cognitive 18) ArchiSteamFarm/Helpers/CrossProcessFileBasedSemaphore.cs:123— CrossProcessFileBasedSemaphore.WaitAsync has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Commands.ResponseRedeemPoints (cognitive 18) ArchiSteamFarm/Steam/Interaction/Commands.cs:2857— Commands.ResponseRedeemPoints has cognitive complexity 18 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchiKestrel.CreateWebApplication (cognitive 17) ArchiSteamFarm/IPC/ArchiKestrel.cs:411— ArchiKestrel.CreateWebApplication has cognitive complexity 17 (threshold 15). Of this number, 15 points are the body's own statements and 2 belong to one function literal inside it that branches. To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ArchiKestrel.StartInternally (cognitive 17) ArchiSteamFarm/IPC/ArchiKestrel.cs:527— ArchiKestrel.StartInternally has cognitive complexity 17 (threshold 15). To reduce it, flatten the nesting: invert conditions into early returns or guard clauses so the happy path stays at one level, and lift the deepest nested block into its own named function.
SteamPICSChanges.RefreshChanges (cognitive 17) ArchiSteamFarm/Steam/Integration/SteamPICSChanges.cs:64— SteamPICSChanges.RefreshChanges has cognitive complexity 17 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
Commands.ResponseTwoFactorFinalized (cognitive 16) ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/Commands.cs:200— Commands.ResponseTwoFactorFinalized has cognitive complexity 16 (threshold 15). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
BotController.AddLicense (cognitive 16) ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:552— BotController.AddLicense has cognitive complexity 16 (threshold 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GlobalConfig.CheckValidation (cognitive 16) ArchiSteamFarm/Storage/GlobalConfig.cs:481— GlobalConfig.CheckValidation has cognitive complexity 16 (threshold 15). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
LLM evaluation failed — JSON parse error: Expected end of string, but instead reached end of data. Path: $.notable[4].comment | LineNumber: 0 | BytePositionInLine: 975.
Medium: use_ecb_mode ArchiSteamFarm/Helpers/ArchiCryptoHelper.cs:256— Usage of the insecure ECB mode detected. You should use an authenticated encryption mode instead, which is implemented by the classes AesGcm or ChaCha20Poly1305.
Duplicated block (20 lines × 2) ArchiSteamFarm/Steam/Storage/BotConfig.cs:159— ArchiSteamFarm/Steam/Storage/BotConfig.cs:159-178 | ArchiSteamFarm/Storage/GlobalConfig.cs:157-176 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm/Steam/Storage/BotConfig.cs:159` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (19 lines × 2) ArchiSteamFarm/Steam/Interaction/Commands.cs:2461— ArchiSteamFarm/Steam/Interaction/Commands.cs:2461-2479 | ArchiSteamFarm/Steam/Interaction/Commands.cs:2488-2506 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 8) ArchiSteamFarm/Steam/Interaction/Commands.cs:1293— ArchiSteamFarm/Steam/Interaction/Commands.cs:1293-1307 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1356-1370 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1452-1466 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1522-1536 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1899-1913 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1950-1964 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3327-3341 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3378-3392 — all 8 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm/Steam/Interaction/Commands.cs:1293` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (15 lines × 2) ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Commands.cs:105— ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Commands.cs:105-119 | ArchiSteamFarm.OfficialPlugins.MobileAuthenticator/Commands.cs:346-360 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm.OfficialPlugins.ItemsMatcher/Commands.cs:105` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 19) ArchiSteamFarm/Steam/Interaction/Commands.cs:562— ArchiSteamFarm/Steam/Interaction/Commands.cs:562-575 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1134-1147 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1168-1181 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1245-1258 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1273-1286 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1432-1445 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1710-1723 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1748-1761 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1790-1803 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1879-1892 | ArchiSteamFarm/Steam/Interaction/Commands.cs:2396-2409 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3078-3091 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3126-3139 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3160-3173 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3237-3250 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3279-3292 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3307-3320 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3640-3653 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3751-3764 — all 19 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm/Steam/Interaction/Commands.cs:562` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 3) ArchiSteamFarm/Steam/Interaction/Commands.cs:751— ArchiSteamFarm/Steam/Interaction/Commands.cs:751-763 | ArchiSteamFarm/Steam/Interaction/Commands.cs:902-914 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1650-1662 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm/Steam/Interaction/Commands.cs:751` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) ArchiSteamFarm/Steam/Interaction/Commands.cs:809— ArchiSteamFarm/Steam/Interaction/Commands.cs:809-821 | ArchiSteamFarm/Steam/Interaction/Commands.cs:976-988 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm/Steam/Interaction/Commands.cs:809` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 16) ArchiSteamFarm/Steam/Interaction/Commands.cs:701— ArchiSteamFarm/Steam/Interaction/Commands.cs:701-712 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1335-1346 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1403-1414 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1501-1512 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1573-1584 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1929-1940 | ArchiSteamFarm/Steam/Interaction/Commands.cs:1989-2000 | ArchiSteamFarm/Steam/Interaction/Commands.cs:2033-2044 | ArchiSteamFarm/Steam/Interaction/Commands.cs:2203-2214 | ArchiSteamFarm/Steam/Interaction/Commands.cs:2357-2368 | ArchiSteamFarm/Steam/Interaction/Commands.cs:2548-2559 | ArchiSteamFarm/Steam/Interaction/Commands.cs:2950-2961 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3039-3050 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3357-3368 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3417-3428 | ArchiSteamFarm/Steam/Interaction/Commands.cs:3476-3487 — all 16 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm/Steam/Interaction/Commands.cs:701` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) ArchiSteamFarm/Steam/Interaction/Commands.cs:2319— ArchiSteamFarm/Steam/Interaction/Commands.cs:2319-2330 | ArchiSteamFarm/Steam/Interaction/Commands.cs:2915-2926 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm/Steam/Interaction/Commands.cs:2319` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 5) ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:205— ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:205-214 | ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:502-511 | ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:520-529 | ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:538-547 | ArchiSteamFarm/IPC/Controllers/Api/TwoFactorAuthenticationController.cs:104-113 — there are 5 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 5 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm/IPC/Controllers/Api/BotController.cs:205` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) ArchiSteamFarm/Steam/Interaction/Commands.cs:787— ArchiSteamFarm/Steam/Interaction/Commands.cs:787-795 | ArchiSteamFarm/Steam/Interaction/Commands.cs:962-970 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `ArchiSteamFarm/Steam/Interaction/Commands.cs:787` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (6 lines × 2) ArchiSteamFarm/Steam/Exchange/Trading.cs:92— ArchiSteamFarm/Steam/Exchange/Trading.cs:92-97 | ArchiSteamFarm/Steam/Exchange/Trading.cs:99-104 — 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.
Off the main sequence: ArchiSteamFarm — ArchiSteamFarm: abstractness 0.10, instability 0.00, distance 0.90 — an application entry point, so it is concrete by design — the distance is expected; what is worth checking is that other projects depend on it at all, since a host should be a leaf of the graph.
Coverage not measured — no coverage collector is wired up — Coverage NOT MEASURED: the test suite built and its tests PASSED, but the run produced no coverage data — `--collect:"XPlat Code Coverage"` found no data collector, which is what a test project with no `coverlet.collector` PackageReference does. Nothing is wrong with the suite or the build; there is simply no coverage instrumentation wired up. Add a `coverlet.collector` PackageReference to the test project(s) (or commit the Cobertura/OpenCover/lcov report your CI produces) and real coverage will be measured. It is excluded from the score rather than counted as a near-zero defect.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 55 significant file(s) lose their only recent owner: ArchiSteamFarm/Steam/Interaction/Commands.cs, ArchiSteamFarm/Steam/Bot.cs, ArchiSteamFarm/Steam/Integration/ArchiWebHandler.cs, ArchiSteamFarm.OfficialPlugins.ItemsMatcher/RemoteCommunication.cs, ArchiSteamFarm/Web/WebBrowser.cs, ArchiSteamFarm/Steam/Integration/ArchiHandler.cs, ArchiSteamFarm/Core/ASF.cs, ArchiSteamFarm/Plugins/PluginsCore.cs (+47 more). Pair on, review, or document these before any departure.
No ADRs found — No ADRs found at common paths; consider documenting architectural decisions in Docs/ADL/ or similar.
D23 · Boundary Type-Coupling· Bounded contexts not declared · ×1
Bounded contexts not declared — At 36k LoC across 9 projects the codebase is large and multi-module, so explicit bounded contexts are needed. Name this codebase's bounded contexts (≥2 module groups, e.g. per subsystem) so cross-boundary type coupling can 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"]`.
Split ArchiSteamFarm — A sprawling farm project whose 30k LoC and 26 namespaces are all over the place. Suggested: by namespace: Steam, Power, Cooling, Network
Low: stacktrace-disclosure ArchiSteamFarm/IPC/ArchiKestrel.cs:135— Stacktrace information is displayed in a non-Development environment. Accidentally disclosing sensitive stack trace information in a production environment aids an attacker in reconnaissance and information gathering. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
IL efficiency: 11 authored method(s) exceed the IL budget — 11 of 1922 first-party methods compile to oversized IL bodies (> 250 instructions); worst: ArchiSteamFarm.Steam.Storage.BotConfig.CheckValidation, 510 IL instructions; large bodies don't JIT-inline, which pulled this dimension to 9.9/10; splitting the hottest bodies recovers the most.
D22 · Internal API Consistency· No exposed public API · ×1
No exposed public API — No intentionally-exposed types (IsPackable or .Contracts) to evaluate.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
0
—
Run 019fd168-578a-7705-b0eb-0c667f6b4278 · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Appendix C — Personal-data map
Every field, property and record parameter whose name is conventional personal data — 5 field(s) across 1 category, each with an exact repo-relative file:line. This is the data inventory a compliance review starts from — right-to-erasure, retention, minimisation. Detected by name with a deliberately specific classifier (the same one the GDPR dimensions use, so CardDefinition or FileName don't trip); informational — it feeds no score.
Issues: 10 · Warnings: 233 · Recommendations: 6 · Info: 9 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 05-08-2026 @ 10:11 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.