codeql

package
v0.4.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var KnownResultSetNames = []string{"#select", "problems"}

Known result set names

Functions

func GenerateResultsZipArchive

func GenerateResultsZipArchive(runQueryResult *RunQueryResult) ([]byte, error)

Types

type BQRSInfo

type BQRSInfo struct {
	ResultSets           []ResultSet `json:"resultSets"`
	CompatibleQueryKinds []string    `json:"compatibleQueryKinds"`
}

type BqrsFilePaths

type BqrsFilePaths struct {
	BasePath          string   `json:"basePath"`
	RelativeFilePaths []string `json:"relativeFilePaths"`
}

type CodeQLCommandOutput

type CodeQLCommandOutput struct {
	ExitCode int    `json:"exitCode"`
	Stdout   string `json:"stdout"`
}

type CodeqlCli

type CodeqlCli struct {
	Path string
}

Types

type CreationMetadata

type CreationMetadata struct {
	SHA        *string `yaml:"sha,omitempty"`
	CLIVersion *string `yaml:"cliVersion,omitempty"`
}

type DatabaseMetadata

type DatabaseMetadata struct {
	CreationMetadata *CreationMetadata `yaml:"creationMetadata,omitempty"`
}

type Query

type Query struct {
	QueryPath            string        `json:"queryPath"`
	QueryMetadata        QueryMetadata `json:"queryMetadata"`
	RelativeBqrsFilePath string        `json:"relativeBqrsFilePath"`
	BqrsInfo             BQRSInfo      `json:"bqrsInfo"`
}

type QueryMetadata

type QueryMetadata struct {
	ID   *string `json:"id,omitempty"`
	Kind *string `json:"kind,omitempty"`
}

type QueryPackRunResults

type QueryPackRunResults struct {
	Queries           []Query `json:"queries"`
	TotalResultsCount int     `json:"totalResultsCount"`
	ResultsBasePath   string  `json:"resultsBasePath"`
}

type ResolvedDatabase

type ResolvedDatabase struct {
	SourceLocationPrefix string `json:"sourceLocationPrefix"`
}

type ResultSet

type ResultSet struct {
	Name string `json:"name"`
	Rows int    `json:"rows"`
}

type RunQueryResult

type RunQueryResult struct {
	ResultCount          int
	DatabaseSHA          string
	SourceLocationPrefix string
	BqrsFilePaths        BqrsFilePaths
	SarifFilePath        string
}

func RunQuery

func RunQuery(database string, language queue.QueryLanguage,
	queryPackPath string, tempDir string) (*RunQueryResult, error)

type Sarif

type Sarif struct {
	Runs []SarifRun `json:"runs"`
}

type SarifOutputType

type SarifOutputType string
const (
	Problem     SarifOutputType = "problem"
	PathProblem SarifOutputType = "path-problem"
)

type SarifRun

type SarifRun struct {
	// XX: static types
	VersionControlProvenance []interface{} `json:"versionControlProvenance,omitempty"`
	// XX: never set, only read
	Results []interface{} `json:"results"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL