-
Notifications
You must be signed in to change notification settings - Fork 451
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
[VulnCheck] Initial Implementation of VulnCheck Connector #3257
[VulnCheck] Initial Implementation of VulnCheck Connector #3257
Conversation
I see that ❯ poetry run black --version
black, 24.10.0 (compiled: yes)
Python (CPython) 3.12.8
❯ poetry run isort --profile black --check src/vclib/config_variables.py --verbose
_ _
(_) ___ ___ _ __| |_
| |/ _/ / _ \/ '__ _/
| |\__ \/\_\/| | | |_
|_|\___/\___/\_/ \_/
isort your imports, so you don't have to.
VERSION 5.13.2
else-type place_module for os returned STDLIB
from-type place_module for pathlib returned STDLIB
else-type place_module for yaml returned THIRDPARTY
from-type place_module for pycti returned THIRDPARTY
from-type place_module for vclib.sources.data_source returned FIRSTPARTY
SUCCESS: /Users/user-name/vulncheck/opencti-connector/external-import/vulncheck/src/vclib/config_variables.py Everything Looks Good!
❯ poetry run isort --profile black --check src/vclib/connector_client.py --verbose
_ _
(_) ___ ___ _ __| |_
| |/ _/ / _ \/ '__ _/
| |\__ \/\_\/| | | |_
|_|\___/\___/\_/ \_/
isort your imports, so you don't have to.
VERSION 5.13.2
else-type place_module for gzip returned STDLIB
else-type place_module for json returned STDLIB
else-type place_module for os returned STDLIB
else-type place_module for zipfile returned STDLIB
from-type place_module for datetime returned STDLIB
from-type place_module for typing returned STDLIB
else-type place_module for requests returned THIRDPARTY
else-type place_module for vulncheck_sdk returned THIRDPARTY
from-type place_module for pycti returned THIRDPARTY
from-type place_module for pydantic returned THIRDPARTY
from-type place_module for vulncheck_sdk.models.advisory_botnet returned THIRDPARTY
from-type place_module for vulncheck_sdk.models.advisory_ip_intel_record returned THIRDPARTY
from-type place_module for vulncheck_sdk.models.advisory_ransomware_exploit returned THIRDPARTY
from-type place_module for vulncheck_sdk.models.advisory_threat_actor_with_external_objects returned THIRDPARTY
from-type place_module for vulncheck_sdk.models.advisory_vuln_check_kev returned THIRDPARTY
from-type place_module for vulncheck_sdk.models.api_exploit_v3_result returned THIRDPARTY
from-type place_module for vulncheck_sdk.models.api_initial_access returned THIRDPARTY
from-type place_module for vulncheck_sdk.models.api_nvd20_cve returned THIRDPARTY
from-type place_module for vulncheck_sdk.models.api_nvd20_cve_extended returned THIRDPARTY
from-type place_module for vclib.config_variables returned FIRSTPARTY
from-type place_module for vclib.sources returned FIRSTPARTY
SUCCESS: /Users/user-name/vulncheck/opencti-connector/external-import/vulncheck/src/vclib/connector_client.py Everything Looks Good! |
77281d0
to
062d5b9
Compare
0305d9b
to
11be26b
Compare
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.
Hi @maddawik, thank you for your contribution!
I succeed to launch the connector both locally and as a docker image (after a small fix, see my comment) ✅
For the formatting issue, where did you run isort
? at the root of the connectors
repository? or at the root of vulncheck
directory?
If so, please try to run it at the root of the repo and see if it helps 🤞Let us know 😇
Thanks!
9818df2
to
0f4b30d
Compare
11be26b
to
5301186
Compare
Hey @Powlinett , thank you for the feedback! 🎉 I have made updates per your suggestion and have also pushed some additional commits. I hope you'll forgive me for the additional changes, but I think they will be welcome ones! To make it a little easier to digest I've included a summary of the changes below: Features
Fixes
I was also able to resolve the formatting issues using Please let me know if you have any additional feedback! 😊 |
This refactors all of the data sources in a number of ways - Updated scope config to use STIX objects for further filtering - Split each data source into separate works for better clarity and transparency on the administrative UI - Reduced cyclomatic complexity for all parsing and gathering functionality - Reduced the amount of in-memory processing required for parsing large data sources - Applied dependency injection where possible - Generally using a more functional approach
- Run the app with a non-priveleged user - Leverage a bind mount for `requirements.txt` for faster builds - Remove additional entrypoint script - Other Python best practices
4e1f5d8
to
8883ac4
Compare
Looks good to me 👍
Many thanks 🙌 |
Proposed changes
This is the initial implementation of an external import connector for VulnCheck. It transforms several different data sources from our API, using our python-sdk, into STIX objects/relationships.
Some data sources ingest substantial volumes of data for parsing and generate a significant number of STIX objects and relationships as a result. These resource-intensive data sources have been highlighted in the documentation for user awareness.
Related issues
#3522
Checklist
Further comments
We've made our best effort to make design decisions that are in-line with OpenCTI's plugin architecture - that said, please let me know if there are improvements that can be made!