Get the FREE Ultimate OpenClaw Setup Guide →

security-engineering

Scanned
npx machina-cli add skill aiskillstore/marketplace/security-engineering --openclaw
Files (1)
SKILL.md
5.5 KB

Security Engineering

Comprehensive security engineering skill covering application security, infrastructure security, compliance, and incident response.

When to Use This Skill

  • Designing security architecture
  • Implementing authentication and authorization
  • Conducting threat modeling
  • Security code review
  • Implementing compliance controls (SOC2, HIPAA, PCI-DSS)
  • Incident response planning
  • Security monitoring and alerting

Security Architecture

Defense in Depth

Layer security controls at multiple levels:

LayerControls
PerimeterFirewall, WAF, DDoS protection
NetworkSegmentation, IDS/IPS, VPN
HostHardening, EDR, patch management
ApplicationInput validation, secure coding, SAST/DAST
DataEncryption, access control, DLP
IdentityMFA, SSO, privileged access management

Zero Trust Architecture

Core Principles:

  1. Never trust, always verify
  2. Assume breach mentality
  3. Least privilege access
  4. Micro-segmentation
  5. Continuous verification

Implementation:

  • Identity-based access (not network-based)
  • Device health verification
  • Continuous authentication
  • Encrypted communications everywhere
  • Detailed logging and monitoring

Authentication Patterns

OAuth 2.0 / OIDC

Grant Types:

GrantUse Case
Authorization Code + PKCEWeb/mobile apps
Client CredentialsService-to-service
Device CodeCLI tools, IoT

Token Best Practices:

  • Short-lived access tokens (15 min - 1 hour)
  • Secure refresh token storage
  • Token rotation on use
  • Revocation capabilities

Session Management

  • Secure, HttpOnly, SameSite cookies
  • Session timeout (idle and absolute)
  • Session invalidation on logout
  • Concurrent session limits
  • Session binding to device/IP

Multi-Factor Authentication

  • TOTP (authenticator apps)
  • WebAuthn/FIDO2 (hardware keys)
  • Push notifications
  • SMS (last resort, vulnerable to SIM swap)

Authorization Patterns

RBAC (Role-Based Access Control)

Users → Roles → Permissions

Best for: Well-defined organizational hierarchies

ABAC (Attribute-Based Access Control)

If user.department == "engineering" AND
   resource.classification == "internal" AND
   time.hour BETWEEN 9 AND 17
THEN allow

Best for: Complex, dynamic access requirements

Policy as Code

Use OPA/Rego or Cedar for externalized policy:

  • Version controlled policies
  • Testable access rules
  • Audit trail
  • Separation of concerns

Secure Development

OWASP Top 10 Mitigations

RiskMitigation
InjectionParameterized queries, input validation
Broken AuthStrong password policy, MFA, rate limiting
Sensitive DataEncryption, minimal data collection
XXEDisable external entities
Broken AccessAuthorization checks, default deny
MisconfigSecure defaults, hardening guides
XSSOutput encoding, CSP
DeserializationIntegrity checks, avoid untrusted data
ComponentsDependency scanning, updates
LoggingCentralized logging, alerting

Security Testing

SAST (Static Analysis):

  • Run on every commit
  • Block high-severity findings
  • Tools: Semgrep, CodeQL, SonarQube

DAST (Dynamic Analysis):

  • Run against staging/dev
  • Tools: OWASP ZAP, Burp Suite

Dependency Scanning:

  • Check for known vulnerabilities
  • Tools: Snyk, Dependabot, npm audit

Secrets Management

Never:

  • Commit secrets to git
  • Log secrets
  • Pass secrets in URLs
  • Hardcode secrets

Do:

  • Use secret managers (Vault, AWS Secrets Manager)
  • Rotate secrets regularly
  • Audit secret access
  • Use short-lived credentials

Compliance Frameworks

Common Requirements

FrameworkFocus Area
SOC 2Trust services (security, availability, etc.)
HIPAAHealthcare data protection
PCI-DSSPayment card data
GDPREU personal data protection
ISO 27001Information security management

Key Controls

  • Access control and authentication
  • Encryption (at rest and in transit)
  • Logging and monitoring
  • Incident response procedures
  • Business continuity planning
  • Vendor management
  • Employee security training

Incident Response

Response Phases

  1. Preparation: Runbooks, tools, training
  2. Detection: Monitoring, alerting, triage
  3. Containment: Isolate, preserve evidence
  4. Eradication: Remove threat, patch vulnerabilities
  5. Recovery: Restore services, verify clean
  6. Lessons Learned: Post-mortem, improvements

Severity Levels

LevelDescriptionResponse Time
P1Active breach, data exfiltrationImmediate
P2Vulnerability being exploited< 4 hours
P3High-risk vulnerability discovered< 24 hours
P4Security improvement neededNext sprint

Reference Files

  • references/threat_modeling.md - STRIDE methodology and examples
  • references/compliance_controls.md - Framework-specific control mappings

Integration with Other Skills

  • cloud-infrastructure - For cloud security
  • debugging - For security incident investigation
  • testing - For security testing patterns

Source

git clone https://github.com/aiskillstore/marketplace/blob/main/skills/89jobrien/security-engineering/SKILL.mdView on GitHub

Overview

Security Engineering covers application and infrastructure security, compliance, and incident response. It guides designing security architecture, implementing authentication/authorization, threat modeling, and monitoring controls to protect data and operations.

How This Skill Works

This skill combines defense-in-depth with Zero Trust, OAuth2/OIDC, RBAC/ABAC and Policy as Code to enforce access and data protection. It also prescribes secure development practices, regular security testing (SAST/DAST), and secrets management to reduce risk.

When to Use It

  • Designing security architecture and controls across perimeter, network, host, app, and data layers
  • Implementing authentication and authorization (OAuth2.0/OIDC, MFA, SSO)
  • Conducting threat modeling to identify and mitigate risks
  • Implementing compliance controls (SOC 2, HIPAA, PCI-DSS) and audit readiness
  • Setting up security monitoring, alerting, and incident response planning

Quick Start

  1. Step 1: Map data flows and trust boundaries to identify where controls are needed
  2. Step 2: Implement authentication/authorization patterns (OAuth2/OIDC, MFA) and RBAC/ABAC
  3. Step 3: Set up CI/CD security checks (SAST/DAST), secret management, and incident response runbooks

Best Practices

  • Apply defense-in-depth across all layers (perimeter, network, host, application, data)
  • Adopt Zero Trust with identity-based access, continuous verification, and detailed logging
  • Use RBAC or ABAC complemented by Policy as Code (OPA/Rego) for scalable access control
  • Follow OWASP Top 10 mitigations and integrate SAST/DAST in CI/CD
  • Manage secrets with dedicated secret managers and avoid hardcoding or leaking credentials

Example Use Cases

  • Architecting a web app with MFA, SSO, and encrypted data at rest
  • Implementing OAuth 2.0 / OIDC for microservices and service-to-service communication
  • Running threat modeling sessions during design to surface attack surfaces
  • Enforcing PCI-DSS compliance through access controls, logging, and encryption
  • Establishing a security incident response plan with monitoring and playbooks

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers