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

Argoproj/argo-Cd

No baseline yet — first run
57% At Risk

Large · 144,759 LoC · rebuild ~2.2 person-years · weakest lens: Accessibility (45%)

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

35/37dimensions tool-verifieddeterministic · confidence 1.0 · 2 LLM-assisted, advisory
822findings with an exact file:lineof 833 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
37/95dimensions across the health lenses144759 LoC — wide & deep

Executive summary

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

argoproj/argo-cd is sound in substance but carries real gaps (57%). It is not in crisis, but the issues below raise the cost of changing it — friction its consumers ultimately inherit.

It is strongest in Architecture (100%) — the structure is clean and changes stay contained. Readiness (86%) 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 Accessibility (45%) — it raises ongoing delivery and operational cost. Security (61%) is the next concern — exposure to security and compliance incidents is elevated.

Leadership focus, highest impact first: Make custom controls keyboard-operable (role + tabindex + key handler) (Keyboard semantics); accessibility in the toolchain (A11y enforcement); Give every control a programmatic label (a <label for> /… (Forms & labels).

For scale: Large (~144,759 production lines); rebuilding it from scratch would take roughly ~2.2 person-years (~1–5 engineers). Approximate, ±~30%.

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

How the score is built — each lens's share of the headline Width is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Accessibility 45% · 46% weightSecurity 61% · 25% weightCode Health 63% · 14% weightMaturity 76% · 8% weightReadiness 86% · 4% weightArchitecture 100% · 2% weight

Raise Accessibility 45 → 70 (the Healthy floor) ⇒ headline 57 → ~66.

Code composition — where the lines go
Tests 100%
Rebuild cost & value ~ Modeled — €110,000–€540,000
Cost to rebuild€110,000–€540,000 (1.1–3.4 person-years (1,786–5,665 h), ~1–5 engineers)
Domain complexityStandard — harder problems cost more per line
Quality factor0.8× (at 57% quality) — the last 20% of quality is most of the work
Size & shapeLarge · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)

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

How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 0.8× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).

Top priorities

The highest-leverage moves; the full ranked list is in the Roadmap below.

1
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
+10.9 pts · Medium effort · Keyboard semantics
2
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
+10.9 pts · Medium effort · A11y enforcement
3
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
+10.7 pts · Medium effort · Forms & labels

Diagnosis — what's actually going on

The top fix pays for itself · High · Economics
The top-ranked fix costs roughly 3–10 engineer-days once. Not doing it costs about 982.8–5896.6 engineer-days every year, paid as drag on the ~5,925,264 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 7–15% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 1,461,024 line(s) changed over a 90-day window ⇒ ~5,925,264/year · D1/D2/D4 code quality: averaging 5.3/10 ⇒ a 7–15% drag on each change · top-ranked remediation: Medium effort ⇒ about 3–10 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Value concentrated against a weak lens · Medium · Value at risk
This is a Large asset (~2.2 person-years to rebuild), and its weakest lens is Accessibility at 45%. The operational and business risk on an asset this size concentrates there — that's where remediation buys the most protection.
Evidence: valuation: Large, ~2.2 person-years rebuild (144,759 LoC) · weakest lens: Accessibility 45%
→ Direct remediation budget at Accessibility first — highest risk-reduction per euro on an asset this size.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 5.3/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 7–15% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 5.3/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.

Architecture — module dependency matrix

201 modules, 762 dependencies — 1 dependency cycle, shown as the red cell(s) above the diagonal. Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)

…ine/v3/pkg/utils/kube…d/v3/server/broadcast…argo-cd/v3/util/cache…oj/argo-cd/v3/util/io…/argo-cd/v3/util/rbac…3/controller/hydrator…3/controller/sharding…-resources/generators…o-cd/v3/pkg/apiclient…/argo-cd/v3/util/argo…util/argo/normalizers…go-cd/v3/util/askpass…/argo-cd/v3/util/helm…l/notification/argocd…/argo-cd/v3/util/oidc…go-cd/v3/util/webhook…d/v3/controller/cache…d/v3/server/extension…-cd/v3/util/argo/diff…go-cd/v3/util/session…argo-cd/v3/controller…v3/server/application…roj/argo-cd/v3/server…j/argo-cd/v3/util/oci…/argo-cd/v3/util/grpc…j/argo-cd/v3/util/git…d/v3/reposerver/cache…d/v3/cmpserver/plugin…argocd/commands/admin…/applicationset/utils…services/scm_provider…o-cd/v3/util/settings…oj/argo-cd/v3/util/db…plicationset/services…/application/v1alpha1…onset/progressivesync…icationset/generators…cationset/controllers…d/v3/util/clusterauth…notification/settings…ine/v3/pkg/utils/kube1…d/v3/server/broadcast2…argo-cd/v3/util/cache3…oj/argo-cd/v3/util/io4…/argo-cd/v3/util/rbac5…3/controller/hydrator6…3/controller/sharding7…-resources/generators8…o-cd/v3/pkg/apiclient9…/argo-cd/v3/util/argo10…util/argo/normalizers11…go-cd/v3/util/askpass12…/argo-cd/v3/util/helm13…l/notification/argocd14…/argo-cd/v3/util/oidc15…go-cd/v3/util/webhook16…d/v3/controller/cache17…d/v3/server/extension18…-cd/v3/util/argo/diff19…go-cd/v3/util/session20…argo-cd/v3/controller21…v3/server/application22…roj/argo-cd/v3/server23…j/argo-cd/v3/util/oci24…/argo-cd/v3/util/grpc25…j/argo-cd/v3/util/git26…d/v3/reposerver/cache27…d/v3/cmpserver/plugin28…argocd/commands/admin29…/applicationset/utils30…services/scm_provider31…o-cd/v3/util/settings32…oj/argo-cd/v3/util/db33…plicationset/services34…/application/v1alpha135…onset/progressivesync36…icationset/generators37…cationset/controllers38…d/v3/util/clusterauth39…notification/settings401211924421126212212242226322222112629411329225331345132113232911221511231111121141121311111151412221111211111121141121311111251412221111211111121141121311111211412221113111151211111121141121311111215112221111212111322141122311111215142233131112111111221411213211112151412121151112111111211411213111112151412213111211111121141131311111215141222111111151211224121212121212241212491212241236121212121225126213481224242412121210121111112114112131111121514134223461121111112114112131111121514132121921121111112114112131111121514122211124222222422832426222224210282444222+161 more modules (most-connected shown)

At a glance — Code Health · 63% · Adequate · gated by D2

At a glance — Architecture · 100% · Exemplary

At a glance — Maturity · 76% · Strong

At a glance — Readiness · 86% · Strong

At a glance — Security · 61% · Adequate · gated by D29, D31, D38

At a glance — Accessibility · 45% · Weak · gated by AC4

Security & Compliance — OWASP Top-10 mapping

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

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

Roadmap

Begin by making all custom controls keyboard-operable and ensuring anchors have valid hrefs. Next, enforce accessibility standards by integrating linting and automated testing into the CI pipeline. Simultaneously, ensure every form control and button has a proper programmatic label. Finally, add text alternatives for media, correct page structure landmarks, and remove deprecated meta elements.

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

Do thisHelpsEffortDimension
Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.+10.9 ptsMediumKeyboard semantics
Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI.+10.9 ptsMediumA11y enforcement
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.+10.7 ptsMediumForms & labels
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.+10.6 ptsMediumText alternatives
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.+9.3 ptsMediumPage structure
Resolve the 22 Medium finding(s) in Static Analysis (SAST) — start with main.go (2), gitops-agent-deploy.yaml (2), install-namespaced.yaml (2).+0.8 ptsMediumStatic Analysis (SAST)
Add a build/run (quick start) section to the root README — the first thing a newcomer needs.+1.4 ptsMediumDocumentation (README)
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).+1.4 ptsMediumArchitecture documentation

File quality

Per-file score 0–10 — a quality signature. Of 206 files carrying findings, judged against the Production bar: 1% slop · 74% mixed · 25% near-clean.

FileScoreBandWorst signal
ui/pnpm-lock.yaml0.0SlopOSV Dependency Vulnerabilities: High CVE: [GHSA redacted]
gitops-engine/agent/manifests/install-namespaced.yaml2.0SlopIaC & Container Security: Critical IaC: KSV-0044
gitops-engine/agent/manifests/install.yaml2.0SlopIaC & Container Security: Critical IaC: KSV-0044
gitops-engine/agent/manifests/base/gitops-agent-deploy.yaml4.1MixedIaC & Container Security: High IaC: KSV-0014
gitops-engine/agent/main.go4.3MixedStatic Analysis (SAST): Medium: use-tls
server/badge/badge.go4.6MixedStatic Analysis (SAST): Medium: raw-html-format
controller/appcontroller.go4.9MixedStatic Analysis (SAST): Medium: math-random-used
util/webhook/webhook.go4.9MixedStatic Analysis (SAST): Medium: math-random-used
util/io/files/tar.go5.1MixedStatic Analysis (SAST): Medium: potential-dos-via-decompression-bomb
manifests/dev-tilt/ui-deployment.yaml5.1MixedIaC & Container Security: High IaC: KSV-0014
manifests/ha/install-with-hydrator.yaml5.1MixedIaC & Container Security: Critical IaC: KSV-0041
manifests/ha/install.yaml5.1MixedIaC & Container Security: Critical IaC: KSV-0041
manifests/install-with-hydrator.yaml5.1MixedIaC & Container Security: Critical IaC: KSV-0041
manifests/install.yaml5.1MixedIaC & Container Security: Critical IaC: KSV-0041
util/session/sessionmanager.go5.3MixedStatic Analysis (SAST): Medium: math-random-used
cmd/argocd-notification/commands/argocd_notification.go5.3MixedStatic Analysis (SAST): Medium: use-tls
cmd/argocd-applicationset-controller/commands/applicationset_controller.go5.7MixedStatic Analysis (SAST): Medium: use-tls
cmd/argocd/commands/plugin.go5.7MixedStatic Analysis (SAST): High: dangerous-exec-cmd
gitops-engine/agent/manifests/cluster-install/gitops-agent-cluster-role.yaml5.8MixedIaC & Container Security: Critical IaC: KSV-0044
gitops-engine/agent/manifests/namespace-install/gitops-agent-role.yaml5.8MixedIaC & Container Security: Critical IaC: KSV-0044

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 35 of 37 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.8 — 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 — 37 dimensions across the health lenses
D1D2D3D4D13D15D16D19D21D28D29D31D33D34D35D36D37D38D40D41D42AC1AC2AC3AC4AC5AC6AC7M1M2M3M4P1P3P4P5P6

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

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

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

Tools & methods

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

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

Every finding is locatable in findings.md. Run 019fd681-8034-7f31-8267-e9b5c773888b.

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

Run transparency — what happened this run

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

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

Repo exclusion declarations: 19 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

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

Per-dimension blind spots

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

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity (jscpd) — it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D19 Documentation Quality: Documentation quality is judged by an LLM over a bounded sample of docs — it reads what is written, not whether the docs match the running system, and it is advisory, not a measurement.
  • D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
  • 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.
  • D42 Runtime Threat Enforcement: Runtime enforcement is read from committed policy files — a Tetragon/Falco/Kyverno stack installed cluster-wide (Helm release, platform add-on) with no in-repo trace can't be credited, and a committed policy is declared intent, not proof the engine is running and blocking in the live cluster.
  • 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.
  • 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.

Dimensions

D1 · Cyclomatic Complexity4.6 / 10Weak✓ Tool-verified

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

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

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

172 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was appStateManager.CompareAppState at 95.

Server.Get (cyclomatic 22) · ×2server/application/application.go:781
appStateManager.CompareAppState (cyclomatic 95)controller/state.go:681
commands.NewApplicationSyncCommand (cyclomatic 69)cmd/argocd/commands/app.go:1699
admin.NewImportCommand (cyclomatic 65)cmd/argocd/commands/admin/backup.go:158
syncContext.Sync (cyclomatic 59)gitops-engine/pkg/sync/sync_context.go:493

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

What to do

  1. Resolve the 2 Server.Get (cyclomatic 22) finding(s) in Cyclomatic Complexity — start with application.go, settings.go. — One of this dimension's main actionable groups (2 warning-level).
  2. Resolve the 1 appStateManager.CompareAppState (cyclomatic 95) finding(s) in Cyclomatic Complexity — start with state.go. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 commands.NewApplicationSyncCommand (cyclomatic 69) finding(s) in Cyclomatic Complexity — start with app.go. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

336 method(s) exceeded the cognitive complexity threshold of 15; the worst was appStateManager.CompareAppState at 163.

appStateManager.CompareAppState (cognitive 163)controller/state.go:681
kustomize.Build (cognitive 153)util/kustomize/kustomize.go:124
admin.NewImportCommand (cognitive 135)cmd/argocd/commands/admin/backup.go:158
commands.NewApplicationSyncCommand (cognitive 123)cmd/argocd/commands/app.go:1699
Service.runManifestGenAsync (cognitive 117)reposerver/repository/repository.go:850

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

What to do

  1. Resolve the 1 appStateManager.CompareAppState (cognitive 163) finding(s) in Cognitive Complexity — start with state.go. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 kustomize.Build (cognitive 153) finding(s) in Cognitive Complexity — start with kustomize.go. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 admin.NewImportCommand (cognitive 135) finding(s) in Cognitive Complexity — start with backup.go. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

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

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

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

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

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

36 god class(es) detected.

FileTooLong: repository/repository.go · ×26reposerver/repository/repository.go:0
TooManyMethods: ApplicationController · ×10controller/appcontroller.go:118

✓ On the Gold path — maintain.

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

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

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

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

153 duplicated block group(s) detected.

Duplicated block (9 lines × 2) · ×25applicationset/generators/pull_request.go:143
Duplicated block (10 lines × 2) · ×18gitops-engine/pkg/diff/diff.go:1137
Duplicated block (12 lines × 2) · ×15gitops-engine/pkg/utils/kube/ctl.go:296
Duplicated block (11 lines × 2) · ×15applicationset/generators/matrix.go:92
Duplicated block (8 lines × 2) · ×15gitops-engine/pkg/cache/cluster.go:683

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

✓ On the Gold path — maintain.

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

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

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

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

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

Secret scan ran and found no leaked secrets.

✓ On the Gold path — maintain.

Detailed fixes: d13_recommendation.md.

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

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

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

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

Top hotspots: controller/appcontroller.go (22×44=968); reposerver/repository/repository.go (21×42=882); controller/state.go (8×95=760)

Hotspot: controller/appcontroller.go · ×10controller/appcontroller.go

✓ On the Gold path — maintain.

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

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

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

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

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

6 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is util/oidc/oidc_azure.go.

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

✓ On the Gold path — maintain.

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

D19 · Documentation Quality / 10Strong◐ Sampled · advisory

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

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic doc sample (READMEs plus first 25 architecture docs), with two-pass stability filtering. Advisory, sampled.

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

Argo CD's documentation is clear and complete for a GitOps tooling project. The READMEs cover releases, integration tests, the social footprint, and an Argo CD UI demo; the architecture docs explain four installation manifest sets (normal, HA), the GitOps Engine, and e2e testing against a real cluster; renovate shared presets guide with repo structure; manifests/addons notes stable versioning; and test/fixture directories cover the E2E server configuration, certificates, and CMP plugins. The documentation is well-organized and covers both usage and operational topics. The documentation is comprehensive across READMEs, architecture/design docs, and XML-doc coverage for Kubernetes Argo CD components. It covers RBAC for argocd-server (cluster-role/role-binding grants cluster-wide CRUD), the source-hydrator git-push setup with security notes about secrets separation from pull credentials, a detailed Cluster Decision Resource generator walkthrough including status-format parsing, duck-type lookup, and a ConfigMap example, and two separate Redis charts (stable/redis and stable/minio) covering prerequisites, installation, access keys, distributed mode, and statefulset limitations. The test/e2e docs also cover reverse-pruning ordering and CRD creation.

What to do

  1. Improve Documentation Quality — currently 8.6/10. — Argo CD's documentation is clear and complete for a GitOps tooling project. The READMEs cover releases, integration tests, the social footprint, and an Argo CD UI demo; the architecture docs explain four installation manifest sets (normal, HA), the GitOps Engine, and e2e testing against a real cluster; renovate shared presets guide with repo structure; manifests/addons notes stable versioning; and test/fixture directories cover the E2E server configuration, certificates, and CMP plugins. The documentation is well-organized and covers both usage and operational topics. The documentation is comprehensive across READMEs, architecture/design docs, and XML-doc coverage for Kubernetes Argo CD components. It covers RBAC for argocd-server (cluster-role/role-binding grants cluster-wide CRUD), the source-hydrator git-push setup with security notes about secrets separation from pull credentials, a detailed Cluster Decision Resource generator walkthrough including status-format parsing, duck-type lookup, and a ConfigMap example, and two separate Redis charts (stable/redis and stable/minio) covering prerequisites, installation, access keys, distributed mode, and statefulset limitations. The test/e2e docs also cover reverse-pruning ordering and CRD creation.

Detailed fixes: d19_recommendation.md.

D21 · Naming Consistency / 10Exemplary◐ Sampled · advisory

What it measures: Whether names — types, methods, variables — are clear and consistent.

Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.

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

0 naming inconsistencies across 0 sampled symbols.

✓ On the Gold path — maintain.

Detailed fixes: d21_recommendation.md.

D28 · Secrets (history)5.0 / 10Adequate✓ Tool-verified

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

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

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

5 finding(s): 0 critical, 5 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.circleci/config.yml:28detected by gitleaks finding
Rotate the exposed credentials — git history can't be un-committed

What to do

  1. Resolve the 1 Secret finding(s) in Secrets (history) — start with config.yml. — One of this dimension's main actionable groups (1 issue-level).
  2. 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.

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

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

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

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

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

56 finding(s): 0 critical, 4 high, 22 medium, 30 low.

High: dependabot-missing-cooldown · ×4.github/dependabot.yml:3detected by semgrep finding
Medium: use-tls · ×22cmd/argocd-applicationset-controller/commands/applicationset_controller.go:338detected by semgrep finding
Low: missing-ssl-minversion · ×24applicationset/services/pull_request/gitea.go:32detected by semgrep finding

What to do

  1. Resolve the 24 Low finding(s) in Static Analysis (SAST) — start with client.go (4), utils.go (3), argocd_dex.go (3). — One of this dimension's main actionable groups (24 recommendation-level).
  2. Resolve the 22 Medium finding(s) in Static Analysis (SAST) — start with main.go (2), gitops-agent-deploy.yaml (2), install-namespaced.yaml (2). — One of this dimension's main actionable groups (22 warning-level).
  3. Resolve the 4 High finding(s) in Static Analysis (SAST) — start with dependabot.yml, ci-build.yaml, init-release.yaml. — One of this dimension's main actionable groups (4 issue-level).

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

D31 · IaC & Container Security0.0 / 10Critical✓ Tool-verified

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

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

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

1682 finding(s): 32 critical, 21 high, 909 medium, 720 low.

Critical IaC: KSV-0044 · ×28gitops-engine/agent/manifests/cluster-install/gitops-agent-cluster-role.yamldetected by trivy finding
High IaC: DS-0002 · ×13Dockerfile.tiltdetected by trivy finding

What to do

  1. Resolve the 28 Critical IaC finding(s) in IaC & Container Security — start with install.yaml (8), install-with-hydrator.yaml (6), gitops-agent-cluster-role.yaml (2). — One of this dimension's main actionable groups (28 issue-level).
  2. Resolve the 13 High IaC finding(s) in IaC & Container Security — start with argocd-application-controller-statefulset.yaml (3), argocd-repo-server-deployment.yaml (2), argocd-server-deployment.yaml (2). — One of this dimension's main actionable groups (13 issue-level).

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

D33 · JS/npm Dependency Vulnerabilities10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether JavaScript/npm dependencies have known published vulnerabilities (CVEs) — the npm ecosystem's biggest risk.

Method: JS/npm CVE scan via trivy fs --scanners vuln over JS manifests (package.json/yarn.lock/pnpm-lock/bun.lockb); 0-10 tight normalizer. NotApplicable without JS manifests. Exhaustive, deterministic.

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

No known-vulnerable JS/npm dependencies.

✓ On the Gold path — maintain.

Detailed fixes: d33_recommendation.md.

D34 · Knowledge Freshness8.7 / 10Strong✓ Tool-verified

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

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

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

37 of 285 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is util/clusterauth/clusterauth.go.

Further orphaned files (smaller)

What to do

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

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

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

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

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

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

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

No strong hidden change-coupling between production files.

✓ On the Gold path — maintain.

Detailed fixes: d35_recommendation.md.

D36 · Supply-chain Provenance & Signing7.5 / 10Strong✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

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

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

Unpinned build actions

What to do

  1. Resolve the 1 Unpinned build actions finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).

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

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

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

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

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

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

✓ On the Gold path — maintain.

Detailed fixes: d37_recommendation.md.

D38 · OSV Dependency Vulnerabilities1.2 / 10Critical✓ Tool-verified

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

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

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

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

High CVE: [GHSA redacted] · ×10ui/pnpm-lock.yamldetected by osv-scanner finding
High vulnerability: [GHSA redacted]ui/pnpm-lock.yamldetected by osv-scanner finding
Medium CVE: [GHSA redacted] · ×8ui/pnpm-lock.yamldetected by osv-scanner finding
Medium vulnerability: [GHSA redacted] · ×2ui/pnpm-lock.yamldetected by osv-scanner finding
Low CVE: [GHSA redacted]ui/pnpm-lock.yamldetected by osv-scanner finding

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

What to do

  1. Resolve the 10 High CVE finding(s) in OSV Dependency Vulnerabilities — start with pnpm-lock.yaml (10). — One of this dimension's main actionable groups (10 issue-level).
  2. Resolve the 8 Medium CVE finding(s) in OSV Dependency Vulnerabilities — start with pnpm-lock.yaml (4), go.mod (4). — One of this dimension's main actionable groups (8 warning-level).
  3. Resolve the 1 High vulnerability finding(s) in OSV Dependency Vulnerabilities — start with pnpm-lock.yaml. — 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.

D40 · Network Egress Confinement10.0 / 10Exemplary✓ Tool-verified

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

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

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

Kubernetes workloads are covered by a network policy that restricts egress.

✓ On the Gold path — maintain.

Detailed fixes: d40_recommendation.md.

D41 · Kernel & Syscall Confinement8.0 / 10Strong✓ Tool-verified

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

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

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

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

No AppArmor/SELinux confinement

What to do

  1. 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.

D42 · Runtime Threat Enforcement8.0 / 10Strong✓ Tool-verified

What it measures: Whether the Kubernetes deployment wires runtime threat enforcement — a detection engine (Tetragon/Falco) and/or an admission-control policy gate (Kyverno / OPA Gatekeeper / PodSecurity). Presence of committed policy, not a runtime guarantee.

Method: Deterministic YAML-manifest inspection (no external tool, no Roslyn): on Kubernetes workloads, credits a runtime threat-detection engine (Tetragon TracingPolicy / Falco) and an admission-control policy (Kyverno / OPA Gatekeeper / PodSecurity). Reward-leaning; NotApplicable without workloads. Deterministic.

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

1/2 runtime-enforcement controls present (threat detection, admission control).

No runtime threat detection

What to do

  1. Resolve the 1 No runtime threat detection finding(s) in Runtime Threat Enforcement. — One of this dimension's main actionable groups (1 recommendation-level).

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

Frontend & cross-cutting dimensions

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

AC1 · Text alternatives5.4 / 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.

  • An image with no alt (and no aria-label/aria-labelledby) is unreadable to assistive tech. Add alt — alt="" if it's purely decorative. — badge-panel.tsx:38

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.
AC2 · Forms & labels5.0 / 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.

  • 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. (×3) — application-create-panel.tsx:56, application-sync-options.tsx:55, appearance-list.tsx:22
  • This control has no associated label. Add a <label htmlFor> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. (×16) — application-details-app-dropdown.tsx:29, application-parameters.tsx:47, edit-notification-subscriptions.tsx:141, …
  • 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. (×3) — kustomize.tsx:17, kustomize.tsx:26, log-message-filter.tsx:7
  • 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. (×3) — edit-notification-subscriptions.tsx:145, edit-notification-subscriptions.tsx:171, filter.tsx:179

What to do

  • Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
AC3 · Page structure7.1 / 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.

  • No <main> (or role="main") means no "skip to content" target and a weaker landmark map. Wrap the primary content in <main>. — index.html:2

What to do

  • Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
AC4 · Keyboard semantics1.2 / 10Critical✓ Tool-verified

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. (×12) — collapsible-multi-source-section.tsx:24, application-deployment-history-details.tsx:42, application-deployment-history-details.tsx:65, …
  • 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. (×13) — revision-metadata-rows.tsx:46, application-details.tsx:396, application-details.tsx:453, …

What to do

  • Make custom controls keyboard-operable (role + tabindex + key handler), drop positive tabindex, and give anchors a real href.
AC5 · ARIA correctness10.0 / 10Exemplary○ Nothing flagged

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.

AC6 · Visual & motion safety10.0 / 10Exemplary○ Nothing flagged

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

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

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

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

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

  • No accessibility enforcement found — no a11y linter (eslint-plugin-jsx-a11y) and no axe/pa11y/Lighthouse in tests or CI. Start with the linter to catch issues at author time.

What to do

  • Enforce accessibility in the toolchain: add eslint-plugin-jsx-a11y, then assert with jest-axe in tests, then gate axe/pa11y/Lighthouse in CI.
M1 · Documentation (README)7.3 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

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

What to do

  • Add a build/run (quick start) section to the root README — the first thing a newcomer needs.
  • Add a 'Testing' section to the root README — how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 1 of 3 project(s) that lack one — worth up to 0.7 pts.
M2 · Architecture documentation5.0 / 10Adequate✓ Tool-verified

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

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

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

What to do

  • Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

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

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

M4 · Documentation accuracy10.0 / 10Exemplary◐ Sampled · advisory

Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).

Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P3 · Security & performance tooling8.0 / 10Strong✓ Tool-verified

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

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

What to do

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

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

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

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

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

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

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).

DimensionWCAG 2.2 A/AA criteriaCoverage
AC1 · Text alternatives1.1.1, 1.2.2, 1.2.5Partial signal
AC2 · Forms & labels1.3.1, 3.3.2, 4.1.2Partial signal
AC3 · Page structure1.4.4, 2.2.1, 2.4.1, 2.4.2, 3.1.1, 4.1.2Partial signal
AC4 · Keyboard semantics2.1.1, 2.4.3Partial signal
AC5 · ARIA correctness4.1.2Partial signal
AC6 · Visual & motion safety1.4.3, 2.4.7Partial — literal CSS only
AC7 · A11y enforcementenforcement — no page criterionEnforcement posture (process)

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

Reference — by lens

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

LensScoreRatingImpact
Code Health63%Adequate — gated by D2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Architecture100%ExemplaryStrongest area.
Maturity76%StrongSolid.
Readiness86%StrongSolid.
Security61%Adequate — gated by D29, D31, D38Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Accessibility45%Weak — gated by AC4Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not included — 58 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 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
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D10 Test Quality — ~169432 lines of test source are present (.go, .tsx, .ts) 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.
  • 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) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — No inline comments to assess — comment value is not applicable here.
  • D25 ADR Conformance — no ADRs to check
  • D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
  • D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Go module (go.mod/go.sum), 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.
  • 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, which this pass does not read, so cohesion was not assessed for this repository. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage not included — suite not readable by the collector
  • D9 Test Distribution — Test source is present (.go, .tsx, .ts) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
  • DM1 Domain Modelling — applicable but not scored (2 of 2 signals for this style — below the bar we score at): 2 aggregate root(s) (types guarding their own state behind command methods — this language has no AggregateRoot base to inherit); 4 value object(s)
  • ED1 Event-Driven — not scored — this repository shows only 1 of the 3 signals this check looks for (2 event-sourced shape(s) (event folds / event-recording aggregates))
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows only 1 of the 3 signals this check looks for (2 Go aggregate(s) recording domain events (own events-slice append / raise-record))
  • GD1 Unfinished & placeholder code — no source files
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • P12 CI test-gate honesty — Reported, not scored — 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.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository

Appendix A — Findings (grouped)

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

Issue — 57 finding(s)
D31 · IaC & Container Security · Critical IaC · ×28
  • Critical IaC: KSV-0044 gitops-engine/agent/manifests/cluster-install/gitops-agent-cluster-role.yaml — No wildcard verb and resource roles
  • Critical IaC: KSV-0046 gitops-engine/agent/manifests/cluster-install/gitops-agent-cluster-role.yaml — Manage all resources
  • Critical IaC: KSV-0044 gitops-engine/agent/manifests/install-namespaced.yaml — No wildcard verb and resource roles
  • Critical IaC: KSV-0112 gitops-engine/agent/manifests/install-namespaced.yaml — Manage all resources at the namespace
  • Critical IaC: KSV-0044 gitops-engine/agent/manifests/install.yaml — No wildcard verb and resource roles
  • Critical IaC: KSV-0046 gitops-engine/agent/manifests/install.yaml — Manage all resources
  • Critical IaC: KSV-0044 gitops-engine/agent/manifests/namespace-install/gitops-agent-role.yaml — No wildcard verb and resource roles
  • Critical IaC: KSV-0112 gitops-engine/agent/manifests/namespace-install/gitops-agent-role.yaml — Manage all resources at the namespace
  • Critical IaC: KSV-0044 manifests/cluster-rbac/application-controller/argocd-application-controller-clusterrole.yaml — No wildcard verb and resource roles
  • Critical IaC: KSV-0046 manifests/cluster-rbac/application-controller/argocd-application-controller-clusterrole.yaml — Manage all resources
  • Critical IaC: KSV-0041 manifests/cluster-rbac/applicationset-controller/argocd-applicationset-controller-clusterrole.yaml — Manage secrets
  • Critical IaC: KSV-0046 manifests/cluster-rbac/server/argocd-server-clusterrole.yaml — Manage all resources
  • Critical IaC: KSV-0044 manifests/core-install-with-hydrator.yaml — No wildcard verb and resource roles
  • Critical IaC: KSV-0046 manifests/core-install-with-hydrator.yaml — Manage all resources
  • Critical IaC: KSV-0044 manifests/core-install.yaml — No wildcard verb and resource roles
  • Critical IaC: KSV-0046 manifests/core-install.yaml — Manage all resources
  • Critical IaC: KSV-0041 manifests/ha/install-with-hydrator.yaml — Manage secrets
  • Critical IaC: KSV-0044 manifests/ha/install-with-hydrator.yaml — No wildcard verb and resource roles
  • Critical IaC: KSV-0046 manifests/ha/install-with-hydrator.yaml — Manage all resources
  • Critical IaC: KSV-0041 manifests/ha/install.yaml — Manage secrets
  • Critical IaC: KSV-0044 manifests/ha/install.yaml — No wildcard verb and resource roles
  • Critical IaC: KSV-0046 manifests/ha/install.yaml — Manage all resources
  • Critical IaC: KSV-0041 manifests/install-with-hydrator.yaml — Manage secrets
  • Critical IaC: KSV-0044 manifests/install-with-hydrator.yaml — No wildcard verb and resource roles
  • Critical IaC: KSV-0046 manifests/install-with-hydrator.yaml — Manage all resources
  • + 3 more in this group — see findings.md.
D31 · IaC & Container Security · High IaC · ×13
  • High IaC: DS-0002 Dockerfile.tilt — Image user should not be 'root' A container that starts as root runs your process with root's capabilities inside the namespace, so a compromise of the process starts from there. The step: create an unprivileged account in the image (`RUN adduser --system --no-create-home app`), give it ownership of the paths the process writes at runtime (`COPY --chown=` on those layers, or a `RUN chown -R`), and end the final stage with `USER app` so it is the default at start. Build stages that only compile can stay root; it is the stage that RUNS that needs the account. If the process genuinely requires root — it manages the container runtime, ptraces another process or opens raw devices — say so here rather than making a change that breaks it.
  • High IaC: KSV-0014 gitops-engine/agent/manifests/base/gitops-agent-deploy.yaml — Root file system is not read-only
  • High IaC: KSV-0014 gitops-engine/agent/manifests/install-namespaced.yaml — Root file system is not read-only
  • High IaC: KSV-0014 gitops-engine/agent/manifests/install.yaml — Root file system is not read-only
  • High IaC: KSV-0014 manifests/base/application-controller-deployment/argocd-application-controller-statefulset.yaml — Root file system is not read-only
  • High IaC: KSV-0014 manifests/dev-tilt/ui-deployment.yaml — Root file system is not read-only
  • High IaC: KSV-0014 manifests/ha/base/controller-deployment/argocd-application-controller-statefulset.yaml — Root file system is not read-only
  • High IaC: KSV-0014 manifests/ha/base/controller-deployment/argocd-repo-server-deployment.yaml — Root file system is not read-only
  • High IaC: KSV-0014 manifests/ha/base/controller-deployment/argocd-server-deployment.yaml — Root file system is not read-only
  • High IaC: KSV-0014 manifests/ha/base/overlays/argocd-application-controller-statefulset.yaml — Root file system is not read-only
  • High IaC: KSV-0014 manifests/ha/base/overlays/argocd-repo-server-deployment.yaml — Root file system is not read-only
  • High IaC: KSV-0014 manifests/ha/base/overlays/argocd-server-deployment.yaml — Root file system is not read-only
  • High IaC: KSV-0014 manifests/ha/base/redis-ha/chart/upstream.yaml — Root file system is not read-only
D38 · OSV Dependency Vulnerabilities · High CVE · ×10
  • High CVE: [GHSA redacted] ui/pnpm-lock.yaml — brace-expansion 1.1.14: [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 (`pnpm.overrides` for pnpm)). This is 1 of 3 advisories with a published fix this scan raises against brace-expansion 1.1.14, 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 3 advisories this scan raises against brace-expansion 1.1.14: [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] ui/pnpm-lock.yaml — brace-expansion 2.1.0: [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 (`pnpm.overrides` for pnpm)). This is 1 of 3 advisories with a published fix this scan raises against brace-expansion 2.1.0, 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 3 advisories this scan raises against brace-expansion 2.1.0: [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] ui/pnpm-lock.yaml — brace-expansion 5.0.6: [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 5.0.7 with an `overrides` entry (`pnpm.overrides` for pnpm)). This is 1 of 3 advisories with a published fix this scan raises against brace-expansion 5.0.6, and their fixed versions do not agree — anything below 5.0.9 still leaves at least one of them open. Take this package to 5.0.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 brace-expansion 5.0.6: [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] ui/pnpm-lock.yaml — fast-uri 3.1.4: [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.5 with an `overrides` entry (`pnpm.overrides` for pnpm)).
  • High CVE: [GHSA redacted] ui/pnpm-lock.yaml — 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 (`pnpm.overrides` for pnpm)).
  • High CVE: [GHSA redacted] ui/pnpm-lock.yaml — immutable 5.1.6: [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 5.1.8 with an `overrides` entry (`pnpm.overrides` for pnpm)). This one row stands for the 2 advisories this scan raises against immutable 5.1.6: [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] ui/pnpm-lock.yaml — js-yaml 3.14.1: [GHSA redacted] — this repo declares js-yaml ^4.1.1, but the vulnerable 3.14.1 is a SEPARATE copy on another release line, so editing your own js-yaml entry cannot move it: upgrade the dependency that pulls it in (or pin js-yaml to 3.15.0 with an `overrides` entry (`pnpm.overrides` for pnpm)). This is 1 of 3 advisories with a published fix this scan raises against js-yaml 3.14.1, and their fixed versions do not agree — anything below 3.15.0 still leaves at least one of them open. Take this package to 3.15.0 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 js-yaml 3.14.1: [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] ui/pnpm-lock.yaml — js-yaml 4.1.1: [GHSA redacted] — this repo declares js-yaml ^4.1.1, a range that ALREADY admits the fixed 4.3.0, so there is no manifest edit to make here. Re-resolve the lock so js-yaml moves onto 4.3.0 or later; if the flagged 4.1.1 comes back, a dependency is pinning it — upgrade that dependent, or pin js-yaml with an `overrides` entry (`pnpm.overrides` for pnpm) so only one copy resolves. 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] ui/pnpm-lock.yaml — linkify-it 3.0.3: [GHSA redacted] — linkify-it is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (— 5.0.1 is a MAJOR ahead of the resolved 3.0.3, so an `overrides` pin would force a breaking version under a dependent written against 3.0.3; 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 linkify-it 3.0.3, and their fixed versions do not agree — anything below 5.0.2 still leaves at least one of them open. Take this package to 5.0.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 linkify-it 3.0.3: [GHSA redacted], [GHSA redacted].
  • High CVE: [GHSA redacted] ui/pnpm-lock.yaml — undici 6.26.0: [GHSA redacted] — undici is not declared in this repo's manifests: it is pulled in transitively, so upgrade the dependency that requires it (or pin undici to 6.27.0 with an `overrides` entry (`pnpm.overrides` for pnpm)). This is 1 of 7 advisories with a published fix this scan raises against undici 6.26.0, and their fixed versions do not agree — anything below 6.28.0 still leaves at least one of them open. Take this package to 6.28.0 or later: that is the floor for the package, not this row's target alone. This one row stands for the 7 advisories this scan raises against undici 6.26.0: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
D29 · Static Analysis (SAST) · High · ×4
  • High: dependabot-missing-cooldown .github/dependabot.yml:3 — This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or unstable. Add a `cooldown` block with `default-days: 7` to each `package-ecosystem` entry under `updates` to wait 7 days before proposing updates to newly published package versions. Reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown. This is a semgrep security-AUDIT rule reporting a POLICY that is absent or weaker than its recommendation, not an exploitable defect. Confirm whether the current setting is a deliberate decision for this repository — and apply the change where it is not; where it is (a policy your release process already enforces elsewhere, or one this repository has consciously opted out of), record the decision and leave the configuration as it is. This configuration file has 3 such entries; one cooldown decision clears them all — reported once.
  • High: gha-curl-pipe-shell .github/workflows/ci-build.yaml:619 — A `run:` step pipes the output of `curl` or `wget` directly into a shell interpreter. This is the "curl | bash" install pattern — if the remote server is compromised or the URL is hijacked, an attacker can execute arbitrary code in your CI runner. Consider downloading the file first, verifying its checksum or signature, and then executing it.
  • High: run-shell-injection .github/workflows/init-release.yaml:69 — Using variable interpolation `${{...}}` with a workflow input in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. A workflow input is not bounded by this step and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
  • High: dangerous-exec-cmd cmd/argocd/commands/plugin.go:124 — Detected non-static command inside exec.Cmd. Audit the input to 'exec.Cmd'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code. 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.
D28 · Secrets (history) · Secret · ×1
  • Secret: generic-api-key .circleci/config.yml:28 — matched rule 'generic-api-key'
D38 · OSV Dependency Vulnerabilities · High vulnerability · ×1
  • High vulnerability: [GHSA redacted] ui/pnpm-lock.yaml — 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].
Warning — 740 finding(s)
D3 · God Classes · FileTooLong · ×26
  • FileTooLong: repository/repository.go reposerver/repository/repository.go:0 — FileTooLong — 2257 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: v1alpha1/types.go pkg/apis/application/v1alpha1/types.go:0 — FileTooLong — 2144 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: commands/app.go cmd/argocd/commands/app.go:0 — FileTooLong — 2122 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: application/application.go server/application/application.go:0 — FileTooLong — 2066 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: controller/appcontroller.go controller/appcontroller.go:0 — FileTooLong — 1988 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: settings/settings.go util/settings/settings.go:0 — FileTooLong — 1687 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: server/server.go server/server.go:0 — FileTooLong — 1230 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: sync/sync_context.go gitops-engine/pkg/sync/sync_context.go:0 — FileTooLong — 1122 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: git/client.go util/git/client.go:0 — FileTooLong — 1062 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: cache/cluster.go gitops-engine/pkg/cache/cluster.go:0 — FileTooLong — 1025 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: controller/state.go controller/state.go:0 — FileTooLong — 889 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: argo/argo.go util/argo/argo.go:0 — FileTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: controllers/applicationset_controller.go applicationset/controllers/applicationset_controller.go:0 — FileTooLong — 841 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: commands/project.go cmd/argocd/commands/project.go:0 — FileTooLong — 824 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: oidc/oidc.go util/oidc/oidc.go:0 — FileTooLong — 707 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: util/app.go cmd/util/app.go:0 — FileTooLong — 706 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: diff/diff.go gitops-engine/pkg/diff/diff.go:0 — FileTooLong — 701 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: git/creds.go util/git/creds.go:0 — FileTooLong — 659 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: apiclient/apiclient.go pkg/apiclient/apiclient.go:0 — FileTooLong — 645 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: cache/cache.go controller/cache/cache.go:0 — FileTooLong — 588 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: webhook/webhook.go util/webhook/webhook.go:0 — FileTooLong — 563 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: commands/app_diff.go cmd/argocd/commands/app_diff.go:0 — FileTooLong — 539 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: cache/info.go controller/cache/info.go:0 — FileTooLong — 523 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: v1alpha1/applicationset_types.go pkg/apis/application/v1alpha1/applicationset_types.go:0 — FileTooLong — 522 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: repository/repository.go server/repository/repository.go:0 — FileTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 1 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×25
  • Duplicated block (9 lines × 2) applicationset/generators/pull_request.go:143 — applicationset/generators/pull_request.go:143-151 | applicationset/generators/scm_provider.go:179-187 — 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) applicationset/generators/pull_request.go:167 — applicationset/generators/pull_request.go:167-175 | applicationset/generators/scm_provider.go:205-213 — 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) applicationset/utils/utils.go:413 — applicationset/utils/utils.go:413-422 | util/hydrator/template.go:38-46 — 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 (9 lines × 2) cmd/argocd-application-controller/commands/argocd_application_controller.go:127 — cmd/argocd-application-controller/commands/argocd_application_controller.go:127-135 | cmd/argocd-server/commands/argocd_server.go:135-143 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (9 lines × 2) cmd/argocd/commands/account.go:171 — cmd/argocd/commands/account.go:171-179 | cmd/argocd/commands/account.go:227-235 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/account.go:171` 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) cmd/argocd/commands/account.go:185 — cmd/argocd/commands/account.go:185-193 | cmd/argocd/commands/app_actions.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 `cmd/argocd/commands/account.go:185` 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) cmd/argocd/commands/app.go:282 — cmd/argocd/commands/app.go:282-290 | cmd/argocd/commands/app_resources.go:442-450 — 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 `cmd/argocd/commands/app.go:282` 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) cmd/argocd/commands/project.go:1126 — cmd/argocd/commands/project.go:1126-1134 | cmd/argocd/commands/project_role.go:540-548 — 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 `cmd/argocd/commands/project.go:1126` 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) commitserver/metrics/githandlers.go:11 — commitserver/metrics/githandlers.go:11-19 | reposerver/metrics/githandlers.go:27-35 — 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 `commitserver/metrics/githandlers.go:11` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) pkg/apis/application/v1alpha1/types.go:2970 — pkg/apis/application/v1alpha1/types.go:2970-2979 | pkg/apis/application/v1alpha1/types.go:3012-3020 — 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) reposerver/repository/repository.go:417 — reposerver/repository/repository.go:417-426 | reposerver/repository/repository.go:459-467 — 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 `reposerver/repository/repository.go:417` 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) reposerver/repository/repository.go:3227 — reposerver/repository/repository.go:3227-3235 | reposerver/repository/repository.go:3299-3307 — 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 `reposerver/repository/repository.go:3227` 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 (9 lines × 2) server/application/application.go:409 — server/application/application.go:409-417 | server/applicationset/applicationset.go:347-355 — 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 `server/application/application.go:409` 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) server/application/application.go:997 — server/application/application.go:997-1005 | server/applicationset/applicationset.go:577-585 — 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 `server/application/application.go:997` 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) util/cert/cert.go:127 — util/cert/cert.go:127-135 | util/cert/cert.go:193-201 — 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 `util/cert/cert.go:127` 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) util/cmp/stream.go:195 — util/cmp/stream.go:195-203 | util/manifeststream/stream.go:232-240 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `util/cmp/stream.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 (9 lines × 2) applicationset/generators/utils.go:25 — applicationset/generators/utils.go:25-33 | applicationset/generators/utils.go:37-45 — 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 `applicationset/generators/utils.go:25` 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) cmd/argocd/commands/applicationset.go:105 — cmd/argocd/commands/applicationset.go:105-113 | cmd/argocd/commands/applicationset.go:213-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. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/applicationset.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.
  • Duplicated block (9 lines × 2) cmd/argocd/commands/cluster.go:354 — cmd/argocd/commands/cluster.go:354-362 | cmd/argocd/commands/cluster.go:429-437 — 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 (9 lines × 2) cmd/argocd/commands/project_role.go:100 — cmd/argocd/commands/project_role.go:100-108 | cmd/argocd/commands/project_role.go:175-183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) cmd/argocd/commands/project_source_integrity.go:117 — cmd/argocd/commands/project_source_integrity.go:117-125 | cmd/argocd/commands/project_source_integrity.go:181-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/project_source_integrity.go:117` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also 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) controller/cache/info.go:154 — controller/cache/info.go:154-162 | controller/cache/info.go:190-198 — 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 `controller/cache/info.go:154` 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) util/kube/kube.go:145 — util/kube/kube.go:145-153 | util/kube/kube.go:169-177 — 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 `util/kube/kube.go:145` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (9 lines × 2) util/notification/settings/settings.go:66 — util/notification/settings/settings.go:66-74 | util/notification/settings/settings.go:89-97 — 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 `util/notification/settings/settings.go:66` 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) util/notification/settings/settings.go:78 — util/notification/settings/settings.go:78-86 | util/notification/settings/settings.go:102-110 — 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 `util/notification/settings/settings.go:78` 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.
D29 · Static Analysis (SAST) · Medium · ×22
  • Medium: use-tls cmd/argocd-applicationset-controller/commands/applicationset_controller.go:338 — Found an HTTP server without TLS. Use 'http.ListenAndServeTLS' instead. See https://golang.org/pkg/net/http/#ListenAndServeTLS for more information. 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: use-tls cmd/argocd-commit-server/commands/argocd_commit_server.go:55 — Found an HTTP server without TLS. Use 'http.ListenAndServeTLS' instead. See https://golang.org/pkg/net/http/#ListenAndServeTLS for more information. 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: use-tls cmd/argocd-notification/commands/argocd_notification.go:144 — Found an HTTP server without TLS. Use 'http.ListenAndServeTLS' instead. See https://golang.org/pkg/net/http/#ListenAndServeTLS for more information. 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: use-tls cmd/argocd-repo-server/commands/argocd_repo_server.go:214 — Found an HTTP server without TLS. Use 'http.ListenAndServeTLS' instead. See https://golang.org/pkg/net/http/#ListenAndServeTLS for more information. 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: math-random-used controller/appcontroller.go:9 — `math/rand` is not cryptographically secure — its stream is reproducible from its seed and predictable from observed output — so any value that must be unguessable (a token, nonce, key, salt, session id, password-reset or MFA code) has to come from `crypto/rand`. Where non-cryptographic randomness IS the intent — jitter, backoff, sampling, load spreading, simulation, test fixtures, or output that is deliberately reproducible from a seed — `math/rand` is the correct choice and no change is needed; a package that deliberately offers both should keep its security-sensitive callers on the `crypto/rand` path rather than drop the other one. This is a semgrep security-AUDIT rule: it reports that a sensitive pattern is present, not that it is exploitable here. Confirm whether the flagged value reaches a security decision — a credential, token, nonce, key, salt or session id, or an externally reachable surface — and apply the change where it does; where it provably does not (cosmetic, simulation, or deliberately reproducible use), record the review and leave the code as it is.
  • Medium: use-tls gitops-engine/agent/main.go:114 — Found an HTTP server without TLS. Use 'http.ListenAndServeTLS' instead. See https://golang.org/pkg/net/http/#ListenAndServeTLS for more information. 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: use-tls gitops-engine/agent/main.go:184 — Found an HTTP server without TLS. Use 'http.ListenAndServeTLS' instead. See https://golang.org/pkg/net/http/#ListenAndServeTLS for more information. 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: allow-privilege-escalation-no-securitycontext gitops-engine/agent/manifests/base/gitops-agent-deploy.yaml:18 — In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However, certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a `securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`. This will prevent the container from running any privileged processes and limit the impact of any potential attacks. By adding a `securityContext` to your Kubernetes pod, you can help to ensure that your containerized applications are more secure and less vulnerable to privilege escalation attacks.
  • Medium: allow-privilege-escalation-no-securitycontext gitops-engine/agent/manifests/base/gitops-agent-deploy.yaml:29 — In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However, certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a `securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`. This will prevent the container from running any privileged processes and limit the impact of any potential attacks. By adding a `securityContext` to your Kubernetes pod, you can help to ensure that your containerized applications are more secure and less vulnerable to privilege escalation attacks.
  • Medium: allow-privilege-escalation-no-securitycontext gitops-engine/agent/manifests/install-namespaced.yaml:53 — In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However, certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a `securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`. This will prevent the container from running any privileged processes and limit the impact of any potential attacks. By adding a `securityContext` to your Kubernetes pod, you can help to ensure that your containerized applications are more secure and less vulnerable to privilege escalation attacks.
  • Medium: allow-privilege-escalation-no-securitycontext gitops-engine/agent/manifests/install-namespaced.yaml:66 — In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However, certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a `securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`. This will prevent the container from running any privileged processes and limit the impact of any potential attacks. By adding a `securityContext` to your Kubernetes pod, you can help to ensure that your containerized applications are more secure and less vulnerable to privilege escalation attacks.
  • Medium: allow-privilege-escalation-no-securitycontext gitops-engine/agent/manifests/install.yaml:57 — In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However, certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a `securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`. This will prevent the container from running any privileged processes and limit the impact of any potential attacks. By adding a `securityContext` to your Kubernetes pod, you can help to ensure that your containerized applications are more secure and less vulnerable to privilege escalation attacks.
  • Medium: allow-privilege-escalation-no-securitycontext gitops-engine/agent/manifests/install.yaml:70 — In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However, certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a `securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`. This will prevent the container from running any privileged processes and limit the impact of any potential attacks. By adding a `securityContext` to your Kubernetes pod, you can help to ensure that your containerized applications are more secure and less vulnerable to privilege escalation attacks.
  • Medium: use-of-md5 gitops-engine/internal/kubernetes_vendor/pkg/api/v1/endpoints/util.go: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. This is a semgrep security-AUDIT rule: it reports that a sensitive pattern is present, not that it is exploitable here. Confirm whether the flagged value reaches a security decision — a credential, token, nonce, key, salt or session id, or an externally reachable surface — and apply the change where it does; where it provably does not (cosmetic, simulation, or deliberately reproducible use), record the review and leave the code as it is.
  • Medium: use-of-md5 gitops-engine/internal/kubernetes_vendor/pkg/api/v1/endpoints/util.go:86 — 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. This is a semgrep security-AUDIT rule: it reports that a sensitive pattern is present, not that it is exploitable here. Confirm whether the flagged value reaches a security decision — a credential, token, nonce, key, salt or session id, or an externally reachable surface — and apply the change where it does; where it provably does not (cosmetic, simulation, or deliberately reproducible use), record the review and leave the code as it is.
  • Medium: math-random-used hack/gen-resources/generators/application_generator.go:6 — `math/rand` is not cryptographically secure — its stream is reproducible from its seed and predictable from observed output — so any value that must be unguessable (a token, nonce, key, salt, session id, password-reset or MFA code) has to come from `crypto/rand`. Where non-cryptographic randomness IS the intent — jitter, backoff, sampling, load spreading, simulation, test fixtures, or output that is deliberately reproducible from a seed — `math/rand` is the correct choice and no change is needed; a package that deliberately offers both should keep its security-sensitive callers on the `crypto/rand` path rather than drop the other one. This is a semgrep security-AUDIT rule: it reports that a sensitive pattern is present, not that it is exploitable here. Confirm whether the flagged value reaches a security decision — a credential, token, nonce, key, salt or session id, or an externally reachable surface — and apply the change where it does; where it provably does not (cosmetic, simulation, or deliberately reproducible use), record the review and leave the code as it is.
  • Medium: allow-privilege-escalation-no-securitycontext manifests/dev-tilt/ui-deployment.yaml:15 — In Kubernetes, each pod runs in its own isolated environment with its own set of security policies. However, certain container images may contain `setuid` or `setgid` binaries that could allow an attacker to perform privilege escalation and gain access to sensitive resources. To mitigate this risk, it's recommended to add a `securityContext` to the container in the pod, with the parameter `allowPrivilegeEscalation` set to `false`. This will prevent the container from running any privileged processes and limit the impact of any potential attacks. By adding a `securityContext` to your Kubernetes pod, you can help to ensure that your containerized applications are more secure and less vulnerable to privilege escalation attacks.
  • Medium: raw-html-format server/badge/badge.go:230 — Detected user input flowing into a manually constructed HTML string. You may be accidentally bypassing secure methods of rendering HTML by manually constructing HTML and this could create a cross-site scripting vulnerability, which could let attackers steal sensitive user data. Use the `html/template` package which will safely render HTML instead, or inspect that the HTML is rendered safely.
  • Medium: raw-html-format server/badge/badge.go:259 — Detected user input flowing into a manually constructed HTML string. You may be accidentally bypassing secure methods of rendering HTML by manually constructing HTML and this could create a cross-site scripting vulnerability, which could let attackers steal sensitive user data. Use the `html/template` package which will safely render HTML instead, or inspect that the HTML is rendered safely.
  • Medium: potential-dos-via-decompression-bomb util/io/files/tar.go:177 — Detected a possible denial-of-service via a zip bomb attack. By limiting the max bytes read, you can mitigate this attack. `io.CopyN()` can specify a size. 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: math-random-used util/session/sessionmanager.go:8 — `math/rand` is not cryptographically secure — its stream is reproducible from its seed and predictable from observed output — so any value that must be unguessable (a token, nonce, key, salt, session id, password-reset or MFA code) has to come from `crypto/rand`. Where non-cryptographic randomness IS the intent — jitter, backoff, sampling, load spreading, simulation, test fixtures, or output that is deliberately reproducible from a seed — `math/rand` is the correct choice and no change is needed; a package that deliberately offers both should keep its security-sensitive callers on the `crypto/rand` path rather than drop the other one. This is a semgrep security-AUDIT rule: it reports that a sensitive pattern is present, not that it is exploitable here. Confirm whether the flagged value reaches a security decision — a credential, token, nonce, key, salt or session id, or an externally reachable surface — and apply the change where it does; where it provably does not (cosmetic, simulation, or deliberately reproducible use), record the review and leave the code as it is.
  • Medium: math-random-used util/webhook/webhook.go:7 — `math/rand` is not cryptographically secure — its stream is reproducible from its seed and predictable from observed output — so any value that must be unguessable (a token, nonce, key, salt, session id, password-reset or MFA code) has to come from `crypto/rand`. Where non-cryptographic randomness IS the intent — jitter, backoff, sampling, load spreading, simulation, test fixtures, or output that is deliberately reproducible from a seed — `math/rand` is the correct choice and no change is needed; a package that deliberately offers both should keep its security-sensitive callers on the `crypto/rand` path rather than drop the other one. This is a semgrep security-AUDIT rule: it reports that a sensitive pattern is present, not that it is exploitable here. Confirm whether the flagged value reaches a security decision — a credential, token, nonce, key, salt or session id, or an externally reachable surface — and apply the change where it does; where it provably does not (cosmetic, simulation, or deliberately reproducible use), record the review and leave the code as it is.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×18
  • Duplicated block (10 lines × 2) gitops-engine/pkg/diff/diff.go:1137 — gitops-engine/pkg/diff/diff.go:1137-1146 | gitops-engine/pkg/diff/diff.go:1154-1163 — 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 `gitops-engine/pkg/diff/diff.go:1137` 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) cmd/argocd/commands/admin/cluster.go:206 — cmd/argocd/commands/admin/cluster.go:206-215 | cmd/argocd/commands/admin/cluster.go:502-512 — 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) cmd/argocd/commands/admin/cluster.go:236 — cmd/argocd/commands/admin/cluster.go:236-246 | cmd/argocd/commands/admin/cluster.go:531-540 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/cluster.go:236` 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) cmd/argocd/commands/admin/settings.go:345 — cmd/argocd/commands/admin/settings.go:345-354 | cmd/argocd/commands/admin/settings.go:366-375 — 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) cmd/argocd/commands/project.go:195 — cmd/argocd/commands/project.go:195-204 | cmd/argocd/commands/project.go:240-249 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/project.go:195` 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) cmd/util/app.go:582 — cmd/util/app.go:582-591 | cmd/util/applicationset.go:34-43 — 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 `cmd/util/app.go:582` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) cmpserver/server.go:64 — cmpserver/server.go:64-73 | reposerver/server.go:108-117 — 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) server/application/application.go:1265 — server/application/application.go:1265-1277 | server/applicationset/applicationset.go:92-101 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `server/application/application.go:1265` 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) server/application/application.go:1668 — server/application/application.go:1668-1677 | server/application/application.go:1729-1738 — 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) server/repository/repository.go:160 — server/repository/repository.go:160-169 | server/repository/repository.go:625-634 — 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 `server/repository/repository.go:160` 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) util/db/repository.go:61 — util/db/repository.go:61-70 | util/db/repository.go:75-84 — 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) util/helm/cmd.go:104 — util/helm/cmd.go:104-113 | util/helm/cmd.go:262-271 — 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 `util/helm/cmd.go:104` 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) util/helm/cmd.go:130 — util/helm/cmd.go:130-139 | util/helm/cmd.go:330-339 — 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 `util/helm/cmd.go:130` 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 (10 lines × 2) util/sourceintegrity/gpg.go:223 — util/sourceintegrity/gpg.go:223-232 | util/sourceintegrity/gpg.go:380-390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `util/sourceintegrity/gpg.go:223` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (10 lines × 2) cmd/argocd/commands/admin/repo.go:124 — cmd/argocd/commands/admin/repo.go:124-133 | cmd/argocd/commands/repo.go:144-153 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/repo.go:124` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (10 lines × 2) cmd/argocd/commands/applicationset.go:90 — cmd/argocd/commands/applicationset.go:90-100 | cmd/argocd/commands/applicationset.go:392-401 — 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 (10 lines × 2) cmd/argocd/commands/applicationset.go:153 — cmd/argocd/commands/applicationset.go:153-162 | cmd/argocd/commands/applicationset.go:262-271 — 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) util/kube/kube.go:47 — util/kube/kube.go:47-56 | util/kube/kube.go:84-93 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `util/kube/kube.go:47` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×15
  • Duplicated block (12 lines × 2) gitops-engine/pkg/utils/kube/ctl.go:296 — gitops-engine/pkg/utils/kube/ctl.go:296-307 | gitops-engine/pkg/utils/kube/ctl.go:327-338 — 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 `gitops-engine/pkg/utils/kube/ctl.go:296` 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) gitops-engine/pkg/utils/kube/resource_ops.go:525 — gitops-engine/pkg/utils/kube/resource_ops.go:525-536 | gitops-engine/pkg/utils/kube/resource_ops.go:582-593 — 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 `gitops-engine/pkg/utils/kube/resource_ops.go:525` 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) cmd/argocd-commit-server/commands/argocd_commit_server.go:78 — cmd/argocd-commit-server/commands/argocd_commit_server.go:78-91 | cmd/argocd-repo-server/commands/argocd_repo_server.go:201-212 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd-commit-server/commands/argocd_commit_server.go:78` 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) cmd/argocd-dex/commands/argocd_dex.go:62 — cmd/argocd-dex/commands/argocd_dex.go:62-73 | cmd/argocd-repo-server/commands/argocd_repo_server.go:101-112 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd-dex/commands/argocd_dex.go:62` 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 × 2) cmd/argocd/commands/app.go:2569 — cmd/argocd/commands/app.go:2569-2580 | cmd/util/app.go:529-540 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:2569` 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) cmd/argocd/commands/app.go:2825 — cmd/argocd/commands/app.go:2825-2836 | cmd/argocd/commands/app_diff.go:650-661 — 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 `cmd/argocd/commands/app.go:2825` 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) controller/appcontroller.go:2801 — controller/appcontroller.go:2801-2812 | controller/appcontroller.go:3045-3056 — 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 `controller/appcontroller.go:2801` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (12 lines × 2) pkg/apis/application/v1alpha1/repository_types.go:158 — pkg/apis/application/v1alpha1/repository_types.go:158-169 | pkg/apis/application/v1alpha1/repository_types.go:212-223 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `pkg/apis/application/v1alpha1/repository_types.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 (12 lines × 2) server/application/application.go:1006 — server/application/application.go:1006-1017 | server/applicationset/applicationset.go:586-597 — 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 `server/application/application.go:1006` 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) server/project/project.go:97 — server/project/project.go:97-108 | server/project/project.go:216-227 — 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 (12 lines × 2) util/settings/settings.go:1901 — util/settings/settings.go:1901-1912 | util/settings/settings.go:1916-1927 — 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 `util/settings/settings.go:1901` 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) applicationset/services/scm_provider/utils.go:114 — applicationset/services/scm_provider/utils.go:114-125 | applicationset/services/scm_provider/utils.go:148-159 — 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) cmd/argocd/commands/admin/repo.go:101 — cmd/argocd/commands/admin/repo.go:101-112 | cmd/argocd/commands/repo.go:122-133 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/repo.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 (12 lines × 2) cmd/argocd/commands/login.go:87 — cmd/argocd/commands/login.go:87-98 | cmd/argocd/commands/logout.go:61-72 — 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 `cmd/argocd/commands/login.go:87` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (12 lines × 2) cmd/argocd/commands/repo.go:386 — cmd/argocd/commands/repo.go:386-399 | cmd/argocd/commands/repo.go:458-469 — 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.
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×15
  • Duplicated block (11 lines × 2) applicationset/generators/matrix.go:92 — applicationset/generators/matrix.go:92-102 | applicationset/generators/merge.go:147-157 — 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 `applicationset/generators/matrix.go:92` 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) applicationset/generators/pull_request.go:221 — applicationset/generators/pull_request.go:221-232 | applicationset/generators/scm_provider.go:299-309 — 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 `applicationset/generators/pull_request.go:221` 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) applicationset/webhook/webhook.go:469 — applicationset/webhook/webhook.go:469-479 | applicationset/webhook/webhook.go:524-534 — 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) cmd/argocd/commands/admin/cluster.go:381 — cmd/argocd/commands/admin/cluster.go:381-391 | cmd/argocd/commands/admin/cluster.go:434-445 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/cluster.go:381` 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) cmd/argocd/commands/admin/settings.go:417 — cmd/argocd/commands/admin/settings.go:417-427 | cmd/argocd/commands/admin/settings.go:464-474 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/settings.go:417` 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) cmd/argocd/commands/app.go:253 — cmd/argocd/commands/app.go:253-263 | cmd/argocd/commands/applicationset.go:585-595 — 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 (11 lines × 2) cmd/argocd/commands/app.go:3104 — cmd/argocd/commands/app.go:3104-3114 | cmd/argocd/commands/app.go:3251-3262 — 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 (11 lines × 2) server/application/application.go:514 — server/application/application.go:514-524 | server/application/application.go:683-693 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) server/application/application.go:1560 — server/application/application.go:1560-1570 | server/application/application.go:1603-1613 — 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) util/cmp/stream.go:179 — util/cmp/stream.go:179-189 | util/manifeststream/stream.go:212-222 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `util/cmp/stream.go:179` 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) util/helm/cmd.go:176 — util/helm/cmd.go:176-187 | util/helm/cmd.go:263-273 — 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 `util/helm/cmd.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. 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) util/webhook/registry.go:74 — util/webhook/registry.go:74-84 | util/webhook/webhook.go:458-470 — 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 `util/webhook/registry.go:74` 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) cmd/argocd/commands/admin/backup.go:54 — cmd/argocd/commands/admin/backup.go:54-64 | cmd/argocd/commands/admin/project_allowlist.go:54-64 — 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 `cmd/argocd/commands/admin/backup.go:54` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (11 lines × 2) cmd/argocd/commands/project_source_integrity.go:274 — cmd/argocd/commands/project_source_integrity.go:274-284 | cmd/argocd/commands/project_source_integrity.go:379-390 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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) controller/cache/info.go:246 — controller/cache/info.go:246-256 | controller/cache/info.go:454-466 — 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 `controller/cache/info.go:246` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×15
  • Duplicated block (8 lines × 2) gitops-engine/pkg/cache/cluster.go:683 — gitops-engine/pkg/cache/cluster.go:683-690 | gitops-engine/pkg/cache/cluster.go:1203-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 `gitops-engine/pkg/cache/cluster.go:683` 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) applicationset/controllers/applicationset_controller.go:569 — applicationset/controllers/applicationset_controller.go:569-576 | applicationset/controllers/applicationset_controller.go:1193-1200 — 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 (8 lines × 2) cmd/argocd-application-controller/commands/argocd_application_controller.go:151 — cmd/argocd-application-controller/commands/argocd_application_controller.go:151-160 | cmd/argocd-applicationset-controller/commands/applicationset_controller.go:219-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 `cmd/argocd-application-controller/commands/argocd_application_controller.go:151` 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) cmd/argocd/commands/admin/settings.go:537 — cmd/argocd/commands/admin/settings.go:537-544 | cmd/argocd/commands/admin/settings.go:602-609 — 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 (8 lines × 2) cmd/argocd/commands/app.go:383 — cmd/argocd/commands/app.go:383-391 | cmd/argocd/commands/app.go:578-585 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
  • Duplicated block (8 lines × 2) cmd/argocd/commands/app.go:3005 — cmd/argocd/commands/app.go:3005-3013 | cmd/argocd/commands/project.go:1137-1144 — 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 `cmd/argocd/commands/app.go:3005` 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) controller/sharding/cache.go:265 — controller/sharding/cache.go:265-272 | controller/sharding/sharding.go:246-253 — 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 `controller/sharding/cache.go:265` 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) server/application/application.go:706 — server/application/application.go:706-715 | server/application/application.go:846-853 — 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 `server/application/application.go:706` 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 (8 lines × 2) server/application/application.go:1020 — server/application/application.go:1020-1027 | server/applicationset/applicationset.go:396-403 — 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 `server/application/application.go:1020` 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) server/application/application.go:1699 — server/application/application.go:1699-1706 | server/application/application.go:1729-1736 — 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) server/repository/repository.go:287 — server/repository/repository.go:287-299 | server/repository/repository.go:338-345 — 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 (8 lines × 2) util/git/creds.go:961 — util/git/creds.go:961-968 | util/git/creds.go:1063-1070 — 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 `util/git/creds.go:961` 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) cmd/argocd/commands/project_role.go:547 — cmd/argocd/commands/project_role.go:547-554 | cmd/argocd/commands/projectwindows.go:377-384 — 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 `cmd/argocd/commands/project_role.go:547` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) cmd/argocd/commands/project_role.go:639 — cmd/argocd/commands/project_role.go:639-646 | cmd/argocd/commands/project_role.go:670-677 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/project_role.go:639` 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) cmd/argocd/commands/project_source_integrity.go:190 — cmd/argocd/commands/project_source_integrity.go:190-197 | cmd/argocd/commands/project_source_integrity.go:392-399 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/project_source_integrity.go:190` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×15
  • Duplicated block (7 lines × 2) gitops-engine/pkg/cache/cluster.go:1601 — gitops-engine/pkg/cache/cluster.go:1601-1607 | gitops-engine/pkg/cache/cluster.go:1616-1622 — 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 `gitops-engine/pkg/cache/cluster.go:1601` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) cmd/argocd/commands/admin/app.go:293 — cmd/argocd/commands/admin/app.go:293-299 | cmd/argocd/commands/headless/headless.go:137-143 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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) cmd/argocd/commands/app.go:1463 — cmd/argocd/commands/app.go:1463-1469 | cmd/argocd/commands/applicationset.go:358-364 — 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 `cmd/argocd/commands/app.go:1463` 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) cmd/argocd/commands/project.go:307 — cmd/argocd/commands/project.go:307-313 | cmd/argocd/commands/project.go:1219-1225 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/project.go:307` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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) cmpserver/server.go:51 — cmpserver/server.go:51-57 | reposerver/server.go:94-100 — 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 `cmpserver/server.go:51` 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) controller/appcontroller.go:830 — controller/appcontroller.go:830-836 | server/application/application.go:3161-3167 — 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 `controller/appcontroller.go:830` 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) controller/appcontroller.go:1105 — controller/appcontroller.go:1105-1111 | controller/appcontroller.go:2523-2529 — 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 `controller/appcontroller.go:1105` 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) hack/gen-resources/cmd/commands/cmd.go:62 — hack/gen-resources/cmd/commands/cmd.go:62-69 | hack/gen-resources/cmd/commands/cmd.go:101-107 — 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) reposerver/repository/repository.go:970 — reposerver/repository/repository.go:970-976 | reposerver/repository/repository.go:1045-1051 — 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 `reposerver/repository/repository.go:970` 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) reposerver/repository/repository.go:3213 — reposerver/repository/repository.go:3213-3219 | reposerver/repository/repository.go:3285-3291 — 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 `reposerver/repository/repository.go:3213` 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) server/application/application.go:2178 — server/application/application.go:2178-2184 | server/application/application.go:2318-2324 — 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 (7 lines × 2) util/oidc/oidc.go:265 — util/oidc/oidc.go:265-271 | util/session/sessionmanager.go:159-165 — 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 `util/oidc/oidc.go:265` 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) util/webhook/webhook.go:276 — util/webhook/webhook.go:276-282 | util/webhook/webhook.go:289-295 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) cmd/argocd/commands/admin/repo.go:160 — cmd/argocd/commands/admin/repo.go:160-166 | cmd/argocd/commands/repo.go:222-228 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (7 lines × 2) cmd/argocd/commands/login.go:136 — cmd/argocd/commands/login.go:136-142 | cmd/argocd/commands/relogin.go:77-83 — 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.
D15 · Churn × Complexity Hotspots · Hotspot · ×10
  • Hotspot: controller/appcontroller.go controller/appcontroller.go — controller/appcontroller.go changed 22 times in last 90 days, max complexity 44. 11 of those changes were fix/bug commits, and the other 11 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: reposerver/repository/repository.go reposerver/repository/repository.go — reposerver/repository/repository.go changed 21 times in last 90 days, max complexity 42. 13 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: controller/state.go controller/state.go — controller/state.go changed 8 times in last 90 days, max complexity 95. 3 of those changes were fix/bug commits, and the other 5 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: gitops-engine/pkg/sync/sync_context.go gitops-engine/pkg/sync/sync_context.go — gitops-engine/pkg/sync/sync_context.go changed 8 times in last 90 days, max complexity 59. 2 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: controller/sync.go controller/sync.go — controller/sync.go changed 9 times in last 90 days, max complexity 51. 5 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: cmd/argocd/commands/app.go cmd/argocd/commands/app.go — cmd/argocd/commands/app.go changed 4 times in last 90 days, max complexity 69. 1 of those changes was a fix/bug commit, and the other 3 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: controller/cache/info.go controller/cache/info.go — controller/cache/info.go changed 6 times in last 90 days, max complexity 46. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: server/application/application.go server/application/application.go — server/application/application.go changed 6 times in last 90 days, max complexity 46. 2 of those changes were fix/bug commits, and the other 4 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: util/settings/settings.go util/settings/settings.go — util/settings/settings.go changed 13 times in last 90 days, max complexity 19. 4 of those changes were fix/bug commits, and the other 9 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
  • Hotspot: pkg/apis/application/v1alpha1/types.go pkg/apis/application/v1alpha1/types.go — pkg/apis/application/v1alpha1/types.go changed 9 times in last 90 days, max complexity 27. 3 of those changes were fix/bug commits, and the other 6 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
D3 · God Classes · TooManyMethods · ×10
  • TooManyMethods: ApplicationController controller/appcontroller.go:118 — TooManyMethods — 71 methods, declared across 3 files: controller/appcontroller.go (52), controller/hydrator_dependencies.go (13), controller/hook.go (6). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: SettingsManager util/settings/settings.go:602 — TooManyMethods — 71 methods, declared across 2 files: settings/settings.go (66), settings/accounts.go (5). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: db util/db/db.go:127 — TooManyMethods — 61 methods, declared across 8 files: db/repository.go (35), db/cluster.go (10), db/certificate.go (6), db/secrets.go (4), +4 more file(s). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. Most of these members implement db.ArgoDB (43 of 61 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: Server server/application/application.go:91 — TooManyMethods — 59 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: clusterCache gitops-engine/pkg/cache/cluster.go:231 — TooManyMethods — 49 methods, declared across 2 files: cache/cluster.go (48), cache/references.go (1). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: client pkg/apiclient/apiclient.go:134 — TooManyMethods — 38 methods, declared across 2 files: apiclient/apiclient.go (35), apiclient/grpcproxy.go (3). That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. Most of these members implement apiclient.Client (31 of 38 members), so moving them onto a smaller type would remove them from that contract rather than reduce it. To reduce it, split the contract instead: give each cohesive group of operations its own smaller interface and its own implementing type. Where the contract has to stay whole, move the work behind these members into collaborator types, so what is left here is a forward per member rather than a responsibility per member.
  • TooManyMethods: nativeGitClient util/git/client.go:179 — TooManyMethods — 38 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ArgoCDSettings util/settings/settings.go:87 — TooManyMethods — 36 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: syncContext gitops-engine/pkg/sync/sync_context.go:388 — TooManyMethods — 35 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Service reposerver/repository/repository.go:92 — TooManyMethods — 33 methods. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D38 · OSV Dependency Vulnerabilities · Medium CVE · ×8
  • Medium CVE: [GHSA redacted] ui/pnpm-lock.yaml — ajv 7.2.4: [GHSA redacted] — upgrade to 8.18.0
  • Medium CVE: [GHSA redacted] ui/pnpm-lock.yaml — dompurify 3.4.0: [GHSA redacted] — upgrade to 3.4.7. This is 1 of 8 advisories with a published fix this scan raises against dompurify 3.4.0, 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 9 advisories this scan raises against dompurify 3.4.0: [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted], [GHSA redacted].
  • Medium CVE: GO-2026-5158 gitops-engine/go.mod — go.opentelemetry.io/otel 1.41.0 (go.opentelemetry.io/otel/baggage, go.opentelemetry.io/otel/propagation): GO-2026-5158 — upgrade to 1.42.0
  • Medium CVE: GO-2026-5942 gitops-engine/go.mod — golang.org/x/net 0.55.0 (golang.org/x/net/dns/dnsmessage): GO-2026-5942 — golang.org/x/net is not a DIRECT requirement of this module: go.mod records it as `// indirect`, pulled in transitively, so raise it in place (run `go -C gitops-engine get golang.org/x/net@v0.56.0`, which updates the require line gitops-engine/go.mod already holds for it).
  • Medium CVE: GO-2026-5970 gitops-engine/go.mod — golang.org/x/text 0.37.0 (golang.org/x/text/unicode/norm): GO-2026-5970 — golang.org/x/text is not a DIRECT requirement of this module: go.mod records it as `// indirect`, pulled in transitively, so raise it in place (run `go -C gitops-engine get golang.org/x/text@v0.39.0`, which updates the require line gitops-engine/go.mod already holds for it).
  • Medium CVE: GO-2025-3521 gitops-engine/go.mod — k8s.io/kubernetes 1.36.1: GO-2025-3521 — no fixed version has been published yet. Track the advisory, and remove or replace k8s.io/kubernetes if the exposure is not acceptable until one lands. (in 2 dependency files: gitops-engine/go.mod, go.mod) This one row stands for the 2 advisories this scan raises against k8s.io/kubernetes 1.36.1: GO-2025-3521, GO-2025-3547.
  • Medium CVE: [GHSA redacted] ui/pnpm-lock.yaml — uuid 8.3.2: [GHSA redacted] — this repo already declares uuid ^14.0.1 directly, at or above the fixed 11.1.1; the vulnerable 8.3.2 is a second copy resolved for a dependency that requires an older range. Upgrade those dependents, or pin uuid with an `overrides` entry (`pnpm.overrides` for pnpm) so only one copy resolves.
  • Medium CVE: [GHSA redacted] ui/pnpm-lock.yaml — uuid 9.0.1: [GHSA redacted] — this repo already declares uuid ^14.0.1 directly, at or above the fixed 11.1.1; the vulnerable 9.0.1 is a second copy resolved for a dependency that requires an older range. Upgrade those dependents, or pin uuid with an `overrides` entry (`pnpm.overrides` for pnpm) so only one copy resolves.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×8
  • Duplicated block (6 lines × 2) cmd/argocd-dex/commands/argocd_dex.go:140 — cmd/argocd-dex/commands/argocd_dex.go:140-145 | cmd/argocd-dex/commands/argocd_dex.go:208-213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd-dex/commands/argocd_dex.go:140` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) cmd/argocd-notification/commands/argocd_notification.go:123 — cmd/argocd-notification/commands/argocd_notification.go:123-128 | cmd/argocd/commands/admin/notifications.go:58-63 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd-notification/commands/argocd_notification.go:123` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) cmpserver/apiclient/clientset.go:47 — cmpserver/apiclient/clientset.go:47-52 | reposerver/apiclient/clientset.go:130-135 — 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 (6 lines × 2) server/application/application.go:1838 — server/application/application.go:1838-1843 | server/application/application.go:3051-3056 — 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 `server/application/application.go:1838` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
  • Duplicated block (6 lines × 2) server/application/application.go:2223 — server/application/application.go:2223-2228 | server/application/application.go:2248-2253 — 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 `server/application/application.go:2223` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
  • Duplicated block (6 lines × 2) util/db/repository_secrets.go:435 — util/db/repository_secrets.go:435-440 | util/db/repository_secrets.go:537-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.
  • Duplicated block (6 lines × 2) cmd/argocd/commands/app_resources.go:78 — cmd/argocd/commands/app_resources.go:78-85 | cmd/argocd/commands/app_resources.go:560-565 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app_resources.go:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 (6 lines × 2) cmd/argocd/commands/tree.go:107 — cmd/argocd/commands/tree.go:107-112 | cmd/argocd/commands/tree.go:127-132 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×7
  • Duplicated block (13 lines × 2) gitops-engine/pkg/cache/cluster.go:509 — gitops-engine/pkg/cache/cluster.go:509-521 | gitops-engine/pkg/cache/cluster.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 `gitops-engine/pkg/cache/cluster.go:509` 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) gitops-engine/pkg/health/health_apiservice.go:43 — gitops-engine/pkg/health/health_apiservice.go:43-55 | gitops-engine/pkg/health/health_apiservice.go:64-76 — 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 `gitops-engine/pkg/health/health_apiservice.go:43` 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) applicationset/services/pull_request/github.go:26 — applicationset/services/pull_request/github.go:26-38 | applicationset/services/scm_provider/github.go:26-38 — 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 `applicationset/services/pull_request/github.go:26` 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) cmd/argocd/commands/app.go:885 — cmd/argocd/commands/app.go:885-897 | cmd/argocd/commands/app.go:998-1010 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/app.go:885` 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) reposerver/repository/repository.go:3244 — reposerver/repository/repository.go:3244-3256 | reposerver/repository/repository.go:3316-3328 — 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 `reposerver/repository/repository.go:3244` 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 (13 lines × 2) util/db/cluster.go:450 — util/db/cluster.go:450-462 | util/settings/cluster_informer.go:242-254 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `util/db/cluster.go:450` 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) util/db/repository.go:438 — util/db/repository.go:438-450 | util/db/repository.go:455-467 — 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 `util/db/repository.go:438` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×7
  • Duplicated block (9 lines × 3) gitops-engine/pkg/utils/kube/ctl.go:184 — gitops-engine/pkg/utils/kube/ctl.go:184-192 | gitops-engine/pkg/utils/kube/ctl.go:208-216 | gitops-engine/pkg/utils/kube/ctl.go:232-240 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `gitops-engine/pkg/utils/kube/ctl.go:184` 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 × 3) applicationset/services/scm_provider/bitbucket_server.go:140 — applicationset/services/scm_provider/bitbucket_server.go:140-148 | applicationset/services/scm_provider/github.go:55-63 | applicationset/services/scm_provider/gitlab.go:71-79 — 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 `applicationset/services/scm_provider/bitbucket_server.go:140` 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 × 3) cmd/argocd/commands/account.go:91 — cmd/argocd/commands/account.go:91-99 | cmd/argocd/commands/app.go:3103-3111 | cmd/argocd/commands/app.go:3250-3259 — 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 `cmd/argocd/commands/account.go:91` 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 × 3) cmd/argocd/commands/admin/settings.go:397 — cmd/argocd/commands/admin/settings.go:397-405 | cmd/argocd/commands/admin/settings.go:495-503 | cmd/argocd/commands/admin/settings.go:528-536 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `cmd/argocd/commands/admin/settings.go:397` 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 × 3) server/cluster/cluster.go:180 — server/cluster/cluster.go:180-188 | server/cluster/cluster.go:337-345 | server/cluster/cluster.go:454-462 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `server/cluster/cluster.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. 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 × 3) util/kustomize/kustomize.go:193 — util/kustomize/kustomize.go:193-201 | util/kustomize/kustomize.go:214-222 | util/kustomize/kustomize.go:264-272 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `util/kustomize/kustomize.go:193` 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 (9 lines × 3) util/sourceintegrity/gpg.go:126 — util/sourceintegrity/gpg.go:126-134 | util/sourceintegrity/gpg.go:222-230 | util/sourceintegrity/gpg.go:249-257 — 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. The matched lines also register a scope-exit action (a `defer`-style statement) that runs when the function holding them returns: moved into a called unit it would run when THAT unit returns instead — before the caller uses what it releases — so keep the registration at the call site and extract only the work around it, or have the extracted unit hand the resource back for the caller to register.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×4
  • Duplicated block (14 lines × 2) applicationset/generators/matrix.go:109 — applicationset/genera...

    Downloadable artifacts

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