Chuyển đến nội dung
Skillpedia
Bảo mật48k · #5828

sops-encryption

Skill này làm gì

Công cụ này bảo vệ thông tin nhạy cảm, như mật khẩu hoặc khóa, trong các tệp cấu hình. Nó làm xáo trộn thông tin này để không thể đọc dễ dàng, nhưng vẫn giữ cấu trúc tệp hiển thị.

Khi nào nên dùng

  • ✓Khi bạn cần lưu bí mật trong các tệp được đưa vào quản lý phiên bản (như Git).
  • ✓Khi bạn dùng tự động hóa để cài đặt và cấu hình hệ thống (GitOps).
  • ✓Khi bạn cần quản lý thông tin bí mật trong các hệ thống điều phối container như Kubernetes.

Liên kết skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/sops-encryption/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/sops-encryption/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy mã hóa tệp 'config.yaml' có chứa mật khẩu của tôi.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ dùng hệ thống mã hóa để làm xáo trộn dữ liệu nhạy cảm trong tệp. Để đọc hoặc sửa dữ liệu này, bạn cần một khóa đặc biệt (như khóa đám mây hoặc khóa PGP).

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

SOPS Encryption

Encrypt secrets in configuration files while keeping structure visible.

When to Use This Skill

Use this skill when:

  • Encrypting secrets in Git
  • Implementing GitOps with secrets
  • Managing Kubernetes secrets as code
  • Encrypting configuration files

Prerequisites

  • SOPS installed
  • KMS access (AWS, GCP, Azure) or PGP key

Installation

# macOS
brew install sops

# Linux
wget https://github.com/getsops/sops/releases/download/v3.8.0/sops-v3.8.0.linux.amd64
chmod +x sops-v3.8.0.linux.amd64
mv sops-v3.8.0.linux.amd64 /usr/local/bin/sops

Basic Usage

# Encrypt with AWS KMS
sops --encrypt --kms arn:aws:kms:region:account:key/key-id secrets.yaml > secrets.enc.yaml

# Decrypt
sops --decrypt secrets.enc.yaml

# Edit encrypted file
sops secrets.enc.yaml

# Encrypt in place
sops --encrypt --in-place secrets.yaml

Configuration

# .sops.yaml
creation_rules:
  - path_regex: .*\.prod\.yaml$
    kms: arn:aws:kms:us-east-1:account:key/prod-key
  - path_regex: .*\.dev\.yaml$
    kms: arn:aws:kms:us-east-1:account:key/dev-key
  - path_regex: .*
    pgp: fingerprint

Kubernetes Integration

# encrypted secret
apiVersion: v1
kind: Secret
metadata:
  name: myapp-secrets
type: Opaque
stringData:
  password: ENC[AES256_GCM,data:encrypted...]
sops:
  kms:
    - arn: arn:aws:kms:region:account:key/key-id
# With ArgoCD
# Install ksops plugin for ArgoCD to decrypt secrets

Best Practices

  • Store .sops.yaml in repository
  • Use different keys per environment
  • Rotate encryption keys regularly
  • Never commit unencrypted secrets
  • Use key aliases for readability

Related Skills

  • hashicorp-vault (hashicorp-vault) - Centralized secrets
  • argocd-gitops (argocd-gitops) - GitOps integration

Limitations

  • Apply guidance only within authorized scope; test destructive steps in non-production first.
  • Docs-only import: upstream scripts and templates not bundled.

Example

# Read-only first: inventory before any active step.
which <tool> && <tool> --help | head -n 20

Adapted from BagelHole/DevOps-Security-Agent-Skills (MIT); frontmatter, When to Use/Limitations, and safety boundaries added for upstream compliance. Docs-only import: helper scripts and templates not bundled.

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

Tôi có cần cài đặt gì trước không?

Có, bạn cần cài công cụ SOPS trên máy tính và có quyền truy cập vào khóa mã hóa (từ AWS, Google Cloud, Azure hoặc khóa PGP).

Tôi có thể dùng các khóa khác nhau cho các tệp khác nhau không?

Có, bạn có thể cấu hình công cụ dùng các khóa khác nhau tùy theo tên hoặc loại tệp.

Điều gì xảy ra nếu tôi mất khóa mã hóa?

Nếu mất khóa mã hóa, bạn sẽ không thể đọc hoặc sửa dữ liệu đã được làm xáo trộn bằng khóa đó. Điều quan trọng là phải giữ an toàn các khóa của bạn.

Chi tiết

Mô tả gốc của tác giả

Encrypt files and configs with Mozilla SOPS.

repo: sickn33/agentic-awesome-skills

Độ phổ biến

Sao GitHub
48k
Vị trí xếp hạng
#5828
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự