360 Secure SkillHub
360 安全技能中心

Log Scrubber

该 Skill 通过 Python 脚本扫描工作区内的日志与记忆文件,用正则匹配常见的 API 密钥、令牌和凭据,并将其就地替换为脱敏内容,同时保留 .bak 原始备份;支持 --dry-run 仅预览改动而不写文件。说明中称全部处理在本地完成,不调用外部端点。

heather-herbert
heather-herbert
热度 84.32
最近更新 2026-05-11 17:31:25
分类:安全依赖:代码执行 / 读写文件应用场景:自动化脚本 / 数据处理 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add log-scrubber
Metadata
name
log-scrubber
description
Automatically redacts API keys, tokens, and secrets from workspace logs and memory files.
homepage
https://github.com/Heather-Herbert/openclaw-log-scrubber
metadata
{"clawdbot":{"requires":{"env":[]},"files":["scripts/*"]}}

Log Scrubber

This skill automatically scans your /root/.openclaw/workspace/ environment, logs, and memory files to detect and redact sensitive information like API keys, tokens, and credentials.

Features

  • Proactive Scanning: Scans for known patterns (regex) of common secrets.
  • Automated Redaction: Sanitizes files in-place while keeping backups of original files (e.g., .bak extension).
  • Dry-Run Mode: Allows you to simulate redaction without modifying files.
  • Security: Ensures your secrets don't accidentally end up in logs sent to providers or stored in plain-text memory files.

Usage

To perform a dry-run (check proposed changes without modification): python3 /root/.openclaw/workspace/skills/log-scrubber/scripts/scrub.py --dry-run

To apply changes: python3 /root/.openclaw/workspace/skills/log-scrubber/scripts/scrub.py

External Endpoints

  • This skill does not call any external endpoints. It operates entirely locally.

Security & Privacy

  • This skill performs all redaction operations locally on your machine. No data is sent to external servers.

Model Invocation

  • This skill runs locally and does not autonomously invoke models beyond the standard OpenClaw agent execution.

Trust Statement

  • By using this skill, you agree that it will overwrite files in your workspace with redacted versions. Always ensure you have backups of important data.