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

Filter domains that don't belong to cidrs #662

Merged
merged 1 commit into from
Oct 1, 2024
Merged

Conversation

DJensen94
Copy link
Contributor

🗣 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.

Run Linter
@schmelz21 schmelz21 marked this pull request as ready for review October 1, 2024 17:54
@schmelz21 schmelz21 merged commit 409146a into develop Oct 1, 2024
12 of 16 checks passed
@schmelz21 schmelz21 deleted the dj-cidr_hot_fix-WIP branch October 1, 2024 17:54
@DJensen94 DJensen94 restored the dj-cidr_hot_fix-WIP branch October 1, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants