Skip to content

Commit

Permalink
fix #1569: add a SKIP_LIST to updatebreaches.js
Browse files Browse the repository at this point in the history
  • Loading branch information
groovecoder committed Mar 13, 2020
1 parent 3cc6a26 commit c33a85b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/updatebreaches.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ const HIBP = require("../hibp");
const RemoteSettings = require("../lib/remote-settings");


const SKIP_LIST = [
"factual.com",
];

if (
!AppConstants.FX_REMOTE_SETTINGS_WRITER_USER ||
!AppConstants.FX_REMOTE_SETTINGS_WRITER_PASS ||
Expand All @@ -18,8 +22,9 @@ if (
(async () => {
const allHibpBreaches = await HIBP.req("/breaches");
const verifiedSiteBreaches = HIBP.filterBreaches(allHibpBreaches.body);
const unskippedVerifiedSiteBreaches = verifiedSiteBreaches.filter(breach => !SKIP_LIST.includes(breach.Domain));

const newBreaches = await RemoteSettings.whichBreachesAreNotInRemoteSettingsYet(verifiedSiteBreaches);
const newBreaches = await RemoteSettings.whichBreachesAreNotInRemoteSettingsYet(unskippedVerifiedSiteBreaches);

if (newBreaches.length <= 0) {
console.log("No new breaches detected.");
Expand Down

0 comments on commit c33a85b

Please sign in to comment.