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

Add cyhy-cvesync Lambda #25

Open
wants to merge 47 commits into
base: develop
Choose a base branch
from
Open

Conversation

dav3r
Copy link
Member

@dav3r dav3r commented Nov 5, 2024

🗣 Description

This PR adds the cyhy-cvesync-lambda. It is invoked when this code is initially applied, in order to populate the CVE collection in the database. It is also scheduled to run regularly, in order to keep up-to-date with CVE data.

Note that this PR is built on top of #12. For clarity, these are the commits that are specific and relevant to this PR:

💭 Motivation and context

The CyHy database should always include up-to-date CVE information in order to function correctly.

🧪 Testing

I applied these changes in a development environment and verified that the initial Lambda ran successfully against a database with no previously-loaded CVEs. I also confirmed that the Lambda ran successfully on the schedule that I selected.

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All relevant type-of-change labels have been added.
  • I have read the CONTRIBUTING document.
  • These code changes follow cisagov code standards.
  • All relevant repo and/or project documentation has been updated
    to reflect the changes in this PR.
  • All new and existing tests pass.

@dav3r dav3r added the improvement This issue or pull request will add or improve functionality, maintainability, or ease of use label Nov 5, 2024
@dav3r dav3r requested a review from a team November 5, 2024 16:18
@dav3r dav3r self-assigned this Nov 5, 2024
Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved, but please see my one question.

outputs.tf Show resolved Hide resolved
Copy link
Member

@jsf9k jsf9k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I snuck in another question!

variables.tf Outdated Show resolved Hide resolved
dav3r and others added 25 commits November 15, 2024 11:25
The Lambda no longer requires any event input; it just runs and does it's thang.
Also includes an updated variable description to satisfy the markdownlint pre-commit hook.
Co-authored-by: Shane Frasier <[email protected]>
… kevsync lambda module

This allows Terraform to determine if a new version of the lambda deployment package is present in the bucket and if so, update the lambda function to use it.
We don't need them here and Terraform constantly wanted to add them on every apply, even when they were already present.
Invoke it once upon deployment to initially load CVE data into the database.  Then, schedule it to run on a regular basis thereafter.
Co-authored-by: Shane Frasier <[email protected]>
@dav3r dav3r force-pushed the improvement/add-cyhy-cvesync-lambda branch from e2ec4db to 61b7c0f Compare November 15, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement This issue or pull request will add or improve functionality, maintainability, or ease of use
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants