-
Notifications
You must be signed in to change notification settings - Fork 0
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-kevsync #3
Conversation
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 verified that all tests run via pytest -vs --mongo-express
pass locally.
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.
👍 👍 though I noted some small items that should be cleaned up.
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.
👍 👍 👍
Update package name and description Rename path from skeleton example
Update source path in .coveragerc Add asyncio_mode configuration to pytest.ini
mypy can fail and prevent the installation of pre-commit hooks. It isn't obvious when this occurs. Moving it after the `set +o errexit` will prevent this.
…s option Co-authored-by: Mark Feldhousen <mark.feldhousen@gwe.cisa.dhs.gov>
Add more unit tests Add output assertions to unit tests Add two additional unit tests
We can do this now that the first-commits branch of cyhy-config has been merged.
This is to avoid situations where the stdout is split across multiple lines (e.g. when this test is run in GitHub Actions) and the full text of the warning message is not contiguous. To clarify, here is how the pervious version of this test was failing in GHA: AssertionError: assert 'No schema URL provided, skipping KEV JSON validation' in '[19:05:08] WARNING No schema URL provided, skipping KEV JSON main.py:46\n validation. \nProcessing KEV feed ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00\nDeleting KEV docs ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ \n' Update cyhy-config dependency to version 1 Remove unnecessary dependency pins
Sort `__all__` list Co-authored-by: dav3r <david.redmin@trio.dhs.gov> Make error message text more specific Co-authored-by: dav3r <david.redmin@trio.dhs.gov> Make error message text more specific Co-authored-by: dav3r <david.redmin@trio.dhs.gov> Add an assertion error message Co-authored-by: dav3r <david.redmin@trio.dhs.gov> Increase granularity of exceptions Add tests for specific validation failure modes Fix docstring and normalize http exception Improve test coverage Add test for non-200 responses during schema fetch
🗣 Description
This PR contains the initial functionality of the
cyhy-kevsync
module, which synchronizes CISAs known exploited vulnerabilities list to the Cyber Hygiene database.💭 Motivation and context
We have two main motivations here:
kev-sync
tool to Python 3 and its final form as an AWS lambda.🧪 Testing
This code is currently 92% covered by unit tests. Additionally, it has been tested against live KEV data, and a MongoDB instance in AWS.
✅ Pre-approval checklist
in code comments.
to reflect the changes in this PR.
✅ Pre-merge checklist
install_requires
block insetup.py
)✅ Post-merge checklist