Skip to content

ci(lint): drop gosec — security owned by nox#64

Closed
felixgeelhaar wants to merge 2 commits into
mainfrom
ci/drop-gosec
Closed

ci(lint): drop gosec — security owned by nox#64
felixgeelhaar wants to merge 2 commits into
mainfrom
ci/drop-gosec

Conversation

@felixgeelhaar

Copy link
Copy Markdown
Collaborator

Drop gosec — security is owned by nox

The org has standardized on nox for security scanning (secrets + IaC + dependency + AI + taint-analysis SAST), replacing gosec at the code-lint layer. The golden config in klarlabs-studio/.github (golangci.reference.yml) already dropped gosec; this PR brings statekit in line.

Changes

  • .golangci.yml: removed gosec from linters.enable, removed the linters.settings.gosec block (where present), and pruned gosec from exclusions.rules (dropping gosec-only rules entirely, removing the gosec token from mixed rules). Everything else — gocritic, the standard set, formatters, repo-specific config — is preserved unchanged.
  • Dead suppressions: removed 1 now-unused gosec lint directives (//nolint:gosec / // #nosec Gxxx) that become dead once gosec is gone. For mixed //nolint:errcheck,gosec directives, only the gosec token was removed; the rest is kept.

Verification

  • .golangci.yml parses; no residual gosec references.
  • golangci-lint run ./... (v2.12.2, the CI-pinned version) and go build ./... run locally.
  • Removing gosec + its suppressions can only reduce lint findings.

No merge intended — opening for the Lint CI gate to confirm green.

Copilot AI review requested due to automatic review settings June 8, 2026 14:37

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns this repository’s GolangCI-Lint configuration with the org’s standard security scanning approach by removing the legacy gosec linter and its now-dead suppressions, delegating code-level security scanning to nox as described.

Changes:

  • Removed gosec from .golangci.yml (enable list) and deleted the gosec-only exclusion rule block.
  • Removed a now-dead #nosec G203 directive from the HTML renderer now that gosec is no longer part of linting.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
viz/html/renderer.go Removes a gosec-specific suppression comment that becomes dead after dropping gosec.
.golangci.yml Drops gosec from enabled linters and removes the gosec-only exclusions to match org-standard nox ownership.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@felixgeelhaar

Copy link
Copy Markdown
Collaborator Author

Heads-up: the ci / Lint job is red, but not because of this change. The 3 remaining findings are pre-existing govet inline: Constant reflect.Ptr should be inlined warnings in internal/parser/parser.go (lines 56, 103, 342) — a file this PR does not touch. They already fail on main with the CI-pinned golangci-lint v2.12.2. This PR strictly reduces findings (gosec's 4 are gone; 7→3). The govet cleanup is out of scope for the gosec migration and should be a separate PR.

@felixgeelhaar

Copy link
Copy Markdown
Collaborator Author

Deferred — keeping gosec until nox/taint-analysis is published at community trust (the plugin is currently unverified; -allow-unverified declined org-wide). Will re-do the gosec removal once nox owns the taint layer. See klarlabs-studio/.github.

@felixgeelhaar felixgeelhaar deleted the ci/drop-gosec branch June 8, 2026 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants