Skip to content

Update Go and npm dependencies to remediate security vulnerabilities#1033

Merged
pskrbasu merged 5 commits intodevelopfrom
issue-1032-update-dependencies-fix-cves
Mar 31, 2026
Merged

Update Go and npm dependencies to remediate security vulnerabilities#1033
pskrbasu merged 5 commits intodevelopfrom
issue-1032-update-dependencies-fix-cves

Conversation

@graza-io
Copy link
Copy Markdown
Contributor

@graza-io graza-io commented Mar 25, 2026

Summary

Update Go and npm dependencies to fix multiple Dependabot security alerts (closes #1032).

Go — Remediated

npm (ui/dashboard) — Remediated

Outstanding — No Fix Available

pskrbasu and others added 4 commits March 30, 2026 18:35
Add //nolint:gosec comments for three intentional G118 patterns flagged by golangci-lint v2.11.4:
- cmd_hooks.go: cancelFn stored in tasksCancelFn for deferred cleanup
- api.go: context.Background() intentional on shutdown path after ctx is Done
- db_client_execute.go: extend existing govet nolint to also cover gosec

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Exclude G118 globally in .golangci.yml rather than using per-line nolint
comments, which triggered nolintlint unused-directive errors on older
golangci-lint versions (v2.10.x vs v2.11.4 in CI).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three G118 issues were triggered by golangci-lint v2.11.4 (via version: latest in CI):

1. api.go: Replace context.Background() with context.WithoutCancel(ctx) on the
   shutdown path. After <-ctx.Done() the parent ctx is cancelled, so we need a
   fresh context for the srv.Shutdown timeout. context.WithoutCancel inherits
   context values without the cancellation — the semantically correct fix.

2. cmd_hooks.go: Add //nolint:gosec — cancelFn IS stored in the package-level
   tasksCancelFn and called when tasks complete. G118 is a false positive here.

3. db_client_execute.go: Extend existing //nolint:govet to also cover gosec —
   same intentional pattern, already documented: pgx prematurely cancels the PG
   connection if the cancel fn is called in defer.

Additionally:
- Pin golangci-lint CI version to v2.11.4 (was: latest) to prevent future
  unexpected failures from new linter rules on every CI run.
- Add nolintlint exclusion rules in .golangci.yml for the two per-line gosec
  nolints so they don't appear as unused directives on older local versions that
  pre-date G118.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pskrbasu pskrbasu merged commit 21b3e57 into develop Mar 31, 2026
24 checks passed
@pskrbasu pskrbasu deleted the issue-1032-update-dependencies-fix-cves branch March 31, 2026 06:02
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.

Update dependencies to remediate security vulnerabilities

2 participants