Skip to content

Commit b54d72d

Browse files
Add 53 Java CWE Security Skills for AI agents
Deterministic remediation skills for Java/Spring Boot security vulnerabilities. Compatible with skills.sh, Claude Code, Cursor, and other AI assistants. Categories: Injection, Auth, Crypto, Data Protection, File Handling, Concurrency
1 parent 8bfd3e7 commit b54d72d

55 files changed

Lines changed: 9776 additions & 166 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 33 additions & 166 deletions
Original file line numberDiff line numberDiff line change
@@ -1,190 +1,57 @@
1-
# Java CWE Security Skills 🔐
1+
# Java CWE Security Skills
22

3-
**java-cwe-security-skills** is an open-source library of **deterministic security remediation skills for Java applications**, mapped directly to the **MITRE Common Weakness Enumeration (CWE)** framework.
3+
[![skills.sh](https://img.shields.io/badge/skills.sh-indexed-blue)](https://skills.sh)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
45

5-
The repository provides structured **`SKILL.md` definitions** that enable AI coding assistants and security agents to **detect, analyze, and fix vulnerabilities automatically** in Java codebases.
6+
> **53 deterministic AI-agent remediation skills for Java security vulnerabilities**
67
7-
These skills are designed for integration with modern **AI developer platforms**, including:
8+
## 🎯 Purpose
89

9-
* **Augment Code**
10-
* **skills.sh**
11-
* **Claude Code**
12-
* **Cursor AI**
13-
* **LobeHub Skills Marketplace**
14-
* **DevSecOps automation pipelines**
10+
This repository provides **structured remediation skills** that teach AI coding assistants exactly how to fix security vulnerabilities with real code transformations.
1511

16-
---
17-
18-
# Why This Project Exists
19-
20-
Modern development teams rely heavily on **SAST tools** such as:
21-
22-
* Checkmarx
23-
* SonarQube
24-
* Snyk
25-
* CodeQL
26-
* OWASP Dependency Check
12+
## 🔧 Compatible With
2713

28-
While these tools identify vulnerabilities, they often lack **deterministic remediation patterns**.
14+
- [skills.sh](https://skills.sh) marketplace
15+
- Claude Code
16+
- Cursor
17+
- LobeHub
18+
- Other AI coding assistants
2919

30-
This repository bridges that gap by providing **AI-readable remediation skills** that allow coding agents to:
20+
## 📋 Skills
3121

32-
1. Detect vulnerable code patterns
33-
2. Map them to **specific CWE weaknesses**
34-
3. Apply **secure code transformations**
35-
4. Verify the fix through deterministic rules
22+
See [index.md](index.md) for the complete list of skills.
3623

37-
This enables **AI-assisted vulnerability remediation** directly inside development workflows.
24+
## 🚀 Quick Start
3825

39-
---
40-
41-
# Features
26+
Reference a skill when asking AI to fix vulnerabilities:
4227

43-
✔ Deterministic remediation for **Java security vulnerabilities**
44-
✔ Coverage for **100+ Java-relevant CWE weaknesses**
45-
✔ Designed for **AI coding assistants and security agents**
46-
✔ Compatible with **Augment Code skill workflows**
47-
✔ Supports **automated vulnerability fixing in repositories**
48-
✔ Based on **MITRE CWE, OWASP, CodeQL, and secure coding best practices**
49-
50-
---
28+
```
29+
Fix the SQL Injection vulnerability using the cwe-89-sql-injection skill
30+
```
5131

52-
# Repository Structure
32+
## 📦 Repository Structure
5333

54-
```id="7x4ihr"
55-
java-cwe-security-skills
56-
57-
├── cwe-79-xss
58-
│ └── SKILL.md
59-
60-
├── cwe-89-sql-injection
61-
│ └── SKILL.md
62-
63-
├── cwe-611-xxe
34+
```
35+
├── cwe-89-sql-injection/
6436
│ └── SKILL.md
65-
66-
├── cwe-918-ssrf
37+
├── cwe-79-xss/
6738
│ └── SKILL.md
68-
69-
├── cwe-502-insecure-deserialization
39+
├── cwe-611-xxe/
7040
│ └── SKILL.md
71-
72-
└── ...
41+
└── index.md
7342
```
7443

75-
Each folder represents a **single vulnerability remediation skill**.
76-
77-
---
78-
79-
# Example Skill
80-
81-
Example: **CWE-89 SQL Injection**
44+
## 🤝 Contributing
8245

83-
The skill defines:
46+
Pull requests welcome! Add new skills following the existing format.
8447

85-
* vulnerable Java patterns
86-
* deterministic remediation logic
87-
* secure implementation examples
88-
* verification rules
48+
## 📚 Sources
8949

90-
AI coding assistants can automatically transform vulnerable SQL queries into **secure prepared statements**.
50+
- MITRE CWE Database
51+
- OWASP Cheat Sheets
52+
- GitHub CodeQL queries
53+
- VulnerableApp dataset
9154

9255
---
9356

94-
# Supported Vulnerability Categories
95-
96-
The library includes remediation skills for major vulnerability classes.
97-
98-
### Injection
99-
100-
* SQL Injection (CWE-89)
101-
* LDAP Injection (CWE-90)
102-
* XPath Injection (CWE-643)
103-
* Expression Language Injection (CWE-917)
104-
105-
### Web Security
106-
107-
* Cross-Site Scripting (CWE-79)
108-
* HTTP Response Splitting (CWE-113)
109-
* Clickjacking / Missing Security Headers (CWE-693)
110-
111-
### Cryptography
112-
113-
* Weak Cryptography (CWE-327)
114-
* Hardcoded Cryptographic Keys (CWE-321)
115-
* Missing Random IV (CWE-329)
116-
117-
### Data Exposure
118-
119-
* Information Exposure (CWE-200)
120-
* Sensitive Data in Logs (CWE-532)
121-
* Privacy Violations (CWE-359)
122-
123-
### Deserialization
124-
125-
* Insecure Deserialization (CWE-502)
126-
127-
### Resource Management
128-
129-
* Resource Exhaustion (CWE-400)
130-
* Uncontrolled Memory Allocation (CWE-789)
131-
132-
### Input Validation
133-
134-
* Path Traversal (CWE-22)
135-
* Regex Denial of Service (CWE-1333)
136-
* Unchecked Loop Condition (CWE-606)
137-
138-
---
139-
140-
# Using These Skills with Augment Code
141-
142-
Augment Code can use these skills to perform **AI-assisted vulnerability remediation** during development.
143-
144-
Typical workflow:
145-
146-
1. Augment scans the repository for vulnerable patterns
147-
2. The vulnerability is mapped to a **CWE skill**
148-
3. The skill provides **deterministic remediation steps**
149-
4. Augment generates a **secure code transformation**
150-
151-
Example prompt inside Augment:
152-
153-
```
154-
Fix SQL injection vulnerabilities in this Java service.
155-
```
156-
157-
The agent loads the **CWE-89 skill** and applies the secure remediation.
158-
159-
---
160-
161-
# Sources
162-
163-
Security knowledge in this repository is derived from:
164-
165-
* MITRE CWE Database
166-
* OWASP Security Cheat Sheets
167-
* GitHub CodeQL Security Queries
168-
* Snyk Vulnerability Database
169-
* OWASP VulnerableApp
170-
171-
---
172-
173-
# Contributing
174-
175-
Contributions are welcome.
176-
177-
You can contribute by:
178-
179-
* adding new CWE skills
180-
* improving remediation patterns
181-
* adding secure code examples
182-
* expanding coverage for Java frameworks
183-
184-
---
185-
186-
# Vision
187-
188-
The goal of this project is to create the **largest open-source library of AI security remediation skills for Java**.
189-
190-
By combining **CWE knowledge + deterministic remediation patterns**, AI agents can evolve from **vulnerability detection → automatic secure code remediation**.
57+
**Generated**: 2026-03-07

0 commit comments

Comments
 (0)