Security Reviewのロゴ

Security Review

組織
LangConfig
security-review

Comprehensive security code review covering OWASP Top 10, authentication, authorization, and secure coding practices. Use when reviewing code for vulnerabilities or implementing security features.

Add to TypingMind

概要

公開者LangConfig
リポジトリlangconfig
スキル名security-review
スター
69
フォーク
19
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    LangConfigがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Security Review」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/LangConfig/langconfig/tree/main/backend/skills/builtin/security-review
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/LangConfig/langconfig.git /tmp/langconfig
mkdir -p .claude/skills
cp -r /tmp/langconfig/backend/skills/builtin/security-review .claude/skills/security-review
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでSecurity Reviewを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にSecurity Reviewを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Security Reviewは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Instructions

You are a security expert conducting code reviews. Focus on identifying vulnerabilities and recommending secure alternatives.

OWASP Top 10 Checklist (2021)

1. Broken Access Control (A01)

Look for:

  • Missing authorization checks on endpoints
  • Direct object references without validation
  • Privilege escalation paths
  • CORS misconfigurations

Bad:

python
@app.get("/users/{user_id}")
def get_user(user_id: int):
    return db.query(User).get(user_id)  # No auth check!

Good:

python
@app.get("/users/{user_id}")
def get_user(user_id: int, current_user: User = Depends(get_current_user)):
    if current_user.id != user_id and not current_user.is_admin:
        raise HTTPException(403, "Access denied")
    return db.query(User).get(user_id)
2. Cryptographic Failures (A02)

Look for:

  • Sensitive data in plaintext
  • Weak encryption algorithms (MD5, SHA1)
  • Hardcoded secrets
  • Missing HTTPS

Bad:

python
password_hash = hashlib.md5(password.encode()).hexdigest()
API_KEY = "sk-1234567890"  # Hardcoded!

Good:

python
from passlib.hash import bcrypt
password_hash = bcrypt.hash(password)
API_KEY = os.environ.get("API_KEY")
3. Injection (A03)

Look for:

  • SQL injection
  • Command injection
  • LDAP injection
  • Template injection

Bad:

python
query = f"SELECT * FROM users WHERE name = '{user_input}'"
os.system(f"convert {filename} output.png")

Good:

python
query = "SELECT * FROM users WHERE name = :name"
db.execute(query, {"name": user_input})

import subprocess
subprocess.run(["convert", filename, "output.png"], check=True)
4. Insecure Design (A04)

Look for:

  • Missing rate limiting
  • No account lockout
  • Predictable resource IDs
  • Missing security headers

Implement:

python
# Rate limiting
from slowapi import Limiter
limiter = Limiter(key_func=get_remote_address)

@app.post("/login")
@limiter.limit("5/minute")
def login(request: Request):
    ...

# Security headers
app.add_middleware(
    SecurityHeadersMiddleware,
    content_security_policy="default-src 'self'",
    x_frame_options="DENY"
)
5. Security Misconfiguration (A05)

Look for:

  • Debug mode in production
  • Default credentials
  • Unnecessary features enabled
  • Verbose error messages

Check:

python
# Bad
DEBUG = True
SECRET_KEY = "change-me"

# Good
DEBUG = os.getenv("DEBUG", "false").lower() == "true"
SECRET_KEY = os.getenv("SECRET_KEY")
if not SECRET_KEY:
    raise ValueError("SECRET_KEY must be set")
6. Vulnerable Components (A06)

Look for:

  • Outdated dependencies
  • Known vulnerable packages
  • Unmaintained libraries

Tools:

bash
# Python
pip-audit
safety check

# JavaScript
npm audit
snyk test

# General
dependabot alerts
7. Authentication Failures (A07)

Look for:

  • Weak password requirements
  • Missing MFA
  • Session fixation
  • Credential stuffing vulnerability

Implement:

python
# Strong password validation
import re

def validate_password(password: str) -> bool:
    if len(password) < 12:
        return False
    if not re.search(r'[A-Z]', password):
        return False
    if not re.search(r'[a-z]', password):
        return False
    if not re.search(r'\d', password):
        return False
    if not re.search(r'[!@#$%^&*]', password):
        return False
    return True

# Secure session configuration
app.config.update(
    SESSION_COOKIE_SECURE=True,
    SESSION_COOKIE_HTTPONLY=True,
    SESSION_COOKIE_SAMESITE='Strict',
    PERMANENT_SESSION_LIFETIME=timedelta(hours=1)
)
8. Software/Data Integrity Failures (A08)

Look for:

  • Missing integrity checks on updates
  • Insecure deserialization
  • Untrusted CI/CD pipelines

Bad:

python
import pickle
data = pickle.loads(user_input)  # Dangerous!

Good:

python
import json
data = json.loads(user_input)  # Safe for untrusted input
9. Security Logging Failures (A09)

Look for:

  • Missing audit logs
  • Sensitive data in logs
  • No alerting on failures

Implement:

python
import logging

# Configure secure logging
logger = logging.getLogger("security")
logger.setLevel(logging.INFO)

# Log security events
def login(username: str, password: str):
    user = authenticate(username, password)
    if user:
        logger.info(f"Successful login: user={username} ip={request.client.host}")
    else:
        logger.warning(f"Failed login attempt: user={username} ip={request.client.host}")
10. Server-Side Request Forgery (A10)

Look for:

  • User-controlled URLs in requests
  • Internal service access
  • Cloud metadata endpoints

Bad:

python
@app.get("/fetch")
def fetch_url(url: str):
    return requests.get(url).content  # SSRF!

Good:

python
from urllib.parse import urlparse

ALLOWED_HOSTS = ["api.example.com", "cdn.example.com"]

@app.get("/fetch")
def fetch_url(url: str):
    parsed = urlparse(url)
    if parsed.hostname not in ALLOWED_HOSTS:
        raise HTTPException(400, "URL not allowed")
    if parsed.scheme not in ["http", "https"]:
        raise HTTPException(400, "Invalid scheme")
    return requests.get(url).content

Security Review Checklist

Authentication
  • Passwords hashed with bcrypt/argon2
  • Session tokens are random and long enough
  • Session invalidation on logout
  • Account lockout after failed attempts
  • Secure password reset flow
Authorization
  • All endpoints have auth checks
  • Role-based access control implemented
  • No privilege escalation paths
  • API keys properly scoped
Input Validation
  • All user input validated
  • File upload restrictions (type, size)
  • URL parameters sanitized
  • JSON schema validation
Output Encoding
  • HTML output escaped
  • JSON responses properly formatted
  • No sensitive data in responses
  • Error messages don't leak info
Data Protection
  • Sensitive data encrypted at rest
  • TLS for data in transit
  • Secrets in environment variables
  • PII properly handled

Examples

User asks: "Review my authentication code for security issues"

Response approach:

  1. Check password hashing algorithm
  2. Review session management
  3. Look for timing attacks
  4. Check rate limiting
  5. Review token generation
  6. Verify secure cookie settings
  7. Check for credential exposure in logs

よくある質問

AIスキル「Security Review」では何ができますか?

Comprehensive security code review covering OWASP Top 10, authentication, authorization, and secure coding practices. Use when reviewing code for vulnerabilities or implementing security features.

TypingMindでSecurity Reviewを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Security Reviewはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにSecurity Reviewをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/LangConfig/langconfig/tree/main/backend/skills/builtin/security-reviewを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Security Reviewを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Security Reviewで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもSecurity Reviewを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Security Review」は無料ですか?

はい。LangConfigがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇