Loading...
Loading...
Anonymize and sanitize customer-provided log files before they are committed as pipeline test fixtures or sample events. Performs a line-by-line review and replaces all sensitive values inline, preserving log structure and format exactly — never reformats, re-indents, or restructures content. Invoke manually with /anonymize-logs.
npx skill4agent add elastic/integration-skills anonymize-logs| Input | How to provide |
|---|---|
| Log file(s) to sanitize | |
| Output location (optional) | free text path, defaults to same directory with |
| In-place override (optional) | say "in place" to overwrite the original |
token_prefixpassword_hash_prefixhashed_tokenuser@tenant.onmicrosoft.comhome_tenant_idresource_tenant_idaad_tenant_idorgunit_pathorg_unit_pathdatabase.hostdatabase.namedatabase_principal_namedomain_controller_object_guiddomain_controller_object_sidC:\Users\alice\/home/bob/HKLM\...\S-1-5-21-...python3 -c "
import json, sys
with open('FILE') as f:
for i, line in enumerate(f, 1):
line = line.strip()
if line:
try: json.loads(line)
except Exception as e: print(f'Line {i}: {e}')
"REDACTED| Type | Replacement |
|---|---|
| |
| IPv4 | RFC 5737 ranges: |
| IPv6 | |
| Hostname / FQDN | |
| Domain | |
| UUID | |
| API key / token | |
| Username | |
| Display name | |
| Org / company name | |
| Account / tenant ID | |
| Cloud resource ID | |
| S3 bucket name | |
| MAC address | |
| Serial number | |
| Device / machine ID | use a synthetic UUID or |
| Windows SID | |
| File path (Windows) | |
| File path (Unix) | |
| Kubernetes cluster | |
| Phone number | |
| Database host / name | |
| Department / org unit | |
| Hashed / partial token | replace with full synthetic token of same format |
| DHCP fingerprint | |
| JA4 fingerprint | replace with same-length hex string |
/d/123/edit/d/456/edit/d/example-document-id/edithttps://docs.google.com/drawings/d/123/edithttps://docs.google.com/drawings/d/000000000000/editdocs.google.comhttps://internal.corp.com/api/v1/resourcehttps://host-redacted.example.local/api/v1/resourcedocs.google.comapi.github.coms3.amazonaws.comhttp://1=Y +z\\00/00/0000N/AALLOWDENYINFOERRORdocs.google.comapi.github.comMozilla/5.0 ...