static-vulnerability-detector
/static-vulnerability-detector
Statically analyze code to detect security vulnerabilities including buffer overflows, injection risks (SQL, command, XSS), insecure deserialization, improper authentication, hard-coded credentials, and unsafe cryptography. Use when: (1) Performing security code review, (2) Analyzing code for OWASP Top 10 vulnerabilities, (3) Identifying CWE-classified weaknesses, (4) Generating security audit reports, (5) Reviewing code before deployment, or (6) Assessing third-party code security. Findings categorized by CWE ID and severity (Critical/High/Medium/Low).
- Author
- ArabelaTso ↗
- Repository
- Skills-4-SE ↗
- Licence
- Apache-2.0
- Last repository change
- 21.08.2026
Assessment and security
- Files in this package
- 3
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 21.08.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Statically analyze code to detect security vulnerabilities including buffer overflows, injection risks (SQL, command, XSS), insecure deserialization, improper authentication, hard-coded credentials, and unsafe cryptography. Use when: (1) Performing security code review, (2) Analyzing code for OWASP Top 10 vulnerabilities, (3) Identifying CWE-classified weaknesses, (4) Generating security audit reports, (5) Reviewing code before deployment, or (6) Assessing third-party code security. Findings categorized by CWE ID and severity (Critical/High/Medium/Low).
Original author description
Statically analyze code to detect security vulnerabilities including buffer overflows, injection risks (SQL, command, XSS), insecure deserialization, improper authentication, hard-coded credentials, and unsafe cryptography. Use when: (1) Performing security code review, (2) Analyzing code for OWASP Top 10 vulnerabilities, (3) Identifying CWE-classified weaknesses, (4) Generating security audit reports, (5) Reviewing code before deployment, or (6) Assessing third-party code security. Findings categorized by CWE ID and severity (Critical/High/Medium/Low).
How it works
- Analysis Workflow
- Vulnerability Categories
- Detection Heuristics
- CWE Reference
- Report Format
- Examples
- Analysis Tips
SKILL.md preview
---
name: static-vulnerability-detector
description: "Statically analyze code to detect security vulnerabilities including buffer overflows, injection risks (SQL, command, XSS), insecure deserialization, improper authentication, hard-coded credentials, and unsafe cryptography. Use when: (1) Performing security code review, (2) Analyzing code for OWASP Top 10 vulnerabilities, (3) Identifying CWE-classified weaknesses, (4) Generating security audit reports, (5) Reviewing code before deployment, or (6) Assessing third-party code security. Findings categorized by CWE ID and severity (Critical/High/Medium/Low)."
---
# Static Vulnerability Detector
Analyze code for security vulnerabilities with CWE classification and severity assessment.
## Analysis Workflow
### 1. Code Scanning
Systematically examine code for vulnerability patterns:
**Memory Safety** (C/C++):
- Buffer overflows (CWE-119)
- Out-of-bounds access (CWE-125)
- Use-after-free (CWE-416)
- Double free (CWE-415)
- Null pointer dereference (CWE-476)
**Injection Vulnerabilities**:
- SQL injection (CWE-89)
- Command injection (CWE-78)
- Cross-site scripting (CWE-79)
- XML injection (CWE-91)
- LDAP injection (CWE-90)
**Authentication & Authorization**:
- Missing authentication (CWE-306)
- Improper authentication (CWE-287)
- Missing authorization (CWE-862)
- Hard-coded credentials (CWE-798)
**Cryptographic Issues**:
- Weak algorithms (CWE-327)
- Inadequate encryption (CWE-326)
- Weak random values (CWE-330)
- Missing encryption (CWE-311)
**Deserialization**:
- Untrusted deserialization (CWE-502)
- Mass assignment (CWE-915)
**Input Validation**:
- Improper validation (CWE-20)
- Path traversal (CWE-22)
- SSRF (CWE-918)
### 2. Pattern Matching
For each vulnerability category, identify:
**Dangerous Functions**:
- C/C++: `strcpy`, `sprintf`, `gets`, `scanf`
- Python: `pickle.loads`, `eval`, `exec`
- SQL: String concatenation in queries
- Shell: `os.system`, `subprocess` with `shell=True`
**Unsafe Patterns**:
- Unvalidated user input
- Missing bounds checking
- Weak cryptographic algorithms
- Hard-coded secrets
- Missing authentication decorators
**Context Analysis**:
- Data flow from user input to sink
- Sanitization and validation presence
- Authentication/authorization checks
- Error handling adequacy
### 3. Severity Assessment
Assign severity based on:
**CRITICAL**:
- Remote code execution possible
- Authentication bypass
- SQL injection with admin access
- Arbitrary file read/write
**HIGH**:
- Privilege escalation
- Sensitive data exposure
- Hard-coded credentials
- Weak cryptography for sensitive data
**MEDIUM**:
- Information disclosure
- Denial of service
- Missing input validation
- Insecure configuration
**LOW**:
- Minor information leaks
- Verbose error messages
- Missing security headers
### 4. Confidence Level
Assess confidence in finding:
**HIGH**: Clear vulnerability pattern, no mitigating factors
**MEDIUM**: Vulnerability likely but context unclear
**LOW**: Potential issue requiring manual verification
### 5. Generate Report
Structure findings as:
```markdown
## Vulnerability: [Title]
**ID**: VULN-[number]
**CWE**: CWE-[ID]
**Severity**: [CRITICAL/HIGH/MEDIUM/LOW]
**Confidence**: [HIGH/MEDIUM/LOW]
**Location**: [File:Line]
### Description
[What the vulnerability is]
### Code Snippet
```[language]
[vulnerable code]
```
### Impact
- [Potential consequences]
### Remediation
```[language]
[fixed code]
```
### References
- [CWE link]
- [OWASP reference]
```
## Vulnerability Categories
### Memory Safety (C/C++)
**Buffer Overflow (CWE-119)**:
```c
// VULNERABLE
char buf[10];
strcpy(buf, user_input); // No bounds check
```
**Use-After-Free (CWE-416)**:
```c
// VULNERABLE
free(ptr);
ptr->field = value; // Use after free
```
### Injection Attacks
**SQL Injection (CWE-89)**:
```python
# VULNERABLE
query = f"SELECT * FROM users WHERE id = {user_id}"
cursor.execute(query)
```
**Command Injection (CWE-78)**:
```python
# VULNERABLE
os.system("ping " + user_host)
```
**XSS (CWE-79)**:
```javascript
// VULNERABLE
element.innerHTML = user_input;
```
### Authentication Issues
**Missing Authentication (CWE-306)**:
```python
# VULNERABLE
@app.route('/admin')
def admin_panel():
return render_template('admin.html') # No auth check
```
**Hard-coded Credentials (CWE-798)**:
```python
# VULNERABLE
PASSWORD = "admin123"
API_KEY = "sk-1234567890"
```
### Cryptographic Weaknesses
**Weak Algorithm (CWE-327)**:
```python
# VULNERABLE
hash = hashlib.md5(password.encode()).hexdigest()
```
**Weak Random (CWE-330)**:
```python
# VULNERABLE
token = random.randint(1000, 9999) # For security token
```
### Deserialization
**Untrusted Data (CWE-502)**:
```python
# VULNERABLE
obj = pickle.loads(user_data) # RCE possible
```
### Input Validation
**Path Traversal (CWE-22)**:
```python
# VULNERABLE
with open(f'/uploads/{filename}', 'r') as f: # ../../../etc/passwd
content = f.read()
```
**SSRF (CWE-918)**:
```python
# VULNERABLE
response = requests.get(user_url) # Can access internal services
```
## Detection Heuristics
### Data Flow Analysis
Track tainted data from source to sink:
**Sources** (user input):
- HTTP parameters, headers, body
- Command-line arguments
- File contents
- Environment variables
- Database queries
**Sinks** (dangerous operations):
- SQL query execution
- System command execution
- File operations
- HTML output
- Deserialization
**Sanitization** (check for):
- Input validation
- Escaping/encoding
- Parameterized queries
- Whitelist filtering
### Pattern Recognition
**Dangerous function calls**:
- Without input validation
- With user-controlled arguments
- In security-sensitive contexts
**Missing security controls**:
- No authentication decorator
- No authorization check
- No CSRF protection
- No rate limiting
**Weak configurations**:
- Debug mode enabled
- Verbose errors
- Insecure defaults
## CWE Reference
For detailed vulnerability patterns and remediation, see [cwe_patterns.md](references/cwe_patterns.md).
Key CWE categories:
- Memory safety (CWE-119, 125, 416, 415)
- Injection (CWE-89, 78, 79, 91)
- Authentication (CWE-287, 306, 798, 862)
- Cryptography (CWE-327, 326, 330, 311)
- Deserialization (CWE-502, 915)
- Input validation (CWE-20, 22, 918)
## Report Format
### Summary Section
```markdown
# Security Vulnerability Report
**Scan Date**: [Date]
**Code Base**: [Project]
**Total Findings**: [Count]
## Severity Breakdown
- Critical: [Count]
- High: [Count]
- Medium: [Count]
- Low: [Count]
```
### Detailed Findings
For each vulnerability:
- Unique ID
- CWE classification
- Severity and confidence
- Location (file, line, function)
- Description
- Code snippet
- Impact assessment
- Remediation guidance
- References
### Recommendations
Prioritized action items:
1. Fix critical vulnerabilities immediately
2. Address high-severity issues
3. Plan remediation for medium/low issues
4. Implement security best practices
## Examples
For complete vulnerability detection examples including:
- SQL injection analysis
- Buffer overflow detection
- Hard-coded credentials
- Insecure deserialization
- Missing authentication
- Weak cryptography
See [examples.md](references/examples.md).
## Analysis Tips
- **Context matters**: Consider surrounding code and mitigations
- **False positives**: Mark uncertain findings as low confidence
- **Data flow**: Trace user input to dangerous sinks
- **Defense in depth**: Note multiple security layers
- **Language-specific**: Apply appropriate patterns per language
- **Framework awareness**: Consider framework protections
- **Configuration**: Check for insecure settings
- **Dependencies**: Note vulnerable library versions
- **Completeness**: Scan all code paths
- **Prioritize**: Focus on critical and high severity first
Files in this package (3)
- SKILL.md 8 KB
- references/cwe_patterns.md 10 KB
- references/examples.md 10 KB
Versions
The database has no other skills named static-vulnerability-detector.
Database snapshot: 13.11.2026 · package version 16120aadc3aa (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100performing-security-code-review
This skill provides automated assistance for security agent tasks Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin. it analyzes code for potential vulnerabilities like sql injection, xss, authentication flaws, and… - 100security-audit
Scan code for security vulnerabilities including eval/exec usage, path traversal, hardcoded secrets, and injection risks. Triggers on: security, vulnerability, audit, scan, CVE, CWE, secrets, injection, eval, exec, OWASP. - 98security-review
Scan a codebase for OWASP Top-10 vulnerabilities, hardcoded secrets, insecure dependencies, and unsafe code patterns. Produces a read-only markdown report ranked by severity (Critical / High / Medium / Low). Use when the user says "security review", "scan for vulnerabilities",… - 90security-audit
Use when reviewing code security, auditing dependencies for CVEs, checking configuration or secret security, assessing authentication and authorization patterns, identifying OWASP vulnerabilities (injection, XSS, CSRF), or addressing security concerns about implementations. - 100security-audit
Security vulnerability audit — check for OWASP top risks, hardcoded secrets, injection points, and dependency CVEs. Use when auditing code for security vulnerabilities, reviewing authentication/authorization logic, or checking for secrets leakage before merge. - 90security-reviewer
Dedicated security-audit route for OWASP-style risks, secret leaks, auth flaws, injection, unsafe input handling, SSRF/XSS, and sensitive-data exposure. Use instead of code-reviewer when the prompt explicitly asks for security, vulnerability, threat, auth, or OWASP review.