Terraform Plan scanning with --repo-root-for-plan-enrichment
inconsistent file references in sarif/json report
#6943
Labels
--repo-root-for-plan-enrichment
inconsistent file references in sarif/json report
#6943
Describe the issue
When following the Terraform Plan Scanning documentation and outputting a sarif/json report using
--repo-root-for-plan-enrichment
, console log outputs will show the affected file correctly while the report will reference the JSON plan file that was input.Sarif
When inspecting the
sarif
file output,/runs/[]/results/[]/locations/[]/physicalLocation/artifactLocation/uri
will reference thetfplan.json
file rather than the actual Terraform plan file. However, the/runs/[]/results/[]/locations/[]/physicalLocation/region
startLine
andendLine
are correct in referencing the Terraform configuration file and not thetfplan.json
.JSON
When inspecting the
json
file output, we see that/results/failed_checks/[]/file_path
DOES reference the correct file as a filename (not path), but/results/failed_checks/[]/file_abs_path
and/results/failed_checks/[]/repo_file_path
will reference thetfplan.json
file.The text was updated successfully, but these errors were encountered: