security-audit-pro
/security-audit-pro
Security audit with SAST, SCA, containers, SBOM, PII detection. Use for comprehensive security reviews.
- Author
- ils15 ↗
- Repository
- copilot-global-config ↗
- Licence
- MIT
- Last repository change
- 22.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 22.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Security audit with SAST, SCA, containers, SBOM, PII detection. Use for comprehensive security reviews.
Original author description
Security audit with SAST, SCA, containers, SBOM, PII detection. Use for comprehensive security reviews.
How it works
- Scope
- SAST — Static Application Security Testing
- SCA — Software Composition Analysis
- Container Security
- SBOM — Software Bill of Materials
- PII Detection
- Compliance Patterns
- Integration with Themis
SKILL.md preview
---
name: security-audit-pro
description: "Security audit with SAST, SCA, containers, SBOM, PII detection. Use for comprehensive security reviews."
context: fork
globs: ["**/*.py", "**/*.ts", "**/*.tsx", "**/*.js", "**/*.yml", "**/*.yaml", "**/Dockerfile*", "**/docker-compose*"]
alwaysApply: false
---
# Security Audit Pro — Comprehensive Security Review
Use this skill for professional-grade security auditing. Covers SAST, SCA, container security, SBOM, PII detection, and compliance patterns. Used by Themis during code review.
---
## Scope
This skill replaces and expands the basic `security-audit` skill. It covers:
| Domain | Coverage |
|--------|----------|
| **SAST** | SQL injection, XSS, CSRF, path traversal, command injection |
| **SCA** | Dependencies with known CVEs, outdated packages |
| **Container** | Non-root user, health checks, secrets, minimal base images |
| **SBOM** | Software Bill of Materials generation |
| **PII** | Detection of personal data in code/logs |
| **Compliance** | GDPR, LGPD, HIPAA patterns |
---
## SAST — Static Application Security Testing
### SQL Injection
**❌ Vulnerable:**
```python
query = f"SELECT * FROM users WHERE email = '{email}'"
await db.execute(query)
```
**✅ Safe:**
```python
query = text("SELECT * FROM users WHERE email = :email")
await db.execute(query, {"email": email})
```
### XSS (Cross-Site Scripting)
**❌ Vulnerable:**
```python
return HTMLResponse(content=f"<h1>Welcome, {user.name}</h1>")
```
**✅ Safe:**
```python
from markupsafe import escape
return HTMLResponse(content=f"<h1>Welcome, {escape(user.name)}</h1>")
```
### CSRF
**Check:**
- [ ] CSRF tokens on state-changing endpoints
- [ ] SameSite cookie attribute set
- [ ] Origin/Referer header validation
### Path Traversal
**❌ Vulnerable:**
```python
file_path = f"/uploads/{filename}"
return FileResponse(file_path)
```
**✅ Safe:**
```python
import os
base_dir = "/uploads"
file_path = os.path.join(base_dir, os.path.basename(filename))
if not file_path.startswith(base_dir):
raise HTTPException(400, "Invalid path")
return FileResponse(file_path)
```
### Command Injection
**❌ Vulnerable:**
```python
os.system(f"convert {input_file} {output_file}")
```
**✅ Safe:**
```python
import subprocess
subprocess.run(["convert", input_file, output_file], check=True)
```
---
## SCA — Software Composition Analysis
### Dependency Audit
Run these commands to check for vulnerabilities:
```bash
# Python
pip-audit -r requirements.txt
safety check -r requirements.txt
# Node.js
npm audit
npx audit-ci --moderate
```
### Common Vulnerable Patterns
| Pattern | Risk | Fix |
|---------|------|-----|
| `requests < 2.31.0` | CVE-2023-32681 | Upgrade to >= 2.31.0 |
| `pydantic < 2.0` | Validation bypass | Upgrade to >= 2.7 |
| `sqlalchemy < 2.0` | SQL injection risk | Upgrade to >= 2.0 |
| `express < 4.18.2` | Open redirect | Upgrade to >= 4.18.2 |
---
## Container Security
### Dockerfile Checklist
- [ ] Non-root user (`USER appuser`)
- [ ] Health check defined (`HEALTHCHECK`)
- [ ] No hardcoded secrets (use env vars or vault)
- [ ] Minimal base image (`python:3.12-slim` not `python:3.12`)
- [ ] Multi-stage build (build deps not in final image)
- [ ] `.dockerignore` present
- [ ] No `COPY . .` (copy only needed files)
### docker-compose Checklist
- [ ] No secrets in environment variables (use `.env` or vault)
- [ ] Resource limits defined (`deploy.resources`)
- [ ] Network isolation (separate networks for frontend/backend)
- [ ] Read-only filesystem where possible (`read_only: true`)
- [ ] No `privileged: true`
---
## SBOM — Software Bill of Materials
Generate SBOM for compliance:
```bash
# Python
pip install cyclonedx-bom
cyclonedx-py -r requirements.txt -o sbom.json --format json
# Node.js
npm install --save-dev @cyclonedx/cyclonedx-npm
npx cyclonedx-npm --output-file sbom.json
```
---
## PII Detection
Scan code and logs for personal data:
| Pattern | Example | Severity |
|---------|---------|----------|
| Email in logs | `logger.info(f"User {email} logged in")` | High |
| SSN/CPF in code | `cpf = "123.456.789-00"` | Critical |
| Phone numbers | `phone = "+55 11 99999-9999"` | High |
| Credit cards | `card = "4111 1111 1111 1111"` | Critical |
| Passwords in code | `PASSWORD = "secret123"` | Critical |
### PII Protection Patterns
```python
# ❌ Logging PII
logger.info(f"User {user.email} with CPF {user.cpf} created account")
# ✅ Hashing PII in logs
import hashlib
logger.info(f"User {hashlib.sha256(user.email.encode()).hexdigest()[:8]} created account")
```
---
## Compliance Patterns
### GDPR (EU)
- [ ] Right to be forgotten implemented (delete user data endpoint)
- [ ] Data portability (export user data endpoint)
- [ ] Consent management (explicit opt-in, not opt-out)
- [ ] Data minimization (only collect what's needed)
- [ ] Privacy by design (privacy considered in architecture)
### LGPD (Brazil)
- [ ] Same as GDPR + ANPD notification procedures
- [ ] Data Protection Officer (DPO) contact available
- [ ] Portuguese privacy policy
### HIPAA (US Healthcare)
- [ ] Encryption at rest (database encryption)
- [ ] Encryption in transit (TLS 1.2+)
- [ ] Access logging (who accessed what, when)
- [ ] Audit trails (immutable logs)
- [ ] Business Associate Agreements (BAAs) with vendors
---
## Integration with Themis
Themis applies this skill during code review:
```
Themis receives code for review
↓
Applies security-audit-pro skill
↓
Runs SAST checks (manual pattern matching)
↓
Runs SCA checks (pip-audit / npm audit)
↓
Checks container security (Dockerfile, docker-compose)
↓
Scans for PII patterns
↓
Checks compliance patterns
↓
Returns security review results
```
Versions
The database has no other skills named security-audit-pro.
Identical content appears in 2 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 62d4e07359b2 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100security-audit
OWASP Top 10 security audit, SAST/DAST/SCA scanning, secrets detection, and dependency vulnerability check. Use when: security, vulnerability, OWASP, secrets, CVE, security audit, security scan, penetration. - 100sast-sca-security-analyzer
Use when you perform SAST or SCA security scans. Identifies code flaws, audits third-party dependencies, checks policy compliance, and generates structured security reports with CWE mappings and file locations. - 90dependency-security
Managing Supply Chain Security, SBOM generation, and vulnerability patching (SCA). Use when: dependency security. - 90audit-integrity
Enforce output quality, evidence verification, and quality gates across security audits. Use this skill when you perform SAST, SCA, threat modeling, or security code reviews. Use this skill to verify code locations and taint traces for all findings. Use this skill to prevent the… - 100security-audit
Orchestrator for a full multi-scanner security audit of a whole project: auto-detects the stack, runs SAST, DAST, dependency and config scanning skills and merges one report with remediation. Use for 'full security scan', 'run all security checks', 'comprehensive vulnerability… - 100devsecops
Use this skill when the user says 'DevSecOps', 'shift-left security', 'SAST in CI', 'DAST pipeline', 'secret scanning in CI', 'security gate', 'pipeline hardening'. Embeds automated SAST, DAST, dependency and secret scanning into CI/CD with policy gates. Do NOT use for: deep…