Skip to content

API Reference parrot_tools.security.checkov.executor

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.security.checkov.executor

View source

Checkov executor for running IaC security scans.

Extends BaseExecutor to provide Checkov-specific CLI argument building and helper methods for common scan types.

Alias BaseExecutor

Re-exported from parrot_tools.security.base_executor.BaseExecutor.

Alias CheckovConfig

Re-exported from parrot_tools.security.checkov.config.CheckovConfig.

Class CheckovExecutor

Executes Checkov IaC security scans via Docker or direct CLI.

Checkov CLI pattern: checkov -d <dir> | -f <file> [options]

Supported frameworks:

  • terraform: Terraform configurations
  • cloudformation: AWS CloudFormation templates
  • kubernetes: Kubernetes manifests and Helm charts
  • dockerfile: Dockerfile security checks
  • arm: Azure Resource Manager templates
  • bicep: Azure Bicep configurations
  • serverless: Serverless Framework configurations
  • github_actions: GitHub Actions workflows
  • And many more...
Parameter Type Default Description
config Optional[CheckovConfig] None Checkov configuration. Uses defaults if not provided.

Attributes:

Attribute Type Description
config CheckovConfig

Method CheckovExecutor.scan_directory

Scan a directory for IaC misconfigurations.

scan_directory(path: str, frameworks: Optional[list[str]] = None, run_checks: Optional[list[str]] = None, skip_checks: Optional[list[str]] = None) -> tuple[str, str, int]

Parameter Type Default Description
path str Path to directory to scan.
frameworks Optional[list[str]] None Override frameworks to scan.
run_checks Optional[list[str]] None Override checks to run.
skip_checks Optional[list[str]] None Override checks to skip.

Returns: tuple[str, str, int] — Tuple of (stdout, stderr, exit_code).

Method CheckovExecutor.scan_file

Scan a single file for IaC misconfigurations.

scan_file(path: str, frameworks: Optional[list[str]] = None, run_checks: Optional[list[str]] = None, skip_checks: Optional[list[str]] = None) -> tuple[str, str, int]

Parameter Type Default Description
path str Path to file to scan.
frameworks Optional[list[str]] None Override frameworks to scan.
run_checks Optional[list[str]] None Override checks to run.
skip_checks Optional[list[str]] None Override checks to skip.

Returns: tuple[str, str, int] — Tuple of (stdout, stderr, exit_code).

Method CheckovExecutor.scan_terraform

Scan Terraform configurations for misconfigurations.

scan_terraform(path: str, run_checks: Optional[list[str]] = None, skip_checks: Optional[list[str]] = None, download_modules: bool = True) -> tuple[str, str, int]

Parameter Type Default Description
path str Path to Terraform directory.
run_checks Optional[list[str]] None Override checks to run.
skip_checks Optional[list[str]] None Override checks to skip.
download_modules bool True Download external modules (default True).

Returns: tuple[str, str, int] — Tuple of (stdout, stderr, exit_code).

Method CheckovExecutor.scan_cloudformation

Scan CloudFormation templates for misconfigurations.

scan_cloudformation(path: str, run_checks: Optional[list[str]] = None, skip_checks: Optional[list[str]] = None) -> tuple[str, str, int]

Parameter Type Default Description
path str Path to CloudFormation directory or template file.
run_checks Optional[list[str]] None Override checks to run.
skip_checks Optional[list[str]] None Override checks to skip.

Returns: tuple[str, str, int] — Tuple of (stdout, stderr, exit_code).

Method CheckovExecutor.scan_kubernetes

Scan Kubernetes manifests for misconfigurations.

scan_kubernetes(path: str, run_checks: Optional[list[str]] = None, skip_checks: Optional[list[str]] = None) -> tuple[str, str, int]

Parameter Type Default Description
path str Path to Kubernetes manifests directory.
run_checks Optional[list[str]] None Override checks to run.
skip_checks Optional[list[str]] None Override checks to skip.

Returns: tuple[str, str, int] — Tuple of (stdout, stderr, exit_code).

Method CheckovExecutor.scan_dockerfile

Scan Dockerfile for misconfigurations.

scan_dockerfile(path: str, run_checks: Optional[list[str]] = None, skip_checks: Optional[list[str]] = None) -> tuple[str, str, int]

Parameter Type Default Description
path str Path to Dockerfile or directory containing Dockerfiles.
run_checks Optional[list[str]] None Override checks to run.
skip_checks Optional[list[str]] None Override checks to skip.

Returns: tuple[str, str, int] — Tuple of (stdout, stderr, exit_code).

Method CheckovExecutor.scan_secrets

Scan for exposed secrets using entropy-based detection.

scan_secrets(path: str, skip_paths: Optional[list[str]] = None) -> tuple[str, str, int]

Parameter Type Default Description
path str Path to directory to scan for secrets.
skip_paths Optional[list[str]] None Paths to skip during scanning.

Returns: tuple[str, str, int] — Tuple of (stdout, stderr, exit_code).

Method CheckovExecutor.scan_github_actions

Scan GitHub Actions workflows for misconfigurations.

scan_github_actions(path: str, run_checks: Optional[list[str]] = None, skip_checks: Optional[list[str]] = None) -> tuple[str, str, int]

Parameter Type Default Description
path str Path to .github/workflows directory.
run_checks Optional[list[str]] None Override checks to run.
skip_checks Optional[list[str]] None Override checks to skip.

Returns: tuple[str, str, int] — Tuple of (stdout, stderr, exit_code).

Method CheckovExecutor.list_checks

List available Checkov checks.

list_checks(framework: Optional[str] = None) -> tuple[str, str, int]

Parameter Type Default Description
framework Optional[str] None Filter checks by framework.

Returns: tuple[str, str, int] — Tuple of (stdout, stderr, exit_code).

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally