Skip to content

chore: bump dependencies with open security advisories - #89

Merged
KARTIKrocks merged 2 commits into
mainfrom
chore/bump-vulnerable-deps
Sep 25, 2026
Merged

KARTIKrocks merged 2 commits into
mainfrom
chore/bump-vulnerable-deps

Conversation

@KARTIKrocks

@KARTIKrocks KARTIKrocks commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

User description

Clears every open security advisory in the repo's dependency graph that has a
fix, and documents the two that don't.

The Go side: parsers/pgparser

CodeAnt's repo scan of 4029bbf reported 8 Go advisories, all transitive
through github.com/auxten/postgresql-parser:

Module Was Now Advisories
google.golang.org/grpc v1.33.1 v1.83.2 6, incl. GO-2026-4762 (CVSS 9.1 authz bypass)
google.golang.org/protobuf v1.25.0 v1.36.12 GO-2024-2611
github.com/sirupsen/logrus v1.6.0 v1.9.3 GO-2025-4188

None was reachable, which is worth stating rather than glossing over: every
gRPC advisory is server-side — xDS RBAC, HTTP/2 transport, Rapid Reset — and a
SQL parser starts no gRPC server. govulncheck reported 0 called symbols
before this change, which is why make vuln has been green throughout. The
point of the bump is that a consumer's own scanner reads the module graph, not
the call graph, and would flag a 9.1 on a library they linked for SQL parsing.

The genproto part is not incidental

Bumping grpc alone breaks the workspace build:

ambiguous import: found package google.golang.org/genproto/googleapis/rpc/status in multiple modules:
	google.golang.org/genproto v0.0.0-20200911024640-645f7a48b24f
	google.golang.org/genproto/googleapis/rpc v0.0.0-20260526163538-3dc84a4a5aaa

The pre-split monolithic genproto and the googleapis/{api,rpc} sub-modules
both provide those packages. This only reproduces with go.work active —
GOWORK=off go test ./... resolves one module set and passes, so the first
version of this change looked fine and make ci is what caught it. Bumping the
parent past the split fixes it, and carries grpc to v1.83.2, which closes the
last advisory (GO-2026-6443, still open at v1.83.1).

Result: govulncheck now reports no vulnerabilities across all nine modules
with no "in modules you require" caveat.

The npm side: website/

22 of the 30 advisories were in the Docusaurus build chain. npm audit fix
took fast-uri, image-size, nanoid, joi, qs, svgo, smol-toml and colord to
patched releases with no breaking change.

Two needed an overrides block, which is why package.json changed:

  • js-yaml — Docusaurus pins 4.3.0; the patches are in 4.3.2.
  • serialize-javascript — 6.0.2 via the webpack plugins; the RCE fix is in 7.x.

npm audit fix will not do either on its own. It proposes
@docusaurus/core@3.5.2, which is a downgrade from the pinned 3.10.2.
npm run check (lint + typecheck + build) passes with the overrides in place.

What's left: 17 moderate, all tracing to one root cause —
webpack-dev-server depends on a uuid with a missing bounds check. Clearing
it needs a uuid v8 to v11 major bump behind a transitive, and
webpack-dev-server only runs under npm start; neither ci.yml nor
docs.yml touches it. Left alone deliberately and noted in AGENTS.md, along
with why the overrides block exists so it doesn't get tidied away later.

Not in this PR

The same scan flags auxten/postgresql-parser as an unknown license. It is a
CockroachDB parser fork whose LICENSE says source is Business Source License
1.1 "unless otherwise noted at the beginning of the file", and 129 of the files
pgparser imports carry a BSL header pointing at a licenses/BSL.txt the
module does not ship. sqlguard is MIT. That needs a decision, not a dependency
bump.

Verification

  • make ci — fmt-check, vet, lint, vuln, test-race, lint-docs across all nine modules
  • make tidy-check — all modules tidy
  • GOWORK=off go test ./... in parsers/pgparser — the consumer's view
  • npm run check in website/

CodeAnt-AI Description

Remove known vulnerabilities from Go modules and the documentation build

What Changed

  • The PostgreSQL parser now uses patched Go dependencies, removing the outdated gRPC, protobuf, logging, and related module versions associated with security advisories.
  • The website build now forces patched versions of vulnerable transitive packages and updates its dependency lockfile.
  • The documented application behavior and published website output remain unchanged.

Impact

✅ Fewer dependency security alerts
✅ Safer PostgreSQL parser dependencies
✅ Safer documentation builds

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

`parsers/pgparser` resolved `google.golang.org/grpc` to v1.33.1,
`google.golang.org/protobuf` to v1.25.0 and `github.com/sirupsen/logrus` to
v1.6.0 — all transitive through `github.com/auxten/postgresql-parser`, and
between them the subject of eight advisories including a CVSS 9.1 gRPC
authorization bypass (GO-2026-4762).

None was reachable. Every gRPC advisory is server-side (xDS RBAC, HTTP/2
transport) and a SQL parser starts no gRPC server, which is why `make vuln`
has been green throughout: govulncheck reports called symbols, dependency
scanners report the module graph. The graph is what a consumer's own scanner
sees, so the two views should agree.

`google.golang.org/genproto` had to move too. Bumping grpc alone makes the
workspace build fail with an ambiguous import — the pre-split monolithic
genproto and the `googleapis/{api,rpc}` sub-modules both provide
`googleapis/rpc/status` and `googleapis/api/httpbody`. This only reproduces
with `go.work` active; `GOWORK=off` resolves one module set and passes.
Bumping the parent past the split resolves it, and carries grpc to v1.83.2,
which closes the last remaining advisory (GO-2026-6443).

After this `govulncheck` reports no vulnerabilities in any of the nine
modules, with no "in modules you require" caveat.

The website lockfile picks up the patches available for fast-uri, image-size,
js-yaml, nanoid, joi, qs, svgo, smol-toml and colord. js-yaml and
serialize-javascript needed an `overrides` block: Docusaurus pins versions
with open advisories and `npm audit fix` proposes downgrading
@docusaurus/core from 3.10.2 to 3.5.2 rather than pinning the transitive.
`npm run check` passes with the overrides in place. What remains is
webpack-dev-server's dependency on a vulnerable uuid, reachable only from
`npm start` — no CI job or published artifact touches it.
@codeant-ai

codeant-ai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 0460384 Sep 25, 2026 · 13:15 13:17

@codeant-ai

codeant-ai Bot commented Sep 25, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: KARTIKrocks/sqlguard/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 71466688-62ec-413d-9a82-369cf11009d5


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codeant-ai

codeant-ai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🏁 CodeAnt Quality Gate Results

Commit: 01d4b3a1
Scan Time: 2026-09-25 13:19:43 UTC

✅ Overall Status: PASSED

Quality Gate Details

Quality Gate Status Details
Secrets ✅ PASSED 0 secrets found
SAST ✅ PASSED No security issues
SCA (Dependencies) ✅ PASSED Rating S: No vulnerabilities

View Full Results

@codeant-ai codeant-ai Bot added the size:L This PR changes 100-499 lines, ignoring generated files label Sep 25, 2026
Comment thread parsers/pgparser/go.mod
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.4.3 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: Run make tidy across every Go module, including the unpublished integration module, and commit all resulting go.mod and go.sum updates rather than updating only this module.

Severity Level: Major ⚠️ · 🏷️ Custom_rule

Rule source 📖

.codeant/review.json line 70 (rule "nine-modules-in-lockstep")

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** parsers/pgparser/go.mod
**Line:** 20:20
**Comment:**
	*Custom Rule: Run `make tidy` across every Go module, including the unpublished integration module, and commit all resulting go.mod and go.sum updates rather than updating only this module.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

CodeAnt applied this rule to PR #89 and asked for `make tidy` across every
module "including the unpublished integration module", on a change that bumps
transitive indirect dependencies inside `parsers/pgparser` alone. The finding
is wrong — `parsers/pgparser/go.mod` is the only go.mod in the repo that
references grpc, logrus or genproto, and `make tidy-check` reported every
module tidy — but the rule text earned it twice over.

It claimed `make tidy` runs across `test/integration`. It does not: the
Makefile keeps that module out of SUB_MODULES precisely because it is never
released, so `make tidy` cannot reach it. The rule was describing a command
this repo does not have.

It also phrased the tidy requirement as an unconditional "across all of them",
which reads as every go.mod changing together. Lockstep governs the public API
and the Go version, not a leaf module's own indirect dependency graph. The
rule now says so, and says to check whether another go.mod actually references
the dependency before flagging.

Only .codeant carried this claim. Greptile's `rules.md` scopes the topology
note to "a change to an exported surface", and `.coderabbit.yaml` only states
the no-replace-directive half, so both were already correct.
@KARTIKrocks
KARTIKrocks merged commit e4f9d58 into main Sep 25, 2026
33 checks passed
@KARTIKrocks
KARTIKrocks deleted the chore/bump-vulnerable-deps branch September 25, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant