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: Revert MaD models for database/sql to use QL instead #18439

Conversation

egregius313
Copy link
Contributor

There have been some issues with variable arguments in source models in MaD. This reverts some models back to being modeled in QL.

@egregius313 egregius313 added the no-change-note-required This PR does not need a change note label Jan 8, 2025
@Copilot Copilot bot review requested due to automatic review settings January 8, 2025 02:13
@egregius313 egregius313 requested a review from a team as a code owner January 8, 2025 02:13
@github-actions github-actions bot added the Go label Jan 8, 2025

Choose a reason for hiding this comment

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

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

Files not reviewed (1)
  • go/ql/lib/semmle/go/frameworks/stdlib/DatabaseSql.qll: Language not supported
Comments suppressed due to low confidence (1)

go/ql/lib/ext/database.sql.driver.model.yml:26

  • The taint propagation for the Next method of Rows has been changed from Argument[0] to ReturnValue[0]. Ensure that this change is correct and does not introduce unintended behavior.
-      - ["database/sql/driver", "Rows", True, "Next", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

@egregius313 egregius313 changed the title Go: Revert MaD models for database/sql/driver to use QL instead Go: Revert MaD models for database/sql to use QL instead Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 8, 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:
-    `Standard library <https://pkg.go.dev/std>`_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``",52,607,104
+    `Standard library <https://pkg.go.dev/std>`_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``",52,605,104
-    Totals,,371,934,1532
+    Totals,,371,932,1532
  • Changes to framework-coverage-go.csv:
- database/sql,30,18,14,,,,,,,,,,,,30,,,,,,18,,,,,14,
+ database/sql,30,18,12,,,,,,,,,,,,30,,,,,,18,,,,,12,

smowton
smowton previously approved these changes Jan 8, 2025
@owen-mc
Copy link
Contributor

owen-mc commented Jan 8, 2025

The test changes are expected - slightly different nodes and edges because modelling with MaD and modelling with function models works a bit differently. You can just accept them (the excellent misc/scripts/accept-expected-changes-from-ci.py does it all for you, in case you haven't come across it).

@owen-mc owen-mc merged commit 5cc34a1 into github:main Jan 8, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Go no-change-note-required This PR does not need a change note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants