Skip to content

feat(agents): sqlite-cve-patch - #9

Merged
mashkovd merged 1 commit into
mainfrom
feat/agents-sqlite-cve-patch
May 1, 2026
Merged

mashkovd merged 1 commit into
mainfrom
feat/agents-sqlite-cve-patch

Conversation

@mashkovd

@mashkovd mashkovd commented May 1, 2026

Copy link
Copy Markdown
Member

Implements accepted proposal mctl-agent/sqlite-cve-patch.

Spec: https://github.com/mctlhq/mctl-gitops/tree/main/platform-gitops/agents-state/mctl-agent/proposals/sqlite-cve-patch/

Generated by mctl-agents Tier 2 implementer. Review carefully — this PR was opened automatically and the spec may have gaps.

Upgrade modernc.org/sqlite from v1.34.5 to v1.37.0. The v1.37.x
release bundles SQLite 3.53.0, which is past the 3.50.2 fix point
for CVE-2025-6965 (CVSS 9.8, memory corruption in aggregate queries).

No application code changes are required; the public interface is the
standard database/sql driver, which is unchanged between versions.
No schema migration is needed; the on-disk format is compatible.

Also adds a slog.Info line at DB init to emit the embedded SQLite
version string, satisfying the acceptance criterion that the version
is visible in service logs.

Proposal: platform-gitops/agents-state/mctl-agent/proposals/sqlite-cve-patch/
@mashkovd

mashkovd commented May 1, 2026

Copy link
Copy Markdown
Member Author

@codex review

@mashkovd

mashkovd commented May 1, 2026

Copy link
Copy Markdown
Member Author

@copilot review

Copilot AI commented May 1, 2026

Copy link
Copy Markdown

@copilot review

Code review — feat/agents-sqlite-cve-patch

Summary of changes

File What changed
go.mod modernc.org/sqlite bumped v1.34.5 → v1.37.0; github.com/lib/pq and gopkg.in/yaml.v3 promoted to direct deps; transitive packages updated
go.sum Checksums updated to match
internal/ticket/store.go 5-line block added to log the embedded SQLite version at DB init via slog.Info

Security fix ✅
modernc.org/sqlite v1.37.0 bundles SQLite 3.53.0, which is past the 3.50.2 patch point for CVE-2025-6965 (CVSS 9.8 — memory corruption in aggregate queries). Confirmed no new advisories in the upgraded packages via the GitHub advisory DB.

Dependency hygiene ✅
lib/pq and yaml.v3 were already directly imported (import _ "github.com/lib/pq" in store.go); promoting them to direct deps in go.mod is the correct go mod tidy outcome. The new transitive pull-in (golang.org/x/exp) is required by modernc.org/sqlite v1.37.x — no unexpected additions.

Observability addition ✅
The version-logging block is safe: it uses a short-scoped err variable (no shadowing of the outer err), fails silently so DB init is never blocked, and follows the existing slog style in the codebase.

Tests & build ✅
All 17 test packages pass (go test ./...), go build ./... is clean, and go vet ./... reports nothing.

Minor observations (non-blocking)

  • The sqlite_version() query is issued before s.migrate(), which is intentional and correct — the version is in the log regardless of whether schema migration succeeds.
  • No schema migration is needed between v1.34.5 and v1.37.0 (SQLite on-disk format is unchanged).

Verdict: LGTM — the change is minimal, targeted, and correct. Safe to merge.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mashkovd
mashkovd merged commit c6e5b60 into main May 1, 2026
2 checks passed
@mashkovd
mashkovd deleted the feat/agents-sqlite-cve-patch branch May 1, 2026 08:09
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