360 Secure SkillHub
360 安全技能中心

Security Sentinel

面向 OpenClaw 工作区的安全扫描 Skill:用 npm audit 检查依赖已知漏洞,用正则匹配搜索 API 密钥、密码、私钥和飞书 App Secret 等敏感信息,并检查 package.json、.env 等关键文件是否全局可写,最后输出 JSON 报告并在发现高风险时以退出码 1 结束。

autogame-17
autogame-17
热度 79.12
最近更新 2026-05-20 03:35:36
分类:安全依赖:代码执行 / 读写文件 / 第三方 API应用场景:代码审查 / DevOps / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add security-sentinel
Metadata
name
security-sentinel
description
Scan the workspace for security vulnerabilities, exposed secrets, and misconfigurations.

Security Sentinel

A unified security scanner for OpenClaw workspaces. Detects vulnerabilities in dependencies (npm audit), exposed secrets (regex patterns), and unsafe file permissions.

Usage

CLI

Run a full security scan:

node skills/security-sentinel/index.js

This will output a JSON report to stdout. If risks are detected (high/critical vulnerabilities, secrets, or bad permissions), it exits with code 1.

Options

  • --skip-audit: Skip the npm audit step (faster)
  • --no-fail: Do not exit with code 1 even if risks are detected (useful for monitoring only)

Programmatic

const sentinel = require('./skills/security-sentinel');

const report = await sentinel.scan();

if (report.status === 'risk_detected') {
  console.error('Security issues found:', report);
}

Features

  1. Dependency Audit: Runs npm audit to check package.json dependencies for known CVEs.
  2. Secret Detection: Scans workspace files for patterns resembling API keys, passwords, and private keys.
  3. Permission Check: Verifies critical files (package.json, .env) are not world-writable.

Configuration

  • Ignored Paths: node_modules, .git, logs, temp, .openclaw/cache.
  • Secret Patterns: Generic API Key, Password, Private Key, Feishu App Secret.