Skip to content
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

feat: add bridgecrewio/checkov #20226

Merged

Conversation

florianmutter
Copy link
Contributor

@florianmutter florianmutter commented Feb 22, 2024

bridgecrewio/checkov: Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages with Checkov by Bridgecrew

$ aqua g -i bridgecrewio/checkov

How to confirm if this package works well

Reviewers aren't necessarily familiar with this package, so please describe how to confirm if this package works well.
Please confirm if this package works well yourself as much as possible.

Command and output

$ checkov --version
3.2.23

Reference

[bridgecrewio/checkov](https://github.com/bridgecrewio/checkov): Prevent cloud misconfigurations and find vulnerabilities during build-time in infrastructure as code, container images and open source packages with Checkov by Bridgecrew
@florianmutter florianmutter marked this pull request as draft February 22, 2024 12:19
@florianmutter florianmutter marked this pull request as ready for review February 22, 2024 12:20
@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Feb 22, 2024

Did you run cmdx bridgecrewio/checkov?
If so, I think version_overrides should be set. 🤔

e.g.

version_constraint: "false"
version_overrides:
- version_constraint: semver("<= 0.10.16")
no_asset: true
- version_constraint: "true"

Ah, I see. This repository has a lot of GitHub Releases. 1,823
By default, the command cmdx s checks all releases so it takes a long time if the repository has a lot of GitHub Releases.
Perhaps it would cause GitHub API rate limiting issues.
Maybe we need to give up checking all versions and specify -limit option.

e.g.

cmdx s -limit 200 bridgecrewio/checkov

@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Feb 22, 2024
@suzuki-shunsuke suzuki-shunsuke added this to the v4.139.1 milestone Feb 22, 2024
@florianmutter
Copy link
Contributor Author

I did run it and it created rules for old releases. Since this is a new package I thought it is ok if we start by only supporting the latest version and future versions. I removed the rules and old versions.

@suzuki-shunsuke
Copy link
Member

Since this is a new package I thought it is ok if we start by only supporting the latest version and future versions.

I don't think so.
Even if the package is new, users should be able to use old versions too.

@florianmutter
Copy link
Contributor Author

👍 I will try to update the PR to include the version_constraint

@florianmutter
Copy link
Contributor Author

Created the config again with version constraints for older versions

@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Feb 22, 2024

LGTM. Thank you!

BTW, I'm not familiar with checkov, but checkov seems to be very slow.
It takes over 9 seconds to just show the version with -v option.

And brew install checkov installs a little old version.

$ time /opt/homebrew/bin/checkov -v
3.2.20
/opt/homebrew/bin/checkov -v  2.67s user 0.59s system 36% cpu 9.015 total
$ time /Users/shunsukesuzuki/.local/share/aquaproj-aqua/pkgs/github_release/github.com/bridgecrewio/checkov/3.2.23/checkov_darwin_X86_64_3.2.23.zip/dist/checkov -v
3.2.23
 -v  3.00s user 2.81s system 19% cpu 29.465 total

This has nothing to do with aqua, so I don't care about it but this is a little interesting.

@suzuki-shunsuke suzuki-shunsuke merged commit 247d96b into aquaproj:main Feb 22, 2024
16 checks passed
@suzuki-shunsuke
Copy link
Member

v4.140.0 is out 🎉
https://github.com/aquaproj/aqua-registry/releases/tag/v4.140.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants