Harbor is an open-source container registry that provides security features including vulnerability scanning (integrated Trivy), image signing (Notary/Cosign), RBAC, content trust policies, replicatio
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
Harbor is an open-source container registry that provides security features including vulnerability scanning (integrated Trivy), image signing (Notary/Cosign), RBAC, content trust policies, replicatio
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
Common Misconfigurations & Verification
Harbor's security features default to permissive - a project can scan images and still happily serve vulnerable, unsigned ones:
prevent_vul off or threshold too loose: auto-scan with prevent_vul: "false" records CVEs but never blocks pulls; a severity: "high" gate still serves anything rated medium/low. Both auto_scan and prevent_vul must be true per project.
Content trust not enforced:enable_content_trust/enable_content_trust_cosign set at system level but not on the project, so unsigned images deploy. Signing an image (cosign sign) is not the same as requiring signatures.
Stale or partial scans: images pushed before scanning was enabled, or scanned against an outdated Trivy DB, show "no vulnerabilities" falsely. Distroless/scratch images Harbor cannot parse report clean rather than unknown.
Mutable release tags / public projects: missing immutable-tag rules let v1.0.0 be overwritten; a project left public: "true" exposes images unauthenticated.
Verify behavior, not config: push a known-vulnerable image (e.g. vulnerable-app) and confirm docker pull is rejected; push with DOCKER_CONTENT_TRUST=0 and confirm the unsigned push fails; check the artifact's actual scan via /additions/vulnerabilities and confirm the scan timestamp is recent and the DB current. Confirm the immutable-tag rule blocks re-pushing an existing release tag.
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 deploymentexpose:type:ingresstls:enabled:truecertSource:secretsecret:secretName:harbor-tlsnotarySecretName:harbor-tlsingress:hosts:core:harbor.example.comnotary:notary.example.comexternalURL:https://harbor.example.compersistence:enabled:trueresourcePolicy:"keep"harborAdminPassword:"<strong-password>"trivy:enabled:truegitHubToken:"<github-token>"severity:"CRITICAL,HIGH,MEDIUM"autoScan:truenotary:enabled:truecore:secretKey:"<32-char-secret>"database:type:externalexternal:host:postgres.example.comport:"5432"username:harborpassword:"<db-password>"sslmode:require
# Harbor configuration for OIDCauth_mode:oidc_authoidc_name:"Okta"oidc_endpoint:"https://company.okta.com/oauth2/default"oidc_client_id:"harbor-client-id"oidc_client_secret:"harbor-client-secret"oidc_groups_claim:"groups"oidc_admin_group:"harbor-admins"oidc_scope:"openid,profile,email,groups"oidc_verify_cert:trueoidc_auto_onboard:true
Validation Commands
# Test vulnerability prevention (should block pull of vulnerable image)
docker pull harbor.example.com/production/vulnerable-app:latest
# Expected: Error - image blocked due to vulnerabilities# Verify content trust enforcement
DOCKER_CONTENT_TRUST=0 docker push harbor.example.com/production/unsigned:latest
# Expected: Push rejected due to content trust policy# Check scan results via API
curl -k "https://harbor.example.com/api/v2.0/projects/production/repositories/myapp/artifacts/v1.0.0/additions/vulnerabilities" \
-H "Authorization: Basic $(echo -n admin:Harbor12345 | base64)"# Audit log check
curl -k "https://harbor.example.com/api/v2.0/audit-logs?page=1&page_size=10" \
-H "Authorization: Basic $(echo -n admin:Harbor12345 | base64)"