cecília duarte garcia
Portfolio · Engineering & Support Tools
Incident Timeline Generator
JavaScript · Log Triage

During high-pressure incidents, log lines collected from multiple services, containers, and gateways often arrive out of order and in mixed timestamp formats. This zero-dependency client-side tool parses raw logs locally in the browser, normalizes timestamps, classifies severity levels, reconstructs the exact chronological sequence, and flags notable time gaps above 30 seconds.

Processed locally via DOM text nodes (no network calls). Maximum input: 5 MB / 50,000 lines
// Resource exhaustion guardrails (checked prior to regex parsing & O(n log n) sort)
const MAX_LOG_SIZE = 5 * 1024 * 1024; // 5 MB
const MAX_LINES = 50000;
const MAX_LINE_LENGTH = 4096;
if (rawInput.length > MAX_LOG_SIZE || lines.length > MAX_LINES) {
  throw new Error('Input exceeds the maximum supported size.');
}

// Chronological sort & >30s stall detection; rendered strictly via textContent (XSS-safe)
events.sort((a, b) => a.time - b.time);
const msgNode = document.createElement('span');
msgNode.textContent = ev.message;
Security Log Analyzer
Cybersecurity · SIEM Triage

A lightweight client-side threat detection utility that inspects raw authentication and firewall logs (auth.log, SSH, sudo, and UFW/iptables) to identify brute-force credential stuffing, port scan reconnaissance, privilege escalation, concurrent multi-IP logins, off-hours access, and username enumeration.

DOM-XSS safe: untrusted log lines rendered via createTextNode / textContent. Maximum input: 5 MB / 50,000 lines
const MAX_LOG_SIZE = 5 * 1024 * 1024; // 5 MB ceiling + 50,000 lines cap
const MAX_LINES = 50000;

// Sliding-window Brute Force (5+ failures within 120s) & Port Scan (5+ ports per IP)
if (span <= 120000) alerts.push({ severity: 'high', title: 'Brute Force Attack', ip });
if (data.ports.size >= 5) alerts.push({ severity: 'high', title: 'Port Scan Detected', ip });

// XSS-safe evidence highlighter: uses createTextNode & span.textContent (zero innerHTML)
parent.appendChild(document.createTextNode(line.slice(lastIdx, match.index)));
const span = document.createElement('span');
span.className = 'hl';
span.textContent = match[0];
parent.appendChild(span);
Password Strength Checker
Cybersecurity · Password Assessment

Client-side password security analyzer that estimates entropy, identifies common structural weaknesses, and models resistance against different attack scenarios. Rather than treating raw charset math as true strength, it evaluates four separate dimensions: estimated entropy, pattern analysis, dictionary risk (including leetspeak and common suffixes), and overall assessment.

Your password never leaves your browser. No passwords are stored, logged, or transmitted.
-
Estimated Entropy -
Pattern Analysis -
Dictionary Risk -
Overall Assessment -
12+ characters
Uppercase letters
Lowercase letters
Numbers
Special characters
No repeated patterns
Low dictionary risk
No keyboard walks
Theoretical brute-force estimate under the selected assumptions
Assumes uniform search over effective entropy without MFA or lockout; real resistance depends on KDF/hash cost (Argon2id/bcrypt vs. fast hash), salt, and hardware.
// Raw charset entropy assumes uniform random selection (entropy != password strength)
const rawEntropy = calcRawEntropy(pw);

// Effective strength penalizes leetspeak dictionary words, keyboard walks & predictable suffixes
let effectiveEntropy = rawEntropy;
if (dictRisk === 'high') effectiveEntropy = Math.min(effectiveEntropy, 12);
else if (dictRisk === 'elevated') effectiveEntropy = Math.min(effectiveEntropy, 28);
if (keyboardWalk) effectiveEntropy = Math.min(effectiveEntropy, 16);
if (suffixTrap) effectiveEntropy = Math.max(10, effectiveEntropy - 14);

// Theoretical search estimate under explicit KDF / hardware rate assumptions
const theoreticalSeconds = Math.pow(2, effectiveEntropy) / (2 * guessesPerSecond);