Code Security logo

Code Security

Community
Firstp1ck
code-security

Agents should invoke this skill for code security reviews, leaked secret checks, dependency risk, unsafe shell/Python/TypeScript/Rust patterns, auth/input-validation flaws, SAST-style audits, or supply-chain concerns in repositories.

Overview

PublisherFirstp1ck
Repositorypi-coding-agent-forge
Skill namecode-security
Stars
93
Forks
22
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by Firstp1ck on GitHub. Read the source before you install it.

Installation

Install the Code Security AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Firstp1ck/pi-coding-agent-forge/tree/main/pi-skill-code-security/skills/code-security
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Firstp1ck/pi-coding-agent-forge.git /tmp/pi-coding-agent-forge
mkdir -p .claude/skills
cp -r /tmp/pi-coding-agent-forge/pi-skill-code-security/skills/code-security .claude/skills/code-security
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Code Security in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Code Security on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Code Security is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Code Security

Secret scanning, dependency vulnerability auditing, static analysis patterns, and supply chain security for the user's codebases.

Quick Start

Quick Repo Security Check

Run these in order for any repository:

bash
# 1. Check for leaked secrets
grep -rn "sk-proj-\|sk-\|AKIA\|ghp_\|gho_\|github_pat_\|xoxb-\|xoxp-" --include="*.py" --include="*.ts" --include="*.js" --include="*.rs" --include="*.sh" --include="*.toml" --include="*.json" --include="*.yml" --include="*.yaml" --include="*.env" .

# 2. Check .gitignore covers sensitive files
cat .gitignore | grep -i "env\|secret\|key\|token\|credential"

# 3. Check for .env files in repo
find . -name ".env*" -not -path "./.git/*"

# 4. Run dependency audit (language-specific)
cargo audit          # Rust
npm audit            # JavaScript/TypeScript
pip-audit            # Python (via pip install pip-audit)

Secret Scanning

Patterns to Detect

PatternRegexSeverity
OpenAI API keysk-proj-[A-Za-z0-9_-]{20,}Critical
OpenAI legacy keysk-[A-Za-z0-9]{20,}Critical
AWS access keyAKIA[0-9A-Z]{16}Critical
GitHub PATghp_[A-Za-z0-9]{36}Critical
GitHub OAuthgho_[A-Za-z0-9]{36}Critical
GitHub App tokengithub_pat_[A-Za-z0-9_]{22,}Critical
Slack tokenxox[bpors]-[A-Za-z0-9-]{10,}High
Telegram bot token[0-9]{8,10}:AA[A-Za-z0-9_-]{33}High
Discord bot token[MN][A-Za-z0-9]{23,}\.[A-Za-z0-9_-]{6}\.[A-Za-z0-9_-]{27,}High
JWT tokeneyJ[A-Za-z0-9_-]*\.eyJ[A-Za-z0-9_-]*\.[A-Za-z0-9_-]*High
Generic API key[Aa]pi[_-]?[Kk]ey.*[=:]\s*["'][A-Za-z0-9]{20,}Medium
Password in URL://[^:]+:[^@]+@High
Private key header`-----BEGIN (RSAEC
Password assignment[Pp]assword\s*[=:]\s*["'][^"']{8,}High

Manual Secret Scan

bash
# Comprehensive secret scan across a repo
grep -rn \
    -e "sk-proj-" \
    -e "sk-[A-Za-z0-9]\{20,\}" \
    -e "AKIA[0-9A-Z]\{16\}" \
    -e "ghp_" \
    -e "gho_" \
    -e "github_pat_" \
    -e "xox[bpors]-" \
    -e "BEGIN.*PRIVATE KEY" \
    -e "password\s*=" \
    -e "api_key\s*=" \
    -e "secret\s*=" \
    --include="*.py" --include="*.ts" --include="*.js" --include="*.rs" \
    --include="*.sh" --include="*.toml" --include="*.json" --include="*.yml" \
    --include="*.yaml" --include="*.env" --include="*.cfg" --include="*.ini" \
    .

Git History Check

Secrets removed from current files may still be in git history:

bash
# Search git history for secrets (simplified)
git log --all -p | grep -n "sk-proj-\|AKIA\|ghp_\|BEGIN.*PRIVATE KEY"

# Check specific file history
git log --all -p -- "path/to/suspicious/file"

If secrets found in history:

  1. Rotate the credential immediately (it's already compromised)
  2. Use git filter-repo to remove from history (if critical)
  3. Force push (coordinate with team)
  4. Document in MEMORY.md

.gitignore Hygiene

Every repo should ignore:

gitignore
# Secrets and credentials
.env
.env.*
*.pem
*.key
credentials.json
service-account.json
**/secrets/

# IDE and editor files
.idea/
.vscode/settings.json
*.swp

# OS files
.DS_Store
Thumbs.db

Audit checklist:

  • .env and .env.* are in .gitignore
  • No .env files are tracked: git ls-files | grep "\.env"
  • Private keys (.pem, .key) are ignored
  • Credential JSON files are ignored
  • No sensitive files in git history

Dependency Vulnerability Audit

Rust (cargo audit)

bash
# Install cargo-audit if not present
cargo install cargo-audit

# Run audit
cargo audit

# JSON output for parsing
cargo audit --json

# Fix by updating Cargo.lock
cargo update
cargo audit

Evaluate findings:

Advisory SeverityAction
Critical / unmaintainedUpdate or replace immediately
HighUpdate within 24h
MediumInclude in next release
LowUpdate when convenient

JavaScript / TypeScript (npm audit)

bash
# Run audit
npm audit

# Fix automatically where possible
npm audit fix

# Force fix (may include breaking changes)
npm audit fix --force

# JSON output
npm audit --json

Python (pip-audit)

bash
# Install pip-audit
pip install pip-audit

# Audit current environment
pip-audit

# Audit a requirements file
pip-audit -r requirements.txt

# JSON output
pip-audit --format json

Supply Chain Risk Indicators

Look for these red flags in dependencies:

IndicatorRiskCheck
Very new package (<1 month)TyposquattingCheck publish date and download count
Single maintainerBus factorCheck maintainer count
No recent updates (>2 years)AbandonedCheck last commit/release
Unexpected install scriptsMalicious payloadReview postinstall scripts
Excessive permissionsOver-privilegedReview package permissions
Name similar to popular packageTyposquattingCompare with intended package

Static Analysis (SAST) Patterns

Common Vulnerability Patterns

Command Injection:

# Dangerous patterns
os.system(user_input)
subprocess.call(user_input, shell=True)
exec(user_input)
eval(user_input)

Path Traversal:

# Dangerous patterns
open(user_input)               # Unsanitized file path
os.path.join(base, user_input) # Without validation

SQL Injection:

# Dangerous patterns
f"SELECT * FROM users WHERE id = {user_input}"
cursor.execute("SELECT * FROM users WHERE id = " + user_input)

Hardcoded Credentials:

# Dangerous patterns
password = "hardcoded_value"
API_KEY = "sk-..."
conn_string = "postgres://user:pass@host/db"

Language-Specific Checks

Rust:

bash
# Check for unsafe blocks
grep -rn "unsafe" --include="*.rs" .

# Check for unwrap (potential panics)
grep -rn "\.unwrap()" --include="*.rs" .

# Run clippy with security lints
cargo clippy -- -W clippy::all

Python:

bash
# Check for dangerous functions
grep -rn "eval\|exec\|os.system\|subprocess.call.*shell=True" --include="*.py" .

# Check for pickle (deserialization risk)
grep -rn "pickle\|cPickle" --include="*.py" .

# Run bandit (Python SAST)
pip install bandit
bandit -r . -f json

Shell Scripts:

bash
# Check for unquoted variables (injection risk)
# shellcheck is the best tool for this
shellcheck *.sh

# Check for eval with variables
grep -rn 'eval.*\$' --include="*.sh" .

Code Security Report Format

markdown
# Code Security Report: [Repository Name]

**Date:** YYYY-MM-DD
**Analyst:** Zero
**Repository:** [path or URL]
**Commit:** [short hash]

## Summary

| Category | Critical | High | Medium | Low |
|---|---|---|---|---|
| Secrets | X | X | X | X |
| Dependencies | X | X | X | X |
| Code patterns | X | X | X | X |

## Findings

### Secrets
[List any found secrets with file:line references]

### Dependency Vulnerabilities
[List from cargo audit / npm audit / pip-audit]

### Code Vulnerabilities
[List from SAST scan with file:line references]

## Recommendations

1. [Prioritized actions]

## .gitignore Status

- [ ] Adequate for this project type
- [ ] Missing entries: [list]

Zero skill — Code security analysis and dependency auditing

Frequently asked questions

What does the Code Security AI skill do?

Agents should invoke this skill for code security reviews, leaked secret checks, dependency risk, unsafe shell/Python/TypeScript/Rust patterns, auth/input-validation flaws, SAST-style audits, or supply-chain concerns in repositories.

Why use Code Security on TypingMind?

Because you install it once and use it with any model. Code Security is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Code Security in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Firstp1ck/pi-coding-agent-forge/tree/main/pi-skill-code-security/skills/code-security. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Code Security?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Code Security?

As many as you like. As long as a model supports skills, you can use Code Security with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Code Security AI skill free?

Yes. It is published on GitHub by Firstp1ck under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇