Go: Add models for go 1.21 by owen-mc · Pull Request #22797 · github/codeql · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add models for go 1.21
  • Loading branch information
owen-mc committed Oct 9, 2026
commit b89c8f4e960002abb9e915e74fd7ffeec5aa8e03
6 changes: 6 additions & 0 deletions go/ql/lib/ext/context.model.yml
14 changes: 14 additions & 0 deletions go/ql/lib/ext/crypto.tls.model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,19 @@ extensions:
extensible: summaryModel
data:
- ["crypto/tls", "", False, "Client", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["crypto/tls", "", False, "NewResumptionState", "", "", "Argument[0..1]", "ReturnValue[0]", "taint", "manual"]
- ["crypto/tls", "", False, "NewListener", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["crypto/tls", "", False, "ParseSessionState", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
- ["crypto/tls", "", False, "QUICClient", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["crypto/tls", "", False, "QUICServer", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["crypto/tls", "", False, "Server", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["crypto/tls", "ClientSessionState", True, "ResumptionState", "", "", "Argument[receiver]", "ReturnValue[0..1]", "taint", "manual"]
- ["crypto/tls", "Config", True, "DecryptTicket", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
- ["crypto/tls", "Config", True, "DecryptTicket", "", "", "Argument[0..1]", "ReturnValue[0]", "taint", "manual"]
- ["crypto/tls", "Config", True, "EncryptTicket", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
- ["crypto/tls", "Config", True, "EncryptTicket", "", "", "Argument[0..1]", "ReturnValue[0]", "taint", "manual"]
Comment on lines +13 to +17
- ["crypto/tls", "QUICConn", True, "ConnectionState", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"]
- ["crypto/tls", "QUICConn", True, "HandleData", "", "", "Argument[1]", "Argument[receiver]", "taint", "manual"]
- ["crypto/tls", "QUICConn", True, "NextEvent", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"]
- ["crypto/tls", "QUICConn", True, "SetTransportParameters", "", "", "Argument[0]", "Argument[receiver]", "taint", "manual"]
- ["crypto/tls", "SessionState", True, "Bytes", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
2 changes: 2 additions & 0 deletions go/ql/lib/ext/io.fs.model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ extensions:
extensible: summaryModel
data:
- ["io/fs", "", False, "FileInfoToDirEntry", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["io/fs", "", False, "FormatDirEntry", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["io/fs", "", False, "FormatFileInfo", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
- ["io/fs", "", False, "Glob", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
- ["io/fs", "", False, "ReadDir", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
- ["io/fs", "", False, "ReadFile", "", "", "Argument[0]", "ReturnValue[0]", "taint", "manual"]
Expand Down
1 change: 1 addition & 0 deletions go/ql/lib/ext/math.big.model.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ extensions:
pack: codeql/go-all
extensible: summaryModel
data:
- ["math/big", "Int", True, "Float64", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
- ["math/big", "Int", True, "Int64", "", "", "Argument[receiver]", "ReturnValue[0]", "taint", "manual"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---
category: minorAnalysis
---
* Added data flow models for APIs mentioned in the minor library changes section of the Go 1.21 release notes.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ func walkDirCallback(path string, d fs.DirEntry, _ error) error {
}

func steps() {
{
source := newSource(17).(fs.DirEntry)
out := fs.FormatDirEntry(source)
sink(17, out)
}
{
source := newSource(18).(fs.FileInfo)
out := fs.FormatFileInfo(source)
sink(18, out)
}
{
source := newSource(16).(fs.FileInfo)
out := fs.FileInfoToDirEntry(source)
Expand Down
Loading