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
when running precommit in github workflow.
we dont specify any terrascan extra configs. or policy configs.
the error occurs
cli/init.go:42 failed to initialize terrascan. error : failed to download policies. error: 'repository already exists'
what i tried,
remove ~/.terrascan folder (even though nothing is there) just make sure there is no such folder in the github runner.
ls -all ~/.terrascan || true
ls -all ~/.config/terrascan || true
ls -all /tmp/terrascan || true
rm -rf ~/.terrascan
rm -rf ~/.config/terrascan
rm -rf /tmp/terrascan
ls: cannot access '/home/runner/.terrascan': No such file or directory
ls: cannot access '/home/runner/.config/terrascan': No such file or directory
ls: cannot access '/tmp/terrascan': No such file or directory
nothing works
i enabled debug logs, found something weird,
it tried to download policy twice? could this be the cause for repository already exist.
also absolute rego_subdir path, /opt/actions-runner/_work/my-repo/my-repo/terraform/oidc/pkg/policies/opa/rego, does not fall under base repo path's /home/runner/.terrascan directory structure
we dont have any policy config under the repo. folder terraform/oidc, why it will show this?
debug cli/register.go:66 TERRASCAN_CONFIG:
2025-03-17T03:04:03.949Z debug cli/register.go:66 TERRASCAN_CONFIG:
2025-03-17T03:04:03.949Z debug config/config-reader.go:55 no config file specified
2025-03-17T03:04:03.949Z debug config/config-reader.go:55 no config file specified
2025-03-17T03:04:03.949Z debug utils/policy.go:43 absolute rego_subdir path, `/opt/actions-runner/_work/my-repo/my-repo/terraform/oidc/pkg/policies/opa/rego`, does not fall under base repo path's `/home/runner/.terrascan` directory structure2025-03-17T03:04:03.949Z debug utils/policy.go:43 absolute rego_subdir path, `/opt/actions-runner/_work/my-repo/my-repo/terraform/oidc_second/pkg/policies/opa/rego`, does not fall under base repo path's `/home/runner/.terrascan` directory structure
2025-03-17T03:04:03.949Z debug utils/policy.go:44 appending rego_subdir path: `pkg/policies/opa/rego` to the policy base path: `/home/runner/.terrascan`. checking ...
2025-03-17T03:04:03.949Z debug utils/policy.go:44 appending rego_subdir path: `pkg/policies/opa/rego` to the policy base path: `/home/runner/.terrascan`. checking ...
2025-03-17T03:04:03.949Z debug config/global.go:126 global config loaded
2025-03-17T03:04:03.949Z debug config/global.go:126 global config loaded
2025-03-17T03:04:03.949Z debug initialize/run.go:52 initializing terrascan
2025-03-17T03:04:03.949Z debug initialize/run.go:52 initializing terrascan
2025-03-17T03:04:03.949Z debug initialize/run.go:68 downloading policies
2025-03-17T03:04:03.950Z debug initialize/run.go:68 downloading policies
2025-03-17T03:04:03.951Z debug initialize/run.go:69 base directory path : /home/runner/.terrascan
2025-03-17T03:04:03.951Z debug initialize/run.go:69 base directory path : /home/runner/.terrascan
2025-03-17T03:04:04.219Z debug initialize/run.go:225 policy directory path : https://github.com/tenable/terrascan.git
2025-03-17T03:04:04.219Z debug initialize/run.go:226 policy repo url : https://github.com/tenable/terrascan.git
2025-03-17T03:04:04.219Z debug initialize/run.go:227 policy repo git branch : master
2025-03-17T03:04:04.219Z debug initialize/run.go:228 cloning terrascan repo at /home/runner/.terrascan
2025-03-17T03:04:04.220Z debug initialize/run.go:225 policy directory path : https://github.com/tenable/terrascan.git
2025-03-17T03:04:04.220Z debug initialize/run.go:226 policy repo url : https://github.com/tenable/terrascan.git
2025-03-17T03:04:04.220Z debug initialize/run.go:227 policy repo git branch : master
2025-03-17T03:04:04.220Z debug initialize/run.go:228 cloning terrascan repo at /home/runner/.terrascan
2025-03-17T03:04:04.222Z error cli/init.go:42 failed to initialize terrascan. error : failed to download policies. error: 'repository already exists'
could you help please
The text was updated successfully, but these errors were encountered:
we are using pre-commit, with terrascan
pre-commit version 4.1.0
terrascan version 1.19.9
terraform version 1.11.1
pre-commit config
when running precommit in github workflow.
we dont specify any terrascan extra configs. or policy configs.
the error occurs
cli/init.go:42 failed to initialize terrascan. error : failed to download policies. error: 'repository already exists'
what i tried,
remove ~/.terrascan folder (even though nothing is there) just make sure there is no such folder in the github runner.
ls -all ~/.terrascan || true
ls -all ~/.config/terrascan || true
ls -all /tmp/terrascan || true
rm -rf ~/.terrascan
rm -rf ~/.config/terrascan
rm -rf /tmp/terrascan
ls: cannot access '/home/runner/.terrascan': No such file or directory
ls: cannot access '/home/runner/.config/terrascan': No such file or directory
ls: cannot access '/tmp/terrascan': No such file or directory
nothing works
i enabled debug logs, found something weird,
it tried to download policy twice? could this be the cause for repository already exist.
also
absolute rego_subdir path,
/opt/actions-runner/_work/my-repo/my-repo/terraform/oidc/pkg/policies/opa/rego, does not fall under base repo path's
/home/runner/.terrascandirectory structure
we dont have any policy config under the repo. folder
terraform/oidc
, why it will show this?could you help please
The text was updated successfully, but these errors were encountered: