-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
platform(sca): Run package scan using API #3812
Conversation
# Conflicts: # checkov/sca_package_2/runner.py # checkov/sca_package_2/scanner.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, looking forward when it is completely implemented 🚀
checkov/sca_package_2/scanner.py
Outdated
} | ||
|
||
response = request_wrapper( | ||
"POST", f"{self._base_url}/api/v1/vulnerabilities/cli/scan", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you move f"{self._base_url}/api/v1/vulnerabilities/cli/scan"
to the __init__
then it can be used for the polling to0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure
checkov/sca_package_2/scanner.py
Outdated
logging.info("Failed to run package scanning.") | ||
return dict() | ||
|
||
return self.poll_scan_result() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the polling should be under def scan()
, just return the id here so, it can be used by poll_scan_result()
* add new sca package * updated * updated * removed redundant lines * update class * run sca scan * mypy * flake8 * RUN_SCA_PACKAGE_SCAN_V2 * RUN_SCA_PACKAGE_SCAN_V2 * fixed * reformat path * fix files config * updated * mypy * fixed root_folder * Added tests * update files * mypy * linting * Fixed tests * Fixed tests * Fixed tests * update endpoint url * updated * linting
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Description
using POST request start sca package scanning process
Fixes # (issue)
New/Edited policies (Delete if not relevant)
Description
Include a description of what makes it a violation and any relevant external links.
Fix
How does someone fix the issue in code and/or in runtime?
Checklist: