搜索

PythonReactSEOPDF
OpenClaw

Expanso Log Sanitize

log sanitize

aronchick0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install aronchick/expanso-log-sanitize

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

log-sanitize

"Sanitize log entries by removing passwords, tokens, and sensitive patterns"

Requirements

  • Expanso Edge installed (expanso-edge binary in PATH)
  • Install via: clawhub install expanso-edge

Usage

CLI Pipeline
# Run standalone
echo '<input>' | expanso-edge run pipeline-cli.yaml
MCP Pipeline
# Start as MCP server
expanso-edge run pipeline-mcp.yaml
Deploy to Expanso Cloud
expanso-cli job deploy https://skills.expanso.io/log-sanitize/pipeline-cli.yaml

Files

File Purpose
skill.yaml Skill metadata (inputs, outputs, credentials)
pipeline-cli.yaml Standalone CLI pipeline
pipeline-mcp.yaml MCP server pipeline

来源信息

Source
github
Repository
openclaw/skills
Path
skills/aronchick/expanso-log-sanitize
Version
—
Commit
9943d5fcc42802745d3ba9fe385414feeaa813a9
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

README

log-sanitize

Sanitize log entries by removing sensitive data patterns like passwords, tokens, and API keys.

Overview

This skill runs entirely locally without any API calls. It uses pattern matching to detect and redact common secret patterns in log files.

Usage

CLI Mode
# Sanitize a log line
echo 'user=admin password=secret123 token=abc456' | \
  expanso-edge run pipeline-cli.yaml

# Sanitize an entire log file
cat /var/log/app.log | expanso-edge run pipeline-cli.yaml
MCP Mode
# Start server
PORT=8080 expanso-edge run pipeline-mcp.yaml &

# Make request
curl -X POST http://localhost:8080/sanitize \
  -H "Content-Type: application/json" \
  -d '{"log": "password=secret123 api_key=sk-123abc"}'

Output

{
  "sanitized": "user=admin password=***REDACTED*** token=***REDACTED***",
  "redactions": 27,
  "metadata": {
    "skill": "log-sanitize",
    "mode": "cli",
    "trace_id": "abc123...",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}

Patterns Detected

Pattern Example Replacement
Passwords password=secret password=***REDACTED***
API Keys api_key=sk-123 api_key=***REDACTED***
Tokens token=abc123 token=***REDACTED***
Bearer Auth Bearer eyJ... Bearer ***REDACTED***
AWS Keys AKIAIOSFODNN7 ***AWS_KEY_REDACTED***
JWT Tokens eyJ...eyJ... ***JWT_REDACTED***
Secrets secret=xyz secret=***REDACTED***

Use Cases

  • Pre-processing logs before sending to log aggregators
  • Sanitizing logs before sharing with support
  • Compliance with security policies
  • Preparing logs for public documentation

来源内容

SKILL.md
# log-sanitize

"Sanitize log entries by removing passwords, tokens, and sensitive patterns"

## Requirements

- Expanso Edge installed (`expanso-edge` binary in PATH)
- Install via: `clawhub install expanso-edge`

## Usage

### CLI Pipeline
```bash
# Run standalone
echo '<input>' | expanso-edge run pipeline-cli.yaml
```

### MCP Pipeline
```bash
# Start as MCP server
expanso-edge run pipeline-mcp.yaml
```

### Deploy to Expanso Cloud
```bash
expanso-cli job deploy https://skills.expanso.io/log-sanitize/pipeline-cli.yaml
```

## Files

| File | Purpose |
|------|---------|
| `skill.yaml` | Skill metadata (inputs, outputs, credentials) |
| `pipeline-cli.yaml` | Standalone CLI pipeline |
| `pipeline-mcp.yaml` | MCP server pipeline |
README
# log-sanitize

Sanitize log entries by removing sensitive data patterns like passwords, tokens, and API keys.

## Overview

This skill runs **entirely locally** without any API calls. It uses pattern matching to detect and redact common secret patterns in log files.

## Usage

### CLI Mode

```bash
# Sanitize a log line
echo 'user=admin password=secret123 token=abc456' | \
  expanso-edge run pipeline-cli.yaml

# Sanitize an entire log file
cat /var/log/app.log | expanso-edge run pipeline-cli.yaml
```

### MCP Mode

```bash
# Start server
PORT=8080 expanso-edge run pipeline-mcp.yaml &

# Make request
curl -X POST http://localhost:8080/sanitize \
  -H "Content-Type: application/json" \
  -d '{"log": "password=secret123 api_key=sk-123abc"}'
```

## Output

```json
{
  "sanitized": "user=admin password=***REDACTED*** token=***REDACTED***",
  "redactions": 27,
  "metadata": {
    "skill": "log-sanitize",
    "mode": "cli",
    "trace_id": "abc123...",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}
```

## Patterns Detected

| Pattern | Example | Replacement |
|---------|---------|-------------|
| Passwords | `password=secret` | `password=***REDACTED***` |
| API Keys | `api_key=sk-123` | `api_key=***REDACTED***` |
| Tokens | `token=abc123` | `token=***REDACTED***` |
| Bearer Auth | `Bearer eyJ...` | `Bearer ***REDACTED***` |
| AWS Keys | `AKIAIOSFODNN7` | `***AWS_KEY_REDACTED***` |
| JWT Tokens | `eyJ...eyJ...` | `***JWT_REDACTED***` |
| Secrets | `secret=xyz` | `secret=***REDACTED***` |

## Use Cases

- Pre-processing logs before sending to log aggregators
- Sanitizing logs before sharing with support
- Compliance with security policies
- Preparing logs for public documentation

相关技能

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.