当前位置: 首页 > Skill >

security-plus

security-plus

security-plus

Enhanced security with OWASP Top 10, dependency scanning, SAST/DAST, secrets detection, compliance checks, and security hardening guides.

1.0.0 2026.11.16 146
获取Skill文件查看使用说明
作 者:陈知 许可证: 更新时间:2026.11.16
本文目录展开

Security Plus

Enhanced security with OWASP Top 10, vulnerability scanning, and compliance checks.

Features

  • OWASP Top 10: Complete coverage of web application risks
  • Vulnerability Scanning: SAST, DAST, dependency scanning
  • Secrets Detection: Prevent credential leaks
  • Compliance Checks: GDPR, HIPAA, SOC2 basics
  • Security Hardening: Server, application, database hardening

Quick Reference

Risk Category Mitigation
Injection A03:2021 Parameterized queries
Broken Auth A07:2021 MFA, secure session
XSS A03:2021 Input validation, output encoding
SSRF A10:2021 Input validation, allowlists
Security Misconfig A05:2021 Secure defaults, hardening

OWASP Top 10 (2021)

A01: Broken Access Control

# Prevention
- Deny by default
- Implement RBAC/ABAC
- Validate permissions server-side
- Log access control failures
- Rate limit API access

A02: Cryptographic Failures

# Prevention
- Use strong algorithms (AES-256, RSA-2048+)
- Never store passwords in plaintext
- Use bcrypt/argon2 for password hashing
- Encrypt data at rest and in transit
- Manage keys properly

A03: Injection

# Prevention
- Use parameterized queries
- Validate and sanitize input
- Use ORM/ODM libraries
- Escape output
- Use LIMIT and other SQL controls

A04: Insecure Design

# Prevention
- Threat modeling
- Secure design patterns
- Reference architecture
- Security requirements
- Secure development lifecycle

A05: Security Misconfiguration

# Prevention
- Secure defaults
- Minimal installation
- Review configurations
- Automated verification
- Hardening guides

A06: Vulnerable Components

# Prevention
- Dependency scanning
- Automated updates
- Software composition analysis
- Monitor CVEs
- Remove unused dependencies

A07: Authentication Failures

# Prevention
- Multi-factor authentication
- Secure password storage
- Rate limiting
- Session management
- Account lockout

A08: Software and Data Integrity

# Prevention
- Digital signatures
- CI/CD pipeline security
- Dependency verification
- Code review
- Integrity checks

A09: Security Logging Failures

# Prevention
- Log security events
- Centralized logging
- Alert on suspicious activity
- Log integrity protection
- Incident response plan

A10: Server-Side Request Forgery

# Prevention
- Input validation
- URL allowlists
- Disable HTTP redirections
- Segment networks
- Use metadata endpoints

Vulnerability Scanning

SAST (Static Application Security Testing)

# SonarQube
sonar-scanner

# Semgrep
semgrep scan --config=auto

# Bandit (Python)
bandit -r src/

DAST (Dynamic Application Security Testing)

# OWASP ZAP
docker run -t owasp/zap2docker-stable zap-baseline.py -t https://example.com

# Nikto
nikto -h https://example.com

Dependency Scanning

# npm audit
npm audit
npm audit fix

# Snyk
npx snyk test
npx snyk monitor

# Safety (Python)
safety check

# Bundler-audit (Ruby)
bundle-audit check --update

Secrets Detection

Pre-commit Hooks

# Install pre-commit
pip install pre-commit

# Add to .pre-commit-config.yaml
repos:
  - repo: https://github.com/Yelp/detect-secrets
    rev: v1.4.0
    hooks:
      - id: detect-secrets
        args: ['--baseline', '.secrets.baseline']

Scanning Tools

# detect-secrets
detect-secrets scan

# gitleaks
gitleaks detect --source . --verbose

# truffleHog
trufflehog git file://. --only-verified

Secret Patterns

# Common patterns to detect
- AWS keys: AKIA[0-9A-Z]{16}
- GitHub tokens: gh[pousr]_[A-Za-z0-9]{36}
- Private keys: -----BEGIN.*PRIVATE KEY-----
- API keys: [a-zA-Z0-9]{32,}
- Passwords: passwords*[:=]s*[^s]+

Compliance Checks

GDPR

# Requirements
- Data minimization
- Purpose limitation
- Storage limitation
- Right to erasure
- Data portability
- Consent management

HIPAA

# Requirements
- Access controls
- Audit controls
- Integrity controls
- Transmission security
- Encryption at rest
- Business associate agreements

SOC2

# Trust Service Criteria
- Security
- Availability
- Processing integrity
- Confidentiality
- Privacy

Security Hardening

Server Hardening

# SSH
- Disable root login
- Use key-based auth
- Change default port
- Limit SSH users

# Firewall
- Allow only necessary ports
- Rate limit connections
- Block known malicious IPs

# Updates
- Enable automatic security updates
- Remove unused packages
- Disable unnecessary services

Application Hardening

# Headers
- Content-Security-Policy
- X-Content-Type-Options
- X-Frame-Options
- Strict-Transport-Security

# Cookies
- Secure flag
- HttpOnly flag
- SameSite attribute
- Short expiration

# Input Validation
- Whitelist validation
- Length limits
- Type checking
- Sanitization

Database Hardening

# Access
- Least privilege
- Separate accounts
- Strong passwords
- Network restrictions

# Configuration
- Disable remote access
- Enable encryption
- Audit logging
- Regular backups

# Queries
- Parameterized queries
- Input validation
- Output encoding

Security Checklist

Development

  • Security requirements defined
  • Threat modeling completed
  • Secure coding guidelines followed
  • Code review for security
  • Dependencies scanned

Deployment

  • Secure configuration
  • Secrets in vault
  • HTTPS enabled
  • Security headers set
  • Logging configured

Operations

  • Monitoring enabled
  • Alerts configured
  • Incident response plan
  • Regular audits
  • Backup testing

Tools Reference

Category Tool Purpose
SAST SonarQube, Semgrep Code analysis
DAST OWASP ZAP, Nikto Runtime testing
Dependencies Snyk, npm audit Vulnerability scanning
Secrets detect-secrets, gitleaks Credential detection
Container Trivy, Clair Image scanning
Infrastructure Checkov, tfsec IaC scanning

Best Practices

  1. Shift left - Security early in development
  2. Defense in depth - Multiple security layers
  3. Least privilege - Minimal permissions
  4. Secure defaults - Out-of-box security
  5. Fail securely - Graceful degradation
  6. Don't trust input - Validate everything
  7. Log security events - Audit trail
  8. Regular updates - Patch vulnerabilities

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,016
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,004
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,002
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,001
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,001
PHP集成RabbitMQ实现消息队列的完整步骤

使用 php-amqplib 库,通过建立连接、声明交换机与队列并绑定,即可在 PHP 中实现消息的发送与消费。

2026.05.24 1,001
Skill 文件
  • SKILL.md
    • Security Plus
    • Features
    • Quick Reference
    • OWASP Top 10 (2021)
      • A01: Broken Access Control
      • A02: Cryptographic Failures
      • A03: Injection
      • A04: Insecure Design
      • A05: Security Misconfiguration
      • A06: Vulnerable Components
      • A07: Authentication Failures
      • A08: Software and Data Integrity
      • A09: Security Logging Failures
      • A10: Server-Side Request Forgery
    • Vulnerability Scanning
      • SAST (Static Application Security Testing)
      • DAST (Dynamic Application Security Testing)
      • Dependency Scanning
    • Secrets Detection
      • Pre-commit Hooks
      • Scanning Tools
      • Secret Patterns
    • Compliance Checks
      • GDPR
      • HIPAA
      • SOC2
    • Security Hardening
      • Server Hardening
      • Application Hardening
      • Database Hardening
    • Security Checklist
      • Development
      • Deployment
      • Operations
    • Tools Reference
    • Best Practices
  • 项目或源文件

相关 Skill

更多
docker-plus docker-plus Enhanced Docker with Dockerfile templates, multi-stage builds, security hardening, production best practices, Docker Compose patterns, and troubleshooting guides.
Security Hardening Security Hardening AI 智能体的安全审计与加固,涵盖凭证安全、机密扫描、提示注入防御、数据防泄露及隐私区域。
x402 Commerce Kit: Merchant Starter Kit + Payment Rails Guide + Security Hardening x402 Commerce Kit: Merchant Starter Kit + Payment Rails Guide + Security Hardening 从零启动加密原生店铺。包括 x402商家入门套件(可部署代码)、代理支付通道手册和商业安全...
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表