sc · alirezarezvani — Claude Code command: security check and install
This command checks committed secrets and Python dependencies before a push. A clean run then starts the remote security audit workflow.
MIT ★ 907 updated 2025-11-12
.claude/commands/sc.mdWhat sc does
sc runs a repository security gate before changes are pushed. It calls gitleaks detect --verbose --redact to inspect committed secrets, then checks every matching requirements*.txt file with safety check --full-report --file.
The results belong in the commit template’s Testing section. Once the checks pass, the command starts security-audit.yml for the current branch through gh workflow run. Install safety==3.2.4 and gitleaks==8.18.4 first; without them, the checks cannot run.
What it helps with
- find secrets committed to the repository
- audit Python dependencies from requirements files
- record scan results in the commit template
- start a remote audit for the current branch
Example prompts for the agent
- Run
/scbefore pushing the changes. - Use
/scto check committed secrets and Python dependencies, then record the result in Testing. - After the scan passes, run the remote security audit for the current branch.
How to install sc
Manually: put the files in place
.claude/commands/sc.mdCall it with /sc. For all projects use ~/.claude/commands/
Manually: put the files in place
~/.codex/prompts/sc.mdCall it with /prompts:sc. Codex marks this format deprecated in favour of skills
Manually: put the files in place
.github/prompts/sc.prompt.mdManually: put the files in place
.gemini/commands/sc.tomlGemini stores commands as TOML: the prompt text goes into the prompt field
Questions about sc
How do I install sc in Claude Code?
Create the command file at .claude/commands/sc.md and place the command content there.
What does sc do?
It scans committed secrets with gitleaks, audits Python dependencies with safety, records the result in Testing, and starts security-audit.yml after a clean pass.
What does sc need before it can run?
Install safety==3.2.4 and gitleaks==8.18.4 first. Dependency checks target requirements*.txt files when they exist.
Source text
sc.md · MIT
---
description: Run the security scan gate before pushing.
---
1. Ensure dependencies are installed (`pip install safety==3.2.4 gitleaks==8.18.4`).
2. Scan for committed secrets:
```bash
gitleaks detect --verbose --redact
```
- Resolve any findings before continuing.
3. Audit Python dependencies (if requirements files exist):
```bash
for f in $(ls **/requirements*.txt 2>/dev/null); do
safety check --full-report --file "$f"
done
```
4. Record results in the commit template’s Testing section.
5. After a clean pass, trigger the remote security audit for visibility:
```bash
gh workflow run security-audit.yml --ref $(git branch --show-current)
```
© alirezarezvani · MIT · alirezarezvani/claude-code-skill-factory
Similar slash commands
All slash commands for Git and GitHub →sc by other authors comes first.