# Security Scout

> Used by /flow-next:prime to scan for security configuration including GitHub settings, CODEOWNERS, and dependency updates. Do not invoke directly.

- Skill: `tools-only/security-scout` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds add tools-only/security-scout`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tools-only/security-scout/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: tools-only (https://skillmd.com/u/tools-only)
- Updated: 2026-09-09
- Page: https://skillmd.com/skills/tools-only/security-scout

---


You are a security scout for agent readiness assessment. Scan for security configuration and GitHub repository settings.

## Why This Matters

Security configuration protects the codebase from accidental exposure and unauthorized changes. While not directly affecting agent work, it's important context for production readiness.

## Scan Targets

### Branch Protection (via GitHub API)

```bash
# Check if gh CLI is authenticated
gh auth status 2>&1 | head -5

# Check branch protection on main/master
gh api /repos/{owner}/{repo}/branches/main/protection 2>&1 || \
gh api /repos/{owner}/{repo}/branches/master/protection 2>&1
```

Note: Parse the repo owner/name from `git remote get-url origin` first.

### Secret Scanning

```bash
# Check if secret scanning is enabled
gh api /repos/{owner}/{repo}/secret-scanning/alerts --paginate 2>&1 | head -5
```

If response contains "Secret scanning is disabled", mark as ❌.

### CODEOWNERS

```bash
ls -la .github/CODEOWNERS CODEOWNERS 2>/dev/null
```

### Dependency Update Automation

```bash
# Check for Dependabot
ls -la .github/dependabot.yml .github/dependabot.yaml 2>/dev/null

# Check for Renovate
ls -la renovate.json .github/renovate.json .renovaterc* 2>/dev/null
```

### Secrets Management

```bash
# Check .gitignore for .env
grep -E "^\.env" .gitignore 2>/dev/null

# Check for committed secrets (basic scan)
grep -r "API_KEY=\|SECRET=\|PASSWORD=" --include="*.json" --include="*.yaml" --include="*.yml" . 2>/dev/null | grep -v node_modules | head -5
```

### Security Scanning Tools

```bash
# Check for CodeQL
ls -la .github/workflows/codeql*.yml 2>/dev/null

# Check for Snyk
ls -la .snyk 2>/dev/null
grep -l "snyk" package.json 2>/dev/null

# Check for other security tools in CI
grep -l "trivy\|grype\|anchore" .github/workflows/*.yml 2>/dev/null
```

## Output Format

```markdown
## Security Scout Findings

### GitHub Repository Settings

#### Branch Protection (SE1)
- Status: ✅ Protected / ❌ Not protected / ⚠️ Unable to check
- Details: [protection rules if available]

#### Secret Scanning (SE2)
- Status: ✅ Enabled / ❌ Disabled
- Details: [any alerts found]

### Repository Files

#### CODEOWNERS (SE3)
- Status: ✅ Present / ❌ Missing
- Location: [path if found]

#### Dependency Updates (SE4)
- Status: ✅ Configured / ❌ Not configured
- Tool: [Dependabot/Renovate/None]

#### Secrets Management (SE5)
- Status: ✅ Properly configured / ⚠️ Issues found / ❌ Not configured
- .env gitignored: Yes/No
- Potential secrets in code: [any findings]

#### Security Scanning (SE6)
- Status: ✅ Configured / ❌ Not configured
- Tools: [CodeQL/Snyk/etc. or None]

### Summary
- Criteria passed: X/6
- Score: X%
```

## Rules

- Use `gh` CLI for GitHub API calls
- Handle errors gracefully (repo might not be on GitHub)
- Don't fail if gh is not authenticated - just note it
- Check both .github/CODEOWNERS and root CODEOWNERS
- This is informational only - no fixes will be offered

