Skip to content

Commit

Permalink
Remove some info from logs
Browse files Browse the repository at this point in the history
These logs included too much about our users, which we don't want
to be able to access.
  • Loading branch information
Vinnl committed Feb 19, 2025
1 parent 9233722 commit d672fb7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/scripts/cronjobs/emailBreachAlerts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import {
getDashboardSummary,
} from "../../app/functions/server/dashboard";
import { getScanResultsWithBroker } from "../../db/tables/onerep_scans";
import { logger } from "../../app/functions/server/logging";

const SENTRY_SLUG = "cron-breach-alerts";

Expand Down Expand Up @@ -219,7 +220,16 @@ export async function poll(
const notifiedRecipients: string[] = [];

for (const recipient of recipients) {
console.info("notify", { recipient });
logger.info(
"Notifying a user of a breach. Some non-identifying user data:",
{
breaches_last_shown: recipient.breaches_last_shown,
sign_in_count: recipient.sign_in_count,
breaches_resolved: recipient.breaches_resolved,
created_at: recipient.created_at,
updated_at: recipient.updated_at,
},
);

const notifiedSubs = await getNotifiedSubscribersForBreach(breachId);

Expand Down

0 comments on commit d672fb7

Please sign in to comment.