triat / terraform-security-scan

Run a security scan on your terraform with the very nice https://github.com/aquasecurity/tfsec
MIT License
110 stars 30 forks source link

The repository for tfsec needs to be updated or allowed to be specified #20

Closed lloydsmithjr03 closed 3 years ago

lloydsmithjr03 commented 3 years ago

When running the security scan, the following error occurs due to the repository for tfsec having changed from liamg to tfsec.

Run triat/terraform-security-scan@v2.0.1
/usr/bin/docker run --name e5c3541af75e3790146f4bd13e54443700b6d_0b8144 --label 1e5c35 --workdir /github/workspace --rm -e GITHUB_TOKEN -e tfsec_version -e INPUT_TFSEC_ACTIONS_COMMENT -e INPUT_TFSEC_ACTIONS_WORKING_DIR -e INPUT_TFSEC_EXCLUDE -e INPUT_TFSEC_VERSION -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/nuarx.infrastructure.sandbox/nuarx.infrastructure.sandbox":"/github/workspace" 1e5c35:41af75e3790146f4bd13e54443700b6d
go: finding github.com/liamg/tfsec v0.29.0
go: downloading github.com/liamg/tfsec v0.29.0
go: extracting github.com/liamg/tfsec v0.29.0
go get: github.com/liamg/tfsec@v0.29.0: parsing go.mod:
    module declares its path as: github.com/tfsec/tfsec
            but was required as: github.com/liamg/tfsec
/entrypoint.sh: line 20: /go/bin/tfsec: No such file or directory

The hard-coded URI is found here

https://github.com/triat/terraform-security-scan/blob/dd313dc315e939a494648df15bd4f3c3b7b50ec2/entrypoint.sh#L10

lloydsmithjr03 commented 3 years ago

This issue is corrected by #19