Skip to content
Agentmart
Submit a tool

dev-vulnerability-patterns

程式碼漏洞模式資料庫。提供 Python/JS/Java/Go 語言特定的漏洞程式碼模式、CWE 分類、安全替代方案與嚴重度評估標準。適用於「漏洞模式」、「CWE」、「SQL Injection」、「XSS」、「安全漏洞」、「安全編碼」、「漏洞程式碼」等安全性審查任務。強化 security-analyst…

Skill by vincent119

IndexedApache-2.0
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/vincent119-dev-vulnerability-patterns

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

程式碼漏洞模式資料庫。提供 Python/JS/Java/Go 語言特定的漏洞程式碼模式、CWE 分類、安全替代方案與嚴重度評估標準。適用於「漏洞模式」、「CWE」、「SQL Injection」、「XSS」、「安全漏洞」、「安全編碼」、「漏洞程式碼」等安全性審查任務。強化 security-analyst 的分析能力。注意:滲透測試執行與 WAF 設定不在此技能範圍內。

Use cases: backend, security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/dev-vulnerability-patterns

What's inside

Skill name
dev-vulnerability-patterns
Description
程式碼漏洞模式資料庫。提供 Python/JS/Java/Go 語言特定的漏洞程式碼模式、CWE 分類、安全替代方案與嚴重度評估標準。適用於「漏洞模式」、「CWE」、「SQL Injection」、「XSS」、「安全漏洞」、「安全編碼」、「漏洞程式碼」等安全性審查任務。強化 security-analyst 的分析能力。注意:滲透測試執行與 WAF 設定不在此技能範圍內。
License
Apache-2.0
Instructions
257 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Vulnerability Patterns — 程式碼漏洞模式資料庫

security-analyst 在安全性審查時使用的漏洞程式碼模式、CWE 分類與安全替代方案參考。

## 此技能的功能

- 提供 CWE Top 25 漏洞分類與優先偵測目標
- 提供 Python、JavaScript/TypeScript、Java、Go 的語言特定漏洞模式
- 每個漏洞附上安全替代方案
- 提供 CVSS v3.1 嚴重度評估標準

## 適用時機

- 執行安全性程式碼審查
- 識別特定語言的漏洞模式
- 搭配 `dev-code-reviewer` 技能使用

## 觸發範例

- 「這段 Python 程式碼有 SQL Injection 風險嗎?」
- 「檢查這個 Go 程式碼的 Path Traversal 漏洞」
- 「列出這段程式碼的 CWE 分類」
- 「這個 API 有沒有認證缺陷?」

---

## 漏洞分類系統(CWE Top 25)

### 優先偵測目標

| CWE | 名稱 | 嚴重度 | 頻率 |
|-----|------|--------|------|
| CWE-89 | SQL Injection | Critical | 高 |
| CWE-78 | OS Command Injection | Critical | 中 |
| CWE-798 | Hardcoded Credentials | Critical | 高 |
| CWE-862 | Missing Authorization | Critical | 高 |
| CWE-306 | Missing Authentication | Critical | 中 |
| CWE-502 | Insecure Deserialization | Critical | 中 |
| CWE-79 | XSS (Cross-Site Scripting) | High | 極高 |
| CWE-22 | Path Traversal | High | 中 |
| CWE-352 | CSRF | High | 高 |
| CWE-918 | SSRF | High | 中 |

---

## 語言特定漏洞模式

### Python

#### SQL Injection(CWE-89)
```python
# 漏洞
query = f"SELECT * FROM users WHERE name = '{user_input}'"
cursor.execute(query)

# 安全
cursor.execute("SELECT * FROM users WHERE name = %s", (user_input,))
# 或使用 ORM(SQLAlchemy、Django ORM)
```

#### Command Injection(CWE-78)
```python
# 漏洞
os.system(f"ping {user_input}")
subprocess.call(f"ls {user_input}", shell=True)

# 安全
subprocess.run(["ping", user_input], shell=False)
```

#### Path Traversal(CWE-22)
```python
# 漏洞
file_path = os.path.join(BASE_DIR, user_input)
open(file_path).read()

# 安全
file_path = os.path.realpath(os.path.join(BASE_DIR, user_input))
if not file_path.startswith(os.path.realpath(BASE_DIR)):
    raise ValueError("Invalid path")
```

#### YAML Deserialization(CWE-502)
```python
# 漏洞
data = yaml.load(user_input)  # 可能執行任意程式碼

# 安全
data = yaml.safe_load(user_input)
```

---

### JavaScript / TypeScript

#### XSS(CWE-79)
```javascript
// 漏洞(React)
<div dangerouslySetInnerHTML={{ __html: userInput }} />

// 安全
<div>{userInput}</div>  // React 自動跳脫
// 必要時使用 DOMPurify
import DOMPurify from 'dompurify';
<div dangerouslySetInnerHTML={{ __html: DOMPurify.sanitize(userInput) }} />
```

#### Prototype Pollution(CWE-1321)
```javascript
// 漏洞
function merge(target, source) {
  for (let key in source) {
    target[key] = source[key];  // __proto__ 污染
  }
}

// 安全
function merge(target, source) {
  for (let key of Object.keys(source)) {

From vincent119/ai-rules-kit, Apache-2.0.

More from vincent119/ai-rules-kit

Signals

Stars
0
Forks
0
Open issues
0
Last commit (this folder)
Sep 8, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from vincent119

Cite this page

dev-vulnerability-patterns skill. Agent Mart. https://agentmart.dev/skills/vincent119-dev-vulnerability-patterns (last updated 2026-10-24)