Skip to content
This repository has been archived by the owner on Oct 27, 2024. It is now read-only.

Infinite scans #99

Open
jasonckeating opened this issue Mar 31, 2022 · 5 comments
Open

Infinite scans #99

jasonckeating opened this issue Mar 31, 2022 · 5 comments

Comments

@jasonckeating
Copy link

Scans have started scanning infinitely.
The checkov indicator at the bottom of vscode spins without ever succeeding on even small terraform files that previously produced results.

Because it doesn't fail, I don't get an option to check the logs.

@orhovy
Copy link
Contributor

orhovy commented Mar 31, 2022

Hi @jasonckeating, can you specify some more data about whats happening?
Did you try to reboot you VsCode? this might dump the logs to the file, logs would be helpful.
what version of checkov is installed? and also whats the version of the extension?

@jasonckeating
Copy link
Author

checkov v2.0.1020
extension v1.0.76

I have tried a few reboots of vsCode, and the plugin

@jasonckeating
Copy link
Author

These are the logs captured after checkov runs for a while and spins.

[debug]: Log from Checkov: 2022-03-31 14:59:25,852 [MainThread  ] [INFO ]  Found working version of helm dependancies: v3.8.1
2022-03-31 14:59:25,853 [MainThread  ] [DEBUG]  dockerfile_runner declares no system dependency checks required.
2022-03-31 14:59:25,853 [MainThread  ] [DEBUG]  secrets_runner declares no system dependency checks required.
2022-03-31 14:59:25,853 [MainThread  ] [DEBUG]  json_runner declares no system dependency checks required.
2022-03-31 14:59:25,853 [MainThread  ] [DEBUG]  yaml_runner declares no system dependency checks required.
2022-03-31 14:59:25,853 [MainThread  ] [DEBUG]  github_configuration_runner declares no system dependency checks required.
 
[debug]: Log from Checkov: 2022-03-31 14:59:25,853 [MainThread  ] [DEBUG]  gitlab_configuration_runner declares no system dependency checks required.
 
[debug]: Log from Checkov: 2022-03-31 14:59:25,854 [MainThread  ] [DEBUG]  bitbucket_configuration_runner declares no system dependency checks required.
 
[debug]: Log from Checkov: 2022-03-31 14:59:25,854 [MainThread  ] [INFO ]  Checking necessary system dependancies for kustomize checks.
 
[debug]: Log from Checkov: 2022-03-31 14:59:25,911 [MainThread  ] [INFO ]  Found working version of kustomize dependancy kustomize: v4.5.4
 
[debug]: Log from Checkov: 2022-03-31 14:59:25,913 [MainThread  ] [DEBUG]  sca_package_runner declares no system dependency checks required. 
[debug]: Log from Checkov: 
2022-03-31 14:59:25,914 [MainThread  ] [DEBUG]  github_actions_runner declares no system dependency checks required.
 
[debug]: Log from Checkov: 2022-03-31 14:59:25,915 [MainThread  ] [DEBUG]  bicep_runner declares no system dependency checks required.
2022-03-31 14:59:25,915 [MainThread  ] [DEBUG]  Using API key ending with RZloWHg=
2022-03-31 14:59:25,915 [MainThread  ] [DEBUG]  BC_SOURCE = vscode, version = 1.0.76
 
[debug]: Log from Checkov: 2022-03-31 14:59:25,915 [MainThread  ] [INFO ]  Using Prisma API URL: https://api3.prismacloud.io
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,399 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,409 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,410 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,413 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,419 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,420 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
2022-03-31 14:59:26,421 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,422 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Response from version command: 2.0.1020
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,619 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,620 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
2022-03-31 14:59:26,620 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,621 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
2022-03-31 14:59:26,621 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,624 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,625 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,629 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,636 [MainThread  ] [DEBUG]  Checkov version: 2.0.1020
2022-03-31 14:59:26,636 [MainThread  ] [DEBUG]  Python executable: /usr/local/bin/python
2022-03-31 14:59:26,637 [MainThread  ] [DEBUG]  Python version: 3.10.2 (main, Feb 25 2022, 22:40:35) [GCC 10.3.1 20211027]
2022-03-31 14:59:26,637 [MainThread  ] [DEBUG]  Checkov executable (argv[0]): /usr/local/bin/checkov
2022-03-31 14:59:26,637 [MainThread  ] [DEBUG]  Command Line Args:   -f aws_root/account_base/organization-cloudtrail.tf -s --bc-api-key **** --repo-id _git/tfbase_master -o json
Environment Variables:
  PRISMA_API_URL:    https://api3.prismacloud.io
Defaults:
  --framework:       ['all']
  --branch:          master
  --download-external-modules:False
  --external-modules-download-path:.external_modules
  --evaluate-variables:True

2022-03-31 14:59:26,637 [MainThread  ] [INFO ]  Resultant set of frameworks (removing skipped frameworks): all
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,638 [MainThread  ] [DEBUG]  terraform_runner declares no system dependency checks required.
2022-03-31 14:59:26,638 [MainThread  ] [DEBUG]  cloudformation_runner declares no system dependency checks required.
2022-03-31 14:59:26,638 [MainThread  ] [DEBUG]  kubernetes_runner declares no system dependency checks required.
2022-03-31 14:59:26,638 [MainThread  ] [DEBUG]  serverless_runner declares no system dependency checks required.
2022-03-31 14:59:26,638 [MainThread  ] [DEBUG]  arm_runner declares no system dependency checks required.
2022-03-31 14:59:26,638 [MainThread  ] [DEBUG]  terraform_plan_runner declares no system dependency checks required.
2022-03-31 14:59:26,638 [MainThread  ] [INFO ]  Checking necessary system dependancies for helm checks.
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,711 [MainThread  ] [INFO ]  Found working version of helm dependancies: v3.8.1
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,712 [MainThread  ] [DEBUG]  dockerfile_runner declares no system dependency checks required.
2022-03-31 14:59:26,712 [MainThread  ] [DEBUG]  secrets_runner declares no system dependency checks required.
2022-03-31 14:59:26,712 [MainThread  ] [DEBUG]  json_runner declares no system dependency checks required.
2022-03-31 14:59:26,712 [MainThread  ] [DEBUG]  yaml_runner declares no system dependency checks required.
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,712 [MainThread  ] [DEBUG]  github_configuration_runner declares no system dependency checks required.
2022-03-31 14:59:26,713 [MainThread  ] [DEBUG]  gitlab_configuration_runner declares no system dependency checks required.
2022-03-31 14:59:26,713 [MainThread  ] [DEBUG]  bitbucket_configuration_runner declares no system dependency checks required.
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,713 [MainThread  ] [INFO ]  Checking necessary system dependancies for kustomize checks.
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,736 [MainThread  ] [INFO ]  Found working version of kustomize dependancy kustomize: v4.5.4
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,736 [MainThread  ] [DEBUG]  sca_package_runner declares no system dependency checks required.
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,737 [MainThread  ] [DEBUG]  github_actions_runner declares no system dependency checks required.
2022-03-31 14:59:26,737 [MainThread  ] [DEBUG]  bicep_runner declares no system dependency checks required.
2022-03-31 14:59:26,738 [MainThread  ] [DEBUG]  Using API key ending with RZloWHg=
 
[debug]: Log from Checkov: 2022-03-31 14:59:26,738 [MainThread  ] [DEBUG]  BC_SOURCE = vscode, version = 1.0.76
2022-03-31 14:59:26,738 [MainThread  ] [INFO ]  Using Prisma API URL: https://api3.prismacloud.io
 
[info]: Cancellation token invoked, aborting checkov run. 

@SteveVaknin
Copy link
Contributor

@mikeurbanski1 let us know if there is any progress 🙏

@trapacampo
Copy link

trapacampo commented Apr 6, 2022

Infinite scans here too.

In my case here is the error:

[info]: Running checkov: 
[info]: checkov -s --bc-api-key **** --repo-id _git/PROJECT -f "c:\Users\USER\GitProjects\PROJECT\variables.tf" -o json 
[debug]: Version command: checkov -v 
[warn]: Checkov stderr: Asociaci�n de archivo no encontrada para la extensi�n .py
 
[debug]: Response from version command: 2.0.1037
 
[warn]: Checkov stderr: Traceback (most recent call last):
  File "<string>", line 1, in <module>
 
[warn]: Checkov stderr:   File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 116, in spawn_main
 
[warn]: Checkov stderr:     exitcode = _main(fd, parent_sentinel)
  File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 125, in _main
 
[warn]: Checkov stderr:     prepare(preparation_data)
  File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 236, in prepare
 
[warn]: Checkov stderr:     _fixup_main_from_path(data['init_main_from_path'])
  File "C:\Program Files\Python310\lib\multiprocessing\spawn.py", line 287, in _fixup_main_from_path
 
[warn]: Checkov stderr:     main_content = runpy.run_path(main_path,
  File "C:\Program Files\Python310\lib\runpy.py", line 268, in run_path
 
[warn]: Checkov stderr:     code, fname = _get_code_from_file(run_name, path_name)
  File "C:\Program Files\Python310\lib\runpy.py", line 242, in _get_code_from_file
 
[warn]: Checkov stderr:     code = compile(f.read(), fname, 'exec')
  File "C:\Users\USER\AppData\Roaming\Python\Python310\Scripts\checkov.cmd", line 1
 
[warn]: Checkov stderr:     @echo OFF
     ^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?

If I execute this command " checkov -s --bc-api-key **** --repo-id _git/PROJECT -f "c:\Users\USER\GitProjects\PROJECT\variables.tf" -o json" on the VSCode terminal is working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants