You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running terrascan as a docker image, using aws Cloud Formation IaC code and terrascan results shows invalid line numbers, it always shows line number 1, which is not quite right.
I ran the following command, provided under "What I Did" section, which runs fine and generates github-sarif json output file.
I have attached input (sample-IaC.yaml) and output (sample-IaC-terrascan-results.json).
Can someone please enlighten me that does terrascan suppose to provide correct line number in results file ?
What I Did
podman run --volume some-folder:some-folder -w some-folder docker.io/tenable/terrascan:latest scan --iac-type cft iac-version v1 --policy-type aws --output human
Violation Details -
Description : Ensure that detailed monitoring is enabled for EC2 instances.
File : sample-IaC.yaml
Line : 1
Severity : HIGH
-----------------------------------------------------------------------
Description : EC2 instances should disable IMDS or require IMDSv2 as this can be related to the weaponization phase of kill chain
File : sample-IaC.yaml
Line : 1
Severity : MEDIUM
-----------------------------------------------------------------------
Description : Enabling S3 versioning will enable easy recovery from both unintended user actions, like deletes and overwrites
File : sample-IaC.yaml
Line : 1
Severity : HIGH
-----------------------------------------------------------------------
Scan Summary -
File/Folder : /home/ec2-user/actions-runner/_work/CloudFormation/CloudFormation/IaC
IaC Type : cft
Scanned At : 2023-12-19 22:48:06.687083685 +0000 UTC
Policies Validated : 152
Violated Policies : 3
Low : 0
Medium : 1
High : 2
The text was updated successfully, but these errors were encountered:
AbdurRaheem-DOE
changed the title
terrascan does not correct line numbers in test results
terrascan does not display correct line numbers in test results
Jan 9, 2024
Description
Running terrascan as a docker image, using aws Cloud Formation IaC code and terrascan results shows invalid line numbers, it always shows line number 1, which is not quite right.
I ran the following command, provided under "What I Did" section, which runs fine and generates github-sarif json output file.
I have attached input (sample-IaC.yaml) and output (sample-IaC-terrascan-results.json).
Can someone please enlighten me that does terrascan suppose to provide correct line number in results file ?
What I Did
Sample IaC Code
terrascan-results
The text was updated successfully, but these errors were encountered: