Skip to content
Back to skills

Issue Detection

ASecurity

Static analysis issue detection patterns and rules

  • 755 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added February 9, 2026
documentationgoshellsqlapidatabasesecurityperformancedocumentation

Works with

  • api

Security analysis

A100/100

Scanned February 12, 2026

npx -y skills add majiayu000/claude-skill-registry --skill issue-detection --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Issue Detection?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Issue Detection
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-issue-detection/badge)](https://www.skillsdirectory.com/skills/majiayu000-issue-detection)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: issue-detection
description: Static analysis issue detection patterns and rules
---

# Issue Detection Methodology

## Objective

Identify code issues across security, quality, performance, and maintainability dimensions.

## Security Issues

### Injection Vulnerabilities

**SQL Injection**
- Pattern: String concatenation in SQL queries
- Detection: Look for query strings built with + operator
- Fix: Use parameterized queries

**Command Injection**
- Pattern: User input passed to shell execution functions
- Detection: Look for subprocess/exec calls with dynamic arguments
- Fix: Use subprocess with shell=False, validate inputs

**XSS**
- Pattern: Unescaped user input in HTML output
- Detection: Template variables without escaping filters
- Fix: HTML escape all user content

### Authentication Issues

**Hardcoded Credentials**
- Pattern: password/secret/key assignments with string literals
- Detection: Regex for common credential variable names
- Fix: Use environment variables

**Weak Crypto**
- Pattern: MD5, SHA1 for passwords, ECB mode
- Fix: Use bcrypt/argon2 for passwords, AES-GCM

## Quality Issues

### Complexity Violations

**High Cyclomatic Complexity**
- Threshold: > 20
- Impact: Hard to test, prone to bugs
- Fix: Extract methods, reduce conditions

**Deep Nesting**
- Threshold: > 5 levels
- Impact: Hard to read and maintain
- Fix: Early returns, guard clauses

### Code Smells

**Long Method**
- Threshold: > 50 lines
- Fix: Extract smaller methods

**Large Class**
- Threshold: > 500 lines or > 20 methods
- Fix: Split into focused classes

**Long Parameter List**
- Threshold: > 5 parameters
- Fix: Use parameter object

## Performance Issues

### Algorithm Efficiency

**N+1 Queries**
- Pattern: Loop containing database query
- Detection: ORM calls inside for/while loops
- Fix: Use eager loading/joins

**Quadratic Algorithms**
- Pattern: Nested loops over same collection
- Impact: O(n^2) scaling
- Fix: Use sets, maps, or better algorithms

### Resource Management

**Unclosed Resources**
- Pattern: File/connection open without close or context manager
- Fix: Use `with` statement

**Memory Issues**
- Pattern: Growing collections without bounds
- Fix: Use bounded caches, weak references

## Maintainability Issues

### Documentation Gaps

**Missing Docstrings**
- Pattern: Public functions without documentation
- Standard: All public APIs documented

**Outdated Comments**
- Pattern: Comments contradicting code
- Fix: Update or remove

### Test Coverage

**Untested Code**
- Pattern: No corresponding test file
- Threshold: < 60% coverage is concern

**Missing Edge Case Tests**
- Pattern: Only happy path tested
- Fix: Add boundary and error tests

## Issue Reporting Format

```
[SEVERITY] [CATEGORY] in [file:line]
Description: [what is wrong]
Impact: [why it matters]
Fix: [how to resolve]
Confidence: [High/Medium/Low]
```

## Severity Classification

| Severity | Criteria |
|----------|----------|
| Critical | Security vulnerability, data loss risk |
| High | Performance blocker, major quality issue |
| Medium | Code smell, minor security concern |
| Low | Style issue, improvement suggestion |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.