Skip to content

API Reference parrot_tools.cloudsploit.models

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

parrot_tools.cloudsploit.models

View source

Pydantic data models for CloudSploit security scanning toolkit.

Class CloudProvider

Supported cloud providers for CloudSploit scans.

Class CloudSploitConfig

Configuration for CloudSploit execution.

Fields:

Field Type Default Description
docker_image str 'cloudsploit:0.0.1' Docker image to use for scanning (build from github.com/aquasecurity/cloudsploit)
use_docker bool True Use Docker for execution. Set False for direct CLI mode.
cli_path Optional[str] None Path to CloudSploit CLI when not using Docker
cloud_provider CloudProvider CloudProvider.AWS Cloud provider target for scans (aws, google, azure)
aws_access_key_id Optional[str] AWS_ACCESS_KEY_ID AWS access key ID (default from parrot.conf)
aws_secret_access_key Optional[str] AWS_SECRET_ACCESS_KEY AWS secret access key (default from parrot.conf)
aws_session_token Optional[str] None AWS session token for temporary credentials (optional)
aws_profile Optional[str] None AWS profile name from ~/.aws/credentials
aws_region str AWS_DEFAULT_REGION or 'us-east-1' Default AWS region (AWS_REGION)
aws_default_region str AWS_DEFAULT_REGION or 'us-east-1' AWS default region (AWS_DEFAULT_REGION)
aws_sdk_load_config str '1' Enable AWS SDK load config (AWS_SDK_LOAD_CONFIG=1 required)
gcp_project_id Optional[str] None Google Cloud project ID
gcp_credentials_path Optional[str] None Path to GCP service account JSON file
oci_tenancy_id Optional[str] None OCI tenancy OCID
oci_user_id Optional[str] None OCI user OCID
oci_key_fingerprint Optional[str] None Fingerprint of the OCI API signing key
oci_key_file Optional[str] None Path to the OCI API private key (PEM)
oci_region Optional[str] None OCI region identifier (e.g. 'us-ashburn-1')
config_file Optional[Union[str, Path]] None Path to a CloudSploit JS credentials file (string, passed as --config=<path> to the CLI). File existence is validated at scan time, not at config construction — the file may be mounted via Docker at scan invocation. Takes precedence over env-var credentials when set.
timeout_seconds int 600 Maximum scan duration in seconds
govcloud bool False Enable AWS GovCloud mode
results_dir Optional[str] None Directory for storing scan results on filesystem
ecr_plan_file Optional[Union[str, Path]] None Path to a YAML ECR collection plan file. Passed to collect_ecr_findings(plan=...) as the fallback when no per-call plan is given. File existence is validated at scan time, not at config construction — the file may be supplied by ops at invocation time.

Class ComparisonReport

Result of comparing two CloudSploit scans.

Fields:

Field Type Default Description
new_findings list[ScanFinding] Findings in current scan but not in baseline
resolved_findings list[ScanFinding] Findings in baseline but not in current scan
unchanged_findings list[ScanFinding] Findings present in both scans
severity_changed list[dict] Findings where severity changed between scans
baseline_timestamp Optional[datetime] None Timestamp of baseline scan
current_timestamp Optional[datetime] None Timestamp of current scan

Class ComplianceFramework

Supported compliance frameworks for filtered scans.

Class EcrCollectionPlan

Plan for collect_ecr_findings. Loaded from a YAML file at runtime.

Fields:

Field Type Default Description
region str AWS region to query
aws_id str 'default' Credential identifier resolved by AWSInterface
concurrency int 5 Max concurrent describe-image-scan-findings calls
repos list[EcrRepoPlan] Repositories to scan in plan order

Method EcrCollectionPlan.from_yaml

Load and validate a plan from a YAML file.

from_yaml(path: Union[str, Path]) -> EcrCollectionPlan

Parameter Type Default Description
path Union[str, Path] Path to the YAML file on disk.

Returns: EcrCollectionPlan — Validated EcrCollectionPlan instance.

Raises:

  • FileNotFoundError — If path does not point to an existing file.
  • pydantic.ValidationError — If the parsed YAML does not match the expected schema.

Class EcrCollectionResult

Top-level container — mirrors the JSON output of collect_ecr_findings.js.

Shape::

{
    "generated_at": "<ISO-8601 UTC>",
    "region": "<AWS region>",
    "repos": [ <EcrRepoFindings>, ... ],
    "skipped": [ {"repo": ..., "reason": ...}, ... ],
}

Fields:

Field Type Default Description
generated_at datetime UTC timestamp when the collection was produced
region str AWS region queried
repos list[EcrRepoFindings] Repos for which at least one tag returned scan findings
skipped list[dict] Per-repo skip records when no tag returned a scan (e.g. ScanNotFoundException on every tag)

Class EcrRepoFindings

Aggregated findings for a single (repo, tag) pair.

Fields:

Field Type Default Description
repo str ECR repository name
tag str Image tag that returned scan findings
scan_time Optional[datetime] None Timestamp of the ECR scan
counts dict[EcrSeverity, int] Finding count per ECR severity level
findings list[EcrScanFinding] Individual vulnerability findings

Class EcrRepoPlan

One ECR repository plus its tag priority order.

Fields:

Field Type Default Description
name str ECR repository name
tags list[str] Tags to try in priority order; first match wins

Class EcrScanFinding

One vulnerability finding from ECR Basic Scanning.

Fields:

Field Type Default Description
name str CVE identifier or finding name
severity EcrSeverity ECR vulnerability severity
description str '' Finding description text
uri str '' URL to the CVE or advisory
package_name Optional[str] None Affected package name (from ECR attributes)
package_version Optional[str] None Affected package version (from ECR attributes)
fixed_in_versions Optional[str] None Version(s) with the fix (from ECR attributes)
cvss Optional[str] None CVSS score string. Prefers CVSS4_SCORE when available, falls back to CVSS3_SCORE.

Class EcrSeverity

ECR / vulnerability scan severities (distinct from SeverityLevel).

Maps to the severity strings returned by ECR Basic Scanning via describe_image_scan_findings. NOT compatible with SeverityLevel(OK/WARN/FAIL/UNKNOWN) — that enum is for CSPM.

Class ScanFinding

A single finding from a CloudSploit scan.

Fields:

Field Type Default Description
plugin str Plugin identifier
category str Service category (e.g., EC2, IAM, S3)
title str Human-readable finding title
description str '' Detailed description
resource Optional[str] None AWS resource ARN/ID
region str 'global' AWS region
status SeverityLevel Finding severity
message str '' Detailed status message

Class ScanResult

Full scan result container.

Fields:

Field Type Default Description
findings list[ScanFinding] List of scan findings
summary ScanSummary Aggregated scan summary
raw_json Optional[Union[dict, list]] None Raw CloudSploit JSON output
collection_data Optional[dict] None Raw collection data from cloud APIs

Class ScanSummary

Aggregated summary of a CloudSploit scan.

Fields:

Field Type Default Description
total_findings int Total number of findings
ok_count int Number of OK (passing) findings
warn_count int Number of WARN findings
fail_count int Number of FAIL findings
unknown_count int Number of UNKNOWN findings
categories dict[str, int] Finding count by service category
scan_timestamp datetime When the scan was performed
compliance_framework Optional[str] None Compliance framework used for filtering
duration_seconds Optional[float] None Scan duration in seconds

Class SeverityLevel

CloudSploit finding severity levels.

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