-
Notifications
You must be signed in to change notification settings - Fork 1
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
First commits to create cyhy-db #5
Draft
felddy
wants to merge
101
commits into
develop
Choose a base branch
from
first-commits
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
+2,403
−303
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Delete example package and files Update Python version to 3.12 in build workflows Update package name and description in setup.py Update dependencies in setup.py
Add comments to severity calculation.
This commit refactors the CVE model and test in the `cyhy_db` package. The changes include: - Replacing the `odmantic` library with `mongoengine` for the model definition. - Updating the field types and constraints in the CVE model. - Removing the `calculate_severity` method and integrating the severity calculation directly in the `save` method. - Updating the test cases to reflect the changes in the model.
We aren't using Random() for the purposes of cryptography here, so we can safely ignore these warnings.
felddy
added
documentation
This issue or pull request improves or adds to documentation
hacktoberfest-accepted
Pull request that should count toward Hacktoberfest participation
improvement
This issue or pull request will add or improve functionality, maintainability, or ease of use
labels
Sep 25, 2024
We are using the or (`|`) operator for types that was introduced in Python 3.10 with PEP 604. See: - https://docs.python.org/3/whatsnew/3.10.html#pep-604-new-type-union-operator
Pull Request Test Coverage Report for Build 11164912521Details
💛 - Coveralls |
This is primarily because pymongo DEBUG level logging is extremely verbose and should only be enabled when needed. Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
This field now accepts either a string representing the time (%H:%M:%S) or a datetime.time object, which is stored in the database as a string in %H:%M:%S format. This also improves our input checking so that invalid times (e.g. 34:45:56) can no longer be added. Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
Also, remove some commented-out code that is no longer needed. Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
…s option Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
…include the same indexes as ScanDoc Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
documentation
This issue or pull request improves or adds to documentation
hacktoberfest-accepted
Pull request that should count toward Hacktoberfest participation
improvement
This issue or pull request will add or improve functionality, maintainability, or ease of use
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🗣 Description
This PR contains the initial functionality of the
cyhy-db
module, which provides a object model for accessing the various document collections in a Cyber Hygiene database.This PR also includes an assortment of unit tests, though more testing will likely be added later.
💭 Motivation and context
We have two main motivations here:
🧪 Testing
All unit tests currently pass in
pytest
. This code has also been partially tested by its use in thecyhy-kevsync
module (initial PR coming soon).✅ Pre-approval checklist
in code comments.
to reflect the changes in this PR.
✅ Pre-merge checklist
✅ Post-merge checklist
v1
tag that points to new release.