Output Formats
Cloudsploit supports multiple output formats for different use cases: interactive terminal viewing, automated parsing, executive reporting, and CI/CD integration.
Basic Usage
Specify output format with --output (or -o) and destination with --outfile:
1cloudsploit scan aws --output <format> --outfile /path/to/file
If --outfile is omitted, table output goes to console, JSON goes to ~/.cloudsploit/results/ by default.
Format Comparison
TABLE
Human-readable console table output (default). Best for interactive terminal viewing.
.txt1cloudsploit scan aws --output table
Use When
- Easy to read in terminal
- Color-coded by severity
- No post-processing needed
Avoid When
- Not machine-parseable
- Hard to import to other tools
- Not suitable for reports
JSON
Complete structured data including all finding details, resources, and remediation. Best for automation.
.json1cloudsploit scan aws --output json --outfile results.json
Use When
- Machine-readable
- Full detail preservation
- Easy to parse with jq
- API-friendly
Avoid When
- Harder for humans to read
- Larger file sizes
- Requires tooling to analyze
CSV
Comma-separated values for spreadsheet analysis. Flattened finding data only.
.csv1cloudsploit scan aws --output csv --outfile findings.csv
Use When
- Import to Excel/Sheets
- Easy filtering/sorting
- Pivot table analysis
- Widely supported
Avoid When
- Loses nested structure
- Limited detail
- Remediation truncated
- No resource relationships
HTML
Interactive web report with filtering, sorting, and pretty formatting. Best for sharing with stakeholders.
.html1cloudsploit scan aws --output html --outfile report.html
Use When
- Beautiful formatting
- Interactive filtering
- Easy sharing (email/upload)
- Can embed screenshots
Avoid When
- Not automation-friendly
- Single-view only
- Requires web browser
- Hard to merge reports
JUNIT
JUnit XML format for CI/CD integration. Reports pass/fail per-detector for test pipelines.
.xml1cloudsploit scan aws --output junit --outfile results.xml
Use When
- CI/CD native format
- Jenkins/GitLab/Azure understand it
- Test pass/fail tracking
- Historical trendable
Avoid When
- Very verbose XML
- Hard to read manually
- Limited human context
- Tool-specific quirks
Post-Processing Examples
Combine Cloudsploit with command-line tools for custom analysis:
Count Findings by Severity
1cloudsploit scan aws --output json | jq '.findings | group_by(.severity) | map({severity: .[0].severity, count: length})'
Extract Only Critical Issues
1cloudsploit scan aws --output json | jq '.findings[] | select(.severity=="CRITICAL")'
Get Unique Resource Types
1cloudsploit scan aws --output json | jq '.resources[].type' | sort | uniq -c | sort -nr
Convert JSON to Markdown Table
1cloudsploit scan aws --output json | jq -r '.findings[] | "| (.severity) | (.title) | (.resource_id) |"' > report.md
Multi-Account Combined Output
Merge results from multiple cloud accounts into a single report:
1# Scan multiple accounts and combine2cloudsploit scan aws --profile account1 --output json > acc1.json3cloudsploit scan aws --profile account2 --output json > acc2.json4cloudsploit scan azure --output json > azure.json56# Merge all JSON files7jq -s 'add' acc1.json acc2.json azure.json > combined.json89# Generate single HTML report10cloudsploit scan --input combined.json --output html --outfile full-report.html