Public report — ragflow, published 6 Aug 2026.
Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version;
ask the repo owner for the full report.
686findings with an exact file:lineof 706 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
57/118dimensions across the health lenses688657 LoC — wide & deep
Executive summary
Read through the Preview lens: this repo is pre-1.0 / in development, so the colour bands are relaxed to what a preview needs — *green* means good enough for a preview, not yet production-stable. Code correctness and security stay near-strict even here; the score itself is absolute and comparable across repos.
infiniflow/ragflow carries serious gaps (44%). Several issues below can materially affect correctness, security, or the cost of changing it — and propagate to everything that depends on it.
It is strongest in Event-Driven (91%) — its messaging keeps components properly decoupled. Code Health (79%) is solid too.
Most urgent: a critical security exposure was detected (see the Security & Compliance lens). Treat it as a priority regardless of the overall grade.
The area that most needs attention is Readiness (36%) — releases are harder to depend on — versioning, release notes and dependency hygiene are thin, so consumers can't easily tell what changed or trust an upgrade. Accessibility (46%) is the next concern — it raises ongoing delivery and operational cost.
Leadership focus, highest impact first: 2 Leaked secret finding(s) (Secret Scanning); SAST step to CI running what this repository's stack ships (Security & performance tooling); unused dependencies, declare unlisted imports explicitly,… (Dependency Hygiene).
For scale: Very large (~688,657 production lines); rebuilding it from scratch would take roughly ~11.1 person-years (~6–21 engineers). Approximate, ±~30%.
It builds on a genuinely strong Event-Driven foundation (91%); 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.
0.7× (at 44% quality) — the last 20% of quality is most of the work
Size & shape
Very large · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
Dead frontend code
~6480 LoC unreachable (71 file(s)) — that slice of this estimate buys code with zero runtime value; deleting it is the cheapest win in this report (the R7 card lists every file)
This codebase represents roughly ~11.1 person-years of build effort (about ~€1,600,000 to rebuild). Its weakest lens is Readiness at 36% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Very high (×1.9) — CQRS, domain model, event-driven integration, event sourcing × a 0.7× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with service_conf.yaml, dataset_example.py.
Add a SAST step to CI running what this repository's stack ships: gosec / govulncheck (or golangci-lint) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Value concentrated against a weak lens · High · Value at risk
This is a Very large asset (~11.1 person-years to rebuild), and its weakest lens is Readiness at 36%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
→ Direct remediation budget at Readiness first — highest risk-reduction per euro on an asset this size.
Root cause: an un-encapsulated domain · Medium · Root cause
57 findings across public setters, anemic types and primitive ids share one root cause — the domain layer doesn't protect its own invariants. Fixing the encapsulation pattern resolves them together, rather than chasing each finding.
→ Address encapsulation as one pattern (private setters + behaviour + strongly-typed ids), not 100 separate findings.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with service_conf.yaml, dataset_example.py. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with service_conf.yaml, dataset_example.py.
Architecture — module dependency matrix
125 modules, 304 dependencies — 2 dependency cycles, 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.)
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
50
High / Critical
A06:2021 — Vulnerable & Outdated Components
50
High / Critical
A05:2021 — Security Misconfiguration
49
High / Critical
A02:2021 — Cryptographic Failures
6
High / Critical
Roadmap
Immediately resolve the two leaked secrets in service_conf.yaml and dataset_example.py to eliminate critical exposure risks. Strengthen the build pipeline by integrating automated security scanning to prevent security regressions from being merged. Clean up the dependency tree by removing unused packages and explicitly declaring all imports. Finally, document the disaster recovery and backup procedures to ensure a tested restore process is in place.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with service_conf.yaml, dataset_example.py.
Add a SAST step to CI running what this repository's stack ships: gosec / govulncheck (or golangci-lint) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
Enforce accessibility in the toolchain you already use: add `jsx-a11y` to the `plugins` array in your oxlint config (its a11y rules are off until the plugin is listed), then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
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. 55 of 57 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 2 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.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 — 57 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, 686 of 706 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.
D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
Repo exclusion declarations (.gitattributes linguist-generated/vendored, .editorconfig generated_code): none declared — every source file was scored.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D4 Code Duplication: Duplication is token-similarity (jscpd) — it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
D33 JS/npm Dependency Vulnerabilities: JS/npm CVE matching reads package manifests and lockfiles — risk from how a dependency is used, and advisories not yet published, fall outside this scan.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D40 Network Egress Confinement: Egress confinement is read from committed Kubernetes manifests — a policy applied out-of-band (cluster-default deny, a service mesh, or a cloud firewall/security group off-repo) is invisible, and a present NetworkPolicy is declared config, not proof the cluster admission-controller actually enforces it at runtime.
D41 Kernel & Syscall Confinement: Syscall/MAC confinement is read from committed manifests — a profile applied by a cluster-wide PodSecurity default or a mutating webhook off-repo isn't seen, and a declared seccomp/AppArmor profile is config presence, not proof the node's kernel actually loaded and enforced it.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A clean result is "no unlabelled native control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC4 Keyboard semantics: Keyboard semantics are inferred from markup attributes — interactivity wired purely in script, focus managed at runtime, and component-level handlers are invisible. A clean result means "no static keyboard-trap shape", not a keyboard-operability proof.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
AC7 A11y enforcement: Enforcement is scored from in-repo config/CI evidence only — an a11y gate enforced in external tooling with no in-repo trace can't be credited, and a configured linter is presence, not proof the rules actually run or block a merge.
DM4 Rich vs anemic model: Behaviour is detected as state mutation inside a method body — a method that enforces an invariant by validating-and-throwing without mutating reads as a query, and mutation delegated through an interface the scan can't resolve isn't credited; entities with zero public properties still drop out of the population. It detects that state changes, not whether the rule is correct.
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".
P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (3): D19, D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
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.
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.
Resolve the 2 Leaked secret finding(s) in Secret Scanning — start with service_conf.yaml, dataset_example.py. — One of this dimension's main actionable groups (2 issue-level).
Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.5 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
110 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is internal/cli/admin_parser.go.
Off-boarding risk: anonymized user #1 · ×6
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
RAGFlow's documentation is clear, complete, and well-structured across READMEs, architecture/design docs, and XML-doc coverage. The landing page features a multi-language README badge set (English/Chinese/Simplified Chinese/French/Japanese/Korean/Russian) plus links to the English README, Docker Compose, Helm Chart, DeepDoc, Firecrawl integration, and an ES-to-OceanBase migration tool. A strong architecture section covers RAGFlow's components, environment variables, service configuration, and prerequisites for each platform (Ubuntu, CentOS, OpenSUSE, macOS). The READMEs are well-organized with numbered sections such as 'Deploy', 'Configure the required environment for testing', 'Test Elasticsearch', 'Test Infinity', and a detailed helm chart guide. Despite being clipped mid-document in several places, every outlined section is present and not flagged as missing. The documentation is comprehensive and well-structured across READMEs, architecture/design docs, and XML coverage for a large software project. It covers one-line run commands, argument references, environment variables, output/artifact sections; the benchmark CLI with global flags, auth/bootstrap flags, JSON args, and an exhaustive list of supported datasets; the Go agent harness framework (graph engine, ADK, push-based AgentLoop, observability, event sourcing), a detailed quick-start for each layer; the OSS deepdoc HTTP API service with health, model metadata, prediction endpoints, request/response examples, and class-id compatibility notes; and an embedded-plugins plugin directory explaining how to add LLM tool plugins. The visible content is clear and complete. RAGFlow's documentation is comprehensive and well-structured across READMEs, architecture/design docs, and release notes: the README for each major component (Admin Service, CLI, Chat plugin, filesystem interface) clearly states purpose, outlines starting steps, and lists supported commands with examples. A dedicated Release Notes document chronicles every released version with new features, bug fixes, and pull request links, covering all versions from v0.26.4 back to the earliest release (in this case, v0.26.4). The outline is consistently present in each clipped section, so any named subsection was not cut by the scanner and must be considered present rather than missing.
The Virtual Filesystem section mentions a design principle 'Provider Pattern' but does not explain how to register new providers or the filesystem's routing table.internal/cli/README.md
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md · top locations in Appendix A, every location in findings.md.
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: 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.
4 finding(s): 0 critical, 4 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.
Secret: generic-api-key · ×3internal/tokenizer/bpe_loader.go:60detected by gitleaks finding
Rotate the exposed credentials — git history can't be un-committed
What to do
Resolve the 3 Secret finding(s) in Secrets (history) — start with bpe_loader.go, box_connector.py, private.pem. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.
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: github-actions-mutable-action-tag · ×35.github/workflows/release.yml:38detected by semgrep finding
Medium: insecure-uuid-version · ×15admin/server/auth.py:93detected by semgrep finding
What to do
Resolve the 35 High finding(s) in Static Analysis (SAST) — start with release.yml (9), pyproject.toml (4), chunk.go (4). — One of this dimension's main actionable groups (35 issue-level).
Resolve the 15 Medium finding(s) in Static Analysis (SAST) — start with user_account_service.py (3), auth.py (2), configs.py (2). — One of this dimension's main actionable groups (15 warning-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
High IaC: DS-0002 · ×6Dockerfiledetected by trivy finding
Medium IaC: DS-0013 · ×38Dockerfiledetected by trivy finding
Low IaC: KSV-0003 · ×5helm/templates/infinity.yamldetected by trivy finding
What to do
Resolve the 38 Medium IaC finding(s) in IaC & Container Security — start with Dockerfile.scratch.oc9 (13), Dockerfile (5), ragflow.yaml (5). — One of this dimension's main actionable groups (38 warning-level).
Resolve the 6 High IaC finding(s) in IaC & Container Security — start with Dockerfile, infinity.yaml, minio.yaml. — One of this dimension's main actionable groups (6 issue-level).
Resolve the 5 Low IaC finding(s) in IaC & Container Security — start with infinity.yaml (5). — One of this dimension's main actionable groups (5 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
18 of 1892 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is common/data_source/google_drive/doc_conversion.py.
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.
Resolve the 1 Unpinned build actions finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 Secret passed as a command-line argument finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 No build provenance finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
What it measures: Whether dependencies have known published vulnerabilities (CVEs) per the OSV database — read natively from whatever lockfile the repository ships (Cargo, npm, Go, Python, Maven, RubyGems, …). D33 and D30 add ecosystem-specific scanners on top for npm and .NET.
Method: Multi-ecosystem dependency-CVE scan via osv-scanner --recursive (queries the osv.dev database + parses lockfiles natively across ecosystems: npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven/Gradle pom.xml/gradle.lockfile, PyPI requirements.txt/poetry.lock/Pipfile.lock, Composer composer.lock, RubyGems Gemfile.lock, Hex mix.lock, pub pubspec.lock, Swift Package.resolved); severity tally (Critical/High/Medium/Low) to 0-10 tight normalizer (8.0). NotApplicable only when the repo declares no supported non-.NET dependency lockfile (a NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain); coverage needs a resolved lockfile. Additive to D33 (trivy fs); exhaustive + deterministic, DB kept fresh.
High CVE: [GHSA redacted] · ×29web/package-lock.jsondetected by osv-scanner finding
High vulnerability: [GHSA redacted] · ×4uv.lockdetected by osv-scanner finding
Critical CVE: [GHSA redacted]web/package-lock.jsondetected by osv-scanner finding
Medium CVE: [GHSA redacted] · ×12web/package-lock.jsondetected by osv-scanner finding
Medium vulnerability: [GHSA redacted] · ×4go.moddetected by osv-scanner finding
What to do
Resolve the 29 High CVE finding(s) in OSV Dependency Vulnerabilities — start with package-lock.json (24), uv.lock (4), go.mod. — One of this dimension's main actionable groups (29 issue-level).
Resolve the 4 High vulnerability finding(s) in OSV Dependency Vulnerabilities — start with package-lock.json (2), uv.lock, go.mod. — One of this dimension's main actionable groups (4 issue-level).
Resolve the 1 Critical CVE finding(s) in OSV Dependency Vulnerabilities — start with package-lock.json. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d38_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether Kubernetes workloads restrict network EGRESS with a NetworkPolicy (or Cilium policy), limiting where a compromised pod can send data or reach a command-and-control server. Presence of committed egress-restricting policy, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn — language-agnostic): Kubernetes workloads gate applicability; credits a NetworkPolicy / Cilium policy that restricts egress (policyTypes: [Egress] / egress rules). Reward-leaning (neutral floor climbing to 10, never a deduction — baseline misconfigs stay with D31). Deterministic.
What it measures: Whether Kubernetes workloads confine the kernel boundary — a seccomp profile (RuntimeDefault/Localhost) plus an AppArmor/SELinux mandatory-access-control layer — shrinking the syscall attack surface a container escape would use. Presence of committed confinement config, not runtime enforcement.
Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a seccomp profile (RuntimeDefault/Localhost) and an AppArmor/SELinux MAC layer. Reward-leaning (neutral floor climbing to 10); NotApplicable without workloads. Deterministic.
Resolve the 1 No AppArmor/SELinux confinement finding(s) in Kernel & Syscall Confinement. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d41_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC1 · Text alternatives5.2 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Video with no captions <track> offers no captions. This player's source is set at runtime, so there is no caption file to author here: give the player a way to carry captions — accept a track/captions URL alongside the media and render a <track kind="captions"> when one is supplied — and capture that asset wherever the media enters the product (upload, import or generation). — video-preview.tsx:64
An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — index.tsx:29
A <canvas> with no aria-label/title and no inner fallback content can't be described by assistive tech. Add a name or fallback content. — audio-button.tsx:167
What to do
Add a text alternative — alt on images (alt="" for purely decorative ones), a title or aria-label on meaningful svg, an aria-label or inner fallback content on canvas, and a captions <track> on video.
Do you agree with this assessment?
AC2 · Forms & labels4.4 / 10Weak✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
A fieldset groups related controls but has no <legend> to name the group. Add a <legend> as its first child — or, if the group already has a visible caption beside it (or the fieldset is there only to disable its subtree and carries no group box), point aria-labelledby at that caption's id instead, which names the group without rendering a second one. — children-delimiter-form.tsx:59
This UI-library field component is named only by a placeholder — a placeholder is not a label (it vanishes as soon as the user types, and many assistive technologies ignore it). Give it a real name whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×7) — expandable-search-input.tsx:54, filter-popover.tsx:248, next.tsx:51, …
This UI-library field component has no label / aria-label / aria-labelledby / id / name — and neither does anything it renders — so it likely renders an unlabelled control. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×4) — feedback-dialog.tsx:63, index.tsx:139, async-tree-select.tsx:243, …
This UI-library field component has no label / aria-label / aria-labelledby / id / name, and nothing it renders carries one either. The text inside it does not stand in for one: these compound APIs render a trigger with role="combobox" (or role="button"), and those roles take their name from the AUTHOR, not from their content — so the words on screen never reach the accessibility tree as a name. Name it whichever way this library supports: a label prop, an aria-label, or an id on the rendered control with a <label htmlFor> pointing at it. For a group of controls, name the group itself (aria-label, or a fieldset with a legend) — labelling each item leaves the set unnamed. (×8) — index.tsx:192, index.tsx:235, sandbox-settings.tsx:466, …
This control has only a placeholder — a placeholder is not a label (it vanishes on input and many AT ignore it). Add a <label htmlFor>, a wrapping <label>, or aria-label. (×5) — floating-chat-widget.tsx:696, floating-chat-widget.tsx:901, tree-select.tsx:252, …
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Do you agree with this assessment?
AC3 · Page structure7.2 / 10Strong✓ Tool-verified
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
An iframe with no title (or an empty one) is announced only as "frame". Add a non-empty title describing its content, or an aria-label. — monitoring.tsx:10
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether interactive behaviour is keyboard-reachable — no click handler on a non-interactive element lacking a role, tabindex and key handler, no positive tabindex, no href-less anchor, no placeholder-href (#/javascript) link acting as a button. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: click handlers on non-interactive elements lacking role+tabindex+key handler, positive tabindex values, and href-less anchors. Components skipped, spreads suppressed. Deterministic, hard fact per element.
A click handler on a plain element isn't keyboard-operable. Use a <button>, or add role + tabIndex={0} + a key handler. (×16) — file-uploader.tsx:353, filter-field.tsx:83, tree-select.tsx:171, …
A click handler on a plain element with no role and no tabindex: even where another element's key handler can reach it, assistive tech can neither focus it nor announce what it is. Use a <button>, or add role + tabIndex={0}. (×7) — input-select.tsx:90, input-select.tsx:418, input-select.tsx:549, …
An <a> with no href, role or tabindex isn't focusable or keyboard-activatable. Give it a real href, or use a <button> for an action. (×2) — header.tsx:206, header.tsx:209
What to do
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Do you agree with this assessment?
AC7 · A11y enforcement4.0 / 10Weak✓ Tool-verified
Other · Accessibility — Whether accessibility is ENFORCED in the toolchain — an accessibility checker configured over the markup (an a11y lint rule set, e.g. eslint-plugin-jsx-a11y or vuejs-accessibility where the project lints JavaScript) and an automated accessibility assertion wired into tests or CI (axe/pa11y/Lighthouse or an equivalent) — on the Documented→Verified→Prevented ladder.
Method: Repo config/CI scan: an accessibility checker configured over the markup (an a11y lint rule set such as eslint-plugin-jsx-a11y / vuejs-accessibility where JavaScript is linted) and an automated accessibility assertion in tests or CI (axe/pa11y/Lighthouse or equivalent), graded on the Documented→Verified→Prevented rungs. Deterministic, presence/rung detection.
No accessibility enforcement found — your oxlint config does not list the `jsx-a11y` plugin (its a11y rules are off until it does) and there's no axe/pa11y/Lighthouse in tests or CI. Start by enabling that plugin to catch issues at author time.
What to do
Enforce accessibility in the toolchain you already use: add `jsx-a11y` to the `plugins` array in your oxlint config (its a11y rules are off until the plugin is listed), then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
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 · Domain Modelling — Whether aggregates reference each other by identity (id) rather than by direct object reference — the core DDD consistency-boundary rule.
Method: Roslyn (DDD-gated): aggregate roots identified by convention; each aggregate field checked for direct references to other aggregates versus id-only. Deterministic, DDD-native.
Coverage: Population: aggregate roots identified by AggregateRoot/IAggregateRoot base/interface NAME convention; reference-by-identity then checked exhaustively within that set — a root not using those names is invisible.
Other · Domain Modelling — Whether cross-context integration events stay loosely coupled — no producer-owned enums/domain types leaking to consumers. Shared-kernel/contracts types are allowed.
Method: Roslyn (DDD-gated): integration-event properties scanned for producer-domain type/enum leaks versus primitives and shared-kernel types. Deterministic, hard fact.
Do you agree with this assessment?
DM4 · Rich vs anemic model3.9 / 10Weak✓ Tool-verified
Other · Domain Modelling — Whether aggregates/entities carry the behaviour that protects their invariants, rather than being data bags driven by external services.
Method: Roslyn (DDD-gated): entity method BODIES classified mutator-vs-query — only methods that mutate the entity's own declared state count as invariant-protecting behaviour, so a getter/passthrough doesn't rescue an anemic class. Deterministic, exhaustive over domain-layer entities.
Coverage: Population: entities by name/base convention; rich-vs-anemic judged by classifying each method body mutator-vs-query — logic-bearing domain types outside the convention are invisible.
`API4Conversation` is an aggregate/entity with 15 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — api_for_conversation.go:22
`APIToken` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — api_token.go:20
`UserCanvas` is an aggregate/entity with 11 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — canvas.go:20
`CanvasTemplate` is an aggregate/entity with 8 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — canvas.go:41
`UserCanvasVersion` is an aggregate/entity with 6 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — canvas.go:59
`Chat` is an aggregate/entity with 21 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — chat.go:22
`ChatListItem` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — chat.go:59
`ChatSession` is an aggregate/entity with 6 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — chat.go:66
`ChatChannel` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — chat_channel.go:20
`CompilationTemplate` is an aggregate/entity with 9 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — compilation_template.go:20
`CompilationTemplateGroup` is an aggregate/entity with 6 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — compilation_template_group.go:20
`Connector` is an aggregate/entity with 11 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — connector.go:25
`Connector2Kb` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — connector.go:93
`SyncLogs` is an aggregate/entity with 15 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — connector.go:107
`Document` is an aggregate/entity with 22 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — document.go:22
`DocumentListItem` is an aggregate/entity with 28 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — document.go:49
`EvaluationDataset` is an aggregate/entity with 9 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — evaluation.go:21
`EvaluationCase` is an aggregate/entity with 8 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — evaluation.go:41
`EvaluationRun` is an aggregate/entity with 10 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — evaluation.go:60
`EvaluationResult` is an aggregate/entity with 9 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — evaluation.go:81
`File` is an aggregate/entity with 9 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — file.go:20
`FileCommit` is an aggregate/entity with 9 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — file_commit.go:20
`FileCommitItem` is an aggregate/entity with 16 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — file_commit.go:39
`IngestionTask` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — ingestion_task.go:19
`InvitationCode` is an aggregate/entity with 6 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — invitation_code.go:22
`KnowledgeCompileDataset` is an aggregate/entity with 10 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — knowledge_compile_doc.go:32
`License` is an aggregate/entity with 3 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — license.go:24
`LLM` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — llm.go:20
`MyLLM` is an aggregate/entity with 10 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — llm.go:49
`LLMFactories` is an aggregate/entity with 5 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — llm_factories.go:20
`MCPServer` is an aggregate/entity with 8 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — mcp.go:20
`Memory` is an aggregate/entity with 17 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — memory.go:20
`Search` is an aggregate/entity with 8 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — search.go:20
`SearchListItem` is an aggregate/entity with 2 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — search.go:38
`Task` is an aggregate/entity with 13 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — task.go:22
`Tenant` is an aggregate/entity with 20 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — tenant.go:20
`TenantLangfuse` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — tenant_langfuse.go:20
`TenantLLM` is an aggregate/entity with 10 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — tenant_llm.go:21
`TenantModel` is an aggregate/entity with 7 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — tenant_model.go:20
`TenantModelGroup` is an aggregate/entity with 4 data propert(ies) but no state-changing behaviour (only data and queries) — the business logic lives in a service. — tenant_model_group.go:20
6 further occurrence(s) are not listed individually; the score already reflects all 46.
What to do
Move business rules onto the aggregates/entities they govern so invariants are enforced at the source, not in anemic services.
Other · Domain Modelling — Whether entities protect their state (private/init-only setters) instead of exposing public setters that bypass invariants. Softened when a rehydration framework (Marten/EF) is present.
Method: Roslyn (DDD-gated): public setters on entities detected; score softened when Marten/EF rehydration frameworks present. Deterministic, framework-aware.
Coverage: Population: entities by convention; encapsulation (setter shape) checked exhaustively within the set.
Make entity setters private/init-only; change state only through methods that enforce the invariants (Marten/EF can bind via constructor or private setters).
Other · Domain Modelling — Whether clusters of primitives that travel together (a missing value object) are extracted — a low-weight suggestion, LLM-confirmed when configured.
Method: Roslyn (DDD-gated): primitive parameter clusters recurring three or more times across signatures extracted, then confirmed by language model when configured. Advisory, low-weight.
Other · Event-Driven — Whether event handlers stay asynchronous (no blocking remote HTTP/gRPC calls awaited inside a handler).
Method: Roslyn semantic scan (event-driven gated): event-handler bodies scanned for HTTP/gRPC invocations by resolved symbol type, not substring. Deterministic, semantic-resolved.
Other · Event-Driven — Whether commands have a single handler (one owner of the decision) and fan-out is modelled with events.
Method: Roslyn scan (event-driven gated): command-shaped messages identified by convention; handler count per command checked for the exactly-one rule. Deterministic, hard fact.
Do you agree with this assessment?
ED3 · Event naming8.0 / 10Strong✓ Tool-verified
Other · Event-Driven — Whether events are named in the past tense (a clarity nudge — low weight).
Method: Roslyn scan (event-driven gated): domain and integration events checked for past-tense naming (-ed/-en suffix or irregular set). Naming nudge, low-weight advisory.
`knowledgeCompileLeaseValue` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear. — knowledgecompile.go:43
`IChatEvent` reads as an instruction, not a fact that happened. Events describe something that already occurred — name them in the past tense (e.g. `OrderPlaced`, `PaymentCaptured`) so the ubiquitous language stays clear. — use-send-message.ts:91
What to do
Name events in the past tense — they record facts that already happened.
Other · Event-Driven — Whether state changes and message publishes are atomic (a transactional outbox) rather than a crash-unsafe dual write.
Method: Roslyn semantic scan (event-driven gated): event-handler methods scanned for DB-save plus bus-publish without a transactional outbox reference. Deterministic, semantic-resolved.
`IngestionTaskService.StartRunning` writes to the database while `IngestionTaskService.enqueueTask` publishes to the message bus in the same command-handling flow, with no outbox referenced on either path. Splitting the persist and the publish across sibling methods (or two collaborating actors) doesn't make them atomic — a crash between the two either loses the message or emits a phantom event. Use the transactional outbox pattern so the message is committed in the same transaction as the state change and dispatched afterwards. — ingestion_task_service.go:203
What to do
Adopt the transactional outbox pattern so DB writes and message publishes commit atomically — no lost or phantom events on a crash.
Other · Event Sourcing — Whether Apply/When folds reconstruct state purely from the event (no DateTime.Now, Guid.NewGuid, Random or IO) so replay is reproducible.
Method: Roslyn syntax scan (event-sourcing gated): Apply/When folds checked for forbidden tokens (DateTime.Now, Guid.NewGuid, Random, IO), stripped of comments/strings. Deterministic, hard fact per fold.
The event-sourcing fold calls time.Now( — replaying the same events would produce different state, silently corrupting the aggregate over time. Folds must derive state purely from the event payload; capture the timestamp/id/random value IN the event when it is first raised, then read it back here. — debug_log_sink.go:155
What to do
Move every DateTime/Guid/random value into the event at raise-time, then have the fold read it back — folds must be pure functions of (state, event).
Other · Event Sourcing — Whether persisted events are immutable facts (init-only/readonly) — a settable event member lets stored history be rewritten.
Method: Roslyn scan (event-sourcing gated): persisted events checked for public setters; immutability verified per property/field. Deterministic, hard fact.
Do you agree with this assessment?
ES3 · PII in the event store10.0 / 10Exemplary○ Nothing flagged
Other · Event Sourcing — Whether the append-only event log avoids un-erasable personal data (or has a crypto-shredding strategy) — a GDPR right-to-erasure risk.
Method: Roslyn (event-sourcing gated): high-confidence PII flagged Warning; ambiguous name-like fields adjudicated by language model as person versus fictional. Advisory without model, definitive with.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add a README to the 2 of 8 project(s) that lack one — worth up to 0.5 pts.
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 README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Readiness · Readiness — Whether 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.
No static application security testing detected. For this repository's stack, add gosec / govulncheck (or golangci-lint) (or `semgrep --config=auto`, which runs on any language) as a CI step.
What to do
Add a SAST step to CI running what this repository's stack ships: gosec / govulncheck (or golangci-lint) — or `semgrep --config=auto`, which runs on any language — so a security regression fails the build instead of landing.
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?
P5 · DR & Backup7.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.
Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.
What to do
Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
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.
Do you agree with this assessment?
R1 · Type Safety10.0 / 10Exemplary✓ Tool-verified
React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.
Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.
React / JS · Code Health — Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm over JS/TS tokens, D-386).
Method: Copy-pasted token-identical blocks across the frontend (the D4 clone algorithm run over JS/TS tokens). Deterministic.
web/src/components/markdown-content/index.tsx:141 · web/src/components/next-markdown-content/index.tsx:249 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — index.tsx:141
web/src/components/originui/select-with-search.tsx:259 · web/src/pages/agent/form/components/select-with-secondary-menu.tsx:121 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — select-with-search.tsx:259
web/src/lib/editor/markdown/enhanced-markdown-export.ts:202 · web/src/lib/editor/markdown/enhanced-markdown-export.ts:240 · web/src/lib/editor/markdown/enhanced-markdown-export.ts:284 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — enhanced-markdown-export.ts:202
web/src/components/floating-chat-widget.tsx:637 · web/src/components/floating-chat-widget.tsx:852 — 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. — floating-chat-widget.tsx:637
web/src/components/message-item/hooks.ts:15 · web/src/components/next-message-item/hooks.ts:16 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — hooks.ts:15
web/src/pages/admin/sandbox-settings.tsx:693 · web/src/pages/admin/sandbox-settings.tsx:733 · web/src/pages/admin/sandbox-settings.tsx:794 — 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. — sandbox-settings.tsx:693
web/src/pages/agent/log-sheet/workflow-timeline.tsx:208 · web/src/pages/agent/webhook-sheet/timeline.tsx:208 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — workflow-timeline.tsx:208
web/src/assets/icon/next-icon.tsx:32 · web/src/assets/icon/next-icon.tsx:49 · web/src/assets/icon/next-icon.tsx:66 · web/src/assets/icon/next-icon.tsx:83 · +1 more site(s) not listed — all 5 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — next-icon.tsx:32
What to do
Extract the duplicated blocks into shared functions/components.
React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.
Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.
Branch-heavy code is where defects cluster — extract decisions into smaller functions. (×8) — upload-modal.tsx:57, floating-chat-widget.tsx:87, number-editor.tsx:23, …
What to do
Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
Do you agree with this assessment?
R3 · Large Files7.6 / 10Strong✓ Tool-verified
React / JS · Code Health — How many source files exceed the large-file threshold.
Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage9.4 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.
Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.
No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×8) — sidebar.tsx, index.js, raptor-form-fields.tsx, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D33 (JS/npm Dependency Vulnerabilities).
Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D33). Deterministic.
What to do
Bump outdated dependencies to current versions to limit upgrade debt.
Do you agree with this assessment?
R6 · Tooling10.0 / 10Exemplary✓ Tool-verified
React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.
Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.
Do you agree with this assessment?
R7 · Dead Code6.8 / 10Strong✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 21 application, 10 tooling and 40 test entry point(s) detected in this repo. Gate removals on your build/type-check — an undetected custom entry would make these reachable.
no import path from any entry point (21 application, 10 tooling, 40 test roots considered) (×7) — sidebar.tsx, raptor-form-fields.tsx, toggle-list.tsx, …
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.
Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.
Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×3) — vite.config.ts:1, use-dataset-table-columns.tsx:15, date-picker.tsx:9
Declared in web/package.json but never imported anywhere in that package or its workspace members — dead weight and attack surface. Verify against build tooling before removing. (×3)
What to do
Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.
Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.
web/src/routes.tsx → web/src/layouts/root-layout.tsx → web/src/layouts/components/header.tsx → web/src/hooks/logic-hooks.ts → web/src/hooks/route-hook.ts → web/src/routes.tsx (one verified cycle inside a mutually-dependent group of 599 files) — routes.tsx
Break each cycle by extracting the shared piece into a module both sides can import.
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 15 of 55 WCAG 2.2 Level A/AA success criteria (27%; ≈30% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 40 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not included — 61 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.
AX1 Captive dependencies — no DI registrations detected
AX10 Code composition — not assessed — code composition is computed by ROLE over a document set that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — no singleton implementations detected
AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX4 Dependency direction — not applicable to a CQRS architecture (the inward-dependency rule is for layered/clean styles)
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D1 Cyclomatic Complexity — Most of this repository's production source (.py, .ts, .tsx) had no cyclomatic complexity computed for it, so cyclomatic complexity was not measured — whatever else this pass did read is not this repository's complexity. Not scored: no method bodies were exposed for those file kinds by any language model this pass could load. This is a gap in the analysis run, not a finding about this repository.
D10 Test Quality — ~304233 lines of test source are present (.py, .go, .ts, .tsx) but the test-quality collector reads C# only, so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included
D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Go module (go.mod/go.sum), a Python pyproject.toml/requirements.txt (pip/uv/Poetry) and package.json), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D2 Cognitive Complexity — Most of this repository's production source (.py, .ts, .tsx) had no cognitive complexity computed for it, so cognitive complexity was not measured — whatever else this pass did read is not this repository's complexity. Not scored: no method bodies were exposed for those file kinds by any language model this pass could load. This is a gap in the analysis run, not a finding about this repository.
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D22 Internal API Consistency — No exposed public API
D23 Boundary Type-Coupling — Production source is present (.go, .py, .ts, .tsx) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D3 God Classes — Most of this repository's production source (.py, .ts, .tsx) was not read by god-class detection, so class size was not assessed for the languages that are the product — whatever else this pass did read is not this repository's class size. Not scored — this is a gap in the analyzer, not a verdict about this repository.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Go module (go.mod/go.sum), a Python pyproject.toml/requirements.txt (pip/uv/Poetry) and package.json — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D42 Runtime Threat Enforcement — The repository ships application workloads but no cluster-governance resources (CRDs, admission webhooks, or a committed policy engine). Runtime threat-detection (Falco/Tetragon) and admission control (Kyverno/OPA-Gatekeeper/PodSecurity) are cluster-OPERATOR controls owned by the platform, not shipped by an application repo/chart — nothing for this repo to assess.
D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is mostly .go, .py, .ts, .tsx, which this pass does not read, so cohesion was not assessed for this repository. Not scored — this is a gap in the analyzer, not a finding about this repository.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
D9 Test Distribution — Test source is present (.py, .go, .ts, .tsx) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
DM6 Domain ↔ infrastructure boundary — no domain-layer types detected — domain↔infrastructure boundary check not applicable
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
GD1 Unfinished & placeholder code — no source files
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
P8 Schema migrations — not assessed — schema-migration practice is read from a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`go test -coverprofile=coverage.out ./...`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
High: github-actions-mutable-action-tag .github/workflows/release.yml:38— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v6`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v6 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/release.yml:46— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-go@<40-character SHA>`. This step references `actions/setup-go@v5`; resolve the SHA it points at today with `gh api repos/actions/setup-go/commits/v5 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/release.yml:124— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v6`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v6 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/release.yml:132— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/setup-go@<40-character SHA>`. This step references `actions/setup-go@v5`; resolve the SHA it points at today with `gh api repos/actions/setup-go/commits/v5 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/release.yml:196— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/upload-artifact@<40-character SHA>`. This step references `actions/upload-artifact@v4`; resolve the SHA it points at today with `gh api repos/actions/upload-artifact/commits/v4 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/release.yml:214— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v6`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v6 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/release.yml:221— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/download-artifact@<40-character SHA>`. This step references `actions/download-artifact@v5`; resolve the SHA it points at today with `gh api repos/actions/download-artifact/commits/v5 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/release.yml:244— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: softprops/action-gh-release@<40-character SHA>`. This step references `softprops/action-gh-release@v2`; resolve the SHA it points at today with `gh api repos/softprops/action-gh-release/commits/v2 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/release.yml:269— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v6`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v6 --jq .sha`.
High: github-actions-mutable-action-tag .github/workflows/serenedb.yml:46— GitHub Actions step uses a mutable tag or branch reference. Tags and branch names can be silently repointed by the action owner, enabling supply-chain attacks — as seen in the trivy-action and kics-github-action compromises. Pin the reference to a full 40-character commit SHA instead, e.g. `uses: actions/checkout@<40-character SHA>`. This step references `actions/checkout@v6`; resolve the SHA it points at today with `gh api repos/actions/checkout/commits/v6 --jq .sha`.
High: uv-missing-dependency-cooldown admin/client/pyproject.toml:23— This pyproject.toml configures uv but does not set a dependency cooldown. Newly published packages can be malicious or unstable. Add `exclude-newer = "7 days"` under `[tool.uv]` to wait 7 days before resolving newly published package versions. Added in: 0.9.17 Reference: https://docs.astral.sh/uv/concepts/resolution/#dependency-cooldowns. This is a semgrep security-AUDIT rule reporting a POLICY that is absent or weaker than its recommendation, not an exploitable defect. Confirm whether the current setting is a deliberate decision for this repository — and apply the change where it is not; where it is (a policy your release process already enforces elsewhere, or one this repository has consciously opted out of), record the decision and leave the configuration as it is.
High: double-free internal/binding/cpp/opencc/dictionary/text.c:85— Variable 'ucs4_buff' was freed twice. This can lead to undefined behavior.
High: insecure-use-string-copy-fn internal/binding/cpp/opencc/opencc.c:114— Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by bounding the copy to the destination's size and terminating it yourself — `snprintf(dst, sizeof dst, "%s", src)`, or `strncpy` followed by an explicit `dst[sizeof dst - 1] = '\0'` — since the bounds-checked `_s` variants are C11 Annex K, an optional annex that glibc and musl do not implement; where your toolchain does provide them (MSVC) or provides `strlcpy` (BSD, and glibc from 2.38), either is the shorter spelling of the same fix. 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.
High: insecure-use-string-copy-fn internal/binding/cpp/opencc/utils.c:28— Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by bounding the copy to the destination's size and terminating it yourself — `snprintf(dst, sizeof dst, "%s", src)`, or `strncpy` followed by an explicit `dst[sizeof dst - 1] = '\0'` — since the bounds-checked `_s` variants are C11 Annex K, an optional annex that glibc and musl do not implement; where your toolchain does provide them (MSVC) or provides `strlcpy` (BSD, and glibc from 2.38), either is the shorter spelling of the same fix. 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.
High: insecure-use-string-copy-fn internal/binding/cpp/opencc/utils.c:35— Finding triggers whenever there is a strcpy or strncpy used. This is an issue because strcpy does not affirm the size of the destination array and strncpy will not automatically NULL-terminate strings. This can lead to buffer overflows, which can cause program crashes and potentially let an attacker inject code in the program. Fix this by bounding the copy to the destination's size and terminating it yourself — `snprintf(dst, sizeof dst, "%s", src)`, or `strncpy` followed by an explicit `dst[sizeof dst - 1] = '\0'` — since the bounds-checked `_s` variants are C11 Annex K, an optional annex that glibc and musl do not implement; where your toolchain does provide them (MSVC) or provides `strlcpy` (BSD, and glibc from 2.38), either is the shorter spelling of the same fix. 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.
High: go-unsafe-deserialization-interface internal/cli/user_parser.go:3910— Deserializing into `interface{}` allows arbitrary data structures and types, which can lead to security vulnerabilities (CWE-502). Use a concrete struct type instead. Note what this decoder can and cannot do: Go's JSON/YAML decoders construct nothing the document names — decoding into `interface{}` yields only maps, slices and scalars — so no attacker-chosen type is instantiated here and no method on one runs. What is unchecked is the SHAPE of the value. Where the shape is known, decode into a concrete struct as above; where the value must stay generic (a format transcode, a query or template engine, a normaliser that accepts any document), bound the input's size and nesting depth before decoding and validate each field where you read it.
High: string-formatted-query internal/dao/migration.go:505— String-formatted SQL query detected. This could lead to SQL injection if the string is not sanitized properly. Audit this call to ensure the SQL is not manipulable by external data. 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. Note what is being interpolated here: the statement takes the value in a position where SQL expects a table, view or schema NAME, and a name cannot be bound as a query parameter in any driver — the statement has to be planned before the parameter is known, so "use a parameterised query" is not available for this site. The control that IS available: check the name against a fixed allow-list of the identifiers this code may address (or derive it from one) before it reaches the statement, and where the name is genuinely dynamic, pass it through the driver's identifier-quoting helper rather than into the format string. If the name can only ever come from configuration you control, say so at the call site — that is the review this row is asking for.
High: go-unsafe-deserialization-interface internal/engine/infinity/chunk.go:1677— Deserializing into `interface{}` allows arbitrary data structures and types, which can lead to security vulnerabilities (CWE-502). Use a concrete struct type instead. Note what this decoder can and cannot do: Go's JSON/YAML decoders construct nothing the document names — decoding into `interface{}` yields only maps, slices and scalars — so no attacker-chosen type is instantiated here and no method on one runs. What is unchecked is the SHAPE of the value. Where the shape is known, decode into a concrete struct as above; where the value must stay generic (a format transcode, a query or template engine, a normaliser that accepts any document), bound the input's size and nesting depth before decoding and validate each field where you read it.
High: go-unsafe-deserialization-interface internal/engine/infinity/chunk.go:1690— Deserializing into `interface{}` allows arbitrary data structures and types, which can lead to security vulnerabilities (CWE-502). Use a concrete struct type instead. Note what this decoder can and cannot do: Go's JSON/YAML decoders construct nothing the document names — decoding into `interface{}` yields only maps, slices and scalars — so no attacker-chosen type is instantiated here and no method on one runs. What is unchecked is the SHAPE of the value. Where the shape is known, decode into a concrete struct as above; where the value must stay generic (a format transcode, a query or template engine, a normaliser that accepts any document), bound the input's size and nesting depth before decoding and validate each field where you read it.
High: string-formatted-query internal/engine/serenedb/chunk.go:399— String-formatted SQL query detected. This could lead to SQL injection if the string is not sanitized properly. Audit this call to ensure the SQL is not manipulable by external data. 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. Note what is being interpolated here: the statement takes the value in a position where SQL expects a table, view or schema NAME, and a name cannot be bound as a query parameter in any driver — the statement has to be planned before the parameter is known, so "use a parameterised query" is not available for this site. The control that IS available: check the name against a fixed allow-list of the identifiers this code may address (or derive it from one) before it reaches the statement, and where the name is genuinely dynamic, pass it through the driver's identifier-quoting helper rather than into the format string. If the name can only ever come from configuration you control, say so at the call site — that is the review this row is asking for.
High: go-unsafe-deserialization-interface internal/engine/serenedb/common.go:292— Deserializing into `interface{}` allows arbitrary data structures and types, which can lead to security vulnerabilities (CWE-502). Use a concrete struct type instead. Note what this decoder can and cannot do: Go's JSON/YAML decoders construct nothing the document names — decoding into `interface{}` yields only maps, slices and scalars — so no attacker-chosen type is instantiated here and no method on one runs. What is unchecked is the SHAPE of the value. Where the shape is known, decode into a concrete struct as above; where the value must stay generic (a format transcode, a query or template engine, a normaliser that accepts any document), bound the input's size and nesting depth before decoding and validate each field where you read it.
High: string-formatted-query internal/engine/serenedb/metadata.go:182— String-formatted SQL query detected. This could lead to SQL injection if the string is not sanitized properly. Audit this call to ensure the SQL is not manipulable by external data. 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. Note what is being interpolated here: the statement takes the value in a position where SQL expects a table, view or schema NAME, and a name cannot be bound as a query parameter in any driver — the statement has to be planned before the parameter is known, so "use a parameterised query" is not available for this site. The control that IS available: check the name against a fixed allow-list of the identifiers this code may address (or derive it from one) before it reaches the statement, and where the name is genuinely dynamic, pass it through the driver's identifier-quoting helper rather than into the format string. If the name can only ever come from configuration you control, say so at the call site — that is the review this row is asking for.
High: go-unsafe-deserialization-interface internal/entity/models/chat_tools.go:54— Deserializing into `interface{}` allows arbitrary data structures and types, which can lead to security vulnerabilities (CWE-502). Use a concrete struct type instead. Note what this decoder can and cannot do: Go's JSON/YAML decoders construct nothing the document names — decoding into `interface{}` yields only maps, slices and scalars — so no attacker-chosen type is instantiated here and no method on one runs. What is unchecked is the SHAPE of the value. Where the shape is known, decode into a concrete struct as above; where the value must stay generic (a format transcode, a query or template engine, a normaliser that accepts any document), bound the input's size and nesting depth before decoding and validate each field where you read it.
High: go-unsafe-deserialization-interface internal/entity/models/chat_tools.go:188— Deserializing into `interface{}` allows arbitrary data structures and types, which can lead to security vulnerabilities (CWE-502). Use a concrete struct type instead. Note what this decoder can and cannot do: Go's JSON/YAML decoders construct nothing the document names — decoding into `interface{}` yields only maps, slices and scalars — so no attacker-chosen type is instantiated here and no method on one runs. What is unchecked is the SHAPE of the value. Where the shape is known, decode into a concrete struct as above; where the value must stay generic (a format transcode, a query or template engine, a normaliser that accepts any document), bound the input's size and nesting depth before decoding and validate each field where you read it.
High: go-unsafe-deserialization-interface internal/handler/agent.go:1547— Deserializing into `interface{}` allows arbitrary data structures and types, which can lead to security vulnerabilities (CWE-502). Use a concrete struct type instead. Note what this decoder can and cannot do: Go's JSON/YAML decoders construct nothing the document names — decoding into `interface{}` yields only maps, slices and scalars — so no attacker-chosen type is instantiated here and no method on one runs. What is unchecked is the SHAPE of the value. Where the shape is known, decode into a concrete struct as above; where the value must stay generic (a format transcode, a query or template engine, a normaliser that accepts any document), bound the input's size and nesting depth before decoding and validate each field where you read it.
+ 10 more in this group — see findings.md.
D38 · OSV Dependency Vulnerabilities· High CVE · ×29
High CVE: [GHSA redacted] web/package-lock.json— axios 1.13.6: [GHSA redacted] — this repo declares axios ^1.12.0, a range that ALREADY admits the fixed 1.16.0, so there is no manifest edit to make here. Re-resolve the lock so axios moves onto 1.16.0 or later; if the flagged 1.13.6 comes back, a dependency is pinning it — upgrade that dependent, or pin axios with an `overrides` entry so only one copy resolves. This is 1 of 28 advisories with a published fix this scan raises against axios 1.13.6, and their fixed versions do not agree — anything below 1.18.0 still leaves at least one of them open. Take this package to 1.18.0 or later: that is the floor for the package, not this row's target alone. This one row stands for the 28 advisories this scan raises against axios 1.13.6: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] uv.lock— azure-core 1.37.0: [GHSA redacted] — azure-core is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or raise its floor in your own manifest and re-resolve (`uv lock --upgrade-package azure-core`)).
High CVE: [GHSA redacted] web/package-lock.json— brace-expansion 1.1.12: [GHSA redacted] — brace-expansion is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin brace-expansion to 1.1.16 with an `overrides` entry). This is 1 of 4 advisories with a published fix this scan raises against brace-expansion 1.1.12, and their fixed versions do not agree — anything below 1.1.18 still leaves at least one of them open. Take this package to 1.1.18 or later: that is the floor for the package, not this row's target alone. This one row stands for the 4 advisories this scan raises against brace-expansion 1.1.12: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web/package-lock.json— brace-expansion 2.0.2: [GHSA redacted] — brace-expansion is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin brace-expansion to 2.1.2 with an `overrides` entry). This is 1 of 4 advisories with a published fix this scan raises against brace-expansion 2.0.2, and their fixed versions do not agree — anything below 2.1.4 still leaves at least one of them open. Take this package to 2.1.4 or later: that is the floor for the package, not this row's target alone. This one row stands for the 4 advisories this scan raises against brace-expansion 2.0.2: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web/package-lock.json— braces 2.3.2: [GHSA redacted] — braces is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (— 3.0.3 is a MAJOR ahead of the resolved 2.3.2, so an `overrides` pin would force a breaking version under a dependent written against 2.3.2; upgrading the declaring package is the remedy, and where no patched release exists in your major line, record the exposure instead).
High CVE: [GHSA redacted] uv.lock— curl-cffi 0.14.0: [GHSA redacted] — curl-cffi is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or raise its floor in your own manifest and re-resolve (`uv lock --upgrade-package curl-cffi`)).
High CVE: [GHSA redacted] web/package-lock.json— fast-uri 3.1.0: [GHSA redacted] — fast-uri is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin fast-uri to 3.1.3 with an `overrides` entry). This is 1 of 5 advisories with a published fix this scan raises against fast-uri 3.1.0, and their fixed versions do not agree — anything below 3.1.5 still leaves at least one of them open. Take this package to 3.1.5 or later: that is the floor for the package, not this row's target alone. This one row stands for the 5 advisories this scan raises against fast-uri 3.1.0: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web/package-lock.json— flatted 3.3.3: [GHSA redacted] — flatted is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin flatted to 3.4.0 with an `overrides` entry). This is 1 of 2 advisories with a published fix this scan raises against flatted 3.3.3, and their fixed versions do not agree — anything below 3.4.2 still leaves at least one of them open. Take this package to 3.4.2 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against flatted 3.3.3: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web/package-lock.json— form-data 4.0.5: [GHSA redacted] — form-data is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin form-data to 4.0.6 with an `overrides` entry).
High CVE: [GHSA redacted] go.mod— github.com/buger/jsonparser 1.1.1: [GHSA redacted] — github.com/buger/jsonparser is not a DIRECT requirement of this module: go.mod records it as `// indirect`, pulled in transitively, so raise it in place (run `go get github.com/buger/jsonparser@v1.1.2`, which updates the require line go.mod already holds for it).
High CVE: [GHSA redacted] web/package-lock.json— immutable 4.3.7: [GHSA redacted] — immutable is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin immutable to 4.3.9 with an `overrides` entry). This is 1 of 3 advisories with a published fix this scan raises against immutable 4.3.7, and their fixed versions do not agree — anything below 4.3.9 still leaves at least one of them open. Take this package to 4.3.9 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against immutable 4.3.7: [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web/package-lock.json— js-cookie 3.0.5: [GHSA redacted] — js-cookie is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin js-cookie to 3.0.7 with an `overrides` entry).
High CVE: [GHSA redacted] web/package-lock.json— js-yaml 3.14.2: [GHSA redacted] — js-yaml is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin js-yaml to 3.15.0 with an `overrides` entry). This one row stands for the 2 advisories this scan raises against js-yaml 3.14.2: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web/package-lock.json— js-yaml 4.1.1: [GHSA redacted] — js-yaml is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin js-yaml to 4.3.0 with an `overrides` entry). This is 1 of 2 advisories with a published fix this scan raises against js-yaml 4.1.1, and their fixed versions do not agree — anything below 4.3.0 still leaves at least one of them open. Take this package to 4.3.0 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against js-yaml 4.1.1: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web/package-lock.json— minimatch 3.1.2: [GHSA redacted] — minimatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin minimatch to 3.1.4 with an `overrides` entry). This is 1 of 3 advisories with a published fix this scan raises against minimatch 3.1.2, and their fixed versions do not agree — anything below 3.1.4 still leaves at least one of them open. Take this package to 3.1.4 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against minimatch 3.1.2: [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web/package-lock.json— minimatch 5.1.6: [GHSA redacted] — minimatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin minimatch to 5.1.8 with an `overrides` entry). This is 1 of 3 advisories with a published fix this scan raises against minimatch 5.1.6, and their fixed versions do not agree — anything below 5.1.8 still leaves at least one of them open. Take this package to 5.1.8 or later: that is the floor for the package, not this row's target alone. This one row stands for the 3 advisories this scan raises against minimatch 5.1.6: [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web/package-lock.json— node-fetch 1.7.3: [GHSA redacted] — node-fetch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (— 2.6.7 is a MAJOR ahead of the resolved 1.7.3, so an `overrides` pin would force a breaking version under a dependent written against 1.7.3; upgrading the declaring package is the remedy, and where no patched release exists in your major line, record the exposure instead).
High CVE: [GHSA redacted] web/package-lock.json— pdfjs-dist 2.16.105: [GHSA redacted] — pdfjs-dist is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (— 4.2.67 is a MAJOR ahead of the resolved 2.16.105, so an `overrides` pin would force a breaking version under a dependent written against 2.16.105; upgrading the declaring package is the remedy, and where no patched release exists in your major line, record the exposure instead).
High CVE: [GHSA redacted] web/package-lock.json— picomatch 2.3.1: [GHSA redacted] — picomatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin picomatch to 2.3.2 with an `overrides` entry). This one row stands for the 2 advisories this scan raises against picomatch 2.3.1: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web/package-lock.json— picomatch 4.0.3: [GHSA redacted] — picomatch is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin picomatch to 4.0.4 with an `overrides` entry). This one row stands for the 2 advisories this scan raises against picomatch 4.0.3: [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] sdk/python/uv.lock— pillow 12.0.0: [GHSA redacted] — this repo declares pillow 11.1.0, but the vulnerable 12.0.0 is a SEPARATE copy on another release line, so editing your own pillow entry cannot move it: upgrade the dependency that pulls it in (or raise its floor in your own manifest and re-resolve (`uv lock --upgrade-package pillow`)). This is 1 of 19 advisories with a published fix this scan raises against pillow 12.0.0, and their fixed versions do not agree — anything below 12.3.0 still leaves at least one of them open. Take this package to 12.3.0 or later: that is the floor for the package, not this row's target alone. This one row stands for the 19 advisories this scan raises against pillow 12.0.0: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web/package-lock.json— postcss 8.5.6: [GHSA redacted] — this repo declares postcss ^8.5.6, a range that ALREADY admits the fixed 8.5.12, so there is no manifest edit to make here. Re-resolve the lock so postcss moves onto 8.5.12 or later; if the flagged 8.5.6 comes back, a dependency is pinning it — upgrade that dependent, or pin postcss with an `overrides` entry so only one copy resolves. This is 1 of 4 advisories with a published fix this scan raises against postcss 8.5.6, and their fixed versions do not agree — anything below 8.5.23 still leaves at least one of them open. Take this package to 8.5.23 or later: that is the floor for the package, not this row's target alone. This one row stands for the 4 advisories this scan raises against postcss 8.5.6: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] uv.lock— pyarrow 22.0.0: [GHSA redacted] — pyarrow is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or raise its floor in your own manifest and re-resolve (`uv lock --upgrade-package pyarrow`)).
High CVE: [GHSA redacted] web/package-lock.json— react-router 7.11.0: [GHSA redacted] — this repo declares react-router ^7.10.1, a range that ALREADY admits the fixed 7.12.0, so there is no manifest edit to make here. Re-resolve the lock so react-router moves onto 7.12.0 or later; if the flagged 7.11.0 comes back, a dependency is pinning it — upgrade that dependent, or pin react-router with an `overrides` entry so only one copy resolves. This is 1 of 14 advisories with a published fix this scan raises against react-router 7.11.0, and their fixed versions do not agree — anything below 7.18.0 still leaves at least one of them open. Take this package to 7.18.0 or later: that is the floor for the package, not this row's target alone. This one row stands for the 14 advisories this scan raises against react-router 7.11.0: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High CVE: [GHSA redacted] web/package-lock.json— rollup 4.54.0: [GHSA redacted] — rollup is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin rollup to 4.59.0 with an `overrides` entry).
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: KSV-0014 helm/templates/infinity.yaml— Root file system is not read-only
High IaC: KSV-0014 helm/templates/minio.yaml— Root file system is not read-only
High IaC: KSV-0014 helm/templates/mysql.yaml— Root file system is not read-only
High IaC: KSV-0014 helm/templates/ragflow.yaml— Root file system is not read-only
High IaC: KSV-0014 helm/templates/redis.yaml— Root file system is not read-only
D38 · OSV Dependency Vulnerabilities· High vulnerability · ×4
High vulnerability: [GHSA redacted] uv.lock— cryptography 46.0.7: [GHSA redacted] — cryptography is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or raise its floor in your own manifest and re-resolve (`uv lock --upgrade-package cryptography`)). This is 1 of 4 advisories with a published fix this scan raises against cryptography 46.0.7, and their fixed versions do not agree — anything below 50.0.0 still leaves at least one of them open. Take this package to 50.0.0 or later: that is the floor for the package, not this row's target alone. This one row stands for the 4 advisories this scan raises against cryptography 46.0.7: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
High vulnerability: [GHSA redacted] go.mod— google.golang.org/grpc 1.82.0: [GHSA redacted] — google.golang.org/grpc is not a DIRECT requirement of this module: go.mod records it as `// indirect`, pulled in transitively, so raise it in place (run `go get google.golang.org/grpc@v1.82.1`, which updates the require line go.mod already holds for it).
High vulnerability: [GHSA redacted] web/package-lock.json— serialize-javascript 6.0.2: [GHSA redacted] — serialize-javascript is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (— 7.0.3 is a MAJOR ahead of the resolved 6.0.2, so an `overrides` pin would force a breaking version under a dependent written against 6.0.2; upgrading the declaring package is the remedy, and where no patched release exists in your major line, record the exposure instead). This is 1 of 2 advisories with a published fix this scan raises against serialize-javascript 6.0.2, and their fixed versions do not agree — anything below 7.0.5 still leaves at least one of them open. Take this package to 7.0.5 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against serialize-javascript 6.0.2: [GHSA redacted], [GHSA redacted].
High vulnerability: [GHSA redacted] web/package-lock.json— svgo 3.3.2: [GHSA redacted] — svgo is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin svgo to 3.3.4 with an `overrides` entry). This is 1 of 2 advisories with a published fix this scan raises against svgo 3.3.2, and their fixed versions do not agree — anything below 3.3.4 still leaves at least one of them open. Take this package to 3.3.4 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against svgo 3.3.2: [GHSA redacted], [GHSA redacted].
Leaked secret: hardcoded-credential conf/service_conf.yaml:31— hardcoded-credential detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Leaked secret: high-entropy-secret example/sdk/dataset_example.py:25— high-entropy-secret detected. Treat the value as compromised: it is readable by everyone who has ever had the repository, and deleting the line does not un-publish it. In order — (1) REVOKE it at whatever issued it and issue a replacement, which is the only step that actually closes the exposure; (2) load the replacement at run time from your platform's secret store or the process environment instead of from the tree, so no future value is committable; (3) remove the file or line and add its path to the repository's ignore rules, so it cannot come back; (4) if the value was ever live, purge it from the history as well, since a clone taken before the deletion still carries it. If this is instead a FIXTURE — key material generated for tests and valid nowhere — then the exposure is nil and the fix is to make that legible: generate it in test setup, or keep it under a test-data path, so a reader (and this scan) can tell it from the real thing.
Orphaned knowledge common/data_source/google_drive/doc_conversion.py— No living knowledge remains for this large file — its last meaningful change has decayed away; if it breaks, no one currently understands it. Schedule a read-through / add characterisation tests before it bites.
Critical CVE: [GHSA redacted] web/package-lock.json— shell-quote 1.8.3: [GHSA redacted] — shell-quote is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin shell-quote to 1.8.4 with an `overrides` entry). This is 1 of 2 advisories with a published fix this scan raises against shell-quote 1.8.3, and their fixed versions do not agree — anything below 1.9.0 still leaves at least one of them open. Take this package to 1.9.0 or later: that is the floor for the package, not this row's target alone. This one row stands for the 2 advisories this scan raises against shell-quote 1.8.3: [GHSA redacted], [GHSA redacted].
Duplicated block (11 lines × 2) internal/admin/handler.go:636— internal/admin/handler.go:636-646 | internal/handler/system.go:239-249 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) internal/admin/handler_ee.go:569— internal/admin/handler_ee.go:569-579 | internal/admin/handler_ee.go:693-703 — 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 `internal/admin/handler_ee.go:569` 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) internal/admin/handler_ee.go:900— internal/admin/handler_ee.go:900-911 | internal/admin/handler_ee.go:1622-1632 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) internal/admin/handler_ee.go:1753— internal/admin/handler_ee.go:1753-1763 | internal/admin/handler_ee.go:1860-1870 — 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 `internal/admin/handler_ee.go:1753` 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) internal/admin/handler_ee.go:1836— internal/admin/handler_ee.go:1836-1846 | internal/admin/handler_ee.go:1887-1897 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) internal/admin/service.go:714— internal/admin/service.go:714-724 | internal/admin/service.go:756-766 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) internal/admin/service.go:792— internal/admin/service.go:792-802 | internal/admin/service.go:824-834 — 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 `internal/admin/service.go:792` 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 (11 lines × 2) internal/admin/service.go:866— internal/admin/service.go:866-876 | internal/admin/service.go:907-917 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) internal/agent/canvas/scheduler.go:299— internal/agent/canvas/scheduler.go:299-309 | internal/agent/canvas/scheduler.go:371-381 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/agent/canvas/scheduler.go:299` 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) internal/agent/component/agent.go:964— internal/agent/component/agent.go:964-974 | internal/agent/component/categorize.go:128-138 — 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 `internal/agent/component/agent.go:964` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (11 lines × 2) internal/agent/component/llm.go:265— internal/agent/component/llm.go:265-275 | internal/agent/component/llm.go:1033-1043 — 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 `internal/agent/component/llm.go:265` 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 (11 lines × 2) internal/channels/qqbot.go:126— internal/channels/qqbot.go:126-136 | internal/channels/wecom.go:257-267 — 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 `internal/channels/qqbot.go:126` 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) internal/channels/qqbot.go:478— internal/channels/qqbot.go:478-488 | internal/channels/wecom.go:615-625 — 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 `internal/channels/qqbot.go:478` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) internal/cli/filesystem/skill.go:1338— internal/cli/filesystem/skill.go:1338-1348 | internal/cli/filesystem/skill.go:2039-2049 — 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 `internal/cli/filesystem/skill.go:1338` 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 (11 lines × 2) internal/cli/filesystem_command.go:384— internal/cli/filesystem_command.go:384-394 | internal/cli/filesystem_command.go:411-421 — 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 `internal/cli/filesystem_command.go:384` 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) internal/dao/connector.go:347— internal/dao/connector.go:347-357 | internal/dao/connector.go:392-402 — 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 `internal/dao/connector.go:347` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (11 lines × 2) internal/deepdoc/parser/pdf/util/crop.go:135— internal/deepdoc/parser/pdf/util/crop.go:135-145 | internal/deepdoc/parser/pdf/util/crop.go:292-302 — 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 `internal/deepdoc/parser/pdf/util/crop.go:135` 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) internal/deepdoc/parser/pdf/util/crop.go:202— internal/deepdoc/parser/pdf/util/crop.go:202-212 | internal/deepdoc/parser/pdf/util/crop.go:404-414 — 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 `internal/deepdoc/parser/pdf/util/crop.go:202` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) internal/engine/elasticsearch/chunk.go:540— internal/engine/elasticsearch/chunk.go:540-550 | internal/engine/elasticsearch/chunk.go:561-571 — 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 `internal/engine/elasticsearch/chunk.go:540` 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) internal/engine/elasticsearch/chunk.go:1366— internal/engine/elasticsearch/chunk.go:1366-1376 | internal/engine/elasticsearch/chunk.go:1400-1410 — 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 `internal/engine/elasticsearch/chunk.go:1366` 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) internal/engine/elasticsearch/chunk.go:2121— internal/engine/elasticsearch/chunk.go:2121-2131 | internal/engine/infinity/chunk.go:1800-1812 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/engine/elasticsearch/chunk.go:2121` 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) internal/engine/elasticsearch/chunk.go:3051— internal/engine/elasticsearch/chunk.go:3051-3061 | internal/engine/infinity/chunk.go:2355-2365 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/engine/elasticsearch/chunk.go:3051` 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 (11 lines × 2) internal/engine/elasticsearch/document.go:124— internal/engine/elasticsearch/document.go:124-134 | internal/engine/elasticsearch/document.go:201-211 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) internal/engine/infinity/chunk.go:1324— internal/engine/infinity/chunk.go:1324-1334 | internal/engine/infinity/chunk.go:1372-1382 — 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 `internal/engine/infinity/chunk.go:1324` 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) internal/entity/models/302ai.go:159— internal/entity/models/302ai.go:159-169 | internal/entity/models/minimax.go:196-207 — 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 `internal/entity/models/302ai.go:159` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/admin/handler.go:1173— internal/admin/handler.go:1173-1185 | internal/handler/models.go:44-56 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/admin/handler.go:1173` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/agent/sandbox/e2b.go:222— internal/agent/sandbox/e2b.go:222-235 | internal/agent/sandbox/tenki.go:202-214 — 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. 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 × 2) internal/agent/sandbox/e2b.go:237— internal/agent/sandbox/e2b.go:237-249 | internal/agent/sandbox/tenki.go:215-228 — 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. 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 × 2) internal/agent/workflowx/loop.go:629— internal/agent/workflowx/loop.go:629-641 | internal/agent/workflowx/loop.go:656-668 — 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 `internal/agent/workflowx/loop.go:629` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/channels/dingtalk.go:517— internal/channels/dingtalk.go:517-529 | internal/channels/feishu.go:439-451 — 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 `internal/channels/dingtalk.go:517` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/channels/discord.go:518— internal/channels/discord.go:518-531 | internal/channels/whatsapp.go:440-452 — 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 `internal/channels/discord.go:518` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/cli/admin_command.go:415— internal/cli/admin_command.go:415-427 | internal/cli/admin_command.go:533-545 — 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 `internal/cli/admin_command.go:415` 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) internal/cli/filesystem/skill.go:387— internal/cli/filesystem/skill.go:387-399 | internal/cli/filesystem/skill.go:948-960 — 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 `internal/cli/filesystem/skill.go:387` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/cli/filesystem/skill.go:1389— internal/cli/filesystem/skill.go:1389-1401 | internal/cli/filesystem/skill.go:2095-2107 — 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 `internal/cli/filesystem/skill.go:1389` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (13 lines × 2) internal/cli/http_client.go:140— internal/cli/http_client.go:140-152 | internal/cli/http_client.go:210-222 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 × 2) internal/cli/response.go:901— internal/cli/response.go:901-913 | internal/cli/response.go:1276-1288 — 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 `internal/cli/response.go:901` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/engine/elasticsearch/chunk.go:1643— internal/engine/elasticsearch/chunk.go:1643-1655 | internal/engine/infinity/chunk.go:1465-1477 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/engine/elasticsearch/chunk.go:1643` 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) internal/engine/elasticsearch/chunk.go:3030— internal/engine/elasticsearch/chunk.go:3030-3042 | internal/engine/infinity/chunk.go:2334-2346 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/engine/elasticsearch/chunk.go:3030` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/entity/models/302ai.go:194— internal/entity/models/302ai.go:194-206 | internal/entity/models/jiekouai.go:195-207 — 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 `internal/entity/models/302ai.go:194` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) internal/entity/models/302ai.go:556— internal/entity/models/302ai.go:556-568 | internal/entity/models/mistral.go:647-659 — 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 `internal/entity/models/302ai.go:556` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/entity/models/aliyun.go:307— internal/entity/models/aliyun.go:307-319 | internal/entity/models/gitee.go:269-282 — 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 `internal/entity/models/aliyun.go:307` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/entity/models/astraflow.go:368— internal/entity/models/astraflow.go:368-380 | internal/entity/models/xinference.go:471-483 — 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 `internal/entity/models/astraflow.go:368` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/entity/models/baidu.go:284— internal/entity/models/baidu.go:284-296 | internal/entity/models/huaweicloud.go:343-355 — 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 `internal/entity/models/baidu.go:284` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/entity/models/bedrock.go:878— internal/entity/models/bedrock.go:878-890 | internal/entity/models/bedrock.go:982-994 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (13 lines × 2) internal/entity/models/cohere.go:577— internal/entity/models/cohere.go:577-589 | internal/entity/models/xinference.go:378-391 — 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 `internal/entity/models/cohere.go:577` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/entity/models/deepinfra.go:243— internal/entity/models/deepinfra.go:243-255 | internal/entity/models/huaweicloud.go:396-408 — 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 `internal/entity/models/deepinfra.go:243` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (13 lines × 2) internal/entity/models/deepinfra.go:447— internal/entity/models/deepinfra.go:447-459 | internal/entity/models/deepinfra.go:525-537 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/entity/models/deepinfra.go:447` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/entity/models/fishaudio.go:201— internal/entity/models/fishaudio.go:201-213 | internal/entity/models/fishaudio.go:264-276 — 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 `internal/entity/models/fishaudio.go:201` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) internal/entity/models/fishaudio.go:249— internal/entity/models/fishaudio.go:249-261 | internal/entity/models/togetherai.go:549-561 — 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. 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 × 2) internal/entity/models/gitee.go:222— internal/entity/models/gitee.go:222-234 | internal/entity/models/openrouter.go:212-224 — 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 `internal/entity/models/gitee.go:222` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) internal/agent/component/agent.go:1025— internal/agent/component/agent.go:1025-1036 | internal/agent/component/llm.go:198-209 — 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 `internal/agent/component/agent.go:1025` 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) internal/agent/component/universe_a_wrappers.go:50— internal/agent/component/universe_a_wrappers.go:50-61 | internal/agent/tool/tool2component.go:60-71 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/agent/component/universe_a_wrappers.go:50` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) internal/channels/dingtalk.go:148— internal/channels/dingtalk.go:148-159 | internal/channels/feishu.go:146-158 — 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. 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) internal/channels/feishu.go:329— internal/channels/feishu.go:329-340 | internal/channels/line.go:334-345 — 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 `internal/channels/feishu.go:329` 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) internal/cli/admin_command.go:137— internal/cli/admin_command.go:137-148 | internal/cli/admin_command.go:1887-1898 — 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 `internal/cli/admin_command.go:137` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) internal/cli/admin_command.go:269— internal/cli/admin_command.go:269-280 | internal/cli/admin_command.go:291-302 — 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 `internal/cli/admin_command.go:269` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) internal/cli/admin_command.go:447— internal/cli/admin_command.go:447-459 | internal/cli/admin_command.go:2446-2457 — 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 `internal/cli/admin_command.go:447` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) internal/cli/admin_command.go:906— internal/cli/admin_command.go:906-917 | internal/cli/admin_command.go:972-983 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (12 lines × 2) internal/cli/admin_command.go:998— internal/cli/admin_command.go:998-1009 | internal/cli/admin_command.go:1407-1418 — 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 `internal/cli/admin_command.go:998` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) internal/cli/admin_command.go:1105— internal/cli/admin_command.go:1105-1116 | internal/cli/admin_command.go:1671-1682 — 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 `internal/cli/admin_command.go:1105` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) internal/cli/admin_command.go:1183— internal/cli/admin_command.go:1183-1194 | internal/cli/admin_command.go:1204-1215 — 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 `internal/cli/admin_command.go:1183` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) internal/cli/filesystem/skill.go:375— internal/cli/filesystem/skill.go:375-386 | internal/cli/filesystem/skill.go:934-945 — 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 `internal/cli/filesystem/skill.go:375` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) internal/cli/filesystem/skill.go:828— internal/cli/filesystem/skill.go:828-839 | internal/cli/filesystem/skill.go:890-901 — 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 `internal/cli/filesystem/skill.go:828` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) internal/cli/filesystem/skill.go:1306— internal/cli/filesystem/skill.go:1306-1317 | internal/cli/filesystem/skill.go:2007-2018 — 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 `internal/cli/filesystem/skill.go:1306` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) internal/cli/filesystem_command.go:368— internal/cli/filesystem_command.go:368-380 | internal/cli/filesystem_command.go:493-504 — 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 `internal/cli/filesystem_command.go:368` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) internal/cli/http_client.go:236— internal/cli/http_client.go:236-247 | internal/cli/http_client.go:354-365 — 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 (12 lines × 2) internal/cli/response.go:1026— internal/cli/response.go:1026-1037 | internal/cli/response.go:1085-1096 — 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 `internal/cli/response.go:1026` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) internal/engine/elasticsearch/meta_filter.go:589— internal/engine/elasticsearch/meta_filter.go:589-600 | internal/engine/infinity/meta_filter.go:490-501 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/engine/elasticsearch/meta_filter.go:589` 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) internal/engine/infinity/meta_filter.go:318— internal/engine/infinity/meta_filter.go:318-329 | internal/engine/infinity/meta_filter.go:339-350 — 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 `internal/engine/infinity/meta_filter.go:318` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) internal/entity/models/302ai.go:130— internal/entity/models/302ai.go:130-141 | internal/entity/models/localai.go:103-115 — 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.
Duplicated block (12 lines × 2) internal/entity/models/302ai.go:519— internal/entity/models/302ai.go:519-530 | internal/entity/models/mistral.go:610-621 — 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 `internal/entity/models/302ai.go:519` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) internal/entity/models/baidu.go:508— internal/entity/models/baidu.go:508-519 | internal/entity/models/orcarouter.go:203-214 — 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 `internal/entity/models/baidu.go:508` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) internal/entity/models/builtin.go:95— internal/entity/models/builtin.go:95-106 | internal/entity/models/huggingface.go:165-176 — 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 `internal/entity/models/builtin.go:95` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) internal/entity/models/cohere.go:528— internal/entity/models/cohere.go:528-539 | internal/entity/models/ppio.go:361-372 — 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 `internal/entity/models/cohere.go:528` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) internal/entity/models/deepinfra.go:80— internal/entity/models/deepinfra.go:80-91 | internal/entity/models/deepinfra.go:120-131 — 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 `internal/entity/models/deepinfra.go:80` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) internal/admin/handler_ee.go:340— internal/admin/handler_ee.go:340-349 | internal/handler/providers.go:137-146 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (10 lines × 2) internal/admin/handler_ee.go:392— internal/admin/handler_ee.go:392-401 | internal/handler/providers.go:227-236 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) internal/admin/service.go:225— internal/admin/service.go:225-234 | internal/admin/service.go:559-568 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) internal/agent/component/variable_aggregator.go:63— internal/agent/component/variable_aggregator.go:63-72 | internal/agent/component/variable_assigner.go:69-78 — 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 `internal/agent/component/variable_aggregator.go:63` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) internal/agent/tool/querit.go:506— internal/agent/tool/querit.go:506-515 | internal/ingestion/component/knowledge_compiler/structure/compile.go:81-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/agent/tool/querit.go:506` 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) internal/cli/admin_command.go:2513— internal/cli/admin_command.go:2513-2523 | internal/cli/admin_command.go:2540-2549 — 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 `internal/cli/admin_command.go:2513` 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) internal/cli/admin_command.go:2547— internal/cli/admin_command.go:2547-2556 | internal/cli/admin_command.go:2713-2723 — 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 `internal/cli/admin_command.go:2713` 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 (10 lines × 2) internal/cli/benchmark.go:75— internal/cli/benchmark.go:75-84 | internal/cli/benchmark.go:156-165 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/cli/benchmark.go:75` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) internal/cli/cli.go:180— internal/cli/cli.go:180-189 | internal/cli/cli.go:323-332 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/cli/cli.go:180` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) internal/cli/filesystem/skill.go:1263— internal/cli/filesystem/skill.go:1263-1272 | internal/cli/filesystem/skill.go:1959-1968 — 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 `internal/cli/filesystem/skill.go:1263` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) internal/dao/file.go:77— internal/dao/file.go:77-86 | internal/dao/kb.go:552-561 — 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 `internal/dao/file.go:77` 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) internal/engine/elasticsearch/document.go:61— internal/engine/elasticsearch/document.go:61-70 | internal/engine/elasticsearch/document.go:249-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) internal/engine/elasticsearch/meta_filter.go:197— internal/engine/elasticsearch/meta_filter.go:197-206 | internal/engine/infinity/meta_filter.go:81-90 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/engine/elasticsearch/meta_filter.go:197` 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 × 2) internal/entity/models/anthropic.go:82— internal/entity/models/anthropic.go:82-91 | internal/entity/models/anthropic.go:397-406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) internal/entity/models/anthropic.go:493— internal/entity/models/anthropic.go:493-502 | internal/entity/models/zhipu-ai.go:631-640 — 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 `internal/entity/models/anthropic.go:493` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (10 lines × 2) internal/entity/models/base_model.go:216— internal/entity/models/base_model.go:216-225 | internal/entity/models/base_model.go:247-256 — 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) internal/entity/models/huaweicloud.go:277— internal/entity/models/huaweicloud.go:277-286 | internal/entity/models/huaweicloud.go:382-391 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) internal/entity/models/mistral.go:172— internal/entity/models/mistral.go:172-181 | internal/entity/models/tokenhub.go:96-105 — 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.
Duplicated block (10 lines × 2) internal/entity/models/nvidia.go:107— internal/entity/models/nvidia.go:107-116 | internal/entity/models/xiaomi.go:115-126 — 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.
Duplicated block (10 lines × 2) internal/entity/models/openrouter.go:102— internal/entity/models/openrouter.go:102-115 | internal/entity/models/orcarouter.go:90-99 — 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 `internal/entity/models/openrouter.go:102` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) internal/entity/models/openrouter.go:276— internal/entity/models/openrouter.go:276-285 | internal/entity/models/siliconflow.go:440-449 — 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.
Duplicated block (10 lines × 2) internal/entity/models/ragcon.go:272— internal/entity/models/ragcon.go:272-281 | internal/entity/models/siliconflow.go:479-488 — 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 `internal/entity/models/ragcon.go:272` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) internal/entity/models/replicate.go:236— internal/entity/models/replicate.go:236-245 | internal/entity/models/replicate.go:276-285 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/entity/models/replicate.go:236` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (10 lines × 2) internal/entity/models/xinference.go:150— internal/entity/models/xinference.go:150-159 | internal/entity/models/xinference.go:258-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/entity/models/xinference.go:150` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) internal/handler/bot.go:63— internal/handler/bot.go:63-72 | internal/handler/bot.go:186-195 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) internal/admin/service.go:1160— internal/admin/service.go:1160-1167 | internal/admin/service.go:1172-1179 — 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 `internal/admin/service.go:1160` 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 (8 lines × 2) internal/agent/canvas/loop_subgraph.go:246— internal/agent/canvas/loop_subgraph.go:246-253 | internal/agent/canvas/scheduler.go:569-576 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) internal/agent/component/categorize.go:374— internal/agent/component/categorize.go:374-381 | internal/agent/component/categorize.go:538-548 — 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 `internal/agent/component/categorize.go:374` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) internal/agent/component/data_operations.go:146— internal/agent/component/data_operations.go:146-153 | internal/agent/component/loop.go:200-207 — 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 `internal/agent/component/data_operations.go:146` 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 (8 lines × 2) internal/agent/component/llm.go:909— internal/agent/component/llm.go:909-916 | internal/agent/component/llm.go:1289-1296 — 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 `internal/agent/component/llm.go:909` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) internal/agent/runtime/state.go:711— internal/agent/runtime/state.go:711-718 | internal/agent/runtime/state.go:728-735 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/agent/runtime/state.go:711` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) internal/agent/workflowx/loop.go:911— internal/agent/workflowx/loop.go:911-918 | internal/agent/workflowx/parallel.go:758-765 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8 lines × 2) internal/channels/dingtalk.go:449— internal/channels/dingtalk.go:449-457 | internal/channels/line.go:425-432 — 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 `internal/channels/dingtalk.go:449` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8 lines × 2) internal/cli/filesystem/file.go:115— internal/cli/filesystem/file.go:115-122 | internal/cli/filesystem/file.go:499-508 — 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 `internal/cli/filesystem/file.go:115` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) internal/cli/filesystem/skill.go:810— internal/cli/filesystem/skill.go:810-817 | internal/cli/filesystem/skill.go:871-878 — 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 `internal/cli/filesystem/skill.go:810` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) internal/common/multimodal.go:313— internal/common/multimodal.go:313-320 | internal/common/multimodal.go:334-341 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/common/multimodal.go:313` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) internal/engine/infinity/chunk.go:279— internal/engine/infinity/chunk.go:279-286 | internal/engine/infinity/document.go:46-53 — 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 `internal/engine/infinity/chunk.go:279` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) internal/entity/base.go:91— internal/entity/base.go:91-98 | internal/entity/base.go:113-120 — 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 `internal/entity/base.go:91` 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 (8 lines × 2) internal/entity/models/aliyun.go:413— internal/entity/models/aliyun.go:413-420 | internal/entity/models/openai_api_compatible.go:261-268 — 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 `internal/entity/models/aliyun.go:413` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) internal/entity/models/baichuan.go:85— internal/entity/models/baichuan.go:85-93 | internal/entity/models/tokenhub.go:101-108 — 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 `internal/entity/models/baichuan.go:85` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) internal/entity/models/base_model.go:280— internal/entity/models/base_model.go:280-287 | internal/entity/models/replicate.go:426-433 — 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 `internal/entity/models/base_model.go:280` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (8 lines × 2) internal/entity/models/base_model.go:488— internal/entity/models/base_model.go:488-495 | internal/entity/models/replicate.go:221-229 — 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.
Duplicated block (8 lines × 2) internal/entity/models/gpustack.go:256— internal/entity/models/gpustack.go:256-263 | internal/entity/models/xinference.go:205-212 — 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 `internal/entity/models/gpustack.go:256` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) internal/entity/models/huaweicloud.go:501— internal/entity/models/huaweicloud.go:501-508 | internal/entity/models/perplexity.go:147-154 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) internal/entity/models/jiekouai.go:208— internal/entity/models/jiekouai.go:208-215 | internal/entity/models/jiekouai.go:297-304 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (8 lines × 2) internal/entity/models/mistral.go:370— internal/entity/models/mistral.go:370-378 | internal/entity/models/mistral.go:499-506 — 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 `internal/entity/models/mistral.go:370` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) internal/entity/models/ollama.go:77— internal/entity/models/ollama.go:77-84 | internal/entity/models/ollama.go:114-121 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/entity/models/ollama.go:77` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) internal/entity/models/openai.go:483— internal/entity/models/openai.go:483-490 | internal/entity/models/openai.go:559-566 — 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 `internal/entity/models/openai.go:483` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (8 lines × 2) internal/entity/models/openai.go:651— internal/entity/models/openai.go:651-658 | internal/entity/models/stepfun.go:323-330 — 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 `internal/entity/models/openai.go:651` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) internal/entity/models/openai_api_compatible.go:257— internal/entity/models/openai_api_compatible.go:257-264 | internal/entity/models/openai_api_compatible.go:340-347 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Medium IaC: DS-0013 Dockerfile— 'RUN cd ...' to change directory
Medium IaC: KSV-0001 helm/templates/infinity.yaml— Can elevate its own privileges
Medium IaC: KSV-0012 helm/templates/infinity.yaml— Runs as root user One securityContext edit clears this facet's near-duplicate rules together: KSV-0012, KSV-0020, KSV-0021.
Medium IaC: KSV-0022 helm/templates/infinity.yaml— Specific capabilities added
Medium IaC: KSV-0125 helm/templates/infinity.yaml— Restrict container images to trusted registries
Medium IaC: KSV-0001 helm/templates/minio.yaml— Can elevate its own privileges
Medium IaC: KSV-0012 helm/templates/minio.yaml— Runs as root user One securityContext edit clears this facet's near-duplicate rules together: KSV-0012, KSV-0020, KSV-0021.
Medium IaC: KSV-0104 helm/templates/minio.yaml— Seccomp policies disabled One securityContext edit clears this facet's near-duplicate rules together: KSV-0030, KSV-0104.
Medium IaC: KSV-0125 helm/templates/minio.yaml— Restrict container images to trusted registries
Medium IaC: KSV-0001 helm/templates/mysql.yaml— Can elevate its own privileges
Medium IaC: KSV-0012 helm/templates/mysql.yaml— Runs as root user One securityContext edit clears this facet's near-duplicate rules together: KSV-0012, KSV-0020, KSV-0021.
Medium IaC: KSV-0104 helm/templates/mysql.yaml— Seccomp policies disabled One securityContext edit clears this facet's near-duplicate rules together: KSV-0030, KSV-0104.
Medium IaC: KSV-0001 helm/templates/ragflow.yaml— Can elevate its own privileges
Medium IaC: KSV-0012 helm/templates/ragflow.yaml— Runs as root user One securityContext edit clears this facet's near-duplicate rules together: KSV-0012, KSV-0020, KSV-0021.
Medium IaC: KSV-0104 helm/templates/ragflow.yaml— Seccomp policies disabled One securityContext edit clears this facet's near-duplicate rules together: KSV-0030, KSV-0104.
Medium IaC: KSV-0117 helm/templates/ragflow.yaml— Prevent binding to privileged ports
Medium IaC: KSV-0125 helm/templates/ragflow.yaml— Restrict container images to trusted registries
Medium IaC: KSV-0001 helm/templates/redis.yaml— Can elevate its own privileges
Medium IaC: KSV-0012 helm/templates/redis.yaml— Runs as root user One securityContext edit clears this facet's near-duplicate rules together: KSV-0012, KSV-0020, KSV-0021.
Medium IaC: KSV-0104 helm/templates/redis.yaml— Seccomp policies disabled One securityContext edit clears this facet's near-duplicate rules together: KSV-0030, KSV-0104.
Medium IaC: KSV-0125 helm/templates/redis.yaml— Restrict container images to trusted registries
Medium IaC: CKV_DOCKER_9 Dockerfile:76— Ensure that APT isn't used
Medium IaC: CKV_DOCKER_8 Dockerfile:59— Ensure the last USER is not root
Medium IaC: CKV_DOCKER_2 Dockerfile:1— Ensure that HEALTHCHECK instructions have been added to container images
Medium IaC: CKV_DOCKER_4 Dockerfile.scratch.oc9:27— Ensure that COPY is used instead of ADD in Dockerfiles
Duplicated block (9 lines × 2) internal/agent/component/llm.go:925— internal/agent/component/llm.go:925-933 | internal/agent/component/llm.go:1328-1336 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) internal/agent/tool/duckduckgo.go:225— internal/agent/tool/duckduckgo.go:225-233 | internal/agent/tool/duckduckgo.go:356-364 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (9 lines × 2) internal/agent/workflowx/parallel.go:518— internal/agent/workflowx/parallel.go:518-526 | internal/agent/workflowx/parallel.go:534-542 — 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 `internal/agent/workflowx/parallel.go:518` 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 (9 lines × 2) internal/channels/feishu.go:256— internal/channels/feishu.go:256-266 | internal/channels/line.go:268-276 — 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 `internal/channels/feishu.go:256` 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 (9 lines × 2) internal/cli/admin_command.go:1464— internal/cli/admin_command.go:1464-1473 | internal/cli/admin_command.go:1722-1730 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) internal/cli/response.go:1013— internal/cli/response.go:1013-1021 | internal/cli/response.go:1072-1080 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) internal/common/multimodal.go:101— internal/common/multimodal.go:101-109 | internal/common/multimodal.go:123-131 — 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 `internal/common/multimodal.go:101` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) internal/dao/chat.go:195— internal/dao/chat.go:195-203 | internal/dao/chat_session.go:82-90 — 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.
Duplicated block (9 lines × 2) internal/engine/elasticsearch/chunk.go:134— internal/engine/elasticsearch/chunk.go:134-142 | internal/engine/elasticsearch/document.go:59-67 — 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 `internal/engine/elasticsearch/chunk.go:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (9 lines × 2) internal/engine/infinity/chunk.go:1444— internal/engine/infinity/chunk.go:1444-1452 | internal/engine/infinity/chunk.go:1662-1670 — 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 `internal/engine/infinity/chunk.go:1444` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) internal/entity/models/baidu.go:128— internal/entity/models/baidu.go:128-138 | internal/entity/models/localai.go:108-116 — 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 `internal/entity/models/baidu.go:128` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) internal/entity/models/fishaudio.go:294— internal/entity/models/fishaudio.go:294-302 | internal/entity/models/togetherai.go:597-605 — 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 `internal/entity/models/fishaudio.go:294` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (9 lines × 2) internal/entity/models/funasr.go:159— internal/entity/models/funasr.go:159-167 | internal/entity/models/xinference.go:412-421 — 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. 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) internal/entity/models/huaweicloud.go:308— internal/entity/models/huaweicloud.go:308-316 | internal/entity/models/huaweicloud.go:413-421 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (9 lines × 2) internal/entity/models/jiekouai.go:164— internal/entity/models/jiekouai.go:164-172 | internal/entity/models/jina.go:154-162 — 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 `internal/entity/models/jiekouai.go:164` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) internal/entity/models/mineru.go:249— internal/entity/models/mineru.go:249-257 | internal/entity/models/volcengine.go:488-496 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (9 lines × 2) internal/entity/models/novita.go:108— internal/entity/models/novita.go:108-116 | internal/entity/models/upstage.go:101-109 — 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 `internal/entity/models/novita.go:108` 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) internal/entity/models/novita.go:512— internal/entity/models/novita.go:512-520 | internal/entity/models/xinference.go:270-278 — 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 `internal/entity/models/novita.go:512` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) internal/entity/models/ollama.go:105— internal/entity/models/ollama.go:105-113 | internal/entity/models/vllm.go:117-125 — 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 `internal/entity/models/ollama.go: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. 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) internal/entity/models/openai.go:701— internal/entity/models/openai.go:701-709 | internal/entity/models/xai.go:231-239 — 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 `internal/entity/models/openai.go:701` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) internal/entity/models/openrouter.go:403— internal/entity/models/openrouter.go:403-411 | internal/entity/models/zhipu-ai.go:759-767 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (9 lines × 2) internal/entity/models/ragcon.go:87— internal/entity/models/ragcon.go:87-96 | internal/entity/models/siliconflow.go:83-91 — 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 `internal/entity/models/ragcon.go:87` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) internal/entity/models/voyage.go:76— internal/entity/models/voyage.go:76-84 | internal/entity/models/voyage.go:179-187 — 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 `internal/entity/models/voyage.go:76` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) internal/entity/types.go:56— internal/entity/types.go:56-64 | internal/entity/types.go:86-94 — 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 `internal/entity/types.go:56` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) internal/handler/chat_session.go:458— internal/handler/chat_session.go:458-466 | internal/handler/chat_session.go:495-503 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) internal/agent/sandbox/http.go:118— internal/agent/sandbox/http.go:118-124 | internal/agent/tool/http_helper.go:301-307 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/agent/sandbox/http.go:118` 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 (7 lines × 2) internal/cli/filesystem/file.go:364— internal/cli/filesystem/file.go:364-370 | internal/cli/filesystem/file.go:453-459 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/cli/filesystem/file.go:453` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) internal/dao/kb.go:218— internal/dao/kb.go:218-224 | internal/dao/kb.go:545-551 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/dao/kb.go:218` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/deepdoc/parser/pdf/table/table_post.go:57— internal/deepdoc/parser/pdf/table/table_post.go:57-63 | internal/deepdoc/parser/pdf/table/table_post.go:135-143 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/deepdoc/parser/pdf/table/table_post.go:57` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/deepdoc/parser/pdf/tool/compare.go:511— internal/deepdoc/parser/pdf/tool/compare.go:511-517 | internal/deepdoc/parser/pdf/tool/compare.go:582-588 — 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 `internal/deepdoc/parser/pdf/tool/compare.go:511` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/deepdoc/parser/pdf/util/crop.go:220— internal/deepdoc/parser/pdf/util/crop.go:220-227 | internal/deepdoc/parser/pdf/util/crop.go:419-425 — 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 `internal/deepdoc/parser/pdf/util/crop.go:220` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/engine/elasticsearch/chunk.go:482— internal/engine/elasticsearch/chunk.go:482-488 | internal/engine/elasticsearch/chunk.go:1949-1955 — 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 `internal/engine/elasticsearch/chunk.go:482` 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. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) internal/engine/elasticsearch/chunk.go:658— internal/engine/elasticsearch/chunk.go:658-664 | internal/engine/elasticsearch/chunk.go:862-868 — 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 `internal/engine/elasticsearch/chunk.go:658` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/engine/elasticsearch/chunk.go:1949— internal/engine/elasticsearch/chunk.go:1949-1955 | internal/engine/elasticsearch/chunk.go:2390-2396 — 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 `internal/engine/elasticsearch/chunk.go:1949` 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 (7 lines × 2) internal/entity/models/anthropic.go:409— internal/entity/models/anthropic.go:409-415 | internal/entity/models/huaweicloud.go:501-507 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (7 lines × 2) internal/entity/models/base_model.go:585— internal/entity/models/base_model.go:585-591 | internal/handler/dataset.go:1440-1446 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/entity/models/base_model.go:585` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/entity/models/novita.go:559— internal/entity/models/novita.go:559-565 | internal/entity/models/xinference.go:319-325 — 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 `internal/entity/models/novita.go:559` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/entity/models/openai.go:549— internal/entity/models/openai.go:549-556 | internal/entity/models/ragcon.go:404-410 — 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 `internal/entity/models/openai.go:549` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) internal/entity/models/openai.go:618— internal/entity/models/openai.go:618-625 | internal/entity/models/ragcon.go:567-573 — 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 `internal/entity/models/openai.go:618` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) internal/entity/models/ragcon.go:123— internal/entity/models/ragcon.go:123-129 | internal/entity/models/siliconflow.go:119-125 — 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 `internal/entity/models/ragcon.go:123` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/entity/models/ragcon.go:341— internal/entity/models/ragcon.go:341-347 | internal/entity/models/ragcon.go:515-521 — 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 `internal/entity/models/ragcon.go:341` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/entity/models/xiaomi.go:189— internal/entity/models/xiaomi.go:189-196 | internal/entity/models/xiaomi.go:377-383 — 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 `internal/entity/models/xiaomi.go:189` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) internal/handler/bot.go:158— internal/handler/bot.go:158-164 | internal/handler/bot.go:209-215 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/handler/bot.go:158` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/handler/compilation_template_group.go:134— internal/handler/compilation_template_group.go:134-140 | internal/handler/compilation_template_group.go:176-182 — 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 `internal/handler/compilation_template_group.go:134` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/handler/providers.go:1359— internal/handler/providers.go:1359-1365 | internal/handler/providers.go:1422-1428 — 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 `internal/handler/providers.go:1359` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/handler/user.go:153— internal/handler/user.go:153-159 | internal/handler/user.go:232-238 — 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 `internal/handler/user.go:153` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) internal/harness/core/agent_handoff.go:87— internal/harness/core/agent_handoff.go:87-93 | internal/harness/core/agent_handoff.go:110-116 — 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 `internal/harness/core/agent_handoff.go:87` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (7 lines × 2) internal/harness/core/middlewares/subagent/subagent.go:231— internal/harness/core/middlewares/subagent/subagent.go:231-237 | internal/harness/core/middlewares/subagent/subagent.go:303-309 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) internal/harness/core/react_agent.go:133— internal/harness/core/react_agent.go:133-139 | internal/harness/core/react_agent.go:149-155 — 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 `internal/harness/core/react_agent.go:133` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (7 lines × 2) internal/harness/core/react_agent.go:443— internal/harness/core/react_agent.go:443-449 | internal/harness/core/tool_registry.go:195-201 — 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 `internal/harness/core/react_agent.go:443` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) internal/admin/handler_ee.go:1169— internal/admin/handler_ee.go:1169-1182 | internal/admin/handler_ee.go:1197-1210 — 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 `internal/admin/handler_ee.go:1169` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 2) internal/agent/component/agent.go:377— internal/agent/component/agent.go:377-390 | internal/agent/component/agent.go:589-602 — 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 `internal/agent/component/agent.go:377` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) internal/agent/component/llm.go:1249— internal/agent/component/llm.go:1249-1262 | internal/agent/tool/retrieval_nlp.go:619-632 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) internal/cli/admin_command.go:323— internal/cli/admin_command.go:323-336 | internal/cli/admin_command.go:359-372 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/cli/admin_command.go:323` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) internal/cli/admin_command.go:2750— internal/cli/admin_command.go:2750-2763 | internal/cli/admin_command.go:2843-2856 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) internal/dao/chat.go:83— internal/dao/chat.go:83-96 | internal/dao/search.go:76-89 — 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 `internal/dao/chat.go:83` 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 (14 lines × 2) internal/dao/chat.go:132— internal/dao/chat.go:132-145 | internal/dao/search.go:125-138 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) internal/entity/models/aliyun.go:211— internal/entity/models/aliyun.go:211-224 | internal/entity/models/gitee.go:161-174 — 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 `internal/entity/models/aliyun.go:211` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) internal/entity/models/astraflow.go:276— internal/entity/models/astraflow.go:276-289 | internal/entity/models/togetherai.go:314-327 — 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 `internal/entity/models/astraflow.go:276` 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 (14 lines × 2) internal/entity/models/baidu.go:320— internal/entity/models/baidu.go:320-333 | internal/entity/models/cohere.go:469-482 — 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 `internal/entity/models/baidu.go:320` 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 (14 lines × 2) internal/entity/models/base_model.go:340— internal/entity/models/base_model.go:340-353 | internal/entity/models/base_model.go:370-383 — 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 `internal/entity/models/base_model.go:340` 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 (14 lines × 2) internal/entity/models/cohere.go:158— internal/entity/models/cohere.go:158-171 | internal/entity/models/cohere.go:254-267 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/entity/models/cohere.go:158` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) internal/entity/models/cometapi.go:447— internal/entity/models/cometapi.go:447-460 | internal/entity/models/siliconflow.go:599-612 — 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 `internal/entity/models/cometapi.go:447` 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 (14 lines × 2) internal/entity/models/fishaudio.go:158— internal/entity/models/fishaudio.go:158-171 | internal/entity/models/xinference.go:428-441 — 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 `internal/entity/models/fishaudio.go:158` 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 (14 lines × 2) internal/entity/models/gitee.go:379— internal/entity/models/gitee.go:379-392 | internal/entity/models/gitee.go:476-489 — 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 `internal/entity/models/gitee.go:379` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) internal/entity/models/gpustack.go:92— internal/entity/models/gpustack.go:92-105 | internal/entity/models/jina.go:132-145 — 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 `internal/entity/models/gpustack.go:92` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) internal/entity/models/localai.go:269— internal/entity/models/localai.go:269-282 | internal/entity/models/vllm.go:376-389 — 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 `internal/entity/models/localai.go:269` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (14 lines × 2) internal/entity/models/orcarouter.go:142— internal/entity/models/orcarouter.go:142-155 | internal/entity/models/siliconflow.go:641-654 — 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 `internal/entity/models/orcarouter.go:142` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) internal/entity/models/siliconflow.go:690— internal/entity/models/siliconflow.go:690-703 | internal/entity/models/stepfun.go:260-273 — 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 `internal/entity/models/siliconflow.go:690` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) internal/handler/agent.go:197— internal/handler/agent.go:197-210 | internal/handler/search.go:99-112 — 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 `internal/handler/agent.go:197` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) internal/harness/core/middlewares/telemetry/telemetry.go:143— internal/harness/core/middlewares/telemetry/telemetry.go:143-156 | internal/harness/core/middlewares/telemetry/telemetry.go:198-211 — 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 `internal/harness/core/middlewares/telemetry/telemetry.go:143` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) internal/harness/core/model_chain.go:44— internal/harness/core/model_chain.go:44-57 | internal/harness/core/model_chain.go:161-174 — 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 `internal/harness/core/model_chain.go:44` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (14 lines × 2) internal/harness/graph/store/memory.go:106— internal/harness/graph/store/memory.go:106-119 | internal/harness/graph/store/memory.go:140-153 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register. 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 (14 lines × 2) internal/harness/graph/types/scratchpad.go:735— internal/harness/graph/types/scratchpad.go:735-748 | internal/harness/graph/types/scratchpad.go:764-777 — 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 `internal/harness/graph/types/scratchpad.go:735` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (14 lines × 2) internal/ingestion/component/chunker/one.go:85— internal/ingestion/component/chunker/one.go:85-98 | internal/ingestion/component/chunker/table.go:84-97 — 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 `internal/ingestion/component/chunker/one.go:85` 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 (15 lines × 2) internal/admin/handler.go:667— internal/admin/handler.go:667-681 | internal/handler/system.go:212-226 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/admin/handler.go:667` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) internal/admin/handler.go:1198— internal/admin/handler.go:1198-1212 | internal/handler/models.go:70-84 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/admin/handler.go:1198` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) internal/admin/handler_ee.go:1292— internal/admin/handler_ee.go:1292-1306 | internal/admin/handler_ee.go:1456-1470 — 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 `internal/admin/handler_ee.go:1292` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) internal/cli/filesystem/dataset.go:149— internal/cli/filesystem/dataset.go:149-163 | internal/cli/filesystem/dataset.go:198-212 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/cli/filesystem/dataset.go:149` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) internal/cli/filesystem/file.go:283— internal/cli/filesystem/file.go:283-297 | internal/cli/filesystem/file.go:433-447 — 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 `internal/cli/filesystem/file.go:283` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) internal/cli/filesystem/skill.go:356— internal/cli/filesystem/skill.go:356-370 | internal/cli/filesystem/skill.go:904-918 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 2) internal/cli/filesystem/skill.go:628— internal/cli/filesystem/skill.go:628-642 | internal/cli/filesystem/skill.go:820-834 — 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 `internal/cli/filesystem/skill.go:628` 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) internal/cli/response.go:1041— internal/cli/response.go:1041-1055 | internal/cli/response.go:1100-1114 — 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 `internal/cli/response.go:1041` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) internal/engine/elasticsearch/meta_filter.go:487— internal/engine/elasticsearch/meta_filter.go:487-502 | internal/engine/infinity/meta_filter.go:390-404 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `internal/engine/elasticsearch/meta_filter.go:487` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) internal/entity/models/302ai.go:777— internal/entity/models/302ai.go:777-791 | internal/entity/models/mineru.go:293-307 — 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 `internal/entity/models/302ai.go:777` 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 (15 lines × 2) internal/entity/models/bedrock.go:615— internal/entity/models/bedrock.go:615-629 | internal/entity/models/bedrock.go:902-916 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `internal/entity/models/bedrock.go:615` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (15 lines × 2) internal/entity/models/greenpt.go:92— internal/entity/models/greenpt.go:92-106 | internal/entity/models/openai_api_compatible.go:104-118 — 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 `internal/entity/models/greenpt.go:92` 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 (15 lines × 2) internal/entity/models/minimax.go:131— internal/entity/models/minimax.go:131-145 | internal/entity/models/minimax.go:191-205 — 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 `internal/entity/models/minimax.go:131` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 2) internal/entity/models/minimax.go:170— internal/entity/models/minimax.go:170-184 | internal/entity/models/moonshot.go:131-145 — 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.
Duplicated block (15 lines × 2) internal/entity/models/model.go:424— internal/entity/models/model.go:424-438 | internal/entity/models/model.go:497-511 — 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 `internal/entity/models/model.go:424` 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 (15 lines × 2) internal/entity/models/xiaomi.go:313— internal/entity/models/xiaomi.go:313-327 | internal/entity/models/xiaomi.go:507-521 — 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 `internal/entity/models/xiaomi.go:313` 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 (15 lines × 2) internal/handler/chat.go:77— internal/handler/chat.go:77-91 | internal/handler/search.go:89-103 — 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 `internal/handler/chat.go:77` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) internal/handler/file.go:160— internal/handler/file.go:160-174 | internal/handler/file.go:195-209 — 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 `internal/handler/file.go:160` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) internal/handler/memory.go:263— internal/handler/memory.go:263-277 | internal/handler/memory.go:392-406 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 2) internal/handler/memory.go:278— internal/handler/memory.go:278-292 | internal/handler/memory.go:407-421 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (15 lines × 2) internal/handler/search.go:201— internal/handler/search.go:201-215 | internal/handler/search.go:260-274 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) internal/ingestion/component/chunker/group.go:175— internal/ingestion/component/chunker/group.go:175-189 | internal/ingestion/component/chunker/hierarchy.go:259-273 — 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 `internal/ingestion/component/chunker/group.go:175` 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Medium: insecure-uuid-version admin/server/auth.py:93— Using UUID version 1 for UUID generation can lead to predictable UUIDs based on system information (e.g., MAC address, timestamp). This may lead to security risks such as the sandwich attack. Consider using `uuid.uuid4()` instead for better randomness and security. 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.
Medium: insecure-uuid-version admin/server/auth.py:185— Using UUID version 1 for UUID generation can lead to predictable UUIDs based on system information (e.g., MAC address, timestamp). This may lead to security risks such as the sandwich attack. Consider using `uuid.uuid4()` instead for better randomness and security. 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.
Medium: insecure-hash-algorithm-sha1 agent/component/browser.py:374— Detected SHA1 hash algorithm which is considered insecure. SHA1 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: use-defused-xml agent/component/docs_generator.py:12— The Python documentation recommends using `defusedxml` instead of `xml` because the native Python `xml` library is vulnerable to XML External Entity (XXE) attacks. These attacks can leak confidential data and "XML bombs" can cause denial of service. 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.
Medium: insecure-hash-algorithm-md5 api/channels/bootstrap.py:72— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-sha1 api/channels/dingtalk/channel.py:388— Detected SHA1 hash algorithm which is considered insecure. SHA1 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 api/db/db_models.py:530— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-uuid-version api/db/init_data.py:53— Using UUID version 1 for UUID generation can lead to predictable UUIDs based on system information (e.g., MAC address, timestamp). This may lead to security risks such as the sandwich attack. Consider using `uuid.uuid4()` instead for better randomness and security. 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.
Medium: insecure-uuid-version api/db/joint_services/user_account_service.py:59— Using UUID version 1 for UUID generation can lead to predictable UUIDs based on system information (e.g., MAC address, timestamp). This may lead to security risks such as the sandwich attack. Consider using `uuid.uuid4()` instead for better randomness and security. 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.
Medium: insecure-uuid-version api/db/joint_services/user_account_service.py:61— Using UUID version 1 for UUID generation can lead to predictable UUIDs based on system information (e.g., MAC address, timestamp). This may lead to security risks such as the sandwich attack. Consider using `uuid.uuid4()` instead for better randomness and security. 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.
Medium: insecure-uuid-version api/db/joint_services/user_account_service.py:80— Using UUID version 1 for UUID generation can lead to predictable UUIDs based on system information (e.g., MAC address, timestamp). This may lead to security risks such as the sandwich attack. Consider using `uuid.uuid4()` instead for better randomness and security. 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.
Medium: insecure-hash-algorithm-md5 api/db/services/conversation_service.py:90— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: insecure-hash-algorithm-md5 api/db/services/file_commit_service.py:67— Detected MD5 hash algorithm which is considered insecure. MD5 is not collision resistant and is therefore not suitable as a cryptographic signature. Use SHA256 or SHA3 instead.
Medium: avoid-pickle api/utils/configs.py:33— Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format. 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.
Medium: avoid-pickle api/utils/configs.py:42— Avoid using `pickle`, which is known to lead to code execution vulnerabilities. When unpickling, the serialized data could be manipulated to run arbitrary code. Instead, consider serializing the relevant data as JSON or a similar text-based serialization format. 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.
D38 · OSV Dependency Vulnerabilities· Medium CVE · ×12
Medium CVE: [GHSA redacted] web/package-lock.json— ajv 6.12.6: [GHSA redacted] — this repo declares ajv ^8.17.1, but the vulnerable 6.12.6 is a SEPARATE copy on another release line, so editing your own ajv entry cannot move it: upgrade the dependency that pulls it in (or pin ajv to 6.14.0 with an `overrides` entry).
Medium CVE: [GHSA redacted] web/package-lock.json— ajv 8.17.1: [GHSA redacted] — this repo declares ajv ^8.17.1, a range that ALREADY admits the fixed 8.18.0, so there is no manifest edit to make here. Re-resolve the lock so ajv moves onto 8.18.0 or later; if the flagged 8.17.1 comes back, a dependency is pinning it — upgrade that dependent, or pin ajv with an `overrides` entry so only one copy resolves.
Medium CVE: [GHSA redacted] uv.lock— biopython 1.86: [GHSA redacted] — no fixed version has been published yet. Track the advisory; biopython is not declared in this repo's manifests: it is pulled in transitively, so the action is on the dependency that requires it — upgrade or replace that dependent.
Medium CVE: PYSEC-2026-2132 tools/es-to-oceanbase-migration/uv.lock— click 8.3.1: PYSEC-2026-2132 — upgrade to 8.3.3 (in 2 dependency files: tools/es-to-oceanbase-migration/uv.lock, uv.lock)
Medium CVE: [GHSA redacted] uv.lock— diskcache 5.6.3: [GHSA redacted] — no fixed version has been published yet. Track the advisory; diskcache is not declared in this repo's manifests: it is pulled in transitively, so the action is on the dependency that requires it — upgrade or replace that dependent.
Medium CVE: [GHSA redacted] web/package-lock.json— dompurify 3.3.2: [GHSA redacted] — this repo declares dompurify ^3.3.2, a range that ALREADY admits the fixed 3.4.0, so there is no manifest edit to make here. Re-resolve the lock so dompurify moves onto 3.4.0 or later; if the flagged 3.3.2 comes back, a dependency is pinning it — upgrade that dependent, or pin dompurify with an `overrides` entry so only one copy resolves. This is 1 of 12 advisories with a published fix this scan raises against dompurify 3.3.2, and their fixed versions do not agree — anything below 3.4.12 still leaves at least one of them open. Take this package to 3.4.12 or later: that is the floor for the package, not this row's target alone. This one row stands for the 13 advisories this scan raises against dompurify 3.3.2: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
Medium CVE: [GHSA redacted] web/package-lock.json— echarts 5.6.0: [GHSA redacted] — echarts is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (— 6.1.0 is a MAJOR ahead of the resolved 5.6.0, so an `overrides` pin would force a breaking version under a dependent written against 5.6.0; upgrading the declaring package is the remedy, and where no patched release exists in your major line, record the exposure instead).
Medium CVE: PYSEC-2026-2151 uv.lock— flask 3.1.2: PYSEC-2026-2151 — flask is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or raise its floor in your own manifest and re-resolve (`uv lock --upgrade-package flask`)).
Medium CVE: [GHSA redacted] web/package-lock.json— follow-redirects 1.15.11: [GHSA redacted] — follow-redirects is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin follow-redirects to 1.16.0 with an `overrides` entry).
Medium CVE: GO-2026-5320 go.mod— github.com/yuin/goldmark 1.4.13 (github.com/yuin/goldmark/renderer/html): GO-2026-5320 — upgrade to 1.7.17
Medium CVE: GO-2026-5970 go.mod— golang.org/x/text 0.38.0 (golang.org/x/text/unicode/norm): GO-2026-5970 — upgrade to 0.39.0
Medium CVE: [GHSA redacted] admin/client/uv.lock— idna 3.11: [GHSA redacted] — idna is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or raise its floor in your own manifest and re-resolve (`uv lock --upgrade-package idna`)). (in 4 dependency files)
Duplicated block (12 lines × 3) internal/admin/handler_ee.go:530— internal/admin/handler_ee.go:530-541 | internal/admin/handler_ee.go:649-660 | internal/admin/handler_ee.go:726-737 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (12 lines × 3) internal/agent/component/message.go:463— internal/agent/component/message.go:463-474 | internal/ingestion/component/knowledge_compiler/structure/merge.go:538-549 | internal/ingestion/knowledge_compile/writer.go:273-284 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `internal/agent/component/message.go:463` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 3) internal/cli/filesystem/skill_hub/source/github.go:136— internal/cli/filesystem/skill_hub/source/github.go:136-147 | internal/cli/filesystem/skill_hub/source/skillssh.go:313-324 | internal/cli/filesystem/skill_hub/source/skillssh.go:364-375 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `internal/cli/filesystem/skill_hub/source/github.go:136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (12 lines × 3) internal/entity/models/baichuan.go:108— internal/entity/models/baichuan.go:108-119 | internal/entity/models/jina.go:177-188 | internal/entity/models/tokenhub.go:126-137 — 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 `internal/entity/models/baichuan.go:108` 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 × 3) internal/entity/models/cohere.go:385— internal/entity/models/cohere.go:385-396 | internal/entity/models/mistral.go:239-250 | internal/entity/models/voyage.go:91-102 — 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 `internal/entity/models/cohere.go:385` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (12 lines × 3) internal/entity/models/gitee.go:758— internal/entity/models/gitee.go:758-769 | internal/entity/models/volcengine.go:580-591 | internal/entity/models/zhipu-ai.go:309-320 — 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 `internal/entity/models/gitee.go:758` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
Duplicated block (12 lines × 3) internal/entity/models/gpustack.go:195— internal/entity/models/gpustack.go:195-206 | internal/entity/models/jina.go:166-177 | internal/entity/models/togetherai.go:213-225 — 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 `internal/entity/models/gpustack.go:195` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 3) internal/entity/models/groq.go:176— internal/entity/models/groq.go:176-187 | internal/entity/models/ppio.go:130-141 | internal/entity/models/replicate.go:504-515 — 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 `internal/entity/models/groq.go:176` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
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.