简介
Code Security Checks
原始描述
Perform security reviews of code to detect secrets exposure, auth issues, injection risks, unsafe dependencies, and improper execution paths.
通过你的 Agent 添加
安装目录:security-check/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: security-check
description: Perform security reviews: secrets, auth, injection, dependencies, unsafe execution.
metadata:
author: RedHat Dev
version: 1.0.0
owner: RedHat Dev Agent
category: quality
SKILL: security-check
Purpose
Purpose
Perform a security-focused review of code changes or a subsystem: secrets exposure, auth issues, injection risks, unsafe dependencies, and unsafe execution paths.
When to Use
- Before deployment of a feature handling user input, money, or credentials.
- When introducing new dependencies or external integrations.
- After any authentication/authorization changes.
Inputs
scope (required, string): files/modules/diff to inspect.
threat_model (optional, string): assets at risk and attacker capabilities.
languages (optional, string[]): e.g., ["ts","py","solidity"]
constraints (optional, string[]): compliance rules or governance boundaries.
Steps
- Secrets & config:
- ensure no tokens/keys are committed
- ensure
.env.example does not contain real secrets
- Input handling:
- validate and sanitize untrusted inputs
- enforce schema validation at boundaries
- Auth/authz:
- verify authorization checks at every privileged action
- avoid insecure defaults
- Injection and unsafe execution:
- command injection
- SQL/NoSQL injection
- XSS/CSRF (frontend)
- dynamic code execution without validation
- Dependencies:
- flag risky packages
- ensure versions are pinned when required
- Observability:
- logs do not leak secrets/PII
- audit trail exists for sensitive actions
Validation
- Findings are evidence-based and include remediation.
- Risk severity is calibrated (critical/high/medium/low).
- Safety constraints are explicitly enforced (not “recommendedâ€).
Output
scope(required, string): files/modules/diff to inspect.threat_model(optional, string): assets at risk and attacker capabilities.languages(optional, string[]): e.g.,["ts","py","solidity"]constraints(optional, string[]): compliance rules or governance boundaries.
Steps
- Secrets & config:
- ensure no tokens/keys are committed
- ensure
.env.example does not contain real secrets
- Input handling:
- validate and sanitize untrusted inputs
- enforce schema validation at boundaries
- Auth/authz:
- verify authorization checks at every privileged action
- avoid insecure defaults
- Injection and unsafe execution:
- command injection
- SQL/NoSQL injection
- XSS/CSRF (frontend)
- dynamic code execution without validation
- Dependencies:
- flag risky packages
- ensure versions are pinned when required
- Observability:
- logs do not leak secrets/PII
- audit trail exists for sensitive actions
Validation
- Findings are evidence-based and include remediation.
- Risk severity is calibrated (critical/high/medium/low).
- Safety constraints are explicitly enforced (not “recommendedâ€).
Output
- ensure no tokens/keys are committed
- ensure
.env.exampledoes not contain real secrets
- validate and sanitize untrusted inputs
- enforce schema validation at boundaries
- verify authorization checks at every privileged action
- avoid insecure defaults
- command injection
- SQL/NoSQL injection
- XSS/CSRF (frontend)
- dynamic code execution without validation
- flag risky packages
- ensure versions are pinned when required
- logs do not leak secrets/PII
- audit trail exists for sensitive actions
- Findings are evidence-based and include remediation.
- Risk severity is calibrated (critical/high/medium/low).
- Safety constraints are explicitly enforced (not “recommendedâ€).
Output
Security report (example schema):
summary: "<top risks>"
findings:
- id: "SEC-001"
severity: "high|medium|low"
issue: "<what>"
location: ["..."]
remediation: "<how>"
Safety Rules
- Do not disclose secrets that appear in logs/config; redact.
- Do not recommend disabling security controls to “unblockâ€.
- Escalate when the change touches money movement or governance.
Example
Scope: “new webhook handler†Output: flags missing signature verification and recommends replay protection + audit logs.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。