Automation JavaScript Regex 2025

Log Redactor — Network Log Sanitization Tool

A browser-based automation tool that strips sensitive data from network logs in under a second. Built specifically for network engineers who need to share logs with vendors, TAC teams, or colleagues without exposing customer IPs, credentials, device hostnames, or BGP community strings.

Launch Log Redactor

Why log redaction is a real operational pain point

Every time a network engineer escalates an issue to a vendor or shares a log with an external party, there is a manual process: read through the log, find every IP address, every hostname, every community string, scrub them one by one, hope you did not miss anything. This takes 10 to 15 minutes per escalation and creates three distinct problems.

Human error risk

A 500-line BGP log can contain hundreds of IP addresses. Manual review consistently misses some. One leaked customer prefix or management IP is a security and compliance incident.

Slow incident response

During a P1 outage, 10 minutes spent scrubbing a log before you can send it to TAC is 10 minutes of additional downtime. Speed matters and manual redaction fights against that directly.

Inconsistent process

Different engineers use different approaches. Some replace IPs with x.x.x.x, some delete lines entirely, some use find-and-replace. This makes the redacted log harder to read and the process unrepeatable.


Before and after — what redaction looks like

Tokenization is the key design decision. Instead of replacing every IP with the same placeholder like “x.x.x.x”, the tool assigns a unique consistent token to each IP address. IP 10.1.1.1 always becomes [IP_001] throughout the entire log, so the relationships between IPs are preserved and the log stays readable.

Before redaction
neighbor 10.1.1.2 as 65004 BGP state: Established Routes: 4 received, 4 accepted 10.4.4.0/30 via 10.1.1.1 dev eth1 10.4.1.0/30 via 10.2.1.1 dev eth2 SysName: SP4 MgmtIP: 172.20.20.14 PortDescr: eth1 password: SuperSecret123 community: 65001:100
After redaction
neighbor [IP_001] as AS1 BGP state: Established Routes: 4 received, 4 accepted [IP_004]/30 via [IP_002] dev eth1 [IP_005]/30 via [IP_003] dev eth2 SysName: [HOST_REDACTED] MgmtIP: [IP_006] PortDescr: eth1 password: [REDACTED] community: AS2:100

What gets redacted and how

redact.js — IP tokenization with consistent mapping
function redactIPs(text, ipMap, counter) {
    const ipRegex = /\b(\d{1,3}\.){3}\d{1,3}(\/\d{1,2})?\b/g;
    return text.replace(ipRegex, (match) => {
        const key = match.replace(/\/\d+$/, "");      // strip CIDR
        const suffix = match.slice(key.length);          // preserve /30 etc
        if (!ipMap.has(key)) {
            ipMap.set(key, `[IP_${String(++counter.val).padStart(3,"0")}]`);
        }
        return ipMap.get(key) + suffix;
    });
}
// 10.1.1.1 → [IP_001], 10.1.1.2 → [IP_002]
// 10.1.1.1/30 → [IP_001]/30 (CIDR preserved)

How this helps engineers and teams

For individual engineers

Escalation time drops from 10 to 15 minutes of manual scrubbing to under 5 seconds. More time troubleshooting, less time on administrative work.

No more worrying about missed IPs. The tool catches every occurrence automatically, including ones in log timestamps, SNMP traps, and syslog headers that manual review often misses.

The log stays readable. Consistent tokenization means you can still follow the flow of events, identify which devices are involved, and explain the issue to TAC without revealing anything sensitive.

Works in the browser with no install, no account, and no data sent anywhere. The redaction runs entirely in JavaScript on your own machine.

For operations teams and organizations

Creates a consistent, repeatable redaction process across the entire team. Every engineer redacts the same way using the same rules, making shared logs easier to read and cross-reference.

Supports data handling compliance. Automated redaction creates an auditable process where sensitive data is masked before sharing, supporting internal policies and vendor security requirements.

Reduces training overhead. New engineers do not need to be taught which fields to scrub — the tool handles it and they can focus on the actual network problem.

Integrates into the AIOps pipeline. The same redaction logic runs inside the Flask API before any logs are sent to Gemini AI, ensuring the automated monitoring loop never exposes sensitive data to external services.