Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go: Add database source models for the github.com/couchbase/gocb package #18913

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

egregius313
Copy link
Contributor

Adds database source models and relevant summaries for v1 and v2 of the github.com/couchbase/gocb package.

@Copilot Copilot bot review requested due to automatic review settings March 3, 2025 18:30
@egregius313 egregius313 requested a review from a team as a code owner March 3, 2025 18:30

Choose a reason for hiding this comment

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

PR Overview

This PR adds new database source models and corresponding taint tests for both v1 and v2 of the github.com/couchbase/gocb package.

  • Introduces database source model entries in the CodeQL YAML configuration.
  • Adds taint analysis tests for v1 and v2 functions.
  • Updates change notes to reflect the new source models.

Reviewed Changes

File Description
go/ql/lib/ext/6github.com.couchbase.gocb.model.yml New YAML entries for database source models are added for various gocb functions.
go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test_couchbase_gocb_v1.go New taint flow tests for v1 functions.
go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test_couchbase_gocb_v2.go New taint flow tests for v2 functions covering Cluster, Scope, Collection, TransactionAttemptContext, and ViewIndexManager.
go/ql/lib/change-notes/2025-03-03-couchbase-source-models.md Change note reflecting the addition of the new source models.

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

Comments suppressed due to low confidence (1)

go/ql/lib/ext/6github.com.couchbase.gocb.model.yml:12

  • The YAML mapping for the new entry appears to have inconsistent indentation (e.g. 'data:' is indented differently than 'addsTo:'). Please verify that the YAML structure is correctly formatted to avoid any parsing issues.
- addsTo:

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

Copy link
Contributor

github-actions bot commented Mar 3, 2025

⚠️ The head of this PR and the base branch were compared for differences in the framework coverage reports. The generated reports are available in the artifacts of this workflow run. The differences will be picked up by the nightly job after the PR gets merged.

Click to show differences in coverage

go

Generated file changes for go

  • Changes to framework-coverage-go.rst:
-    `Couchbase official client(gocb) <https://github.com/couchbase/gocb>`_,"``github.com/couchbase/gocb*``, ``gopkg.in/couchbase/gocb*``",,36,16
+    `Couchbase official client(gocb) <https://github.com/couchbase/gocb>`_,"``github.com/couchbase/gocb*``, ``gopkg.in/couchbase/gocb*``",44,94,16
-    `Couchbase unofficial client <http://www.github.com/couchbase/go-couchbase>`_,``github.com/couchbaselabs/gocb*``,,18,8
+    `Couchbase unofficial client <http://www.github.com/couchbase/go-couchbase>`_,``github.com/couchbaselabs/gocb*``,22,47,8
-    Totals,,494,958,1556
+    Totals,,560,1045,1556
  • Changes to framework-coverage-go.csv:
- github.com/couchbase/gocb,8,,18,,,,,8,,,,,,,,,,,,,,,,,,18,
+ github.com/couchbase/gocb,8,22,47,,,,,8,,,,,,,,,,,,,22,,,,,47,
- github.com/couchbaselabs/gocb,8,,18,,,,,8,,,,,,,,,,,,,,,,,,18,
+ github.com/couchbaselabs/gocb,8,22,47,,,,,8,,,,,,,,,,,,,22,,,,,47,
- gopkg.in/couchbase/gocb,8,,18,,,,,8,,,,,,,,,,,,,,,,,,18,
+ gopkg.in/couchbase/gocb,8,22,47,,,,,8,,,,,,,,,,,,,22,,,,,47,

Copy link
Contributor

@owen-mc owen-mc left a comment

Choose a reason for hiding this comment

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

A few minor comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants