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 squirrel package #18902

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

Conversation

egregius313
Copy link
Contributor

Adds database source models and relevant summaries for the github.com/Masterminds/squirrel ORM package.

@Copilot Copilot bot review requested due to automatic review settings March 3, 2025 04:35
@egregius313 egregius313 requested a review from a team as a code owner March 3, 2025 04:35
@github-actions github-actions bot added the Go label Mar 3, 2025

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 database source models for the squirrel package to support the CodeQL Go-all pack, along with new tests for taint flows.

  • New YAML definitions for database sources have been added to the squirrel model.
  • Test files have been introduced or updated to exercise the new source models.
  • Test extension files have been modified to incorporate the new mappings for the database source.

Reviewed Changes

File Description
go/ql/lib/ext/github.com.mastermind.squirrel.model.yml Adds database source model mappings for squirrel ORM methods.
go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test_Masterminds_squirrel.go Adds taint flow tests for various squirrel source methods.
go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test.ext.yml Updates test extension configuration with a new source model entry.
go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/source.ext.yml Updates source extension configuration with a new source model entry.

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

Comments suppressed due to low confidence (1)

go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test_Masterminds_squirrel.go:97

  • QueryRow does not return an error, so checking err immediately after its call is redundant. Please remove this check and handle errors from Scan instead.
if err != nil {

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. 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:
-    `Squirrel <https://github.com/Masterminds/squirrel>`_,"``github.com/Masterminds/squirrel*``, ``github.com/lann/squirrel*``, ``gopkg.in/Masterminds/squirrel``",,,96
+    `Squirrel <https://github.com/Masterminds/squirrel>`_,"``github.com/Masterminds/squirrel*``, ``github.com/lann/squirrel*``, ``gopkg.in/Masterminds/squirrel``",84,,96
-    Totals,,494,958,1556
+    Totals,,578,958,1556
  • Changes to framework-coverage-go.csv:
- github.com/Masterminds/squirrel,32,,,,,,,,,,,,,,32,,,,,,,,,,,,
+ github.com/Masterminds/squirrel,32,28,,,,,,,,,,,,,32,,,,,,28,,,,,,
- github.com/lann/squirrel,32,,,,,,,,,,,,,,32,,,,,,,,,,,,
+ github.com/lann/squirrel,32,28,,,,,,,,,,,,,32,,,,,,28,,,,,,
- gopkg.in/Masterminds/squirrel,32,,,,,,,,,,,,,,32,,,,,,,,,,,,
+ gopkg.in/Masterminds/squirrel,32,28,,,,,,,,,,,,,32,,,,,,28,,,,,,

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.

1 participant