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

Initial functionality #12

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

Initial functionality #12

wants to merge 41 commits into from

Conversation

dav3r
Copy link
Member

@dav3r dav3r commented Sep 27, 2024

🗣 Description

This PR deploys the start of a Cyber Hygiene environment containing:

  • A CyHy VPC
  • A DocumentDB cluster
  • An EC2 instance that is allowed to access the DocumentDB
  • A Lambda that synchronizes KEV data to the DocumentDB

💭 Motivation and context

This PR is not intended to provide a fully functional CyHy environment. No host or vulnerability scanning activity is included here yet. That will be added eventually, but for now, we are using this repo as a way to gradually build and test a cloud-native version of CyHy.

🧪 Testing

I successfully ran a terraform apply in a development environment and confirmed that:

  • The intended resources (VPC, DocumentDB, EC2, Lambda) were created
  • The KEV synchronization Lambda ran successfully on a schedule as intended
  • The EC2 instance was accessible via SSH from a trusted IP (var.ec2_trusted_ingress_cidr_blocks)
  • The DocumentDB was accessible via a mongoDB client (mongosh) on the EC2 instance

✅ 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 Sep 27, 2024
@dav3r dav3r self-assigned this Sep 27, 2024
@dav3r dav3r added the hacktoberfest-accepted Pull request that should count toward Hacktoberfest participation label Oct 1, 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.

Here are a few things I noticed in my pre-review.

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
cyhy-kevsync-lambda.tf Outdated Show resolved Hide resolved
documentdb.tf Outdated Show resolved Hide resolved
variables.tf Outdated Show resolved Hide resolved
@dav3r dav3r marked this pull request as ready for review October 25, 2024 18:21
@dav3r dav3r mentioned this pull request Nov 5, 2024
7 tasks
dav3r and others added 22 commits November 15, 2024 11:25
… to scheduling it to run every X minutes.

This allows for more flexibility in scheduling.
This is to prevent unintentional committing of the SSH credentials created in this repo.
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

2 participants