Summary
Custom lint scan found 37 environment-coupling findings where CLI/library code reads process environment directly with os.Getenv / os.LookupEnv instead of receiving configuration explicitly.
Root cause
Lower-level code is coupling itself to ambient process environment state rather than accepting configuration from callers, constructors, or narrow boundary helpers.
Affected areas
pkg/cli/shell_completion.go: 6 findings
pkg/cli/engine_secrets.go: 5 findings
pkg/cli/add_interactive_orchestrator.go: 3 findings
pkg/cli/mcp_validation.go: 2 findings
- plus related single-file findings in
pkg/workflow/workflow_data.go and multiple CLI entrypoint/helpers
Representative diagnostics
pkg/workflow/workflow_data.go: os.Getenv couples the library to the process environment; pass configuration explicitly instead
pkg/cli/add_interactive_engine.go: os.Getenv couples the library to the process environment; pass configuration explicitly instead
pkg/cli/outcomes_command.go: os.LookupEnv couples the library to the process environment; pass configuration explicitly instead
Expected outcome
Refactor a coherent subset of these findings so environment access lives at the outermost practical boundary and values are passed inward explicitly.
Remediation checklist
Suggested starting slice
Copilot execution notes
Use only the minimum relevant guidance: keep remediation tightly scoped to the assigned group, prefer dependency injection or explicit config threading, and stop after make golint-custom confirms progress for the touched findings.
Generated by 🧌 LintMonster · 46.1 AIC · ⌖ 4.95 AIC · ⊞ 4.4K · ◷
Summary
Custom lint scan found 37 environment-coupling findings where CLI/library code reads process environment directly with
os.Getenv/os.LookupEnvinstead of receiving configuration explicitly.Root cause
Lower-level code is coupling itself to ambient process environment state rather than accepting configuration from callers, constructors, or narrow boundary helpers.
Affected areas
pkg/cli/shell_completion.go: 6 findingspkg/cli/engine_secrets.go: 5 findingspkg/cli/add_interactive_orchestrator.go: 3 findingspkg/cli/mcp_validation.go: 2 findingspkg/workflow/workflow_data.goand multiple CLI entrypoint/helpersRepresentative diagnostics
pkg/workflow/workflow_data.go:os.Getenvcouples the library to the process environment; pass configuration explicitly insteadpkg/cli/add_interactive_engine.go:os.Getenvcouples the library to the process environment; pass configuration explicitly insteadpkg/cli/outcomes_command.go:os.LookupEnvcouples the library to the process environment; pass configuration explicitly insteadExpected outcome
Refactor a coherent subset of these findings so environment access lives at the outermost practical boundary and values are passed inward explicitly.
Remediation checklist
make golint-custom.Suggested starting slice
pkg/workflow/workflow_data.gopkg/cli/add_interactive_engine.gopkg/cli/outcomes_command.goCopilot execution notes
Use only the minimum relevant guidance: keep remediation tightly scoped to the assigned group, prefer dependency injection or explicit config threading, and stop after
make golint-customconfirms progress for the touched findings.