Go: Add database sources for the gorqlite package #18863
Go: Add database sources for the gorqlite package #18863egregius313 merged 2 commits intogithub:mainfrom
database sources for the gorqlite package #18863Conversation
There was a problem hiding this comment.
PR Overview
This PR adds database source models for the gorqlite package to support taint flow analysis for various query operations.
- Introduces a new test file for validating taint flows with multiple query methods.
- Updates the model configuration in the YAML file to include source and summary model mappings for
gorqlite. - Adds change notes reflecting the newly added
databasesource models.
Reviewed Changes
| File | Description |
|---|---|
| go/ql/test/library-tests/semmle/go/dataflow/flowsources/local/database/test_rqlite_gorqlite.go | New test file for validating taint flows with different query methods. |
| go/ql/lib/ext/github.com.rqlite.gorqlite.model.yml | Adds new mappings for source and summary models for various gorqlite methods. |
| go/ql/lib/change-notes/2025-02-25-go-database-rqlite-sources.md | Documents the addition of database source models for gorqlite. |
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more
Click to show differences in coveragegoGenerated file changes for go
- `gorqlite <https://github.com/rqlite/gorqlite>`_,"``github.com/raindog308/gorqlite*``, ``github.com/rqlite/gorqlite*``",,,48
+ `gorqlite <https://github.com/rqlite/gorqlite>`_,"``github.com/raindog308/gorqlite*``, ``github.com/rqlite/gorqlite*``",16,4,48
+ Others,``github.com/kanikanema/gorqlite``,8,2,24
- Totals,,470,952,1532
+ Totals,,494,958,1556
+ github.com/kanikanema/gorqlite,24,8,2,,,,,,,,,,,,24,,,,,,8,,,,,2,
- github.com/raindog308/gorqlite,24,,,,,,,,,,,,,,24,,,,,,,,,,,,
+ github.com/raindog308/gorqlite,24,8,2,,,,,,,,,,,,24,,,,,,8,,,,,2,
- github.com/rqlite/gorqlite,24,,,,,,,,,,,,,,24,,,,,,,,,,,,
+ github.com/rqlite/gorqlite,24,8,2,,,,,,,,,,,,24,,,,,,8,,,,,2, |
owen-mc
left a comment
There was a problem hiding this comment.
Looking good. I see there isn't a test for QueryResult.Map. Is that deliberate, or is it easy to add one?
That was just an oversight on my part. I just modified one of the examples to use a call of |
Adds
databasesource models for thegorqlitepackage.