code-safety-audit

code-safety-audit is a skill for Claude Code, Codex from serejaris/kimi-skills. It costs 69 tokens per session (1,491 once invoked), scanned A, original, MIT.

A code security scanner that checks dependencies, exposed secrets, and common unsafe coding patterns. It covers known package vulnerabilities, leaked keys or passwords, and OWASP issues such as SQL injection and cross-site scripting.

In plain words
What is it for?
Use it to scan Node.js or Python projects, check dependencies, find hard-coded credentials, detect unsafe patterns, filter by severity, and save a JSON report.
Why use it?
It brings several common security checks into one scan and reports missing audit tools as a warning instead of failing outright.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to scan Node.js or Python projects, check dependencies, find hard-coded credentials, detect unsafe patterns, filter by severity, and save a JSON report.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/serejaris/kimi-skills/code-safety-audit
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add serejaris/kimi-skills --skill code-safety-audit
Clone the repo
git clone --depth 1 https://github.com/serejaris/kimi-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-safety-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/serejaris/kimi-skills/code-safety-audit/github.svg)](https://agentmods.dev/skills/serejaris/kimi-skills/code-safety-audit)
Your own site
<a href="https://agentmods.dev/skills/serejaris/kimi-skills/code-safety-audit"><img src="https://agentmods.dev/badge/skills/serejaris/kimi-skills/code-safety-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-safety-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/serejaris/kimi-skills/code-safety-audit"><img src="https://agentmods.dev/badge/skills/serejaris/kimi-skills/code-safety-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,491 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.01491
Opus 5 $0.00034 $0.00745
Sonnet 5 $0.00014 $0.00298
Haiku 4.5 $0.00007 $0.00149

Measured 10d ago against content hash c24d228c25f0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

code-safety-audit scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/security_scan.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

| A03: 注入 | SQL 注入、命令注入 (os.system/subprocess shell/eval/exec)、XSS (innerHTML/document.write/dangerouslySetInnerHTML/v-html) |
skills/code-safety-audit/SKILL.md · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

security-scanner

代码安全扫描工具,提供三大扫描能力:

  1. 依赖漏洞扫描 — 自动检测 npm / pip 依赖中的已知漏洞
  2. 密钥泄露检测 — 通过正则匹配 + Shannon 熵值分析发现硬编码的密钥、Token、密码
  3. OWASP 模式检测 — 识别 SQL 注入、XSS、命令注入、不安全反序列化等常见安全反模式

Quick Start

# 扫描当前目录(全部检查项)
python3 scripts/security_scan.py .

# 仅扫描依赖漏洞
python3 scripts/security_scan.py --mode deps .

# 仅检测密钥泄露
python3 scripts/security_scan.py --mode secrets /path/to/project

# 仅检测 OWASP 安全模式
python3 scripts/security_scan.py --mode owasp .

# 输出 JSON 格式报告
python3 scripts/security_scan.py --format json --output report.json .

# 只显示 high 及以上严重级别
python3 scripts/security_scan.py --severity high .

扫描模块详情

1. 依赖漏洞扫描 (deps)

自动检测项目类型并调用相应工具:

项目类型 检测文件 使用工具
Node.js package.json + package-lock.json npm audit
Python requirements.txt / pyproject.toml / Pipfile pip-audit

如果对应的审计工具未安装,会给出提示而不是报错。

2. 密钥泄露检测 (secrets)

通过两种方式检测:

正则匹配:覆盖常见的密钥格式

密钥类型 示例模式
AWS Access Key AKIA 开头的 20 字符
GitHub Token ghp_github_pat_ 开头
Slack Token xoxb-xoxp- 开头
Stripe Key sk_live_pk_live_ 开头
私钥文件 -----BEGIN PRIVATE KEY-----
通用 API Key api_key = "..." 格式
URL 内嵌凭据 https://user:pass@host
JWT Token eyJ... 格式

Shannon 熵值分析:对代码中的字符串常量计算信息熵(阈值 > 4.5 且长度 >= 20),用于发现非标准格式的密钥。

3. OWASP 模式检测 (owasp)

覆盖 OWASP Top 10 中可静态检测的安全模式:

OWASP 分类 检测模式
A02: 密码学失败 弱哈希 (MD5/SHA1)、弱加密 (DES/RC4)
A03: 注入 SQL 注入、命令注入 (os.system/subprocess shell/eval/exec)、XSS (innerHTML/document.write/dangerouslySetInnerHTML/v-html)
A04: 不安全设计 路径遍历
A05: 安全配置错误 Debug 模式开启、CORS 通配符、绑定 0.0.0.0
A08: 完整性失败 不安全反序列化 (pickle/yaml.load/marshal/unserialize)
A10: SSRF 用户输入直接用于 HTTP 请求

支持语言:Python、JavaScript/TypeScript、Java、PHP、Ruby、Go 等。

参数说明

参数 说明 默认值
TARGET 扫描目标目录 当前目录
--mode MODE 扫描模式:alldepssecretsowasp all
--format FORMAT 输出格式:textjson text
--output FILE 输出文件路径 stdout
--severity LEVEL 最低报告级别:lowmediumhighcritical low
--exclude-dir DIR 额外排除的目录(可重复使用) -
--max-file-kb SIZE 单文件最大扫描大小 (KB) 512
-h, --help 显示帮助 -

Read the full file on GitHub · 153 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 153 lines · 69 tokens per session scan A c24d228c25f0

Subscribe to this mod's changes

code-safety-audit is a skill published in the GitHub repository serejaris/kimi-skills (6 stars, last pushed 1mo ago), licensed MIT. It adds 69 tokens to every session and 1,491 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

offensive-wifi

Wireless / 802.11 attack methodology for red team engagements and wireless security assessments. Covers monitor-mode setup, WPA/WPA2-PSK handshake capture and PMKID attacks, WPA3 SAE downgrade and Dragonblood, WPA-Enterprise (EAP) attacks (MSCHAPv2 cracking, EAP-TLS cert theft, evil-twin RADIUS), Karma / Known Beacons…

SnailSploit/Claude-Red · 183 tokens

syndic

Gère un parc de copropriétés en France avec vue portfolio consolidée. Couvre administration, comptabilité (décret 2005, plan comptable copro, 5 annexes), assemblées générales (convocation, PV, notification), appels de fonds, travaux, fournisseurs, recouvrement d'impayés et transition de syndic. Maîtrise les majorités…

romainsimon/paperasse · 194 tokens

offensive-bluetooth-classic

Bluetooth Classic (BR/EDR) attack methodology — device discovery, service enumeration via SDP, LMP/L2CAP layer attacks, legacy PIN cracking (BlueBorne / KNOB), Bluetooth file-transfer abuse (BlueSnarfing legacy), unauthenticated profile abuse (HSP, HFP, OPP), and modern relevance against older industrial / automotive…

SnailSploit/Claude-Red · 123 tokens

agent-wiki

Incremental LLM-friendly wiki generator for Obsidian note vaults. Use when: (1) Building wiki from notes, (2) Ingesting notes to wiki, (3) Obsidian LLM wiki, (4) Incremental knowledge base management. Triggers: 'build wiki from notes', 'ingest notes to wiki', 'Obsidian LLM wiki', 'incremental knowledge base'.

Dianel555/DSkills · 89 tokens

design-md-validator

Validate DESIGN.md files against the official Google specification using the @google/design.md CLI linter. Works with local files. Use when the user wants to lint a DESIGN.md, check spec compliance, find broken token references, verify WCAG contrast ratios, diff two versions, export tokens to Tailwind or DTCG format…

fabricioctelles/skills · 170 tokens

agent-ready-oauth-protected-resource

Sub-skill de agent-ready-cloudflare: Implement OAuth Protected Resource Metadata.

fabricioctelles/skills · 23 tokens