openclaw-secret-scanning-maintainer skill
Triage, redact, clean up, and resolve OpenClaw GitHub Secret Scanning alerts in issues or PRs.
Is the openclaw-secret-scanning-maintainer skill safe?
Clean: nothing in its files matched our rules. We read 2 files in the folder on 2026-11-06.
No findings.
Install the openclaw-secret-scanning-maintainer skill
A skill is a folder. Copy it into your agent's skills folder and the agent loads it when the task matches its description.
git clone --depth 1 https://github.com/openclaw/openclaw.git /tmp/openclaw mkdir -p ~/.claude/skills cp -r /tmp/openclaw/.agents/skills/openclaw-secret-scanning-maintainer ~/.claude/skills/openclaw-secret-scanning-maintainer
In the Claude apps, zip the folder and upload it from the Skills settings. The folder on GitHub
The instructions your agent would load
SKILL.md as published, without the frontmatter. Read it on GitHub
OpenClaw Secret Scanning Maintainer
Maintainer-only. This skill requires repo admin / maintainer permissions to edit or delete other users' comments and resolve secret scanning alerts.
Use this skill when processing alerts from https://github.com/openclaw/openclaw/security/secret-scanning.
Language rule: All notification comments and replacement comments MUST be written in English.
Script
All mechanical operations (API calls, temp file management, security enforcements) are handled by:
$REPO_ROOT/.agents/skills/openclaw-secret-scanning-maintainer/scripts/secret-scanning.mjsThe script enforces:
- hide_secret=true on all alert fetches (no plaintext secrets in stdout)
- mktemp with random UUIDs for all temp files
- -F body=@file for all body uploads (no inline shell quoting)
- Notification templates branched by location type
- Never prints .secret or .body to stdout
Overall Flow
Supports single or multiple alerts. For multiple alerts, process in ascending order.
For each alert:
- Identify — fetch-alert + fetch-content to get metadata and body
- Decide — Agent reads the body file, identifies whether plaintext secrets remain, and produces a redacted version only when needed
- Redact — redact-body-if-needed for issue/PR body; skip for comments (delete directly)
- Purge — delete-comment + recreate-comment for comments; cannot purge body history
- Notify — notify posts the right template per location type, unless the current issue/PR body is already redacted
- Resolve — resolve closes the alert
- Summary — summary prints formatted results
Step 1: Identify
# List all open alerts
node secret-scanning.mjs list-open
# Fetch specific alert metadata + locations
node secret-scanning.mjs fetch-alert <NUMBER>
# Fetch content for each location (saves body to temp file)
node secret-scanning.mjs fetch-content '<location-json>'The fetch-content output includes:
- body_file: path to temp file with full body content
- author: who posted it
- issuenumber / prnumber: where it is
- edithistorycount: number of existing edits
- type: location type for routing
- For discussioncomment, it also includes commentnodeid, discussionnodeid, and replytonodeid when the original comment was a reply.
Location type routing
Step 2: Decide (Agent)
The agent reads the body file from fetch-content output and:
- Identifies ALL secrets in the content (there may be more than the alert flagged)
- Determines whether any plaintext credential remains in the current body
- Replaces each remaining secret with [REDACTED ] — no partial values, no prefix/suffix
- Saves the redacted content to a new temp file
This is the only step that requires semantic understanding. Everything else is mechanical.
For issuebody and pullrequestbody: if the current body has already been redacted by the author and no plaintext credential remains, do not post a public notification comment**. This avoids creating a fresh public pointer to historical sensitive content. Record that redaction separately and use Step 6 to decide whether the evidence supports resolving the alert.
Step 3: Redact
For comments (issue_comment / PR comments)
Do NOT redact. Skip directly to Step 4 (delete + recreate). PATCHing before DELETE creates an unnecessary edit history revision.
For issuebody / pullrequest_body
node secret-scanning.mjs redact-body-if-needed <issue|pr> <NUMBER> <current-body-file> <redacted-body-file> <result-file>Use the bodyfile from fetch-content as . The command writes notifyrequired to and only PATCHes the body when the redacted file differs from the current body.
Step 4: Purge Edit History
Comments — Delete and Recreate
For issue/PR comments:
# Delete original (all edit history gone)
node secret-scanning.mjs delete-comment <COMMENT_ID>
# Recreate with redacted content
node secret-scanning.mjs recreate-comment <ISSUE_NUMBER> <body-file>For discussion comments (uses GraphQL):
# Delete original
node secret-scanning.mjs delete-discussion-comment <COMMENT_NODE_ID>
# Recreate with redacted content
node secret-scanning.mjs recreate-discussion-comment <DISCUSSION_NODE_ID> <body-file> [REPLY_TO_NODE_ID]The fetch-content output for discussioncomment includes commentnodeid and discussionnodeid for these commands. When the original discussion comment was a reply, it also includes replytonodeid; pass that optional third argument so the redacted replacement stays in the original thread.
The recreated comment should follow this format:
> **Note:** The original comment by @<AUTHOR> has been removed due to secret leakage. Below is the redacted version of the original content.
---
<redacted original content>issuebody / pullrequest_body — Cannot Purge Edit History
Editing creates an edit history revision with the pre-edit plaintext. This cannot be cleared via API.
Do not advise authors publicly to delete/recreate issues or close/reopen PRs. That can draw attention to historical content. Keep purge guidance maintainer-only.
Output to maintainer terminal only (never in public comments):
⚠️ Issue/PR body edit history still contains plaintext secrets.
Contact GitHub Support to purge: https://support.github.com/contact
Request purge of issue/PR #{NUMBER} userContentEdits.CRITICAL: Do NOT mention edit history or the "edited" button in any public comment or resolution_comment.
Commits
Cannot clean. Notify author to delete branch or force-push (for unmerged PRs).
Step 5: Notify
node secret-scanning.mjs notify <TARGET> <AUTHOR> <LOCATION_TYPE> <SECRET_TYPES> [REPLY_TO_NODE_ID|BODY_REDACTION_RESULT_FILE]- For non-discussion types, is the issue/PR number.
- For discussioncomment, is the discussionnode_id returned by fetch-content.
- For reply-style discussioncomment locations, pass the optional replytonodeid from fetch-content so the notification stays in the same thread.
- For issuebody and pullrequestbody, pass the from redact-body-if-needed. The script skips notification when notifyrequired is false and refuses body notifications without this file.
Secret types are comma-separated: "Discord Bot Token,Feishu App Secret"
The script picks the right template:
- comment types: "your comment … removed and replaced"
- body types: "your issue/PR description … redacted in place"
- commit: "code you committed"
For issuebody and pullrequest_body, only notify when the current body still contained plaintext and maintainers redacted it. If the user already redacted the current body, skip notification and continue to Step 6.
Step 6: Resolve
node secret-scanning.mjs resolve <ALERT_NUMBER> <RESOLUTION> [COMMENT]Choose an explicit resolution supported by the evidence and the maintainer's authority:
- revoked: the credential owner or issuer has confirmed revocation.
- false_positive: the detection was confirmed to be a false positive.
- usedintests: the credential was confirmed to be used for testing.
- wont_fix: an authorized maintainer has accepted the risk and decided not to remediate; record that decision in the comment.
Redaction and a request to rotate credentials do not establish revocation. If no resolution is substantiated, leave the alert open and report the redaction and notification outcomes separately. The command has no default resolution and adds a resolution comment only when one is supplied.
Step 7: Summary
After processing, create a JSON results file and pass it to the summary command:
More skills from openclaw/openclaw
- A1passwordSet up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.
- Aacp-routerRoute plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.
- Aadd-model-providerAdd and live-prove a model provider with non-interactive config one-liners, without exposing credentials.
- Aagent-transcriptRequested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.
- Aapple-notesCreate, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.
- Aapple-remindersList, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.
- Aauto-qaRun OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.
- AautoreviewStructured code review through the shared OpenClaw agent-skills installation.
- Abear-notesCreate, search, and manage Bear notes via grizzly CLI.
- Ablock-kitUse proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.
- AblogwatcherMonitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
- AblucliBluOS CLI (blu) for discovery, playback, grouping, and volume.