Skip to content
Back to skills

Leak Check

ASecurity

Scan session logs for leaked credentials. Checks JSONL session files against known credential patterns and reports which AI provider received the data.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
ai-agentsgobashnode

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 11, 2026

npx -y skills add johnalbertini14-glitch/openclaw-skills --skill leak-check --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Leak Check?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Leak Check
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/johnalbertini14-glitch-leak-check/badge)](https://www.skillsdirectory.com/skills/johnalbertini14-glitch-leak-check)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: leak-check
description: Scan session logs for leaked credentials. Checks JSONL session files against known credential patterns and reports which AI provider received the data.
metadata: {"openclaw":{"emoji":"πŸ”","requires":{"bins":["node"]}}}
---

# Leak Check

Scan OpenClaw session JSONL files for leaked credentials. Reports which real AI provider (anthropic, openai, google, etc.) received the data, skipping internal delivery echoes.

## Quick Start

```bash
# Check for leaked credentials (default: discord format)
node scripts/leak-check.js

# JSON output
node scripts/leak-check.js --format json
```

## Configuration

Credentials to check are defined in `leak-check.json`. The script searches for this file in order:

1. **Skill directory** (`./leak-check.json`) β€” for backward compatibility
2. **`~/clawd/leak-check.json`** β€” recommended persistent location (survives skill updates via clawhub)

Since clawhub clears the skill directory on updates, place your config in `~/clawd/` to avoid losing it:

```bash
mkdir -p ~/clawd
cp leak-check.json ~/clawd/leak-check.json
```

You can also specify an explicit path with `--config`.

```json
[
  { "name": "Discord", "search": "abc*xyz" },
  { "name": "Postmark", "search": "k7Qm9x" }
]
```

**Important:** Do not store full credentials in this file. Use only a partial fragment β€” enough to uniquely identify the credential via a contains, begins-with, or ends-with match.

**Wildcard patterns:**
- `abc*` β€” starts with "abc"
- `*xyz` β€” ends with "xyz"
- `abc*xyz` β€” starts with "abc" AND ends with "xyz"
- `abc` (no asterisk) β€” contains "abc"
- `""` (empty) β€” skip this credential

## Options

- `--format <type>` β€” Output format: `discord` (default) or `json`
- `--config <path>` β€” Path to credential config file (default: `./leak-check.json`, then `~/clawd/leak-check.json`)
- `--help`, `-h` β€” Show help message

## Output

### Discord (Default)

```
πŸ” **Credential Leak Check**

⚠️ **2 leaked credentials found**

**Discord Token**
β€’ Session: `abc12345` | 2026-02-14 18:30 UTC | Provider: anthropic

**Postmark**
β€’ Session: `def67890` | 2026-02-10 09:15 UTC | Provider: anthropic
```

Or if clean:

```
πŸ” **Credential Leak Check**
βœ… No leaked credentials found (checked 370 files, 7 credentials)
```

### Config Echoes

If the `leak-check.json` config file is read or discussed during an OpenClaw session, the credential patterns will appear in that session's JSONL log. The scanner detects this and reports these matches separately as **config echoes** rather than real leaks:

```
πŸ“‹ **3 possible config echoes** (session contains leak-check config)

β€’ **Discord**: 1 session
...

βœ… No credential leaks beyond config echoes
```

Config echoes will continue to appear on every run until the session file is removed. To clear them, delete the session file from `~/.openclaw/agents/main/sessions/`:

```bash
rm ~/.openclaw/agents/main/sessions/<session-uuid>.jsonl
```

**Tip:** Avoid reading or referencing `leak-check.json` during an OpenClaw session. If it happens, note the session ID from the report and delete it.

### JSON

```json
{
  "leaks": [
    {
      "credential": "Discord Token",
      "session": "abc12345",
      "timestamp": "2026-02-14T18:30:00.000Z",
      "provider": "anthropic"
    }
  ],
  "configEchoes": [
    {
      "credential": "Gateway",
      "session": "b175e53c",
      "timestamp": "2026-02-19T18:00:30.067Z",
      "provider": "minimax-portal",
      "configEcho": true
    }
  ],
  "summary": {
    "filesScanned": 370,
    "credentialsChecked": 7,
    "leaksFound": 2,
    "configEchoesFound": 1
  }
}
```

Files in this skill

  • SKILL.md3.6 KB
  • _meta.json628 B
  • scripts/leak-check.js12.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents β†’

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.