secure-code-review

secure-code-review is a skill for Claude Code, Codex from liuxinye23/CyberStrikeAI. It costs 14 tokens per session (1,369 once invoked), scanned A, original, Apache-2.0.

A checklist and method for reviewing code for security weaknesses. It covers input checks, safe output, authentication, permissions, encryption, error handling, logging, and common vulnerability patterns.

In plain words
What is it for?
Use it for manual reviews, static-analysis checks, and examining code in languages such as Python, Java, and PHP.
Why use it?
It helps find issues such as SQL injection, cross-site scripting, unsafe commands, and weak access controls before they become security problems.

Skill for Claude CodeCodex

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

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.

agentmods
npx agentmods add skills/liuxinye23/cyberstrikeai/secure-code-review
Any agent
npx skills add liuxinye23/CyberStrikeAI --skill secure-code-review
Clone the repo
git clone --depth 1 https://github.com/liuxinye23/CyberStrikeAI

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 secure-code-review

README.md
[![agentmods](https://agentmods.dev/badge/skills/liuxinye23/cyberstrikeai/secure-code-review.svg)](https://agentmods.dev/skills/liuxinye23/cyberstrikeai/secure-code-review)
Your own site
<a href="https://agentmods.dev/skills/liuxinye23/cyberstrikeai/secure-code-review"><img src="https://agentmods.dev/badge/skills/liuxinye23/cyberstrikeai/secure-code-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,369 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
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.00014 $0.01369
Opus 5 $0.00007 $0.00685
Sonnet 5 $0.00003 $0.00274
Haiku 4.5 $0.00001 $0.00137

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

Security

Grade A, and why

secure-code-review 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 5d ago.

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.

os.system()
skills/secure-code-review/SKILL.md · 286 lines

How it starts

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

安全代码审查

概述

安全代码审查是识别代码中安全漏洞的重要方法。本技能提供安全代码审查的方法、工具和最佳实践。

审查范围

1. 输入验证

检查项目:

  • 用户输入验证
  • 参数验证
  • 数据过滤
  • 边界检查

2. 输出编码

检查项目:

  • XSS防护
  • 输出编码
  • 内容安全策略
  • 响应头设置

3. 认证授权

检查项目:

  • 认证机制
  • 会话管理
  • 权限控制
  • 密码处理

4. 加密和密钥

检查项目:

  • 数据加密
  • 密钥管理
  • 哈希算法
  • 随机数生成

审查方法

1. 静态分析

使用SAST工具:

# SonarQube
sonar-scanner

# Checkmarx
# 使用Web界面

# Fortify
sourceanalyzer -b project build.sh
sourceanalyzer -b project -scan

# Semgrep
semgrep --config=auto .

2. 手动审查

审查清单:

  • 输入验证
  • 输出编码
  • SQL注入
  • XSS漏洞
  • 认证授权
  • 加密使用
  • 错误处理
  • 日志记录

3. 代码模式识别

危险函数:

# Python危险函数
eval()
exec()
pickle.loads()
os.system()
subprocess.call()
// Java危险函数
Runtime.exec()
ProcessBuilder()
Class.forName()
// PHP危险函数
eval()
exec()
system()
passthru()

常见漏洞模式

SQL注入

危险代码:

String query = "SELECT * FROM users WHERE id = " + userId;
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(query);

安全代码:

String query = "SELECT * FROM users WHERE id = ?";
PreparedStatement stmt = connection.prepareStatement(query);
stmt.setInt(1, userId);
ResultSet rs = stmt.executeQuery();

XSS漏洞

危险代码:

document.innerHTML = userInput;
element.innerHTML = "<div>" + userInput + "</div>";

安全代码:

element.textContent = userInput;
element.setAttribute("data-value", userInput);
// 或使用编码库
element.innerHTML = escapeHtml(userInput);

命令注入

危险代码:

import os
os.system("ping " + user_input)

安全代码:

import subprocess
subprocess.run(["ping", "-c", "1", validated_input])

路径遍历

危险代码:

String filePath = "/uploads/" + fileName;
File file = new File(filePath);

安全代码:

String basePath = "/uploads/";
String fileName = Paths.get(fileName).getFileName().toString();
String filePath = basePath + fileName;
File file = new File(filePath);
if (!file.getCanonicalPath().startsWith(basePath)) {
    throw new SecurityException("Invalid path");
}

Read the full file on GitHub · 286 lines

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. 5d ago First seen · 286 lines · 14 tokens per session scan A 3d6ee9ac396d

Subscribe to this mod's changes

secure-code-review is a skill published in the GitHub repository liuxinye23/CyberStrikeAI (0 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 14 tokens to every session and 1,369 once invoked, about $0.0001 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens