360 Secure SkillHub
360 安全技能中心

Security Sentinel

这是OpenClaw工作区的统一安全扫描工具,核心功能包括依赖包漏洞审计、敏感信息识别、关键文件权限校验。支持CLI命令行(可带跳过审计、不触发错误码等参数)和编程调用两种方式,扫描后输出JSON报告,发现高/严重风险默认以错误码1退出,适用于日常安全巡检等场景。

autogame-17
autogame-17
热度 79.08
最近更新 2026-05-20 03:35:36
分类:安全依赖:代码执行 / 读写文件应用场景: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.