Run and Demo obfsck Redaction Toolkit

VerifiedCaution

Build, run, test, and demo obfsck, a Rust secret/PII redaction toolkit with 5 binaries. Use demo.py to drive redact, scan, api, mcp, and analyzer.

Sby Skills Guide Bot
SecurityIntermediate
8/24/2026
Claude CodeCursorCodex
#secret-redaction#rust#mcp#cli#demo-runner

Recommended for

Automated summary

Operational runbook for building, running, and demoing obfsck, a Rust secret/PII redaction toolkit, and driving its five binaries.

Strengths

  • Covers all five binaries (redact, scan, analyzer, api, obfsck-mcp) with the verified expected output for each mode.
  • A single driver, `demo/demo.py --bin all`, exercises every binary in one command and leaves no artifacts on disk.
  • Records the real gotchas: `required-features = ["analyzer"]`, exit codes (1 for a scan hit, 2 for the clap usage error), no `--version` flag, and the binary named `obfsck-mcp` rather than `mcp`.
  • Also supplies direct one-liners when the driver is overkill (redact over stdin, JSON-RPC over stdio).

Limitations

  • Repo-specific: every path is relative to the obfsck root, so the skill is unusable outside that codebase.
  • Assumes a Rust toolchain and `uv` already on PATH, with the Rust version pinned by mise.
  • The provided file cuts off mid-sentence in the "human path" section, and despite the description mentioning screenshots the demo deliberately writes nothing to disk.
When to use it

Use it when you are inside the obfsck repo and need to build it, verify a specific binary, or demo redaction, diff scanning, the REST API, or the MCP server.

When not to use it

Avoid it when you need to redact secrets in some other project, or when the obfsck repo and the Rust/uv tooling are not available.

Security analysis

Caution
Quality score85/100

The skill is a legitimate developer/demo guide for a redaction toolkit. It uses powerful tools (bash, cargo build, uv-run Python, a local HTTP server, gitleaks subprocess) but all for benign local build/test/demo purposes on loopback. There is no curl|sh, no exfiltration of secrets/tokens, no obfuscated payloads, and no instruction to disable safety. Rated caution only because it compiles and executes repo code and binds a local port.

Findings
  • •Directs execution of code from the repo: `cargo build --release` and `uv run demo/demo.py` compile and run Rust/Python, so auditing a skill that auto-runs repo code warrants care.
  • •Spawns the external `gitleaks` CLI and pipes a synthetic diff to it (noted as a potential hang vector with `subprocess.run` timeouts).
  • •Starts a local network server (`api` bound to 127.0.0.1:5000 / a free port) and speaks JSON-RPC over stdio — network/process surface, though local-only and legitimate.
  • •Fixtures embed secret-like values (AWS canonical example key, synthetic Slack token) — low risk since they are public/dummy examples, but the pattern of handling secret-shaped literals deserves note.
  • •File appears truncated mid-gotcha ('- **`redac'), so full risk cannot be fully confirmed from the visible text.
How this analysis is made

Examples

Build all five binaries
Build obfsck in release mode with the analyzer feature and confirm that redact, scan, analyzer, api, and obfsck-mcp all ended up in target/release.
Tour every binary
Run the obfsck demo driver for all binaries and walk me through what each mode prints.
Scan a diff for secrets
Use obfsck's scan binary with --no-gitleaks on this git diff, show me the findings, and tell me the exit code.

name: run-obfsck description: Build, run, test, and demo obfsck — a secret/PII redaction toolkit with 5 binaries (redact, scan, analyzer, api, obfsck-mcp). Use when asked to run obfsck, build it, test it, demo it, screenshot its output, or drive any of its binaries (redact secrets, scan a diff, start the REST API, query the MCP server, or run the alert analyzer).

obfsck is a Rust workspace that builds 5 binaries around one redaction engine. Drive it via demo/demo.py --bin <name> (a uv-run Python/rich script) — that is the primary agent path below; it exercises every binary programmatically and is what this skill was verified against.

All paths below are relative to the repo root (obfsck/).

Prerequisites

Rust toolchain and uv are expected to already be on PATH (this repo is mise-managed — mise.toml pins the Rust version). Nothing else to install; uv run demo/demo.py auto-installs its own deps (rich, pyyaml) from the PEP 723 header at the top of the file.

cargo --version   # verified: works out of the box in this container
uv --version      # verified: uv 0.10.9

Build

cargo build --release --features analyzer

Builds all 5 binaries to target/release/: redact, scan, analyzer, api, obfsck-mcp. analyzer is obfsck's own default feature (see Cargo.toml), so --features analyzer is technically redundant but keep it explicit — the 4 server/analyzer binaries have required-features = ["analyzer"] and silently don't build without it.

Run (agent path)

uv run demo/demo.py --bin all       # tours every binary in one run
uv run demo/demo.py --bin redact    # original showcase — obfuscation levels
uv run demo/demo.py --bin scan      # unified-diff secret scanner
uv run demo/demo.py --bin mcp       # JSON-RPC stdio MCP server
uv run demo/demo.py --bin analyzer  # LLM alert-analysis CLI
uv run demo/demo.py --bin api       # axum REST server

Each mode is self-contained and prints rich-formatted panels to stdout — no artifacts land on disk, this is a terminal demo, not a screenshot tool. Verified output for each mode:

| --bin | What it does | Verified result | |---|---|---| | redact (default) | Pipes each demo/examples/*.yaml fixture through redact at 3 levels | Renders a before/after table per fixture; [REDACTED-*] tokens highlighted | | scan | Feeds a synthetic git diff with a Slack bot token through scan --no-gitleaks | scan: 2 finding(s) detected (exit 1) — pattern hit + structural hit on the same line | | mcp | Sends tools/list then tools/call (audit) over stdio JSON-RPC to obfsck-mcp | tools/list returns the audit/generate-filters schema; audit returns {"hits":[{"count":1,"label":"SLACK-BOT"}]} | | analyzer | Runs analyzer --dry-run --loki-url http://127.0.0.1:1 (deliberately unreachable) | Exit 1, prints the miette fancy diagnostic chain (obfsck::analyzer::http → client error (Connect) → Connection refused) | | api | Starts api on a free port, GET /health and GET /, tears it down | {"status":"healthy","service":"alert-analysis-api"} (200), then the index HTML page |

Redact in file mode (bypasses the fixture showcase):

uv run demo/demo.py --bin redact demo/examples/00_levels.yaml --level minimal

Direct invocation without the driver, if you just need one binary:

echo 'AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE' | target/release/redact --level minimal
# → AWS_ACCESS_KEY_ID=[REDACTED-AWS-KEY]

target/release/redact --level minimal  # exit 2, clap usage error — no --version flag exists

obfsck-mcp (note: crate/bin name is obfsck-mcp, not mcp) speaks line-delimited JSON-RPC on stdin/stdout:

echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | target/release/obfsck-mcp

Run (human path)

target/release/api --host 127.0.0.1 --port 5000   # Ctrl-C to stop
# → binds and logs "Alert Analysis API starting"; GET /health works with
#   no backend configured, GET /api/analyze needs a real Loki/VictoriaLogs
#   + LLM provider config to do anything useful.

Test

cargo test --workspace --features analyzer
# or: just test

Verified: 26 test binaries, all pass (203 individual tests across unit + integration + property + golden suites). 5 tests are ignored by design (network tests, gated behind explicit opt-in).


Gotchas

  • scan --no-gitleaks is required in any scripted/driver context. Without it, scan spawns the real gitleaks CLI and pipes the diff to its stdin on a background thread while reading stdout/stderr on the main thread — if gitleaks is on PATH this can hang past any reasonable subprocess timeout (hit a 10s TimeoutExpired in subprocess.run before adding the flag). The driver always passes --no-gitleaks.
  • The repo's own .obfsck.toml allowlist can silently neuter your own demo fixtures. .obfsck.toml allowlists AKIAIOSFODNN7EXAMPLE (AWS's canonical example key) so the pre-commit hook doesn't flag it in demo/examples/. That allowlist is loaded by every scan invocation from this repo, including the demo driver — a scan demo fixture using that exact key silently reports "clean" (exit 0) instead of finding it. Check .obfsck.toml and ~/.config/obfsck/allowlist before picking a fixture value, or the demo will quietly stop demonstrating anything.
  • A fixture secret literal in demo.py's own source trips the pre-commit scan-diff hook on this repo — the hook scans the staged diff of every commit, including edits to the demo file itself. SAMPLE_DIFF's Slack token is built via "-".join([...]) instead of one contiguous string literal so the source bytes don't match the pattern, while the assembled value (used at runtime, piped into scan) still does. If you add a new fixture secret to demo.py, split it the same way or the commit will fail its own pre-commit hook.
  • redact has no --version flag. target/release/redact --version exits 2 with a clap "unrecognized argument" error, not a version string.
  • api/analyzer construct their backend clients at startup without a network call — AlertAnalyzer::from_config just builds reqwest clients, it doesn't ping Loki/the LLM provider. So api starts and answers /health fine even with an unreachable LOKI_URL; the error only surfaces on /api/analyze or when analyzer actually calls fetch_alerts. That's what the analyzer --dry-run demo exploits to show the miette error path deterministically and fast (127.0.0.1:1 refuses instantly, no DNS/timeout wait).

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/run-and-demo-obfsck-redaction-toolkit-mt6repmm/download' --output '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm/SKILL.md.part' && mv '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm/SKILL.md.part' '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Original excerpt: Prerequisites

Rust toolchain and uv are expected to already be on PATH (this repo is mise-managed — mise.toml pins the Rust version). Nothing else to install; uv run demo/demo.py auto-installs its own deps (rich, pyyaml) from the PEP 723 header at the top of the file.

cargo --version   # verified: works out of the box in this container
uv --version      # verified: uv 0.10.9

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm/SKILL.md' && test -s '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/run-obfsck' && cp -R '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm' '.claude/skills/run-obfsck'

Cursor
test -f '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm/SKILL.md' && test -s '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/run-obfsck' && cp -R '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm' '.cursor/skills/run-obfsck'

Codex
test -f '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm/SKILL.md' && test -s '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/run-obfsck' && cp -R '.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm' '.agents/skills/run-obfsck'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm'

openskills read 'run-and-demo-obfsck-redaction-toolkit-mt6repmm'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/run-and-demo-obfsck-redaction-toolkit-mt6repmm/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills