Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
Ogni istanza Harbor creata in Harbor-as-a-Service si connette a uno scanner delle vulnerabilità Trivy
per aiutarti a identificare e risolvere i rischi per la sicurezza nelle tue
immagini container. Trivy è lo scanner predefinito in Harbor versione 2.2 e successive.
Trivy analizza i contenuti delle immagini container, confrontandoli con
database di vulnerabilità noti, come il National Vulnerability Database, per
identificare potenziali problemi.Per ulteriori informazioni, consulta
https://github.com/aquasecurity/trivy.
Prima di iniziare
Per eseguire la scansione delle vulnerabilità, devi disporre di quanto segue:
Puoi scansionare singoli artefatti in Harbor o configurare le impostazioni
delle vulnerabilità nei progetti Harbor.
Scansionare singoli artefatti in Harbor
Per eseguire la scansione di singoli artefatti in Harbor:
Accedi all'interfaccia di Harbor con un account con il ruolo
ProjectAdmin.
Vai a Progetti e seleziona un progetto.
Fai clic sulla scheda Scanner. La scheda Scanner mostra lo scanner
attualmente in uso per questo progetto.
Fai clic su Modifica per selezionare uno scanner diverso dall'elenco di scanner
collegati a questa istanza di Harbor e fai clic su Ok.
Fai clic sulla scheda Repository e seleziona un repository.
Per ogni artefatto nel repository, la colonna Vulnerabilità
mostra lo stato dell'analisi delle vulnerabilità e le informazioni correlate.
Seleziona un artefatto o utilizza la casella di controllo in alto per selezionare tutti gli artefatti nel repository e fai clic su Scansiona per eseguire la scansione delle vulnerabilità su questo artefatto.
Tieni il puntatore sopra il numero di vulnerabilità correggibili per visualizzare un riepilogo
del report sulle vulnerabilità.
Fai clic sul digest dell'artefatto per visualizzare un report dettagliato sulle vulnerabilità.
Configura le impostazioni delle vulnerabilità nei progetti Harbor
Integra l'analisi delle vulnerabilità nel flusso di lavoro di Harbor per gestire in modo proattivo
la sicurezza delle tue applicazioni containerizzate e proteggere la tua organizzazione
da potenziali minacce. Configura i progetti in modo che le immagini con vulnerabilità non possano essere eseguite ed esegui automaticamente la scansione delle immagini non appena vengono inviate al progetto.
Per configurare le impostazioni delle vulnerabilità per un progetto Harbor:
Accedi all'interfaccia di Harbor con un account con il ruolo
ProjectAdmin.
Vai a Progetti e seleziona un progetto.
Fai clic sulla scheda Configuration (Configurazione).
Per impedire il pull delle immagini vulnerabili nel progetto, seleziona la casella di controllo
Impedisci l'esecuzione di immagini vulnerabili.
Seleziona il livello di gravità delle vulnerabilità per impedire l'esecuzione delle immagini.
Per attivare un'analisi immediata delle vulnerabilità sulle nuove immagini di cui è stato eseguito il push al progetto, seleziona la casella di controllo Analizza automaticamente le immagini di cui è stato eseguito il push.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-04 UTC."],[[["\u003cp\u003eHarbor instances use the Trivy vulnerability scanner to identify security risks in container images by comparing them against known vulnerability databases.\u003c/p\u003e\n"],["\u003cp\u003eTo perform vulnerability scans, you must have Trivy enabled during Harbor installation and possess an account with the \u003ccode\u003eProjectAdmin\u003c/code\u003e role within an existing Harbor project.\u003c/p\u003e\n"],["\u003cp\u003eYou can scan individual artifacts by selecting a project, going to the repositories tab, and clicking scan, or view the scan status and detail in the Vulnerabilities column.\u003c/p\u003e\n"],["\u003cp\u003eYou can scan all artifacts in your Harbor instance by accessing the Interrogation Services within the Administration menu, and clicking "Scan now" in the vulnerability tab.\u003c/p\u003e\n"],["\u003cp\u003eHarbor projects can be configured to prevent vulnerable images from running based on severity level and automatically scan newly pushed images.\u003c/p\u003e\n"]]],[],null,["# Scan for vulnerabilities\n\nEvery Harbor instance created in Harbor-as-a-Service connects to a Trivy\nvulnerability scanner to help you identify and address security risks in your\ncontainer images. Trivy is the default scanner in Harbor versions 2.2 and later.\nTrivy analyzes the contents of your container images, comparing them against\nknown vulnerability databases, like the National Vulnerability Database, to\nidentify potential issues.For more information, see\n\u003chttps://github.com/aquasecurity/trivy\u003e.\n\nBefore you begin\n----------------\n\nYou must have the following to scan for vulnerabilities:\n\n- Trivy. You must have enabled Trivy when you installed your Harbor instance by appending installation options `--with-trivy`. For information about installing Harbor with Trivy, see \u003chttps://goharbor.io/docs/2.8.0/install-config/run-installer-script/\u003e.\n- An account with the `ProjectAdmin` role from Harbor's role-based access controls. For more information, see [Configure access for APIs and within a Harbor instance](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/configure-access-control#configure-access-within-harbor-instance).\n- An existing Harbor project. For more information, see [Create Harbor projects](/distributed-cloud/hosted/docs/latest/gdch/platform-application/pa-ao-operations/create-harbor-projects).\n\nYou can scan individual artifacts in Harbor, or configure vulnerability\nsettings in Harbor projects.\n\nScan individual artifacts in Harbor\n-----------------------------------\n\nFollow these steps to scan individual artifacts in Harbor:\n\n1. Sign in to the Harbor interface with an account that has the `ProjectAdmin` role.\n2. Go to **Projects** and select a project.\n3. Click the **Scanner** tab. The **Scanner** tab shows the current scanner in use for this project.\n4. Click **Edit** to select a different scanner from the list of scanners that are connected to this Harbor instance, and click **OK**.\n5. Click the **Repositories** tab and select a repository.\n6. For each artifact in the repository, the **Vulnerabilities** column displays the vulnerability scanning status and related information.\n7. Select an artifact, or use the checkbox at the top to select all\n artifacts in the repository, and click **Scan** to run the\n vulnerability scan on this artifact.\n\n | **Note:** You can start a scan at any time, unless the status is Queued or Scanning.\n8. Hold the pointer over the number of fixable vulnerabilities to see a summary of\n the vulnerability report.\n\n9. Click the artifact digest to see a detailed vulnerability report.\n\nFor more information, see the Harbor documentation:\n\u003chttps://goharbor.io/docs/2.8.0/administration/vulnerability-scanning/scan-individual-artifact/\u003e.\n\nScan all artifacts in Harbor\n----------------------------\n\nFollow these steps to scan all of the artifacts in your Harbor instance:\n\n1. Sign in to the Harbor interface with an account that has the `ProjectAdmin` role.\n2. In the **Administration** menu, click **Interrogation Services**.\n3. To perform a scan of all artifacts in your Harbor instance, select the **Vulnerability** tab and click **Scan now**.\n\n | **Note:** **Scan now** becomes unavailable while the scan is in progress.\n\nFor more information, see the Harbor documentation:\n\u003chttps://goharbor.io/docs/2.8.0/administration/vulnerability-scanning/scan-all-artifacts/\u003e.\n\nConfigure vulnerability settings in Harbor projects\n---------------------------------------------------\n\nIntegrate vulnerability scanning into your Harbor workflow to proactively manage\nthe security of your containerized applications and protect your organization\nfrom potential threats. Configure projects so that images with vulnerabilities\ncannot be run, and to automatically scan images as soon as they are pushed into\nthe project.\n\nFollow these steps to configure vulnerability settings for a Harbor project:\n\n1. Sign in to the Harbor interface with an account that has the `ProjectAdmin` role.\n2. Go to **Projects** and select a project.\n3. Click the **Configuration** tab.\n4. To prevent vulnerable images under the project from being pulled, enable the **Prevent vulnerable images from running** checkbox.\n5. Select the severity level of vulnerabilities to prevent images from running.\n\n | **Note:** Images cannot be pulled if their level is equal to or higher than the selected level of severity. Harbor does not prevent images with a vulnerability severity of negligible from running.\n6. To activate an immediate vulnerability scan on new images that are\n pushed to the project, select the **Automatically scan images on push**\n checkbox.\n\nFor more information, see the Harbor documentation:\n\u003chttps://goharbor.io/docs/2.8.0/working-with-projects/project-configuration/\u003e."]]