Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

agent-security-opsAgent 安全操作

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

26,561

周安装

1,085

GitHub Stars

2

下载量

8,593
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:agent-security-ops(Agent 安全操作)
来源仓库:https://github.com/theagentwire/agent-security-ops
安装命令:
openclaw skills install agent-security-ops
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install agent-security-ops

简介

别再泄露秘密了。预提交钩子 + 10 点扫描 + cron 监控。一个命令即可实现代理操作安全性。作者:The Agent Wire (theagentwire.ai)

SKILL.md

name
agent-security-ops
description
Stop leaking secrets. Pre-commit hooks + 10-point scans + cron monitoring. Agent-ops security in one command. By The Agent Wire (theagentwire.ai)
homepage
https://theagentwire.ai
metadata
{ "openclaw": { "emoji": "🔒" } }

agent-security-ops

Security hardening for solopreneur repos. One command to set up pre-commit hooks, secret scanning, and continuous monitoring.

⚠️ Important: --no-verify Bypass Warning

The pre-commit hook can be bypassed with git commit --no-verify. This skips ALL hooks including secret scanning. Recommendations: 1. Never use --no-verify unless you've manually verified no secrets are staged 2. Set up CI-side scanning as backup — add TruffleHog to your GitHub Actions / CI pipeline so secrets are caught even if hooks are bypassed 3. Run scan.sh after any --no-verify commit to verify nothing slipped through The hook is fail-closed: if TruffleHog is not found, commits are blocked (not silently allowed).

Quick Start

bash skills/agent-security-ops/scripts/setup.sh /path/to/repo

This will:

  1. Install TruffleHog (pinned version with SHA256 checksum verification, override with TRUFFLEHOG_VERSION env var)
  2. Set up a fail-closed pre-commit hook that blocks secrets (scans staged changes)
  3. Harden .gitignore with common secret patterns (including .security-ops/, .terraform/)
  4. Run initial secret scan (git history + filesystem for untracked files)

What You'll See

setup.sh output:

agent-security-ops: Setting up /Users/you/my-project
✓ TruffleHog already installed (3.88.0)
✓ Pre-commit hook installed
→ Added 2 patterns to .gitignore: .security-ops/ .terraform/
→ Running initial secret scan...
✓ Initial scan: clean
→ Running filesystem scan (untracked files)...
✓ Filesystem scan: clean

Setup complete:
  • Installed pre-commit hook
  • Hardened .gitignore (+2 patterns)
  • Initial scan: clean
  💡 More agent-ops at theagentwire.ai/?utm_source=clawhub&utm_medium=skill&utm_campaign=agent-security-ops

scan.sh summary (stderr):

--- TruffleHog Secret Scan ---
✓ No secrets found

--- TruffleHog Filesystem Scan ---
✓ No secrets in untracked files

--- Pattern Grep Scan ---
⚠ Found 2 high-confidence secret pattern(s)
./config.js:3:  apiKey: "sk-proj-abc123..."
✓ No low-confidence patterns

--- Summary ---
⚠ Total: 2 (secrets=0[0 verified], fs=0, patterns=2[+0 low], ...)

Commands

All scripts support --help and --version flags.

setup.sh — One-time repo hardening

bash scripts/setup.sh [/path/to/repo]
bash scripts/setup.sh --fix-ssh /path/to/repo   # also fix SSH permissions

Idempotent. Safe to run multiple times. Defaults to current directory. Existing pre-commit hooks are preserved (appended to, not overwritten).

scan.sh — Full security scan

# JSON report to stdout, human summary to stderr
bash scripts/scan.sh [/path/to/repo]

# Save report
bash scripts/scan.sh /path/to/repo > report.json

Checks:

  • Secrets: TruffleHog — all secrets found (verified ones highlighted)
  • Filesystem: TruffleHog filesystem scan for untracked/working files
  • Pattern grep (high-confidence): AWS, GitHub, Anthropic, Slack, OpenAI, Stripe, Google, Twilio, SendGrid, npm, Vault, private keys
  • Pattern grep (low-confidence): Database URLs, password/secret assignments, bearer tokens, Firebase, Supabase, JWTs
  • .gitignore audit: Uses git check-ignore to verify patterns work
  • Dependency audit: npm audit / pip audit (results in JSON output)
  • File permissions: Finds world-readable .env, .pem, .key, credential files
  • Open ports: Lists listening ports, flags unexpected ones (note: may need sudo on macOS)
  • Environment secrets: Scans shell profiles for hardcoded keys/tokens
  • Loose .env files: Checks $HOME, Desktop, Downloads for .env files (warning only, not counted as repo findings)
  • Docker secrets: Checks Dockerfiles and compose files for hardcoded secrets
  • SSH audit: Verifies ~/.ssh permissions (report only — use setup.sh --fix-ssh to fix)
  • Git remotes: Flags insecure HTTP remotes, checks GitHub repo visibility

monitor.sh — Cron-friendly monitoring

bash scripts/monitor.sh [/path/to/repo]

Content-based delta detection (hashes scan results, not just counts). Exits 1 on any change, 0 if unchanged. Uses atomic file writes and flock-based locking to prevent concurrent runs.

Cron Integration

# Check every hour, alert on new findings
0 * * * * bash /path/to/skills/agent-security-ops/scripts/monitor.sh /path/to/repo || notify "Security scan changed"

Found Something?

FindingWhat to Do
Verified secret in gitRotate the credential immediately. Use git filter-repo or BFG to remove from history.
Unverified secret in gitInvestigate — may be a false positive or an expired credential. Still consider rotating.
Pattern match (high-confidence)Move to .env file or secret manager. Verify it's in .gitignore.
Pattern match (low-confidence)Review manually — may be a false positive. Check if it's a real credential.
Missing .gitignore patternRun setup.sh again — it adds missing patterns.
World-readable sensitive filechmod 600 <file> — restrict to owner only.
Unexpected open portIdentify the process (lsof -i :<port>), stop if unnecessary.
Env secret in shell profileMove to .env file or op run (1Password). Remove export line.
Docker hardcoded secretUse Docker secrets, env vars with ${VAR} syntax, or .env file.
SSH permission issueRun setup.sh --fix-ssh or manually chmod 700 ~/.ssh && chmod 600 ~/.ssh/id_*.
HTTP git remotegit remote set-url origin git@github.com:user/repo.git
Public repo detectedIf unintentional: gh repo edit --visibility private

Limitations

  • Grep ≠ AST analysis: Pattern matching catches literal strings, not obfuscated or dynamically constructed secrets.
  • No SAST/DAST: This is not a replacement for static/dynamic application security testing.
  • IaC limited to Docker: No Terraform, Kubernetes, or CloudFormation scanning beyond basic grep patterns on .tf/.tfvars.
  • TruffleHog verification: Verification depends on service availability — if an API is down, a real secret may show as "unverified." That's why we now scan all secrets, not just verified ones.
  • Port scanning: Only detects currently listening ports, not firewall rules or network exposure. May need sudo on macOS for full process info.
  • $HOME .env scan: Checks outside repo scope as a convenience — findings are warnings only, not counted as repo findings.

What It Scans

CategoryToolCoverage
Secrets in codeTruffleHogCurrent files + full git history (all, verified highlighted)
Filesystem secretsTruffleHogUntracked/working directory files
Secret patterns (high)grep20+ providers (AWS, GitHub, Anthropic, Slack, Stripe, etc.)
Secret patterns (low)grepDB URLs, passwords, bearer tokens, Firebase, Supabase, JWTs
.gitignoregit check-ignore.env*, *.pem, *.key, *.p12, *.pfx, credentials, keystores, .terraform/
Dependenciesnpm/pip auditKnown CVEs in packages
PermissionsfindWorld-readable sensitive files
Open Portslsof/ssUnexpected listening services
Env SecretsgrepHardcoded secrets in shell profiles, loose .env files (warning)
Docker SecretsgrepHardcoded secrets in Dockerfiles and compose files
SSH AuditstatPermission checks on ~/.ssh, keys, config
Git Remotesgit/ghInsecure HTTP remotes, public repo detection

Security Model

  • Binary verification: TruffleHog downloaded with SHA256 checksum verification against official release checksums
  • Fail-closed hook: Missing TruffleHog blocks commits (not silently passes)
  • No brew fallback: Only verified direct download to prevent supply chain attacks
  • Version pinning: TRUFFLEHOG_VERSION validated as semver before use
  • Self-exclusion: Scripts exclude themselves from grep scans via content marker

Reference Files

  • references/patterns.md — Regex patterns for all detected secret types, marked as ✅ scanned or 📖 reference only.

Dependencies

  • git, grep, find (standard)
  • trufflehog (installed by setup.sh, pinned version with checksum verification)
  • jq (optional — produces properly escaped JSON; without it, falls back to shell-based escaping which may break on unusual filenames/content)

Built by The Agent Wire — a weekly newsletter about AI agents for solopreneurs. Liked this skill? I write about building agent-ops tools like this every Wednesday. Star ⭐ this skill if it saved you from leaking a secret.


FAQ

What is this skill? Agent Security Ops installs pre-commit hooks and runs 10-point security scans to prevent AI agents from leaking secrets. Catches API keys, tokens, passwords, and credentials before they reach git history.

What problem does it solve? AI agents generate and handle credentials constantly — API keys, tokens, database URLs. Without guardrails, these end up in commits, logs, or chat messages. This skill adds automated scanning at commit-time and on-demand.

What are the requirements? Bash, git, and TruffleHog (installed automatically). Works on macOS and Linux. No API keys or external services needed.

What does the 10-point scan check? Git staged files, environment files (.env), config files, recent git history, high-entropy strings, known secret patterns, AWS/GCP/Azure credentials, private keys, database URLs, and API tokens.

Does it work with any AI agent framework? Yes. It's framework-agnostic — operates at the git and filesystem level. Works with OpenClaw, Claude Code, Cursor, Aider, or any tool that writes files.

Can it run on a schedule? Yes. Pair it with a cron job for periodic scans of your workspace. The scan outputs a structured report suitable for automated monitoring.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

83.66%
按下载量换算7,189

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills