Skip to main content
skill CX Codex

source-code-scanning — Claude Code skill: what it does, how to install

source-code-scanning guides automated SAST, CVE scanning across project dependencies, and secrets detection to locate vulnerabilities before deployment.

MIT 217 installs ★ 632 updated 2026-07-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add transilienceai/communitytools --skill source-code-scanning -a claude-code
Open on GitHub

What source-code-scanning does

The skill organizes repository security audits into a structured seven-phase workflow. It begins by cataloging languages, package manifests, and entry points, then calls ecosystem-specific SAST linters such as Semgrep, Bandit, gosec, Brakeman, or SpotBugs. Dependency manifests are checked for known CVEs via tools like pip-audit, npm audit, govulncheck, or trivy.

Dedicated steps focus on finding hardcoded secrets through TruffleHog and Gitleaks, followed by tracing injection sinks like eval, exec, and unsafe deserialization calls. The skill also handles mobile binaries by unpacking APK archives to inspect React Native JS bundles or decompiling bytecode with jadx.

Underlying command-line scanners (semgrep, gitleaks, trivy) must already exist in your local environment, as the skill coordinates execution and generates standardized markdown reports under findings/. A strict operational rule prohibits executing unverified target code during scanning.

What it helps with

  • scan package manifests for CVEs using tools like pip-audit or npm audit
  • detect hardcoded API keys and credentials with TruffleHog and Gitleaks
  • identify injection sinks and insecure deserialization flaws across the codebase
  • unpack mobile APK binaries to uncover exposed secrets in JS bundles

Example prompts for the agent

  • Audit this repository for security vulnerabilities and check dependencies for CVEs
  • Scan the codebase for hardcoded secrets and high-risk injection sinks
  • Analyze this mobile APK file for leaked API keys and unsafe endpoints

How to install source-code-scanning

1Skills CLI (Vercel)

npx skills add transilienceai/communitytools --skill source-code-scanning -a claude-code

2Manually: put the files in place

~/.claude/skills/source-code-scanning/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/source-code-scanning/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about source-code-scanning

How to install source-code-scanning in Claude Code?

Run npx skills add transilienceai/communitytools --skill source-code-scanning -a claude-code. The skill file is placed into ~/.claude/skills/source-code-scanning/SKILL.md.

What does source-code-scanning do?

It structures a SAST audit workflow covering OWASP Top 10 and CWE Top 25 vulnerabilities, dependency CVE lookups, hardcoded credentials detection, and backdoor identification.

Which external tools does this skill require?

It relies on linters and scanners available in your environment, including Semgrep, Bandit, gosec, Brakeman, TruffleHog, Gitleaks, and dependency checkers like npm audit or pip-audit.

Source text

SKILL.md · MIT
---
name: source-code-scanning
description: Security-focused source code review and SAST. Scans for vulnerabilities (OWASP Top 10, CWE Top 25), CVEs in third-party dependencies/packages, hardcoded secrets, malicious code, and insecure patterns. Use when given source code, a repo path, or asked to "audit", "scan", "review" code security, or "check dependencies for CVEs".
---

# Source Code Security Review

## Quick Start

1. **Identify** - languages, frameworks, package managers present
2. **Automated SAST** - run tools appropriate to the stack
3. **Dependency CVEs** - scan lockfiles/manifests for known CVEs
4. **Secrets scan** - detect hardcoded credentials/tokens
5. **Manual review** - trace high-risk sinks (exec, eval, query, deserialize)
6. **Malicious code** - check for backdoors, obfuscation, suspicious network calls
7. **Report** - findings with CWE/CVE refs, severity, PoC, remediation

## Workflow

### Phase 1: Enumerate
```
- Languages: ls **/*.{py,js,ts,java,go,rb,php,cs,rs}
- Packages: find package.json, requirements.txt, go.mod, pom.xml, Gemfile, composer.json, Cargo.toml
- Entry points: main(), index.*, app.*, server.*
- Config files: .env*, config.*, settings.*, *.yaml, *.toml
```

### Phase 2: Automated SAST
See [sast-tools.md](reference/sast-tools.md) for commands per language.

Key tools:
- **Multi-language**: Semgrep (`semgrep --config=auto .`)
- **Python**: Bandit (`bandit -r . -f json`)
- **JavaScript/TS**: ESLint security plugin, njsscan
- **Java**: SpotBugs + FindSecBugs
- **Go**: gosec (`gosec ./...`)
- **PHP**: PHPCS Security Audit
- **Ruby**: Brakeman (`brakeman -o report.json`)
- **All**: CodeQL (via `gh codeql`)

### Phase 3: Dependency CVE Scan
See [dependency-cve-scanning.md](reference/dependency-cve-scanning.md) for commands.

| Ecosystem | Command |
|---|---|
| npm/yarn | `npm audit --json` / `yarn audit` |
| Python | `pip-audit -r requirements.txt` |
| Java | `dependency-check --scan .` |
| Go | `govulncheck ./...` |
| Ruby | `bundle audit` |
| Generic | `trivy fs .` / `grype dir:.` |

### Phase 4: Secrets Detection
See [secrets-detection.md](reference/secrets-detection.md).
```bash
trufflehog filesystem . --json
gitleaks detect --source . -v
```

### Phase 5: Manual Review
Focus on high-risk sinks — see [manual-review.md](reference/manual-review.md):
- Injection sinks: `exec`, `eval`, `query`, `system`, `popen`
- Deserialization: `pickle.loads`, `ObjectInputStream`, `unserialize`
- Crypto: hardcoded keys, weak algorithms (MD5, SHA1, DES, ECB)
- Auth: JWT validation, session management, RBAC enforcement
- File ops: path construction with user input

### Phase 6: Malicious Code
See [malicious-code.md](reference/malicious-code.md):
- Obfuscated strings (base64, hex, charCode)
- Unexpected network calls in library code
- Typosquatting indicators
- Postinstall/lifecycle script abuse
- Hidden backdoors in dependencies

## Language-Specific Patterns
See [language-patterns.md](reference/language-patterns.md) for Python, JS, Java, Go, PHP, Ruby.

## Severity Mapping

| Severity | CVSS | Examples |
|---|---|---|
| Critical | 9.0+ | RCE, SQLi with exfil, auth bypass |
| High | 7.0-8.9 | Stored XSS, SSRF, insecure deserialization |
| Medium | 4.0-6.9 | Reflected XSS, info disclosure, IDOR |
| Low | 0.1-3.9 | Missing headers, verbose errors |

## Output Format

```
findings/
  <severity>-<vuln-type>-<location>.md   # One file per finding
evidence/
  <tool>-output.json                      # Raw tool output
summary-report.md                         # Executive summary
```

Each finding: CWE/CVE ID | File:Line | Severity | PoC | Remediation

## Mobile App Analysis (APK/IPA)

When given a mobile app binary:
1. **Extract**: `unzip app.apk -d extracted/` (APKs are ZIP archives)
2. **Identify framework**: React Native (`assets/index.android.bundle`), Flutter (`libflutter.so`), Xamarin, or native
3. **React Native**: JS bundle is plaintext — search for secrets, API keys, config objects, hardcoded tokens
4. **Encoded secrets**: Search for base64 prefixes of known flag/secret formats (e.g., `RkxBR` = base64 of `FLAG`). Config objects often store secrets as base64 in `debug`, `secret`, `apiKey` fields
5. **Native**: Use `jadx` for Java/Kotlin decompilation, check `AndroidManifest.xml`, `strings.xml`, `BuildConfig`
6. **Shared libs**: Check `.so` files with `strings` for hardcoded credentials

## Critical Rules
- Never execute untrusted code during review
- Treat all findings as potential until verified
- Always cross-reference CVEs against actual version in use
- Report supply chain issues separately (they affect all users)

© transilienceai · MIT · transilienceai/communitytools

Similar skills

All skills for Security →

From the same set42

The whole set →
cve-poc-generator The cve-poc-generator skill researches a CVE, writes a safe Python PoC, and produces a vulnerability report. Use it when you need sourced verification and remediation details. CX Codex +1 236installs social-engineering social-engineering is a Claude Code skill for planning authorized tests of human-factor security. It covers phishing, pretexting, voice-based attacks, and physical security checks. CX Codex +1 224installs api-security api-security is a Claude Code skill that tests REST, GraphQL, WebSocket, and Web-LLM interfaces for authorization flaws and injection bugs across large endpoint collections. CX Codex +1 220installs web-app-logic web-app-logic — a skill for finding vulnerabilities in web application logic that automated scanners miss: workflow bypass, race conditions, access control flaws, cache poisoning, and information disclosure. CX Codex +1 219installs techstack-identification techstack-identification is a Claude Code skill that finds a company’s technology stack from public signals. It delegates research to specialist sub-skills and combines their findings in a report. CX Codex +1 215installs hackthebox A skill for HackTheBox competitions that spins up machines, handles credentials, delegates attacks to subagents, and posts breach reports to Slack. CX Codex +1 213installs server-side server-side guides security testing for SSRF, HTTP request smuggling, path traversal, and deserialization flaws in server code. CX Codex +1 213installs authentication This skill checks login flows, tokens, 2FA, CAPTCHA, and bot detection. Use it to examine auth bypasses and weaknesses in authentication controls. CX Codex +1 212installs

Project sponsors

Companies that keep this analytics open