网络安全引擎

SKILL运维和基础设施
运维和基础设施 未标注权限 许可证不明确
安装这个技能

全面安全评估、STRIDE威胁建模、OWASP Top 10审计、漏洞管理与应急响应体系。企业级网络安全评估与加固体系,覆盖安全态势评估、STRIDE威胁建模、OWASP

一句话选型结论

按资料字段整理

网络安全引擎是运维和基础设施类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类运维和基础设施 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install zcwl/afrexai-cybersecurity-engine
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

运维和基础设施
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方zcwl仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 enterprise
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验未标注上游最后核验时间 · 数据更新 1791682688
正文体量31.9 KBSKILL.md 原文大小,越大说明说明书写得越细

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
查服务与日志

按现象定位服务状态与日志线索。

写部署与巡检脚本

把重复的部署、巡检写成脚本。

故障排查

按步骤排查网络、依赖与配置。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在运维和基础设施场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
网络安全引擎当前 未标注权限 未标注 未标注 未标注 有
Azure 部署 调用外部服务 GitHub 仓库 664.2 万 Codex、Claude、Cursor 有
Azure diagnostics 问题管理 调用外部服务 GitHub 仓库 657.6 万 Codex、Claude、Cursor 有
Azure aigateway 部署 调用外部服务 GitHub 仓库 655.3 万 Codex、Claude、Cursor 有
Azure AI 搜索 调用外部服务 GitHub 仓库 651.4 万 Codex、Claude、Cursor 有
Azure Cloud migrate 部署 调用外部服务 GitHub 仓库 650.7 万 Codex、Claude、Cursor 有

SKILL.md 全文

31.9 KB
模型实际读到的说明书原文,来自技能仓库

Cybersecurity Engine

Complete methodology for security assessment, threat modeling, vulnerability management, incident response, and security program design. No tools required — pure agent knowledge that works with any codebase, infrastructure, or organization.

Phase 1: Security Posture Assessment

Quick Health Check (5 minutes)

Run through these three tiers:

Tier 1 — Critical (fix today):
- [ ] Default credentials in production
- [ ] Secrets in source code or environment files committed to git
- [ ] No authentication on admin endpoints
- [ ] SQL injection in user-facing forms
- [ ] Unencrypted sensitive data at rest
- [ ] Public S3 buckets or cloud storage
- [ ] No HTTPS enforcement
- [ ] Root/admin running application processes

Tier 2 — High (fix this week):
- [ ] Dependencies with known CVEs (CVSS ≥ 7.0)
- [ ] No rate limiting on authentication endpoints
- [ ] Missing CSRF protection on state-changing operations
- [ ] Verbose error messages leaking stack traces
- [ ] No input validation on API endpoints
- [ ] Weak password policy (< 12 chars, no complexity)
- [ ] Session tokens in URL parameters
- [ ] No logging of authentication events

Tier 3 — Medium (fix this sprint):
- [ ] Missing security headers (CSP, HSTS, X-Frame-Options)
- [ ] No automated dependency scanning in CI
- [ ] Overprivileged service accounts
- [ ] No secret rotation policy
- [ ] Missing account lockout after failed attempts
- [ ] No security.txt or responsible disclosure policy
- [ ] Cookies without Secure/HttpOnly/SameSite flags

Score: Count failures. 0-2 = solid. 3-5 = needs work. 6+ = stop shipping features, fix security.

Full Assessment Brief

assessment:
  name: &quot;[Project/Org Name] Security Assessment&quot;
  date: &quot;YYYY-MM-DD&quot;
  assessor: &quot;[Agent/Person]&quot;
  scope:
    applications:
      - name: &quot;[App Name]&quot;
        type: &quot;web|api|mobile|desktop|iot&quot;
        tech_stack: &quot;[languages, frameworks, DBs]&quot;
        hosting: &quot;cloud|on-prem|hybrid&quot;
        cloud_provider: &quot;aws|gcp|azure|other&quot;
        internet_facing: true|false
        handles_pii: true|false
        handles_payments: true|false
        handles_phi: true|false  # health data
    infrastructure:
      - servers: &quot;[count, OS types]&quot;
        containers: true|false
        orchestration: &quot;k8s|ecs|nomad|none&quot;
        cdn: &quot;[provider or none]&quot;
        dns: &quot;[provider]&quot;
    third_parties:
      - name: &quot;[service]&quot;
        data_shared: &quot;[what data]&quot;
        criticality: &quot;high|medium|low&quot;
  compliance_requirements:
    - &quot;SOC 2|ISO 27001|GDPR|HIPAA|PCI DSS|SOX|none&quot;
  previous_incidents:
    - date: &quot;YYYY-MM-DD&quot;
      type: &quot;[breach|vuln|misconfiguration]&quot;
      severity: &quot;critical|high|medium|low&quot;
      resolution: &quot;[what was done]&quot;
  risk_tolerance: &quot;conservative|moderate|aggressive&quot;

Phase 2: Threat Modeling (STRIDE+)

Step 1 — Decompose the System

For each application, draw the data flow:

[User] → [CDN/WAF] → [Load Balancer] → [Web Server] → [App Server] → [Database]
                                                     ↘ [Cache]
                                                     ↘ [Message Queue] → [Worker]
                                                     ↘ [Third-party API]
                                                     ↘ [Object Storage]

Identify trust boundaries — where privilege level changes:
- Internet → DMZ (public-facing services)
- DMZ → Internal network (app servers, DBs)
- App → Database (credential boundary)
- User → Admin (role boundary)
- Service → Service (API key boundary)
- Your infra → Third-party (trust boundary)

Step 2 — STRIDE Analysis Per Component

For EACH component crossing a trust boundary:

Threat Question Example Attack
Spoofing Can an attacker pretend to be someone else? Stolen JWT, session hijacking, credential stuffing
Tampering Can data be modified in transit or at rest? Man-in-the-middle, SQL injection, parameter manipulation
Repudiation Can someone deny they did something? Missing audit logs, unsigned transactions
Information Disclosure Can sensitive data leak? Error messages, API over-fetching, side channels
Denial of Service Can the service be overwhelmed? DDoS, resource exhaustion, regex DoS
Elevation of Privilege Can someone gain unauthorized access? IDOR, broken access control, privilege escalation

Step 3 — Threat Register

threats:
  - id: &quot;T-001&quot;
    component: &quot;[affected component]&quot;
    category: &quot;S|T|R|I|D|E&quot;
    description: &quot;[specific attack scenario]&quot;
    attacker_profile: &quot;external-unauthenticated|external-authenticated|internal|insider&quot;
    likelihood: 1-5  # 1=rare, 5=almost certain
    impact: 1-5      # 1=negligible, 5=catastrophic
    risk_score: 0     # likelihood × impact
    existing_controls: &quot;[what&#x27;s already in place]&quot;
    residual_risk: &quot;accept|mitigate|transfer|avoid&quot;
    mitigation: &quot;[specific fix]&quot;
    priority: &quot;P0|P1|P2|P3&quot;
    owner: &quot;[person/team]&quot;
    status: &quot;open|in-progress|mitigated|accepted&quot;

Priority Rules

  • P0 (risk ≥ 20): Fix immediately, stop other work
  • P1 (risk 12-19): Fix within 1 week
  • P2 (risk 6-11): Fix within 1 sprint
  • P3 (risk ≤ 5): Track, fix when convenient

Phase 3: Application Security (OWASP Top 10 + Beyond)

A01: Broken Access Control

Test checklist:
- [ ] Can user A access user B's resources by changing ID? (IDOR)
- [ ] Can non-admin access admin endpoints?
- [ ] Do API endpoints enforce authorization, not just authentication?
- [ ] Are directory listings disabled?
- [ ] Is CORS properly configured (not * with credentials)?
- [ ] Can JWT be tampered with (alg=none, key confusion)?
- [ ] Is rate limiting applied to sensitive endpoints?
- [ ] Do file uploads validate type server-side?

Fix patterns:

# Authorization check pattern (every endpoint)
1. Authenticate → verify identity
2. Authorize → verify permission for THIS resource
3. Validate → verify input is within allowed bounds
4. Execute → perform the action
5. Audit → log who did what

# IDOR prevention
- NEVER use sequential IDs in URLs — use UUIDs
- ALWAYS verify resource ownership server-side
- Use middleware that auto-checks resource.owner === request.user

A02: Cryptographic Failures

Decision tree:

Need to store passwords?
  → bcrypt (cost 12+) or Argon2id
  → NEVER: MD5, SHA1, SHA256 without salt

Need to encrypt data at rest?
  → AES-256-GCM (authenticated encryption)
  → NEVER: ECB mode, DES, RC4

Need to encrypt in transit?
  → TLS 1.2+ (prefer 1.3)
  → HSTS with includeSubDomains
  → Certificate pinning for mobile apps

Need to generate random values?
  → crypto.randomBytes() / secrets.token_bytes()
  → NEVER: Math.random(), random.random()

Need to sign/verify?
  → HMAC-SHA256 for symmetric
  → Ed25519 or RSA-PSS (2048+ bits) for asymmetric
  → NEVER: RSA PKCS#1 v1.5 for new systems

A03: Injection

SQL Injection prevention:

# ALWAYS use parameterized queries
✅ db.query(&quot;SELECT * FROM users WHERE id = $1&quot;, [userId])
❌ db.query(&quot;SELECT * FROM users WHERE id = &quot; + userId)

# Test payloads (for YOUR code, during testing):
&#x27; OR &#x27;1&#x27;=&#x27;1
&#x27;; DROP TABLE users;--
&#x27; UNION SELECT password FROM users--
1; WAITFOR DELAY &#x27;0:0:5&#x27;--

XSS prevention:

# Output encoding rules:
HTML body    → HTML entity encode (&amp;lt; &amp;gt; &amp;amp; &amp;quot; &amp;#x27;)
HTML attr    → Attribute encode + always quote attributes
JavaScript   → JavaScript encode (\\xHH)
URL          → Percent encode (%HH)
CSS          → CSS encode (\\HHHHHH)

# CSP header (strong baseline):
Content-Security-Policy: default-src &#x27;self&#x27;; script-src &#x27;self&#x27;; style-src &#x27;self&#x27; &#x27;unsafe-inline&#x27;; img-src &#x27;self&#x27; data:; font-src &#x27;self&#x27;; connect-src &#x27;self&#x27; https://api.yourdomain.com; frame-ancestors &#x27;none&#x27;; base-uri &#x27;self&#x27;; form-action &#x27;self&#x27;

Command injection prevention:

# NEVER pass user input to shell
✅ execFile(&#x27;convert&#x27;, [&#x27;-resize&#x27;, size, inputFile, outputFile])
❌ exec(&#x27;convert -resize &#x27; + size + &#x27; &#x27; + inputFile + &#x27; &#x27; + outputFile)

# If you MUST use shell:
- Whitelist allowed characters (alphanumeric only)
- Use library wrappers, never string concatenation

A04: Insecure Design

Secure design checklist:
- [ ] Business logic abuse scenarios documented
- [ ] Rate limiting on expensive operations
- [ ] Fail-safe defaults (deny by default)
- [ ] Separation of duties for critical operations
- [ ] Multi-step transactions use CSRF tokens
- [ ] API pagination has max limit
- [ ] File uploads have size limits AND type validation (magic bytes, not extension)
- [ ] Background job payloads are signed/validated

A05: Security Misconfiguration

Server hardening checklist:

web_server:
  - remove_default_pages: true
  - disable_directory_listing: true
  - remove_server_version_header: true
  - disable_TRACE_method: true
  - custom_error_pages: true  # no stack traces

application:
  - debug_mode: false  # NEVER in production
  - verbose_errors: false
  - default_accounts_removed: true
  - unnecessary_features_disabled: true
  - admin_panel_ip_restricted: true

cloud:
  - public_buckets: none
  - security_groups_least_privilege: true
  - imds_v2_enforced: true  # AWS
  - logging_enabled: true
  - mfa_on_root: true
  - billing_alerts: true

A06-A10 Quick Checks

Vuln Test Fix
A06: Vulnerable Components npm audit, pip-audit, trivy fs . Update, pin versions, automate scanning in CI
A07: Auth Failures Brute force test, password policy audit, MFA coverage Rate limit + lockout, enforce MFA, bcrypt/Argon2
A08: Data Integrity Can unsigned data modify app behavior? Sign all serialized data, verify checksums, SRI for CDN
A09: Logging Gaps Do you log auth events, access changes, failures? Structured logging, SIEM integration, alert on anomalies
A10: SSRF Can user input trigger server-side requests? Allowlist URLs, block internal IPs, no redirects to internal

Phase 4: Infrastructure Security

Network Security Baseline

network_hardening:
  firewall:
    default_policy: &quot;deny-all&quot;
    allowed_inbound:
      - port: 443
        source: &quot;0.0.0.0/0&quot;
        service: &quot;HTTPS&quot;
      - port: 22
        source: &quot;[admin_ip_range]&quot;
        service: &quot;SSH&quot;
    rules:
      - &quot;No direct database access from internet&quot;
      - &quot;Internal services communicate on private subnet&quot;
      - &quot;Egress filtering — block unnecessary outbound&quot;

  ssh:
    password_auth: false
    root_login: false
    key_type: &quot;ed25519&quot;
    port: &quot;[non-standard recommended]&quot;
    fail2ban: true
    max_auth_tries: 3

  dns:
    dnssec: true
    caa_records: true  # restrict who can issue TLS certs
    no_zone_transfer: true

  tls:
    min_version: &quot;1.2&quot;
    preferred: &quot;1.3&quot;
    cipher_suites: &quot;ECDHE+AESGCM:ECDHE+CHACHA20&quot;
    hsts: &quot;max-age=31536000; includeSubDomains; preload&quot;
    certificate_monitoring: true
    auto_renewal: true

Container Security

container_hardening:
  image:
    - base: &quot;distroless or alpine (minimal)&quot;
    - user: &quot;non-root (USER 1000:1000)&quot;
    - scan: &quot;trivy image before push&quot;
    - sign: &quot;cosign or Notary&quot;
    - pins: &quot;use SHA256 digests, not :latest&quot;
    - secrets: &quot;NEVER in Dockerfile or image layers&quot;
    - layers: &quot;multi-stage builds, minimal final image&quot;

  runtime:
    - read_only_rootfs: true
    - no_new_privileges: true
    - drop_all_capabilities: true
    - add_only: [&quot;NET_BIND_SERVICE&quot;]  # if needed
    - resource_limits: true
    - seccomp_profile: &quot;default&quot;
    - network_policy: &quot;deny by default&quot;

  registry:
    - private: true
    - vulnerability_scanning: true
    - image_signing: true
    - tag_immutability: true

Cloud Security (AWS/GCP/Azure Universal)

cloud_security_baseline:
  identity:
    - root_account_mfa: true
    - no_root_access_keys: true
    - least_privilege_iam: true
    - service_accounts_scoped: true
    - temporary_credentials: true  # assume role, not long-lived keys
    - sso_enforced: true

  data:
    - encryption_at_rest: &quot;default on all storage&quot;
    - encryption_in_transit: &quot;TLS everywhere&quot;
    - backup_encryption: true
    - key_management: &quot;cloud KMS, not self-managed&quot;
    - data_classification: true

  network:
    - vpc_flow_logs: true
    - private_subnets_for_databases: true
    - nat_gateway_for_outbound: true
    - waf_on_public_endpoints: true
    - ddos_protection: true

  monitoring:
    - cloudtrail_enabled: true  # or equivalent
    - config_rules: true
    - guardduty_enabled: true  # or equivalent
    - cost_alerts: true
    - unused_resource_alerts: true

  storage:
    - no_public_buckets: true
    - versioning_on_critical: true
    - lifecycle_policies: true
    - access_logging: true

Phase 5: Vulnerability Management Program

Vulnerability Lifecycle

Discovery → Triage → Prioritize → Remediate → Verify → Close
    ↓          ↓         ↓            ↓          ↓
  Scan/     Confirm   CVSS +       Fix or     Retest
  Report    real?     context      compensate

Severity SLA

Severity CVSS Remediation SLA Escalation
Critical 9.0-10.0 24 hours CTO/CISO immediately
High 7.0-8.9 7 days Team lead + security
Medium 4.0-6.9 30 days Sprint backlog
Low 0.1-3.9 90 days Track, fix when convenient
Info 0 No SLA Document for awareness

Vulnerability Report Template

vulnerability:
  id: &quot;VULN-YYYY-NNN&quot;
  title: &quot;[descriptive title]&quot;
  discovered: &quot;YYYY-MM-DD&quot;
  discoverer: &quot;[scanner/person/bounty]&quot;
  severity: &quot;critical|high|medium|low|info&quot;
  cvss_score: 0.0
  cvss_vector: &quot;CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H&quot;
  cve: &quot;[if applicable]&quot;
  affected:
    - component: &quot;[app/service/library]&quot;
      version: &quot;[affected versions]&quot;
      environment: &quot;production|staging|dev&quot;
  description: &quot;[what the vulnerability is]&quot;
  impact: &quot;[what an attacker could do]&quot;
  proof_of_concept: &quot;[steps to reproduce]&quot;
  remediation:
    fix: &quot;[specific fix]&quot;
    workaround: &quot;[temporary mitigation]&quot;
    compensating_control: &quot;[if fix isn&#x27;t immediate]&quot;
  status: &quot;open|in-progress|fixed|accepted|false-positive&quot;
  fixed_date: &quot;YYYY-MM-DD&quot;
  verified_by: &quot;[person who confirmed fix]&quot;

Scanning Schedule

Scan Type Frequency Tool Examples
Dependency scan Every CI build npm audit, pip-audit, trivy
SAST (code) Every PR Semgrep, CodeQL, Bandit
Secret scanning Every commit GitLeaks, truffleHog, GitHub secret scanning
Container scan Every image build Trivy, Grype, Snyk Container
DAST (runtime) Weekly OWASP ZAP, Burp Suite, Nuclei
Cloud config Daily ScoutSuite, Prowler, CloudSploit
Penetration test Quarterly Manual + automated
Red team Annually External firm

Phase 6: Incident Response

Incident Severity Levels

Level Definition Response Time Team
SEV-1 Active breach, data exfiltration, service down 15 min All hands + management + legal
SEV-2 Vulnerability actively exploited, partial compromise 1 hour Security + affected team leads
SEV-3 Suspicious activity, potential compromise indicators 4 hours Security team
SEV-4 Low-risk finding, policy violation, failed attack Next business day Assigned engineer

Incident Response Playbook

Phase 1 — Detection & Triage (first 15 minutes)

1. Confirm incident is real (not false positive)
2. Classify severity (SEV-1 through SEV-4)
3. Assign incident commander
4. Open incident channel (Slack/Teams)
5. Start incident log with timestamps
6. Notify stakeholders per severity

Phase 2 — Containment (first hour)

SHORT-TERM (stop the bleeding):
- Isolate affected systems (network segmentation)
- Revoke compromised credentials immediately
- Block attacking IP/user agent
- Enable enhanced logging on affected systems
- Preserve forensic evidence (DON&#x27;T reboot/wipe yet)

LONG-TERM (prevent spread):
- Patch the vulnerability that was exploited
- Rotate ALL credentials that may be compromised
- Update firewall/WAF rules
- Deploy additional monitoring

Phase 3 — Eradication

1. Identify root cause
2. Remove all attacker artifacts (backdoors, malware, new accounts)
3. Patch all instances of the vulnerability
4. Verify no lateral movement occurred
5. Confirm all compromised credentials rotated

Phase 4 — Recovery

1. Restore from clean backups (verify backup integrity first)
2. Rebuild compromised systems from scratch (don&#x27;t trust cleanup)
3. Monitor restored systems with enhanced logging
4. Gradual return to production (staged rollback)
5. Confirm normal operations for 48 hours

Phase 5 — Post-Incident

post_mortem:
  incident_id: &quot;INC-YYYY-NNN&quot;
  date: &quot;YYYY-MM-DD&quot;
  severity: &quot;SEV-1|2|3|4&quot;
  duration: &quot;[detection to resolution]&quot;
  impact:
    users_affected: 0
    data_compromised: &quot;[type and volume]&quot;
    financial_impact: &quot;$0&quot;
    regulatory_notification_required: true|false
  timeline:
    - time: &quot;HH:MM&quot;
      event: &quot;[what happened]&quot;
      action: &quot;[what we did]&quot;
  root_cause: &quot;[specific technical cause]&quot;
  contributing_factors:
    - &quot;[what made it possible or worse]&quot;
  what_went_well:
    - &quot;[detection, response, communication]&quot;
  what_went_poorly:
    - &quot;[gaps, delays, confusion]&quot;
  action_items:
    - action: &quot;[specific improvement]&quot;
      owner: &quot;[person]&quot;
      due: &quot;YYYY-MM-DD&quot;
      status: &quot;open|done&quot;
  lessons_learned:
    - &quot;[distilled insight]&quot;

Communication Templates

Internal notification (SEV-1/2):

🚨 SECURITY INCIDENT — [severity]
What: [brief description]
Impact: [what&#x27;s affected]
Status: [containment/investigation/resolved]
Incident Commander: [name]
Channel: #incident-[id]
Next update: [time]

DO NOT discuss outside this channel.

Customer notification (if required):

Subject: Security Notice — [Company Name]

We&#x27;re writing to inform you of a security incident that [may have|affected] your account.

What happened: [brief, honest description]
When: [date range]
What data was involved: [specific data types]
What we&#x27;ve done: [remediation steps]
What you should do: [password reset, monitor accounts, etc.]
Contact: [security team email/phone]

We take the security of your data seriously and have [specific improvements].

Phase 7: Security Headers & Browser Security

Required HTTP Headers

# Copy-paste baseline for production:
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
Content-Security-Policy: default-src &#x27;self&#x27;; script-src &#x27;self&#x27;; style-src &#x27;self&#x27; &#x27;unsafe-inline&#x27;; img-src &#x27;self&#x27; data: https:; font-src &#x27;self&#x27;; connect-src &#x27;self&#x27;; frame-ancestors &#x27;none&#x27;; base-uri &#x27;self&#x27;; form-action &#x27;self&#x27;
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
Permissions-Policy: camera=(), microphone=(), geolocation=(), interest-cohort=()
Cross-Origin-Opener-Policy: same-origin
Cross-Origin-Resource-Policy: same-origin
X-XSS-Protection: 0  # Disabled — CSP handles this; old header can cause issues

Cookie Security

Set-Cookie: session=&lt;token&gt;;
  Secure;                    # HTTPS only
  HttpOnly;                  # No JavaScript access
  SameSite=Lax;              # CSRF protection (Strict if no cross-site navigation needed)
  Path=/;                    # Scope appropriately
  Max-Age=3600;              # 1 hour (adjust per use case)
  Domain=.yourdomain.com;    # Explicit domain

Phase 8: Authentication & Authorization Deep Dive

Password Policy (NIST 800-63B aligned)

password_policy:
  minimum_length: 12  # NIST minimum is 8, 12+ recommended
  maximum_length: 128  # Must support long passwords
  complexity_rules: false  # NIST says don&#x27;t require special chars
  check_against_breached: true  # HaveIBeenPwned API
  no_password_hints: true
  no_security_questions: true  # Easy to social engineer
  allow_paste: true  # For password managers
  rate_limit_attempts: &quot;5 per 15 minutes&quot;
  lockout_duration: &quot;progressive (1min, 5min, 15min, 1hr)&quot;
  mfa_required: &quot;all accounts&quot;
  mfa_methods:
    preferred: &quot;TOTP or WebAuthn/passkeys&quot;
    acceptable: &quot;push notification&quot;
    discouraged: &quot;SMS (SIM swap risk)&quot;
  storage: &quot;Argon2id or bcrypt cost 12+&quot;

JWT Security Checklist

jwt_security:
  signing:
    algorithm: &quot;RS256 or EdDSA&quot;  # NEVER HS256 with shared secrets in distributed systems
    key_rotation: &quot;quarterly&quot;
    verify_algorithm: true  # Reject alg=none
  claims:
    exp: &quot;required — 15 min for access, 7d for refresh&quot;
    iss: &quot;required — validate on every request&quot;
    aud: &quot;required — validate matches expected service&quot;
    iat: &quot;required&quot;
    jti: &quot;recommended — for revocation&quot;
    nbf: &quot;recommended&quot;
  storage:
    access_token: &quot;memory only (never localStorage)&quot;
    refresh_token: &quot;httpOnly secure cookie&quot;
  revocation:
    method: &quot;token blacklist with Redis TTL matching exp&quot;
    on_password_change: &quot;revoke all tokens&quot;
    on_permission_change: &quot;revoke all tokens&quot;

OAuth 2.0 / OIDC Checklist

  • [ ] Use Authorization Code flow with PKCE (never Implicit)
  • [ ] Validate state parameter to prevent CSRF
  • [ ] Validate nonce for OIDC to prevent replay
  • [ ] Validate token issuer and audience
  • [ ] Store tokens server-side, not in browser
  • [ ] Implement token rotation for refresh tokens
  • [ ] Set minimal scopes (principle of least privilege)
  • [ ] Register exact redirect URIs (no wildcards)

Phase 9: Security Program Design

Building a Security Program from Scratch

Quarter 1 — Foundation:

Week 1-2: Asset inventory (what do we have?)
Week 3-4: Risk assessment (what matters most?)
Week 5-6: Critical controls (authentication, secrets, backups)
Week 7-8: Basic scanning (dependencies, secrets in code)
Week 9-10: Incident response plan (what if something happens?)
Week 11-12: Security awareness basics (phishing, passwords)

Quarter 2 — Automation:

- CI/CD security scanning (SAST, dependency audit)
- Automated secret detection (pre-commit hooks)
- Centralized logging and basic alerting
- Access reviews (quarterly)
- Vulnerability management process

Quarter 3 — Maturity:

- Penetration testing (first external assessment)
- Security architecture review
- Data classification and handling policies
- Vendor security assessments
- Bug bounty program (start small)

Quarter 4 — Optimization:

- Compliance framework alignment (SOC 2, ISO 27001)
- Red team exercise
- Security metrics dashboard
- Security champion program (devs with security training)
- Supply chain security (SBOM, signed artifacts)

Security Metrics Dashboard

security_dashboard:
  vulnerability_management:
    - open_critical: 0  # Target: always 0
    - open_high: 0      # Target: &lt; 5
    - mean_time_to_remediate:
        critical: &quot;24h&quot;  # Target
        high: &quot;7d&quot;
        medium: &quot;30d&quot;
    - scan_coverage: &quot;100%&quot;  # % of repos with automated scanning

  incident_management:
    - incidents_this_quarter: 0
    - mean_time_to_detect: &quot;&lt; 1h&quot;
    - mean_time_to_respond: &quot;&lt; 4h&quot;
    - mean_time_to_recover: &quot;&lt; 24h&quot;

  access_control:
    - mfa_adoption: &quot;100%&quot;
    - privileged_accounts: 0  # Count, minimize
    - stale_accounts: 0       # Accounts unused &gt; 90 days
    - access_reviews_completed: &quot;on schedule&quot;

  code_security:
    - repos_with_sast: &quot;100%&quot;
    - repos_with_dependency_scanning: &quot;100%&quot;
    - secret_detection_coverage: &quot;100%&quot;
    - security_review_for_critical_changes: &quot;100%&quot;

  training:
    - security_awareness_completion: &quot;100%&quot;
    - phishing_simulation_click_rate: &quot;&lt; 5%&quot;
    - security_champions_per_team: &quot;&gt;= 1&quot;

Phase 10: Penetration Testing Methodology

Reconnaissance

PASSIVE (no direct interaction with target):
1. DNS enumeration: subdomains, MX, TXT, CNAME
   - Tools: subfinder, amass, crt.sh, dnsdumpster
2. Technology fingerprinting
   - Check: Wappalyzer, BuiltWith, HTTP headers
3. Public exposure
   - Shodan/Censys for open ports/services
   - GitHub/GitLab for leaked code/secrets
   - Wayback Machine for old endpoints
4. Employee OSINT (for social engineering scope)
   - LinkedIn for tech stack clues
   - Job postings reveal internal tools

ACTIVE (interacting with target — requires permission):
1. Port scanning: full TCP + top 1000 UDP
2. Service enumeration: version detection
3. Web crawling: sitemap, robots.txt, directory brute-force
4. API discovery: /api, /v1, /graphql, /swagger, /openapi

Testing Phases

Phase 1 — Authentication Testing

- Credential stuffing resistance (rate limiting)
- Password reset flow (token guessability, expiry, reuse)
- Account enumeration (different responses for valid/invalid users)
- Session management (token entropy, fixation, timeout)
- MFA bypass attempts (backup codes, race conditions)
- OAuth flow attacks (redirect URI manipulation, scope escalation)

Phase 2 — Authorization Testing

- Horizontal privilege escalation (access other users&#x27; data)
- Vertical privilege escalation (user → admin)
- Missing function-level access control (direct API calls)
- IDOR on every resource endpoint (change IDs systematically)
- GraphQL introspection + unauthorized field access
- Mass assignment (send extra fields in requests)

Phase 3 — Injection Testing

- SQL injection on all user inputs (including headers, cookies)
- XSS (reflected, stored, DOM-based) on all output points
- Command injection on any server-side execution
- SSRF on any URL input or file fetch
- Template injection (if server-side templating)
- LDAP/XML/XXE injection where applicable

Phase 4 — Business Logic Testing

- Price manipulation (change prices in requests)
- Quantity manipulation (negative numbers, decimals, MAX_INT)
- Race conditions (concurrent requests for same resource)
- Workflow bypass (skip steps in multi-step processes)
- Coupon/discount abuse (reuse, stacking)
- Rate limit bypass (header rotation, distributed requests)

Penetration Test Report Template

report:
  executive_summary:
    overall_risk: &quot;critical|high|medium|low&quot;
    critical_findings: 0
    high_findings: 0
    medium_findings: 0
    low_findings: 0
    key_recommendations:
      - &quot;[top 3 fixes by impact]&quot;

  scope:
    targets: &quot;[URLs, IPs, apps tested]&quot;
    methodology: &quot;OWASP Testing Guide v4.2 + PTES&quot;
    dates: &quot;YYYY-MM-DD to YYYY-MM-DD&quot;
    type: &quot;black-box|grey-box|white-box&quot;
    exclusions: &quot;[what was out of scope]&quot;

  findings:
    - id: &quot;F-001&quot;
      title: &quot;[descriptive title]&quot;
      severity: &quot;critical|high|medium|low|info&quot;
      cvss: 0.0
      location: &quot;[URL/endpoint/component]&quot;
      description: &quot;[what the vulnerability is]&quot;
      impact: &quot;[what an attacker could do]&quot;
      evidence: &quot;[screenshots, request/response pairs]&quot;
      reproduction_steps:
        - &quot;[step by step]&quot;
      remediation: &quot;[specific fix with code examples]&quot;
      references:
        - &quot;[OWASP, CWE, CVE links]&quot;

  positive_observations:
    - &quot;[security controls that were effective]&quot;

Phase 11: Supply Chain Security

Dependency Security

supply_chain:
  dependencies:
    - lock_files: &quot;always commit (package-lock.json, poetry.lock, go.sum)&quot;
    - pin_versions: &quot;exact versions, not ranges&quot;
    - audit_frequency: &quot;every CI build&quot;
    - auto_update: &quot;Dependabot/Renovate with auto-merge for patch, review for minor/major&quot;
    - review_new_deps:
        check: &quot;maintainer count, last update, download count, known issues&quot;
        rule: &quot;no single-maintainer deps for critical paths&quot;
    - sbom: &quot;generate SPDX or CycloneDX on every release&quot;

  build_pipeline:
    - reproducible_builds: true
    - artifact_signing: true
    - build_provenance: true  # SLSA Level 2+
    - no_curl_pipe_bash: true  # Never pipe internet scripts to shell
    - verify_checksums: true

  ci_cd:
    - pin_action_versions: &quot;use SHA, not tags (actions/checkout@SHA)&quot;
    - least_privilege_tokens: true
    - no_secrets_in_logs: true
    - protected_branches: true
    - required_reviews: true
    - signed_commits: &quot;recommended&quot;

Phase 12: Security Scoring Rubric

Rate any application/system 0-100:

Dimension Weight 0 (Critical) 5 (Adequate) 10 (Excellent)
Authentication & Access 20% No auth or default creds Password + basic RBAC MFA + ABAC + zero trust
Data Protection 15% Plaintext secrets, no encryption Encryption at rest + transit E2E encryption, key rotation, classification
Vulnerability Management 15% No scanning, known CVEs Automated scanning, SLAs met Full coverage, MTTD < 1h, bug bounty
Infrastructure Security 15% Open ports, no firewall Hardened baseline, least privilege Zero trust, microsegmentation, IaC
Logging & Monitoring 10% No security logging Centralized logs, basic alerts SIEM, anomaly detection, 24/7 SOC
Incident Response 10% No plan Documented plan, tested annually Automated response, < 1h MTTR
Code Security 10% No reviews, injection vulns SAST in CI, peer review Full pipeline, threat modeling, security champions
Supply Chain 5% No dependency management Lock files, automated scanning SBOM, signed artifacts, SLSA

Score interpretation:
- 90-100: Excellent — security is a competitive advantage
- 70-89: Good — solid foundation, keep improving
- 50-69: Needs work — significant gaps exist
- Below 50: Critical — stop feature work, fix security

Common Mistakes

  1. Security through obscurity — hiding admin panel at /secret-admin is not security
  2. Client-side only validation — always validate server-side
  3. Trusting internal networks — assume breach, verify everything
  4. Logging sensitive data — passwords, tokens, PII in logs = breach waiting to happen
  5. "We're too small to be targeted" — automated attacks don't check company size
  6. One-time audit mentality — security is continuous, not a checkbox
  7. Ignoring security in dev/staging — attackers find your staging environment too
  8. Over-permissioning for convenience — least privilege, always
  9. No backup testing — backups you haven't tested are hopes, not backups
  10. Treating compliance as security — SOC 2 ≠ secure; it's a starting point

Edge Cases

  • Startup with zero security: Start with Phase 9 Quarter 1 — foundation first
  • Legacy application: Focus on network segmentation + WAF + monitoring before code fixes
  • Microservices: Service mesh for mTLS, centralized auth (OAuth/OIDC), API gateway
  • IoT/embedded: Assume physical access, encrypt firmware, signed updates, minimal attack surface
  • Mobile apps: Certificate pinning, root/jailbreak detection, binary protection, secure local storage
  • Serverless: Function-level IAM, no secrets in code, API Gateway throttling, cold start timing attacks
  • Multi-tenant SaaS: Tenant isolation verification, noisy neighbor prevention, cross-tenant data leak testing

Natural Language Commands

&quot;Audit security of [project/repo]&quot; → Full assessment (Phase 1-4)
&quot;Threat model [system/feature]&quot; → STRIDE analysis (Phase 2)
&quot;Check OWASP top 10 for [app]&quot; → Application security review (Phase 3)
&quot;Harden [server/container/cloud]&quot; → Infrastructure checklist (Phase 4)
&quot;Create incident response plan&quot; → IR playbook (Phase 6)
&quot;Design security program&quot; → Phased program build (Phase 9)
&quot;Pentest methodology for [target]&quot; → Testing phases (Phase 10)
&quot;Score security of [system]&quot; → 100-point rubric (Phase 12)
&quot;Review auth implementation&quot; → Auth deep dive (Phase 8)
&quot;Check security headers&quot; → Header audit (Phase 7)
&quot;Vulnerability report for [finding]&quot; → Report template (Phase 5)
&quot;Supply chain security review&quot; → Dependency audit (Phase 11)

常见问题

5 问
答案由本站依据条目字段整理
网络安全引擎怎么安装?

在支持 Skills 的客户端里执行:skillhub install zcwl/afrexai-cybersecurity-engine。安装方式为未标注。装完刷新技能列表或重开客户端。

网络安全引擎支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

网络安全引擎权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

网络安全引擎收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

网络安全引擎用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 未标注。