This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see Cake.CodeQL.Cli.
Summary
Analyzes a CodeQL database for vunerabilities and summarizes the results in a SARIF file. Assumes the codeQL cli is installed on the host and available in the terminal path.
- Assembly
- Cake
.CodeQL .Cli .dll - Namespace
- Cake
.CodeQL .Cli - Containing Type
- CodeQLAliases
Syntax
public static void CodeQLAnalyzeDatabase(this ICakeContext context, CodeQLAnalyzeDatabaseToolSettings settings)
Examples
Analyzes a CodeQL database and produces an output SARIF file
//Example of C# compiled language
CodeQLAnalyzeDatabase(new CodeQLAnalyzeDatabaseToolSettings
{
DatabaseDir = "./tools/codeql-db",
WorkingDirectory = "./",
OutputFile = "./results/example-repo.sarif",
Threads = 1,
SarifCategory = "csharp",
Format = "sarifv2.1.0",
Verbose = true
});
Attributes
Type | Description |
---|---|
Cake |
|
Cake |
Parameters
Name | Type | Description |
---|---|---|
context | ICakeContext | The context. |
settings | Code |
The settings. |
Return Value
Type | Description |
---|---|
void |