This skill identifies OWASP vulnerabilities across backend, frontend, mobile, and library code. It's designed for developers and security professionals needing automated security analysis.
$ npx skills add https://github.com/ghostsecurity/skills --skill ghost-scan-codeghost-scan-code is a static application security testing (SAST) skill that uses AI to identify code vulnerabilities and security issues across backend, frontend, mobile, and library code. It integrates with Claude Code to provide automated security analysis without requiring manual code review. The skill works alongside other Ghost Security skills like ghost-scan-deps and ghost-scan-secrets to deliver comprehensive application security coverage. Developers and security teams use ghost-scan-code to catch security flaws early in the development process and reduce the risk of vulnerabilities reaching production.
Install using the command provided and customize scans as needed with arguments.
Scan a repository for SQL injection vulnerabilities.
Identify cross-site scripting (XSS) issues in web applications.
Detect unsafe deserialization vulnerabilities in mobile code.
Perform a full scan of a project for comprehensive security analysis.
$ npx skills add https://github.com/ghostsecurity/skills --skill ghost-scan-codegit clone https://github.com/ghostsecurity/skillsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Perform a comprehensive OWASP Top 10 security scan on [PROJECT_NAME] ([PROJECT_TYPE: backend/frontend/mobile/library]) using the latest OWASP guidelines. Analyze [CODE_REPOSITORY_URL_OR_LOCAL_PATH] for vulnerabilities like [SPECIFIC_VULNERABILITIES_IF_KNOWN]. Provide a prioritized report with severity levels, exploitability scores, and remediation steps. Focus on [OWASP_CATEGORY: Injection/XSS/CSRF/etc.] if specified. Include code snippets for vulnerable lines and suggested fixes.
# OWASP Security Scan Report for Acme Corp's Payment API
*Generated on: 2023-10-15*
## Executive Summary
**Project:** Acme Corp Payment API (Backend - Node.js/Express)
**Scan Type:** Full OWASP Top 10 Analysis
**Total Vulnerabilities:** 12 (High: 3 | Medium: 5 | Low: 4)
**Scan Duration:** 4.2 minutes
---
## Critical Findings (High Severity)
### 1. SQL Injection in `/api/transactions`
**Severity:** Critical (CVSS: 9.8)
**Location:** `routes/transactions.js:45`
**Evidence:**
```javascript
const query = `SELECT * FROM transactions WHERE user_id = ${userId}`;
```
**Impact:** Full database compromise possible
**Remediation:**
- Use parameterized queries:
```javascript
const query = 'SELECT * FROM transactions WHERE user_id = ?';
connection.query(query, [userId], callback);
```
### 2. Missing Authentication in `/api/admin`
**Severity:** High (CVSS: 8.1)
**Location:** `routes/admin.js:12-25`
**Evidence:** Endpoint lacks JWT validation
**Impact:** Unauthorized admin access
**Remediation:**
- Implement middleware:
```javascript
function authenticateAdmin(req, res, next) {
if (!req.user || !req.user.roles.includes('admin')) {
return res.status(403).send('Access denied');
}
next();
}
```
---
## Medium Severity Findings
### 3. Cross-Site Scripting (XSS) in `/api/users`
**Location:** `routes/users.js:78`
**Evidence:**
```javascript
res.send(`<div>${userInput}</div>`);
```
**Remediation:** Use DOMPurify or escape HTML:
```javascript
const clean = DOMPurify.sanitize(userInput);
res.send(`<div>${clean}</div>`);
```
---
## Low Severity Findings
### 12. Verbose Error Messages
**Location:** `app.js:112`
**Evidence:** Error responses include stack traces in production
**Remediation:** Configure error handling middleware:
```javascript
app.use((err, req, res, next) => {
console.error(err);
res.status(500).send('Internal Server Error');
});
```
## Recommendations
1. Prioritize SQL Injection and Authentication fixes (immediate)
2. Schedule XSS remediation for next sprint
3. Implement automated security testing in CI/CD pipeline
4. Conduct quarterly security reviews
*Report generated by Ghost-Scan-Code v2.1.4*Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan