Skip to content

Commit

Permalink
Merge pull request #661 from cisagov/revert-647-dj-cidr_hot_fix-WIP
Browse files Browse the repository at this point in the history
Revert "Only display domains that are directly attributable to a cidr"
  • Loading branch information
schmelz21 authored Oct 1, 2024
2 parents f8f04ee + ca2e71f commit 0462afb
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 124 deletions.
4 changes: 0 additions & 4 deletions backend/src/api/domains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,6 @@ class DomainSearch {
});
}

qs.andWhere(
'domain."isFceb" = true OR (domain."isFceb" = false AND domain."fromCidr" = true)'
);

await this.filterResultQueryset(qs, event);
return qs.getManyAndCount();
}
Expand Down
7 changes: 0 additions & 7 deletions backend/src/api/scans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,6 @@ export const SCAN_SCHEMA: ScanSchema = {
description:
'Open source tool that integrates passive APIs in order to discover target subdomains'
},
flagFloatingIps: {
type: 'fargate',
isPassive: true,
global: true,
description:
'Loops through all domains and determines if their associated IP can be found in a report Cidr block.'
},
hibp: {
type: 'fargate',
isPassive: true,
Expand Down
4 changes: 0 additions & 4 deletions backend/src/api/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,6 @@ export const get = wrapHandler(async (event) => {
});
}

qs.andWhere(
'domain."isFceb" = true OR (domain."isFceb" = false AND domain."fromCidr" = true)'
);

// Handles the case where no orgs and no regions are set, and we pull stats for a region that will never exist
if (
search.filters?.organizations?.length === 0 &&
Expand Down
4 changes: 0 additions & 4 deletions backend/src/api/vulnerabilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ class VulnerabilitySearch {
.leftJoinAndSelect('domain.organization', 'organization')
.leftJoinAndSelect('vulnerability.service', 'service');

qs.andWhere(
'domain."isFceb" = true OR (domain."isFceb" = false AND domain."fromCidr" = true)'
);

if (groupBy) {
qs = qs
.groupBy('title, cve, "isKev", description, severity')
Expand Down
10 changes: 0 additions & 10 deletions backend/src/models/domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,6 @@ export class Domain extends BaseEntity {
})
cloudHosted: boolean;

@Column({
default: false
})
fromCidr: boolean;

@Column({
default: false
})
isFceb: boolean;

/** SSL Certificate information */
@Column({
type: 'jsonb',
Expand Down
28 changes: 0 additions & 28 deletions backend/src/tasks/flagFloatingIps.ts

This file was deleted.

61 changes: 0 additions & 61 deletions backend/src/tasks/helpers/checkIpInCidr.ts

This file was deleted.

4 changes: 0 additions & 4 deletions backend/src/tasks/search-sync-domains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ export const handler = async (commandOptions: CommandOptions) => {
qs.where('organization.id=:org', { org: organizationId });
}

qs.andWhere(
'domain."isFceb" = true OR (domain."isFceb" = false AND domain."fromCidr" = true)'
);

const domainIds = (await qs.getMany()).map((e) => e.id);
console.log(`Got ${domainIds.length} domains.`);
if (domainIds.length) {
Expand Down
2 changes: 0 additions & 2 deletions backend/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { handler as sslyze } from './tasks/sslyze';
import { handler as trustymail } from './tasks/trustymail';
import { handler as vulnSync } from './tasks/vuln-sync';
import { handler as vulnScanningSync } from './tasks/vs_sync';
import { handler as flagFloatingIps } from './tasks/flagFloatingIps';
import { handler as xpanseSync } from './tasks/xpanse-sync';
import { SCAN_SCHEMA } from './api/scans';

Expand All @@ -48,7 +47,6 @@ async function main() {
dnstwist,
dotgov,
findomain,
flagFloatingIps,
intrigueIdent,
lookingGlass,
portscanner,
Expand Down

0 comments on commit 0462afb

Please sign in to comment.