Code Security logo

Code Security

Community
KimYx0207
code-security

Runs Semgrep security scans on the current project to detect vulnerabilities, secrets leakage, and OWASP Top 10 issues. Use when the user asks for security scanning, vulnerability detection, code auditing, secrets checking, or says things like 安全扫描, 代码扫描, 扫漏洞, 安全检查, 漏洞检测, 扫一下安全.

Overview

PublisherKimYx0207
RepositorySkillSemgrep
Skill namecode-security
Stars
37
Forks
11
Bundled files
6
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 6 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by KimYx0207 on GitHub. Read the source before you install it.

Installation

Install the Code Security AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/KimYx0207/SkillSemgrep/tree/main
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/KimYx0207/SkillSemgrep.git \
  .claude/skills/code-security
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Code Security in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Code Security on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Code Security is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

AI代码安全扫描专家

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


前置检查

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

bash
semgrep --version

如果未安装,执行:

bash
pip install semgrep

核心能力

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

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

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

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

bash
semgrep scan --config auto

2. OWASP安全审计

专注于OWASP Top 10漏洞检测:

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

3. 语言专项扫描

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

Python项目:

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

JavaScript/TypeScript项目:

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

Go项目:

bash
semgrep scan --config "p/golang"

4. 密钥泄露检测

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

bash
semgrep scan --config "p/secrets"

5. 指定文件/目录扫描

bash
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. 大型项目扫描可能需要较长时间,可以指定子目录缩小范围

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Code Security AI skill do?

Runs Semgrep security scans on the current project to detect vulnerabilities, secrets leakage, and OWASP Top 10 issues. Use when the user asks for security scanning, vulnerability detection, code auditing, secrets checking, or says things like 安全扫描, 代码扫描, 扫漏洞, 安全检查, 漏洞检测, 扫一下安全.

Why use Code Security on TypingMind?

Because you install it once and use it with any model. Code Security is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Code Security in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/KimYx0207/SkillSemgrep/tree/main. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Code Security?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Code Security?

As many as you like. As long as a model supports skills, you can use Code Security with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Code Security AI skill free?

Yes. It is published on GitHub by KimYx0207 under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇