mirror of
https://github.com/github/codeql.git
synced 2026-01-30 23:02:56 +01:00
Model archive/tar.FileInfoHeader in CSV
This commit is contained in:
committed by
Owen Mansel-Chan
parent
86d3410041
commit
8cba368ef5
@@ -75,7 +75,7 @@ private import FlowSummary
|
||||
* ensuring that they are visible to the taint tracking / data flow library.
|
||||
*/
|
||||
private module Frameworks {
|
||||
// no frameworks currently modeled
|
||||
private import semmle.go.frameworks.Stdlib
|
||||
}
|
||||
|
||||
private predicate sourceModelCsv(string row) { none() }
|
||||
|
||||
@@ -3,6 +3,13 @@
|
||||
*/
|
||||
|
||||
import go
|
||||
private import semmle.go.dataflow.ExternalFlow
|
||||
|
||||
private class FlowSummaries extends SummaryModelCsv {
|
||||
override predicate row(string row) {
|
||||
row = ["archive/tar;;true;FileInfoHeader;;;Argument[0];ReturnValue[0];taint"]
|
||||
}
|
||||
}
|
||||
|
||||
/** Provides models of commonly used functions in the `archive/tar` package. */
|
||||
module ArchiveTar {
|
||||
@@ -11,10 +18,6 @@ module ArchiveTar {
|
||||
FunctionOutput outp;
|
||||
|
||||
FunctionModels() {
|
||||
// signature: func FileInfoHeader(fi os.FileInfo, link string) (*Header, error)
|
||||
hasQualifiedName("archive/tar", "FileInfoHeader") and
|
||||
(inp.isParameter(0) and outp.isResult(0))
|
||||
or
|
||||
// signature: func NewReader(r io.Reader) *Reader
|
||||
hasQualifiedName("archive/tar", "NewReader") and
|
||||
(inp.isParameter(0) and outp.isResult())
|
||||
|
||||
Reference in New Issue
Block a user