मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी35k · #8369

securing-container-registry-with-harbor

यह क्या करती है

यह फीचर Harbor को कॉन्फ़िगर करता है, जो प्रोग्राम इमेज स्टोर करने का सिस्टम है। यह सुरक्षा खामियों की जाँच करता है और पक्का करता है कि इमेज भरोसेमंद स्रोतों से आएं। खतरनाक या बिना पुष्टि वाली इमेज का इस्तेमाल होने से यह रोकता है।

कब इस्तेमाल करें

  • ✓जब आप Harbor का सुरक्षा सिस्टम इंस्टॉल या बदल रहे हों।
  • ✓जब सुरक्षा नियम कहते हों कि सिर्फ़ सत्यापित और सुरक्षित इमेज ही इस्तेमाल हों।
  • ✓जब आप प्रोग्राम स्टोर करने वाले सिस्टम की सुरक्षा बना या बेहतर कर रहे हों।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/securing-container-registry-with-harbor/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/securing-container-registry-with-harbor/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“Harbor को कॉन्फ़िगर करो ताकि वह सुरक्षा खामियों की जाँच करे और माँग करे कि इमेज भरोसेमंद स्रोतों से साइन की गई हों।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह ऑटोमैटिक सुरक्षा जाँच (Trivy) और ट्रस्ट नियम (Cosign/Notary) चालू करता है, ताकि इमेज का स्रोत और उसकी सुरक्षा पक्की हो सके। साथ ही यह तय करता है कि कौन क्या एक्सेस कर सकता है, और इमेज को अपडेट व सुरक्षित रखने के नियम भी सेट करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Securing Container Registry with Harbor

Overview

Harbor is an open-source container registry that provides security features including vulnerability scanning (integrated Trivy), image signing (Notary/Cosign), RBAC, content trust policies, replication, and audit logging. Securing Harbor involves configuring these features to enforce image provenance, prevent vulnerable image deployment, and maintain registry access control.

When to Use

  • When deploying or configuring securing container registry with harbor capabilities in your environment
  • When establishing security controls aligned to compliance requirements
  • When building or improving security architecture for this domain
  • When conducting security assessments that require this implementation

Prerequisites

  • Harbor 2.10+ installed (Helm or Docker Compose)
  • TLS certificates for HTTPS
  • Trivy scanner integration
  • OIDC/LDAP for authentication
  • Kubernetes cluster (for deployment target)

Workflow

Step 1: Install Harbor with Security Configuration

# harbor-values.yaml for Helm deployment
expose:
  type: ingress
  tls:
    enabled: true
    certSource: secret
    secret:
      secretName: harbor-tls
      notarySecretName: harbor-tls
  ingress:
    hosts:
      core: harbor.example.com
      notary: notary.example.com

externalURL: https://harbor.example.com

persistence:
  enabled: true
  resourcePolicy: "keep"

harborAdminPassword: "<strong-password>"

trivy:
  enabled: true
  gitHubToken: "<github-token>"
  severity: "CRITICAL,HIGH,MEDIUM"
  autoScan: true

notary:
  enabled: true

core:
  secretKey: "<32-char-secret>"

database:
  type: external
  external:
    host: postgres.example.com
    port: "5432"
    username: harbor
    password: "<db-password>"
    sslmode: require
helm repo add harbor https://helm.getharbor.io
helm install harbor harbor/harbor -f harbor-values.yaml -n harbor --create-namespace

Step 2: Configure Vulnerability Scanning Policies

# Enable auto-scan on push (via Harbor API)
curl -k -X PUT "https://harbor.example.com/api/v2.0/projects/myproject" \
  -H "Authorization: Basic $(echo -n admin:Harbor12345 | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "auto_scan": "true",
      "severity": "critical",
      "prevent_vul": "true",
      "reuse_sys_cve_allowlist": "true"
    }
  }'

Step 3: Configure Content Trust

# Enable content trust at project level
curl -k -X PUT "https://harbor.example.com/api/v2.0/projects/myproject" \
  -H "Authorization: Basic $(echo -n admin:Harbor12345 | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "enable_content_trust": "true",
      "enable_content_trust_cosign": "true"
    }
  }'

# Sign image with Cosign
cosign sign --key cosign.key harbor.example.com/myproject/myapp:v1.0.0

# Verify signature
cosign verify --key cosign.pub harbor.example.com/myproject/myapp:v1.0.0

Step 4: Configure RBAC and Project Isolation

# Create project with private visibility
curl -k -X POST "https://harbor.example.com/api/v2.0/projects" \
  -H "Authorization: Basic $(echo -n admin:Harbor12345 | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "project_name": "production",
    "metadata": {
      "public": "false",
      "auto_scan": "true",
      "prevent_vul": "true",
      "severity": "high"
    }
  }'

# Harbor roles: ProjectAdmin, Maintainer, Developer, Guest, LimitedGuest
# Add member with specific role
curl -k -X POST "https://harbor.example.com/api/v2.0/projects/production/members" \
  -H "Authorization: Basic $(echo -n admin:Harbor12345 | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "role_id": 3,
    "member_user": {"username": "developer1"}
  }'

Step 5: Configure Immutable Tags and Retention

# Create tag immutability rule (prevent overwriting release tags)
curl -k -X POST "https://harbor.example.com/api/v2.0/projects/production/immutabletagrules" \
  -H "Authorization: Basic $(echo -n admin:Harbor12345 | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "tag_filter": "v*",
    "scope_selectors": {
      "repository": [{"kind": "doublestar", "decoration": "repoMatches", "pattern": "**"}]
    }
  }'

# Configure retention policy (keep last 10 tags, delete untagged after 7 days)
curl -k -X POST "https://harbor.example.com/api/v2.0/retentions" \

…
अक्सर पूछे जाने वाले सवाल

कंटेनर रजिस्ट्री क्या है?

यह वह जगह है जहां प्रोग्राम (जिन्हें कंटेनर कहते हैं) स्टोर किए जाते हैं, जैसे सॉफ़्टवेयर के बिल्डिंग ब्लॉक्स की एक लाइब्रेरी।

'वल्नरेबिलिटी' क्या होती है?

यह किसी प्रोग्राम में मौजूद सुरक्षा कमज़ोरी होती है, जिसका फायदा बुरे इरादे वाले लोग उठा सकते हैं।

'इमेज प्रोवेनेंस' का क्या मतलब है?

इसका मतलब है यह जानना कि प्रोग्राम इमेज किसने बनाई है, और यह पक्का करना कि बनने के बाद उसमें छेड़छाड़ नहीं हुई है।

जानकारी

लेखक का मूल विवरण

Configures the security features of the Harbor open-source container registry - integrated Trivy scanning, Cosign and Notary content trust policies, project-level RBAC, immutable tag and retention rules, and OIDC authentication - to enforce provenance and block deployment of vulnerable images. Use when deploying or hardening Harbor, or when compliance requires that only signed and scanned images c

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#8369
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills