Skip to content

Codeql

codeql

CodeQL Helper Functions.

Contains functions are intended to ease repo integration with CodeQL, ensure consistent command-line usage across repos, and define standard scopes that other plugins and tools can depend on for CodeQL operations.

add_command_line_option

add_command_line_option(parser: ArgumentParser) -> None

Add the CodeQL command to the platform command line options.

Parameters:

Name Type Description Default
parser ArgumentParser

The argument parser used in this build.

required

get_scopes

get_scopes(codeql_enabled: bool) -> Tuple[str]

Return the active CodeQL scopes for this build.

Parameters:

Name Type Description Default
codeql_enabled bool

Whether CodeQL is enabled.

required

Returns:

Type Description
Tuple[str]

Tuple[str]: A tuple of strings containing scopes that enable the CodeQL plugin.

is_codeql_enabled_on_command_line

is_codeql_enabled_on_command_line(args: Namespace) -> bool

Return whether CodeQL was enabled on the command line.

Parameters:

Name Type Description Default
args Namespace

Object holding a string representation of command line arguments.

required

Returns:

Name Type Description
bool bool

True if CodeQL is enabled on the command line. Otherwise, false.

set_audit_only_mode

set_audit_only_mode(uefi_builder: UefiBuilder) -> None

Configure the CodeQL plugin to run in audit only mode.

Parameters:

Name Type Description Default
uefi_builder UefiBuilder

The UefiBuilder object for this platform build.

required