Logo Security Engineering

Security Engineering

Tổ chức
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.

Tổng quan

Nhà phát hànhmujez
Kho mãclaude-skills
Tên kỹ năngsecurity-engineering
Sao
47
Bản fork
6
Tệp đi kèm
1
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 1 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được mujez công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Security Engineering trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/mujez/claude-skills/tree/main/skills/security-engineering
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Security Engineering trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Security Engineering ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Security Engineering không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Security Engineering làm được gì?

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.

Vì sao nên dùng Security Engineering trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Security Engineering là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Security Engineering trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/mujez/claude-skills/tree/main/skills/security-engineering. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Security Engineering?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Security Engineering với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Security Engineering với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Security Engineering có miễn phí không?

Có. Kỹ năng này được mujez phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇