-
Notifications
You must be signed in to change notification settings - Fork 0
Skill redlog pentest
You are running under a RedLog project. RedLog is a tamper-evident audit log for offensive security work. Two planes: hooks record (every Bash command is already captured passively via a PostToolUse hook — that's the logging), and MCP operates the app (assert identity, confirm scope, mark findings, anchor the chain). Your job through this skill is the control-plane part: use MCP for what the hooks can't do, and never re-log over MCP what a hook already captured.
Install once: copy this file to ~/.claude/skills/redlog-pentest.md (or .claude/skills/redlog-pentest.md inside a project).
Set these up in this order. The hook is what actually guarantees capture; the MCP server only adds the agent-initiated actions on top.
- RedLog is running (Electron app open, a project selected).
- PostToolUse hook installed (Settings ▸ Hooks ▸ Claude Code — one click). This is the priority. It passively logs every Bash command whether or not you remember to — the one thing an audit log cannot afford to miss.
-
MCP server registered (once, per host) — for operating the app. RedLog hosts MCP over HTTP, so it's live whenever the app is open. Set it up in Settings ▸ Team & Integrations ▸ MCP Server, then:
claude mcp add --transport http redlog http://127.0.0.1:6660/mcp --header "Authorization: Bearer <mcp-token>"
If the hook is missing, say so — capture is degraded and you must not rely on MCP to make up for it (you will miss commands). If only the MCP server is missing, hooks still capture everything; you just lose markers and scope checks. Either way, tell the operator once and continue rather than blocking work.
Rule of thumb for the whole session: if a hook can capture it, let the hook capture it — never log it again over MCP. Use MCP only for what no hook can do (identity, scope decisions, findings, loot scans, chain anchoring, and non-shell observations).
Call these in this order. If any of them errors, tell the operator and stop calling RedLog tools for the rest of the session — do NOT retry silently.
-
redlog_whoami— confirms which operator token you inherited. If the returnedoperator.nameis not who the human said they are, warn them: someone else's token is loaded. -
redlog_status— check IP safety (ip.ipSafety === "exposed"means VPN is off; ask before doing anything network-touching), event count baseline, and violation count. -
redlog_scope— memorizetargetsandexcludeTargets. If the list is empty, warn: "No scope configured. RedLog will not flag out-of-scope activity." Ask the operator to define scope before recon.
Print a one-line summary of these three to the user, e.g.
Operator: guan (primary) · VPN: safe · Scope:
*.example.com, 10.0.0.0/24· 1247 events, 0 violations.
The hook already logs it. Do not call redlog_log_event for shell commands you ran through Bash — that produces a duplicate.
Call redlog_mark with a clear title, one-paragraph notes, correct severity, and the target. Do this in real time, not at the end:
redlog_mark({
title: "Reflected XSS in /search?q=",
notes: "Payload: <svg onload=alert(1)>. WAF strips <script> but not <svg>. Persistent across sessions. Auth not required.",
severity: "high",
target: "www.example.com"
})
Severity guide (use these, don't hedge):
-
critical— RCE, ATO, full DB access -
high— auth bypass, stored XSS, IDOR on sensitive data -
medium— reflected XSS, open redirect, info disclosure -
low— misconfiguration, verbose errors, missing headers -
info— phase change, environment note, decision log
redlog_quickmark({ title: "Admin panel", url: "https://admin.example.com/login", note: "creds tried: guest:guest fail" })
Any time a tool dumps a config file, response body, JWT, or process env, run it through the detector first:
redlog_loot_scan({ text: "<paste raw output here>" })
Findings auto-become loot events on the timeline.
redlog_screenshot({})
Non-Bash actions (browser fills, GUI clicks, external tool output you paste in):
redlog_log_event({
agent_type: "agent",
data: { subtype: "manual_observation", note: "Admin UI accepts empty CSRF token" },
target: "admin.example.com"
})
If a command you're about to run touches something not in scope.targets (or hits excludeTargets): stop and ask. Do not just log a mark — you need explicit confirmation before running out-of-scope actions. Then log the exchange:
redlog_mark({
title: "Operator authorised probe of api-staging.example.com",
notes: "Not in original scope. Confirmed in-chat 2026-07-28.",
severity: "info",
target: "api-staging.example.com"
})
Before you sign off, in this order:
-
redlog_chain_status— confirm the chain length grew this session. -
redlog_chain_anchor_now— submit the current chain head to OpenTimestamps calendars right now, so anything from this session is timestamped in-session (don't rely only on the hourly loop). - Print the returned anchor status. If
status === "failed"or"partial", tell the operator to re-runredlog_chain_anchor_nowlater when network is better.
If someone else is taking over the session on their own machine:
- Open RedLog ▸ Settings ▸ General ▸ Operator Tokens ▸ Add operator — give the teammate their own token.
- Show the token once — copy it, don't screenshot it.
- Teammate puts it in
~/.redlog/api-tokenon their machine (overwrite existing) and re-launches whatever hooks they use. - From that moment on, every event they generate is attributed to their operator id — mixing you and them in the same timeline is exactly what audit logs are for.
Do not share the primary operator's token. It rotates every session anyway.
- Do not call
redlog_log_eventfor commands the Bash hook already logs — check the hook'ssubtype: claude_code_bashevents first. - Do not try to change
operator_idinsidedata— it's overridden server-side from your token. - Do not paste API tokens, session cookies, or SSH keys into
redlog_log_event.dataunredacted. Run throughredlog_loot_scanfirst; it will detect and store them separately with proper markers. - Do not anchor the chain more than once every few minutes — calendars are shared public infrastructure.
- Do not decide something is "out of scope, so we won't test it" without a marker. Log the decision so the client's report shows exactly what you refused and why.
- HTTP API + tool schemas: docs/agent-integration.md
- Operator token lifecycle: docs/operators.md
- Evidence chain + OTS verification: docs/audit-trail.md
Integration
Evidence
SSH / VPS
Extending
Privacy
Agent skill
Ops