From f766273660b8e4f1505b613f212a5b1b9e915eb7 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Wed, 11 Oct 2023 15:05:46 +0800 Subject: [PATCH] fix: typo --- README.md | 4 ++-- clair/clair.go | 2 +- main.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8364533..70e5f1e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Klar Integration of Clair and Docker Registry (supports both Clair API v1 and v3) -Klar is a simple tool to analyze images stored in a private or public Docker registry for security vulnerabilities using Clair https://github.com/coreos/clair. Klar is designed to be used as an integration tool so it relies on enviroment variables. It's a single binary which requires no dependencies. +Klar is a simple tool to analyze images stored in a private or public Docker registry for security vulnerabilities using Clair https://github.com/coreos/clair. Klar is designed to be used as an integration tool so it relies on environment variables. It's a single binary which requires no dependencies. Klar serves as a client which coordinates the image checks between the Docker registry and Clair. @@ -96,7 +96,7 @@ Then run docker run --env-file=my-klar.env klar postgres:9.5.1 ## Amazon ECR support -There is no permanent username/password for Amazon ECR, the credentials must be retrived using `aws ecr get-login` and they are valid for 12 hours. Here is a sample script which may be used to provide Klar with ECR credentials: +There is no permanent username/password for Amazon ECR, the credentials must be retrieved using `aws ecr get-login` and they are valid for 12 hours. Here is a sample script which may be used to provide Klar with ECR credentials: DOCKER_LOGIN=`aws ecr get-login --no-include-email` PASSWORD=`echo $DOCKER_LOGIN | cut -d' ' -f6` diff --git a/clair/clair.go b/clair/clair.go index 837a536..6bc64cb 100644 --- a/clair/clair.go +++ b/clair/clair.go @@ -112,7 +112,7 @@ func (c *Clair) Analyse(image *docker.Image) ([]*Vulnerability, error) { image.FsLayers = filterEmptyLayers(image.FsLayers) layerLength := len(image.FsLayers) if layerLength == 0 { - fmt.Fprintf(os.Stderr, "no need to analyse image %s/%s:%s as there is no non-emtpy layer\n", + fmt.Fprintf(os.Stderr, "no need to analyse image %s/%s:%s as there is no non-empty layer\n", image.Registry, image.Name, image.Tag) return nil, nil } diff --git a/main.go b/main.go index a69832e..8e1c427 100644 --- a/main.go +++ b/main.go @@ -129,7 +129,7 @@ func vulnsBy(sev string, store map[string][]*clair.Vulnerability) []*clair.Vulne return items } -//Filter out whitelisted vulnerabilites +//Filter out whitelisted vulnerabilities func filterWhitelist(whitelist *vulnerabilitiesWhitelist, vs []*clair.Vulnerability, imageName string) []*clair.Vulnerability { generalWhitelist := whitelist.General imageWhitelist := whitelist.Images