شعار 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

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها mujez على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Security Engineering في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ 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؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق 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 مجانية؟

نعم. نشرها mujez على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇