CodeQLAliases.

CodeQLUploadResults(ICakeContext, CodeQLUploadResultsToolSettings) Method

Summary

Uploads the results of a CodeQL analysis in SARIF file format to GitHub or GitHub Enterprise Server. 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 CodeQLUploadResults(this ICakeContext context, CodeQLUploadResultsToolSettings settings)

Examples

 //Example of C# compiled language

  CodeQLUploadResults(context, new CodeQLUploadResultsToolSettings
  {
    RepositoryName = "my-org/example-repo",
    Ref = "refs/heads/main",
    Commit = "deb275d2d5fe9a522a0b7bd8b6b6a1c939552718",
    GitHubAuthStdin = true,
    GitHubUrl = "https://github.mycompany.com",
    SarifFilePath = "./results/example-repo.sarif",
    WorkingDirectory = "./"
  });

Attributes

Type Description
CakeMethodAliasAttribute
CakeAliasCategoryAttribute

Parameters

Name Type Description
context ICakeContext The context.
settings CodeQLUploadResultsToolSettings The settings.

Return Value

Type Description
void