Repository navigation
feat: add checkov2hdf converter command - #7059
Merged
Merged
Conversation
Add SAF CLI command to convert Checkov JSON output to Heimdall Data
Format (HDF) using the CheckovMapper from @mitre/hdf-converters v2.13.0.
Files:
- src/commands/convert/checkov2hdf.ts — standalone command with
-i (input), -o (output), -w (includeRaw) flags
- src/commands/convert/index.ts — CheckovMapper import + case
'checkov' in auto-detect switch
- test/commands/convert/checkov2hdf.test.ts — 5 tests matching
Heimdall2 hdf-converters coverage: terraform_plan scan, withRaw,
terraform scan, skipped checks + parsing errors, synthetic
(all code paths)
- test/sample_data/checkov/ — 4 sample inputs + 5 HDF baselines
regenerated against published hdf-converters 2.13.0
- README.md — checkov2hdf usage documentation
Usage:
saf convert checkov2hdf -i checkov_results.json -o output-hdf.json
saf convert checkov2hdf -i checkov_results.json -o output-hdf.json -w
Tested against live Checkov scans from sparc-iac (Azure VM, EC2, ECS)
across 17 result files — all converted successfully.
Signed-off-by: Clem Field <[email protected]>
Signed-off-by: clem-field <[email protected]>
|
Amndeep7
approved these changes
Apr 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Add
checkov2hdfconverter command to SAF CLI, consuming theCheckovMapperfrom@mitre/hdf-convertersv2.13.0.Changes
New:
src/commands/convert/checkov2hdf.tsStandalone command with flags:
-i, --input— Input Checkov JSON file (required)-o, --output— Output HDF JSON file (required)-w, --includeRaw— Include raw input in HDF passthroughModified:
src/commands/convert/index.tsCheckovMapperfrom@mitre/hdf-converterscase 'checkov'to the auto-detect switch blockModified:
README.mdNew: Test suite (
test/commands/convert/checkov2hdf.test.ts)5 tests matching the
hdf-converterstest coverage:checkov_json.jsoncheckov_json.json-wcheckov_sample.jsoncheckov_with_skips.jsoncheckov_synthetic.jsonNew: Sample data (
test/sample_data/checkov/)sample_input_report/@mitre/hdf-convertersv2.13.0Usage
Testing
@mitre/hdf-convertersv2.13.0Checklist
--signoffon commitcheckInputvalidates input type before conversion