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

Dj hot fix 2 #665

Merged
merged 8 commits into from
Oct 2, 2024
Merged

Dj hot fix 2 #665

merged 8 commits into from
Oct 2, 2024

Conversation

DJensen94
Copy link
Contributor

@DJensen94 DJensen94 commented Oct 2, 2024

🗣 Description

We only want to display data for domains whose IP is directly attributable to a user provided CIDR. We only want this functionality for non-FCEB organizations.

  1. Add new column to Domains table called "fromCyhyCidr", which will be a boolean for if the domains ip links to a cidr provided to VS
  2. Create a helper function that accepts an organization_id and an ip and returns true if the ip is found inside a cidr block owned by the given org, it will check this against the cidr table in the mini datalake that is updated daily from the VS data in the AE
  3. We will make a crossfeed scan that loops through all domains and runs the ips through the newly created helper function and correctly checks the "fromCyhyCidr" column
  4. Update the api calls that pull domains to filter out domains where "fromCyhyCidr" is false

💭 Motivation and context

This is to avoid reporting issues with IPs that belong to cloud providers and incorrectly attributed domains

🧪 Testing

I have tested locally with both in-cidr and out-cidr ips as well as on fceb and non fceb organizations

✅ Pre-approval checklist

  • This PR has an informative and human-readable title.
  • Changes are limited to a single goal - eschew scope creep!
  • All future TODOs are captured in issues, which are referenced
    in code comments.
  • 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.

✅ Pre-merge checklist

  • Revert dependencies to default branches.
  • Finalize version.

✅ Post-merge checklist

  • Create a release.

filter out domains that don't link to cidrs
update tests
run linter
update domain.test.ts with isFceb so tests run as normal
update all domains.create statements in tests
Copy link
Contributor

@ameliav ameliav left a comment

Choose a reason for hiding this comment

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

After the hot fix code changes, the only failing backend tests for me were not related to this PR (API key issue). Dane to confirm if the data is exhibiting correctly after the changes.

@schmelz21 schmelz21 merged commit 6cf0624 into develop Oct 2, 2024
14 of 18 checks passed
@schmelz21 schmelz21 deleted the dj_hot-fix-2 branch October 2, 2024 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants