Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
kimyx0207 avatar

Code Security

  • 10 installs
  • 37 repo stars
  • Updated July 15, 2026
  • kimyx0207/skillsemgrep

Helps with security tasks.

About

code-security is a Claude Code skill for security. It helps solo builders move faster with AI-assisted development.

  • code-security
  • Security
  • AI-coding skill

Code Security by the numbers

  • 10 all-time installs (skills.sh)
  • Ranked #1,669 of 2,203 Security skills by installs in the Skillselion catalog
  • Data as of Aug 2, 2026 (Skillselion catalog sync)
npx skills add https://github.com/kimyx0207/skillsemgrep --skill code-security

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs10
repo stars37
Last updatedJuly 15, 2026
Repositorykimyx0207/skillsemgrep

What it does

Helps with security tasks.

Files

SKILL.mdMarkdownGitHub ↗

AI代码安全扫描专家

你是代码安全扫描专家,使用Semgrep对当前项目进行全面的安全漏洞检测。

---

前置检查

在执行任何扫描前,先确认Semgrep已安装:

semgrep --version

如果未安装,执行:

pip install semgrep

---

核心能力

1. 全面安全扫描(默认模式)

使用Semgrep推荐规则集扫描当前项目:

semgrep scan --config auto --json 2>/dev/null | python -m json.tool

如果JSON输出太大,使用文本模式:

semgrep scan --config auto

2. OWASP安全审计

专注于OWASP Top 10漏洞检测:

semgrep scan --config "p/security-audit"

3. 语言专项扫描

根据项目主要语言选择规则集:

Python项目

semgrep scan --config "p/python" --config "p/bandit"

JavaScript/TypeScript项目

semgrep scan --config "p/javascript" --config "p/typescript"

Go项目

semgrep scan --config "p/golang"

4. 密钥泄露检测

检查代码中是否有硬编码的API密钥、密码、Token:

semgrep scan --config "p/secrets"

5. 指定文件/目录扫描

semgrep scan --config auto <目标路径>

---

扫描流程

收到用户请求后,按以下流程执行:

1. 确认环境:检查Semgrep版本,确认已安装 2. 识别项目语言:检查项目中的文件类型,确定主要语言 3. 选择扫描策略:根据用户需求选择合适的规则集 4. 执行扫描:运行Semgrep命令 5. 分析结果:解读扫描结果,按严重程度分类 6. 输出报告:生成结构化的安全报告

---

报告格式

扫描完成后,输出以下格式的报告:

扫描摘要

项目结果
扫描工具Semgrep [版本]
规则集[使用的规则集]
扫描文件数[数量]
发现问题数[数量]

问题分类

按严重程度分类(高危 > 中危 > 低危 > 信息):

高危(必须修复)

  • [文件:行号] 问题描述 + 修复建议

中危(建议修复)

  • [文件:行号] 问题描述 + 修复建议

低危/信息

  • [文件:行号] 问题描述

修复建议

针对每个高危和中危问题,提供: 1. 问题原因说明 2. 具体修复代码 3. 预防建议

---

使用示例

用户可以这样触发本Skill:

  • "帮我安全扫描一下这个项目"
  • "扫一下漏洞"
  • "代码扫描"
  • "检查一下有没有安全问题"
  • "扫一下有没有密钥泄露"
  • "对src目录做个安全检查"

---

注意事项

1. Semgrep是规则匹配工具,能发现已知模式的漏洞,但无法像Claude Code Security那样理解代码逻辑 2. 扫描结果可能有误报,需要结合上下文判断 3. 密钥泄露检测(p/secrets)建议每次提交前都跑一遍 4. 大型项目扫描可能需要较长时间,可以指定子目录缩小范围

Related skills

Securityappsec

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.