LEARN. PRACTICE. EXPLAIN.
Learning paths & interview practiceP
← Build a security log triage & authorization analyzer
BUILD → VERIFY → EXPLAIN · STEP 3 OF 6

Detect login anomalies as leads, not verdicts

Correlate failed bursts and new-IP successes while preserving benign hypotheses.

UNDERSTAND

Bring these concepts with you

BUILD

Your implementation

  1. Implement detectCredentialAnomalies(events, { failureThreshold, windowMs }).
  2. Group events per user chronologically and flag >= failureThreshold failures followed by a success from a different sourceIp within windowMs.
  3. Include status: 'needs-investigation' and benignAlternatives rather than claiming confirmed compromise.
export function detectCredentialAnomalies(events, { failureThreshold = 3, windowMs = 600000 } = {}) {
  // Flag failure bursts followed by a new-IP success as leads with benign alternatives.
}
Need a hint?
  • Sort per-user events by Date.parse(ts) before running the sliding time window.
  • An IP address change alone could be a VPN disconnect or cellular roam.

Saved on this device · 0 / 6000 · Do not include passwords or private data.

VERIFY

Acceptance checks

From the folder containing your downloaded files, run:

node checks.mjs ./starter.mjs 3

This runs checks up to this step. Earlier steps must work first. Mark each result only after checking your implementation; the website does not run or grade it.

Record your attempt to enable the checklist and reference comparison.

Compare with the reference

Attempt the step first, then compare decisions and behavior. There can be more than one correct implementation.

EXPLAIN

Your interviewer asks

Why does a login from a new IP after three failures not prove account takeover by itself?

Say your answer aloud, then record the trade-offs and evidence in your notes above.

LOCAL VOICE REHEARSAL

Rehearse your step walkthrough aloud

Target pacing: 02:00 · Stays in this browser only; never uploaded.

00:00/ 02:00
AlifBay Prep