django-security
Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations.
Skill by marshall0524
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/marshall0524-django-security
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
django-security- Description
- Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations.
- License
- MIT
- Instructions
- 589 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- body: 589 lines (spec recommends under 500)
Files (1)
- SKILL.md
SKILL.md (first lines)
# Django セキュリティベストプラクティス
一般的な脆弱性から保護するためのDjangoアプリケーションの包括的なセキュリティガイドライン。
## いつ有効化するか
- Django認証と認可を設定するとき
- ユーザー権限とロールを実装するとき
- 本番セキュリティ設定を構成するとき
- Djangoアプリケーションのセキュリティ問題をレビューするとき
- Djangoアプリケーションを本番環境にデプロイするとき
## 核となるセキュリティ設定
### 本番設定の構成
```python
# settings/production.py
import os
DEBUG = False # 重要: 本番環境では絶対にTrueにしない
ALLOWED_HOSTS = os.environ.get('ALLOWED_HOSTS', '').split(',')
# セキュリティヘッダー
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SECURE_HSTS_SECONDS = 31536000 # 1年
SECURE_HSTS_INCLUDE_SUBDOMAINS = True
SECURE_HSTS_PRELOAD = True
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_BROWSER_XSS_FILTER = True
X_FRAME_OPTIONS = 'DENY'
# HTTPSとクッキー
SESSION_COOKIE_HTTPONLY = True
CSRF_COOKIE_HTTPONLY = True
SESSION_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_SAMESITE = 'Lax'
# シークレットキー(環境変数経由で設定する必要があります)
SECRET_KEY = os.environ.get('DJANGO_SECRET_KEY')
if not SECRET_KEY:
raise ImproperlyConfigured('DJANGO_SECRET_KEY environment variable is required')
# パスワード検証
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
'OPTIONS': {
'min_length': 12,
}
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
```
## 認証
### カスタムユーザーモデル
```python
# apps/users/models.py
from django.contrib.auth.models import AbstractUser
from django.db import models
class User(AbstractUser):
"""より良いセキュリティのためのカスタムユーザーモデル。"""
email = models.EmailField(unique=True)
phone = models.CharField(max_length=20, blank=True)
USERNAME_FIELD = 'email' # メールをユーザー名として使用
REQUIRED_FIELDS = ['username']
class Meta:
db_table = 'users'
verbose_name = 'User'
verbose_name_plural = 'Users'
def __str__(self):
return self.email
# settings/base.py
AUTH_USER_MODEL = 'users.User'
```
### パスワードハッシング
```python
# デフォルトではDjangoはPBKDF2を使用。より強力なセキュリティのために:
PASSWORD_HASHERS = [
'django.contrib.auth.hashers.Argon2PasswordHasher',
'django.contrib.auth.hashers.PBKDF2PasswordHasher',
'django.contrib.auth.hashers.PBKDF2SHA1PasswordHasher',
'django.contrib.auth.hashers.BCryptSHA256PasswordHasher',
]
```
### セッション管理
```python
# セッション設定
SESSION_ENGINE = 'django.contrib.sessions.backends.cache' # または 'db'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 3600 * 24 * 7 # 1週間
SESSION_SAVE_EVERY_REQUEST = False
SESSION_EXPIRE_AT_BROWSER_CLOSE = False # より良いUXですが、セキュリティは低い
```From marshall0524/everythingclaudecode, MIT.
More from marshall0524/everythingclaudecode
- 0.498score
security-scan
marshall0524
AgentShield を使用して、Claude Code の設定(.claude/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CLAUDE.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。
SkillDFreshness: D★ 41Claude Code +9 - 0.498score
configure-ecc
marshall0524
Everything Claude Code のインタラクティブなインストーラー — スキルとルールの選択とインストールをユーザーレベルまたはプロジェクトレベルのディレクトリへガイドし、パスを検証し、必要に応じてインストールされたファイルを最適化します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning
marshall0524
Claude Codeセッションから再利用可能なパターンを自動的に抽出し、将来の使用のために学習済みスキルとして保存します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning-v2
marshall0524
フックを介してセッションを観察し、信頼度スコアリング付きのアトミックなインスティンクトを作成し、スキル/コマンド/エージェントに進化させるインスティンクトベースの学習システム。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
cpp-testing
marshall0524
C++ テストの作成/更新/修正、GoogleTest/CTest の設定、失敗またはフレーキーなテストの診断、カバレッジ/サニタイザーの追加時にのみ使用します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
security-review
marshall0524
認証の追加、ユーザー入力の処理、シークレットの操作、APIエンドポイントの作成、支払い/機密機能の実装時にこのスキルを使用します。包括的なセキュリティチェックリストとパターンを提供します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
nutrient-document-processing
marshall0524
Nutrient DWS API を使用してドキュメントの処理、変換、OCR、抽出、編集、署名、フォーム入力を行います。PDF、DOCX、XLSX、PPTX、HTML、画像に対応しています。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
java-coding-standards
marshall0524
Spring Bootサービス向けのJavaコーディング標準:命名、不変性、Optional使用、ストリーム、例外、ジェネリクス、プロジェクトレイアウト。
SkillDFreshness: D★ 41Claude Code +9 - 0.492score
eval-harness
marshall0524
Claude Codeセッションの正式な評価フレームワークで、評価駆動開発(EDD)の原則を実装します
SkillDFreshness: D★ 41Claude Code +9 - 0.492score
iterative-retrieval
marshall0524
サブエージェントのコンテキスト問題を解決するために、コンテキスト取得を段階的に洗練するパターン
SkillDFreshness: D★ 41Claude Code +9 - 0.486score
python-patterns
marshall0524
Pythonic イディオム、PEP 8標準、型ヒント、堅牢で効率的かつ保守可能なPythonアプリケーションを構築するためのベストプラクティス。
SkillDFreshness: D★ 41Claude Code +9 - 0.486score
coding-standards
marshall0524
TypeScript、JavaScript、React、Node.js開発のための汎用コーディング標準、ベストプラクティス、パターン。
SkillDFreshness: D★ 41Claude Code +9
Signals
- Stars
- 41
- Forks
- 7
- Open issues
- 0
- Last commit (this folder)
- Feb 20, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.399score
django-security
vibeeval
Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations.
SkillDFreshness: D★ 540Claude Code +9 - 0.301score
django-security
ViewWay
Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations.
SkillCFreshness: C★ 3Claude Code +9 - 0.275score
django-security
N-H-Logistics
Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations.
SkillCFreshness: CClaude Code +9 - 0.253score
django-security
SrulyRosenblat
Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations.
SkillDFreshness: D★ 2Claude Code +9 - 0.252score
django-security
LuciferDono
Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations.
SkillDFreshness: D★ 1Claude Code +9 - 0.235score
django-security
Sraldon24
Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations.
SkillDFreshness: DClaude Code +9
More from marshall0524
- 0.498score
security-scan
marshall0524
AgentShield を使用して、Claude Code の設定(.claude/ ディレクトリ)のセキュリティ脆弱性、設定ミス、インジェクションリスクをスキャンします。CLAUDE.md、settings.json、MCP サーバー、フック、エージェント定義をチェックします。
SkillDFreshness: D★ 41Claude Code +9 - 0.498score
configure-ecc
marshall0524
Everything Claude Code のインタラクティブなインストーラー — スキルとルールの選択とインストールをユーザーレベルまたはプロジェクトレベルのディレクトリへガイドし、パスを検証し、必要に応じてインストールされたファイルを最適化します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
java-coding-standards
marshall0524
Spring Bootサービス向けのJavaコーディング標準:命名、不変性、Optional使用、ストリーム、例外、ジェネリクス、プロジェクトレイアウト。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning
marshall0524
Claude Codeセッションから再利用可能なパターンを自動的に抽出し、将来の使用のために学習済みスキルとして保存します。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
continuous-learning-v2
marshall0524
フックを介してセッションを観察し、信頼度スコアリング付きのアトミックなインスティンクトを作成し、スキル/コマンド/エージェントに進化させるインスティンクトベースの学習システム。
SkillDFreshness: D★ 41Claude Code +9 - 0.495score
cpp-testing
marshall0524
C++ テストの作成/更新/修正、GoogleTest/CTest の設定、失敗またはフレーキーなテストの診断、カバレッジ/サニタイザーの追加時にのみ使用します。
SkillDFreshness: D★ 41Claude Code +9
Cite this page
django-security skill. Agent Mart. https://agentmart.dev/skills/marshall0524-django-security (last updated 2026-10-24)