从11/21/2022年美国东部时间上午11:30开始,我们的CI管道开始失败,原因是Checkov更新/升级通知带有输入提示(见下面的输出)。
是否有命令行选项可以跳过桥中的检查?
$ checkov
_ _
___| |__ ___ ___| | _______ __
/ __| '_ \ / _ \/ __| |/ / _ \ \ / /
| (__| | | | __/ (__| < (_) \ V /
\___|_| |_|\___|\___|_|\_\___/ \_/
By bridgecrew.io | version: 2.1.244
Update available 2.1.244 -> 2.2.80
Run pip3 install -U checkov to update
Would you like to “level up” your Checkov powers for free? The upgrade includes:
• Command line docker Image scanning
• Software Composition Analysis
• Centralized policy management
• Free bridgecrew.cloud account with API access
• Auto-fix remediation suggestions
• Enabling of VS Code Plugin
• Dashboard visualisation of Checkov scans
• Integration with GitHub for:
◦ Automated Pull Request scanning
◦ Auto remediation PR generation
• Integration with up to 100 cloud resources for:
◦ Automated cloud resource checks
◦ Resource drift detection
and much more...
It's easy and only takes 2 minutes. We can do it right now!
To Level-up, press 'y'...
Level up? (y/n): Traceback (most recent call last):
File "/usr/bin/checkov", line 9, in <module>
sys.exit(run())
File "/usr/lib/python3.10/site-packages/checkov/main.py", line 368, in run
bc_integration.onboarding()
File "/usr/lib/python3.10/site-packages/checkov/common/bridgecrew/platform_integration.py", line 696, in onboarding
reply = self._input_levelup_results()
File "/usr/lib/python3.10/site-packages/checkov/common/bridgecrew/platform_integration.py", line 860, in _input_levelup_results
result = str(input('Level up? (y/n): ')).lower().strip() # nosec
EOFError: EOF when reading a line
Uploading artifacts for failed job
00:01
Uploading artifacts...
WARNING: plan.json: no matching files
ERROR: No files to upload 我确实尝试使用pip更新版本,但旧版本仍在使用中。这是一个单独的问题,此时我的重点是完全避免更新检查。
bash-5.1# checkov --version
2.1.244
bash-5.1# pip3 install -U checkov
... (Lots of output)
bash-5.1# checkov --version
2.1.244这是我的.checkov.yaml文件:
compact: true
quiet: true
skip-download: false
download-external-modules: true
directory:
- ./
skip-check:
- CKV_AWS_18
- CKV_AWS_50
- CKV_AWS_115
- CKV_AWS_116
- CKV_AWS_117
- CKV_AWS_158
- CKV_AWS_173
- CKV_OPENAPI_4 # some APIs are public
- CKV_OPENAPI_5 # some APIs are public
- LOW 发布于 2022-12-01 18:31:52
如果其他人遇到这种情况,我通过在命令行上显式传递config-file标志来修正它:
checkov --config-file .checkov.yaml在我看来,当我们使用预构建的码头形象来运行我们的工作时,输油管道为什么会开始失效,我仍然不清楚。
发布于 2022-11-23 18:48:22
您只会得到这个输出,因为您调用checkov时没有任何命令行参数。像这样已经有一年了,甚至更久了。
发布于 2022-11-24 08:03:16
我确实尝试过使用pip更新版本,但旧版本仍在使用。
版本2.1.244是在10月2日发布的,所以不是从今天开始发布的。我同意James的建议,使用参数-它将完全避免这个提示。同时,也要检查您的设备中缺少什么,因为最新的checkov似乎无法安装。强烈建议直接使用checkov的码头,如果你没有心情调试这一点,太!
https://stackoverflow.com/questions/74522498
复制相似问题