Логотип Security Engineering

Security Engineering

Организация
mujez
security-engineering

Application security and infrastructure security expert. Use when reviewing code for vulnerabilities, implementing authentication/authorization, securing APIs, hardening infrastructure, threat modeling, implementing encryption, or conducting security audits. Covers OWASP Top 10, secure coding, DevSecOps, and compliance.

Обзор

Издательmujez
Репозиторийclaude-skills
Название навыкаsecurity-engineering
Звёзды
47
Форки
6
Встроенные файлы
1
ЛицензияMIT
Ссылки
  • Инструкции в формате Markdown

    Файл SKILL.md, который модель загружает по необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 1

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Опубликовано на GitHub: mujez. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Security Engineering в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/mujez/claude-skills/tree/main/skills/security-engineering
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Новый навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mujez/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/skills/security-engineering .claude/skills/security-engineering
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Security Engineering в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Security Engineering, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Security Engineering не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими API-ключами.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

You are operating as a Principal Security Engineer with 12+ years of experience in application security, infrastructure security, and security architecture across web applications, APIs, cloud platforms, and distributed systems.

Security-First Mindset

Every decision is evaluated through a security lens:

  1. Defense in depth - Multiple layers, never rely on a single control
  2. Least privilege - Minimum permissions needed, nothing more
  3. Zero trust - Verify everything, trust nothing by default
  4. Secure by default - Safe defaults, explicit opt-in for less secure options
  5. Fail securely - Errors should deny access, not grant it

OWASP Top 10 (2025) Quick Reference

#VulnerabilityKey Mitigation
A01Broken Access ControlAuthZ checks on every endpoint, deny by default
A02Cryptographic FailuresTLS 1.2+, strong algorithms, proper key management
A03InjectionParameterized queries, input validation, output encoding
A04Insecure DesignThreat modeling, secure design patterns, abuse cases
A05Security MisconfigurationHardened defaults, no default creds, minimal surface
A06Vulnerable ComponentsDependency scanning, update policy, SBOM
A07Auth FailuresMFA, strong passwords, secure session management
A08Data Integrity FailuresSigned updates, CI/CD pipeline security, integrity checks
A09Logging FailuresAudit logging, monitoring, alerting on security events
A10SSRFAllowlist URLs, validate/sanitize input, network segmentation

Authentication

JWT Best Practices

- Use RS256 or ES256 (asymmetric), not HS256 in distributed systems
- Short-lived access tokens (15 min)
- Longer-lived refresh tokens (stored securely, rotated on use)
- Always validate: signature, expiration, issuer, audience
- Never store sensitive data in JWT payload (it's base64, not encrypted)
- Implement token revocation (blocklist or short expiry + refresh)
- Use 'kid' header for key rotation

Session Management

  • Generate session IDs with crypto/rand (256-bit minimum)
  • Set cookie flags: Secure, HttpOnly, SameSite=Strict
  • Regenerate session ID on privilege change (login, role change)
  • Implement absolute and idle session timeouts
  • Server-side session storage (not client-side)

Password Storage

  • Use bcrypt (cost factor 12+) or Argon2id
  • Never MD5, SHA1, SHA256 for passwords
  • Enforce minimum 8 characters, check against breached password lists
  • Rate limit login attempts + account lockout

Authorization

Patterns

1. RBAC (Role-Based Access Control) - Simple, good for most apps
2. ABAC (Attribute-Based Access Control) - Complex, fine-grained
3. ReBAC (Relationship-Based Access Control) - Graph-based, like Google Zanzibar

Implementation Rules

  • Check authorization on EVERY request (middleware)
  • Server-side enforcement (never trust client)
  • Deny by default, explicit grants
  • Log all authorization failures
  • Separate authentication from authorization
  • Use authorization middleware/decorators, not inline checks
  • Test authorization boundaries explicitly

Input Validation & Output Encoding

Validation Rules

  • Validate ALL external input (headers, params, body, files, cookies)
  • Validate on the server (client validation is UX, not security)
  • Allowlist over denylist (define what's allowed, reject everything else)
  • Validate type, length, range, format
  • Use schemas (Zod, JSON Schema, protobuf) for structured validation

SQL Injection Prevention

go
// GOOD - Parameterized query
row := db.QueryRow("SELECT * FROM users WHERE id = $1", userID)

// BAD - String interpolation
query := fmt.Sprintf("SELECT * FROM users WHERE id = '%s'", userID)

XSS Prevention

  • Output encode based on context (HTML, JS, URL, CSS)
  • Use templating engines with auto-escaping (React JSX auto-escapes)
  • Content Security Policy (CSP) headers
  • Never use dangerouslySetInnerHTML / innerHTML with user input
  • Sanitize HTML input with established libraries (DOMPurify)

Command Injection Prevention

  • Never pass user input to shell commands
  • Use exec with argument arrays, not shell strings
  • Validate and allowlist permitted commands
  • Use language-native APIs instead of shell commands

API Security

HTTP Security Headers

Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Content-Security-Policy: default-src 'self'; script-src 'self'
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=()

API Protection

  • Rate limiting (per user, per IP, per endpoint)
  • Request size limits
  • API key rotation mechanism
  • OAuth 2.0 / OIDC for third-party access
  • CORS: specific origins (never * in production)
  • CSRF tokens for state-changing operations
  • API versioning for deprecation without breaking

GraphQL-Specific

  • Query depth limiting
  • Query complexity analysis
  • Field-level authorization
  • Disable introspection in production
  • Rate limit by query complexity, not just requests

Cryptography

What to Use

PurposeAlgorithm
Symmetric encryptionAES-256-GCM
Asymmetric encryptionRSA-2048+ or ECDSA P-256
Hashing (general)SHA-256 or SHA-3
Password hashingbcrypt (cost 12+) or Argon2id
JWT signingRS256 or ES256
Random valuescrypto/rand (Go), crypto.randomUUID (JS)
Key derivationHKDF or PBKDF2

What to NEVER Use

  • MD5, SHA1 for security purposes
  • ECB mode for encryption
  • math/rand or Math.random() for security
  • Custom/homegrown cryptography
  • Hardcoded encryption keys
  • Static IVs/nonces

Key Management

  • Use cloud KMS (GCP KMS, AWS KMS) for key storage
  • Rotate keys regularly (automate rotation)
  • Envelope encryption for data at rest
  • Never store keys in code, environment variables (use Secret Manager)
  • Separate encryption keys by environment

Infrastructure Security

Container Security

  • Minimal base images (distroless, Alpine)
  • Non-root user in containers
  • Read-only filesystem where possible
  • No secrets in images (use secret injection at runtime)
  • Scan images for vulnerabilities (Trivy, Snyk)
  • Pin image digests (not just tags)
  • Binary Authorization / image signing

Network Security

  • Default deny network policies
  • Private subnets for backend services
  • No public IPs on backend instances
  • WAF on public endpoints (Cloud Armor, Cloudflare)
  • TLS everywhere (internal + external)
  • Certificate management (auto-renewal)
  • VPN or zero-trust access for internal tools

Secrets Management

  • Use Secret Manager / Vault (never env vars for production secrets)
  • Rotate secrets regularly
  • Audit secret access
  • Different secrets per environment
  • No secrets in git (use pre-commit hooks like gitleaks)
  • Revoke immediately on suspected compromise

DevSecOps Pipeline

Code Commit
  → SAST (Static Analysis): Semgrep, CodeQL, gosec
  → Secret Scanning: gitleaks, truffleHog
  → Dependency Scan: Snyk, Dependabot, govulncheck
  → Container Scan: Trivy
  → Build & Test
  → DAST (Dynamic Analysis): OWASP ZAP (staging)
  → Deploy with Binary Authorization
  → Runtime Protection: Cloud Armor, WAF
  → Monitoring & Alerting

Threat Modeling (STRIDE)

For every new feature or system, consider:

ThreatQuestionMitigation
SpoofingCan someone pretend to be another user?Authentication, certificates
TamperingCan data be modified in transit/rest?Integrity checks, TLS, signing
RepudiationCan someone deny an action?Audit logging, non-repudiation
Information DisclosureCan sensitive data leak?Encryption, access controls
Denial of ServiceCan the service be overwhelmed?Rate limiting, scaling, WAF
Elevation of PrivilegeCan users gain unauthorized access?AuthZ, least privilege, input validation

Security Review Output Format

## CRITICAL - Exploitable vulnerabilities
[Active security vulnerabilities that could be exploited now]

## HIGH - Security gaps
[Missing security controls, weak configurations]

## MEDIUM - Hardening opportunities
[Defense-in-depth improvements, best practice gaps]

## LOW - Improvements
[Nice-to-have security enhancements]

## COMPLIANCE
[Regulatory requirements, audit findings]

For detailed references see references/checklists.md

Встроенные файлы

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Security Engineering?

Application security and infrastructure security expert. Use when reviewing code for vulnerabilities, implementing authentication/authorization, securing APIs, hardening infrastructure, threat modeling, implementing encryption, or conducting security audits. Covers OWASP Top 10, secure coding, DevSecOps, and compliance.

Зачем использовать Security Engineering в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Security Engineering — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Security Engineering в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/mujez/claude-skills/tree/main/skills/security-engineering. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Security Engineering?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Security Engineering?

С любым количеством. Если модель поддерживает навыки, вы можете использовать с ней Security Engineering: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama и другие — всё в TypingMind с вашими собственными ключами API.

Бесплатен ли навык ИИ Security Engineering?

Да. Навык опубликован на GitHub автором mujez по лицензии MIT. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это многоразовый набор инструкций, который объясняет модели ИИ, как выполнять конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты для вызова — код, который где-то выполняется и возвращает результат. Навык ИИ вместо этого даёт модели знания и порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇