-
Notifications
You must be signed in to change notification settings - Fork 504
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issues running terrascan in azure pipelines #835
Comments
If it helps, I had the same issue and settled on the following solution, it feels like a bit of a hack but does the job; - bash: |
docker pull accurics/terrascan
echo $(docker run --rm -t -v $(pwd):/iac -w /iac accurics/terrascan scan -o junit-xml) > Terrascan-Report.xml
workingDirectory: $(System.DefaultWorkingDirectory)
displayName: "Run > Terrascan"
- task: PublishTestResults@2
displayName: "Publish > Terrascan scan results"
inputs:
testRunTitle: "Terrascan Results"
failTaskOnFailedTests: true
testResultsFormat: "JUnit"
testResultsFiles: "Terrascan-Report.xml"
searchFolder: "$(System.DefaultWorkingDirectory)" |
Thanks @russmckendrick , for suggesting this work around. |
On digging a bit into this issue, it seems like an issue because of CGO. We have enabled CGO in terrascan due to a certain package dependency, have raised a #906 for fixing this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Goal is to scan our terraform files for issues in azure pipelines (yaml pipeline).
We can run terrascan --help
We can't run terrascan init
We can't run terrescan scan
The logout put hints that there is a filesystem issue with getting terrascan policies.
What I Did
Output of terrascan
terra init -l debug
terra scan
The text was updated successfully, but these errors were encountered: