Pre-PR security review of your current branch or git diff. Use when the user says "review my changes", "ready to merge", "pre-PR check", "security review before PR", "endor review", or is about to create a pull request. Runs dependency checks, SAST, secrets detection, and license compliance as a security gate. Do NOT use for scanning repos outside the current branch (/endor-scan) or checking individual packages (/endor-check).
72
88%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Comprehensive security review of changes before creating a pull request.
git diff --name-only HEAD # Changed files (staged + unstaged)
git diff HEAD # Full diff
git diff main...HEAD --name-only # Branch comparisonCategorize changed files into: dependency manifests, source code, config files, CI/CD files.
Run incremental PR scan using scan MCP tool:
path: absolute path to repo rootscan_types: ["vulnerabilities", "dependencies", "sast", "secrets"]scan_options: { "pr_incremental": true }This only reports new findings introduced by the PR, not pre-existing issues. Fall back to individual checks below if incremental scan unavailable.
If available, also use security_review MCP tool for AI-powered diff analysis. This provides deeper code-level security insights beyond pattern matching. Results complement the checks below.
If dependency manifests modified:
check_dependency_for_risks MCP tool for each (checks vulnerabilities AND malware)check_dependency_for_vulnerabilities if _risks unavailableFor modified source files (if not covered by Step 1):
scan MCP tool with scan_types: ["sast"]get_resource (resource_type: Finding)If not covered by Step 1:
scan MCP tool with scan_types: ["secrets"]For new dependencies: check license, flag copyleft (GPL, AGPL), warn on unknown.
If Dockerfile/docker-compose modified: check for root user, latest tags, exposed ports, secrets in build args.
## Pre-PR Security Review
**Branch:** {branch} | **Files Changed:** {count} | **Scan Mode:** {Incremental/Full fallback}
### 1. Dependency Check {PASS/WARN/BLOCK}
| Package | Change | Version | Vulnerabilities | Status |
|---------|--------|---------|-----------------|--------|
### 2. SAST Analysis {PASS/WARN/BLOCK}
| File | Issues | Severity | Details |
|------|--------|----------|---------|
### 3. Secrets Scan {PASS/BLOCK}
| Type | File | Line |
|------|------|------|
### 4. License Check {PASS/WARN/BLOCK}
| Package | License | Risk |
|---------|---------|------|
### Verdict: {PASS / WARN / BLOCK}| Verdict | Conditions |
|---|---|
| BLOCK | Critical vuln in new deps, critical SAST finding (SQLi, command injection), any exposed secrets, AGPL/SSPL deps |
| WARN | High vulns (non-reachable), medium/low SAST findings, GPL deps |
| PASS | No critical issues, no secrets, no blocking licenses |
For each blocking issue:
### Required Fixes Before Merge
1. **{Issue}** in {file}:{line}
- **Fix:** {specific remediation}
- **Command:** `/endor-fix {cve}` for detailsFor data source policy, read references/data-sources.md.
If a scan partially succeeds (e.g., dependency check works but SAST fails), present the available results with a note about which checks failed. Do not discard partial results.
| Error | Action |
|---|---|
| No changes detected | Tell user there are no changes to review |
| Auth error | Suggest /endor-setup |
| MCP not available | Perform manual pattern-based review of the diff |
b958adc
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.