Skip to content

feat: add SSL connection parameters to Cassandra and MySQL ingestors - #1676

Merged
Shashankss1205 merged 11 commits into
CodeGraphContext:mainfrom
TrueFurina:feat/sql-ingester-ssl-params
Sep 2, 2026
Merged

Shashankss1205 merged 11 commits into
CodeGraphContext:mainfrom
TrueFurina:feat/sql-ingester-ssl-params

Conversation

@TrueFurina

Copy link
Copy Markdown
Contributor

Summary

Adds SSL connection support to the Cassandra and MySQL schema ingestors (#1094), so ingestion can establish secure sessions against corporate data instances instead of throwing connection errors.

Changes

  • src/codegraphcontext/tools/datasources/cassandra_ingester.py:
    • New ssl_verify: bool = False and ssl_ca_certs: Optional[str] = None parameters on ingest()
    • Builds an ssl.SSLContext (system trust store, or explicit CA bundle) and passes it to Cluster(..., ssl_context=...) when ssl_verify is set
  • src/codegraphcontext/tools/datasources/mysql_ingester.py:
    • Same new parameters on ingest() and _connect()
    • PyMySQL path passes an ssl dict; mysql-connector path passes ssl_ca / ssl_verify_cert

Backward compatible: when ssl_verify is False (default), behavior is unchanged.

Acceptance criteria

  • Ingestion config handlers parse SSL variables (ssl_verify, ssl_ca_certs)
  • SSL parameters passed to backend connection factories
  • No behavior change when SSL is disabled (default)

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

@TrueFurina is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

donovan-yohan and others added 9 commits September 3, 2026 01:55
…aphContext#1677)

VS Code and its forks write settings.json as JSONC. json.load rejects comments
and trailing commas, and the wizard treated that rejection as "no settings yet"
before writing the file back, so a user's whole configuration was replaced by a
lone mcpServers key.

Parse JSONC before giving up, and if the file still cannot be parsed, leave it
alone instead of overwriting it. Back up the file before writing either way, and
say so when comments are present, since json.dump cannot preserve them.

Fixes CodeGraphContext#660

Signed-off-by: Aloys Jehwin <[email protected]>
…xt#1680)

Anything git ignores is now ignored by the indexer, so a repository no longer
needs a .cgcignore that restates its .gitignore.

Patterns are layered defaults -> .gitignore -> .cgcignore. Matching is
last-match-wins, so a negated pattern in .cgcignore can still bring a
git-ignored path back into the graph.

Fixes CodeGraphContext#729

Signed-off-by: Aloys Jehwin <[email protected]>
…aphContext#1682)

* fix(viz): display source filenames for synthetic module nodes

* fix(jobs): serialize last update time in job responses (CodeGraphContext#1679)

* fix(cli): explain embedded database lock conflicts (CodeGraphContext#1684)

* fix(setup-wizard): stop replacing IDE settings that are JSONC (CodeGraphContext#1677)

VS Code and its forks write settings.json as JSONC. json.load rejects comments
and trailing commas, and the wizard treated that rejection as "no settings yet"
before writing the file back, so a user's whole configuration was replaced by a
lone mcpServers key.

Parse JSONC before giving up, and if the file still cannot be parsed, leave it
alone instead of overwriting it. Back up the file before writing either way, and
say so when comments are present, since json.dump cannot preserve them.

Fixes CodeGraphContext#660

Signed-off-by: Aloys Jehwin <[email protected]>

* feat(cgcignore): treat .gitignore as an ignore source (CodeGraphContext#1680)

Anything git ignores is now ignored by the indexer, so a repository no longer
needs a .cgcignore that restates its .gitignore.

Patterns are layered defaults -> .gitignore -> .cgcignore. Matching is
last-match-wins, so a negated pattern in .cgcignore can still bring a
git-ignored path back into the graph.

Fixes CodeGraphContext#729

Signed-off-by: Aloys Jehwin <[email protected]>

* normalize module-node label to the plain filename in all render sites

---------

Signed-off-by: Aloys Jehwin <[email protected]>
Co-authored-by: Donovan Yohan <[email protected]>
Co-authored-by: Aloys Jehwin <[email protected]>
Co-authored-by: Shashank Shekhar Singh <[email protected]>
* fix: find functions by argument type

* fix(jobs): serialize last update time in job responses (CodeGraphContext#1679)

* fix(cli): explain embedded database lock conflicts (CodeGraphContext#1684)

* fix(setup-wizard): stop replacing IDE settings that are JSONC (CodeGraphContext#1677)

VS Code and its forks write settings.json as JSONC. json.load rejects comments
and trailing commas, and the wizard treated that rejection as "no settings yet"
before writing the file back, so a user's whole configuration was replaced by a
lone mcpServers key.

Parse JSONC before giving up, and if the file still cannot be parsed, leave it
alone instead of overwriting it. Back up the file before writing either way, and
say so when comments are present, since json.dump cannot preserve them.

Fixes CodeGraphContext#660

Signed-off-by: Aloys Jehwin <[email protected]>

* feat(cgcignore): treat .gitignore as an ignore source (CodeGraphContext#1680)

Anything git ignores is now ignored by the indexer, so a repository no longer
needs a .cgcignore that restates its .gitignore.

Patterns are layered defaults -> .gitignore -> .cgcignore. Matching is
last-match-wins, so a negated pattern in .cgcignore can still bring a
git-ignored path back into the graph.

Fixes CodeGraphContext#729

Signed-off-by: Aloys Jehwin <[email protected]>

* fix(viz): display source filenames for synthetic module nodes (CodeGraphContext#1682)

* fix(viz): display source filenames for synthetic module nodes

* fix(jobs): serialize last update time in job responses (CodeGraphContext#1679)

* fix(cli): explain embedded database lock conflicts (CodeGraphContext#1684)

* fix(setup-wizard): stop replacing IDE settings that are JSONC (CodeGraphContext#1677)

VS Code and its forks write settings.json as JSONC. json.load rejects comments
and trailing commas, and the wizard treated that rejection as "no settings yet"
before writing the file back, so a user's whole configuration was replaced by a
lone mcpServers key.

Parse JSONC before giving up, and if the file still cannot be parsed, leave it
alone instead of overwriting it. Back up the file before writing either way, and
say so when comments are present, since json.dump cannot preserve them.

Fixes CodeGraphContext#660

Signed-off-by: Aloys Jehwin <[email protected]>

* feat(cgcignore): treat .gitignore as an ignore source (CodeGraphContext#1680)

Anything git ignores is now ignored by the indexer, so a repository no longer
needs a .cgcignore that restates its .gitignore.

Patterns are layered defaults -> .gitignore -> .cgcignore. Matching is
last-match-wins, so a negated pattern in .cgcignore can still bring a
git-ignored path back into the graph.

Fixes CodeGraphContext#729

Signed-off-by: Aloys Jehwin <[email protected]>

* normalize module-node label to the plain filename in all render sites

---------

Signed-off-by: Aloys Jehwin <[email protected]>
Co-authored-by: Donovan Yohan <[email protected]>
Co-authored-by: Aloys Jehwin <[email protected]>
Co-authored-by: Shashank Shekhar Singh <[email protected]>

* fix the argument query so it filters f; behavioral pin on real kuzu

---------

Signed-off-by: Aloys Jehwin <[email protected]>
Co-authored-by: Donovan Yohan <[email protected]>
Co-authored-by: Aloys Jehwin <[email protected]>
Co-authored-by: Upanshi Mittal <[email protected]>
Co-authored-by: Shashank Shekhar Singh <[email protected]>
…ontext#1689)

parse_element classified relationships by class name, matching only
Relationship/KuzuRelationship. FalkorDB's edge class is named Edge, so it
matched no branch and every FalkorDB relationship was silently dropped —
on the backend that is CGC's default on Unix under Python 3.12+. parse_rel
directly below already reads FalkorDB edges correctly; it was never reached.

The offline renderer in cli_helpers already classified by duck typing and
handled this (CodeGraphContext#1453). Both renderers now share those predicates in
utils/graph_shapes, so classification cannot drift apart again.
Shashankss1205
Shashankss1205 previously approved these changes Sep 2, 2026

@Shashankss1205 Shashankss1205 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Verified on a local trial-merge. The security posture is right: SSL stays opt-in (no behavior change for existing setups), and when enabled it demands full verification — CERT_REQUIRED + hostname check on Cassandra's context, verify_mode: REQUIRED/ssl_verify_cert on both MySQL drivers — with no verification-disabling escape hatch. The dual-driver fallback, timeouts and DictCursor behavior all survive the rewrite intact.

Two additions pushed to your branch: the parameters are now reachable — --ssl-verify / --ssl-ca-certs on both cgc datasource mysql and cassandra commands (without which the feature was programmatic-only) — and driver-level tests pin the kwargs each client actually receives, including that ssl is absent by default. Full suite green (1457). Thanks @TrueFurina — addresses the SSL half of #1094.

@TrueFurina
TrueFurina dismissed Shashankss1205’s stale review September 2, 2026 20:42

The merge-base changed after approval.

@Shashankss1205
Shashankss1205 merged commit a042c67 into CodeGraphContext:main Sep 2, 2026
1 check failed
@github-project-automation github-project-automation Bot moved this from Backlog tasks to Done in CGC Progress Board Sep 2, 2026
@Shashankss1205 Shashankss1205 added gssoc:approved GSSoC validation: counts toward scoring level:intermediate GSSoC difficulty: 35 pts contributor / 20 mentor mentor:Shashankss1205 GSSoC mentor attribution: credits reviewing mentor type:feature GSSoC type bonus: feature labels Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC validation: counts toward scoring level:intermediate GSSoC difficulty: 35 pts contributor / 20 mentor mentor:Shashankss1205 GSSoC mentor attribution: credits reviewing mentor type:feature GSSoC type bonus: feature

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants