From 3b583b4a6d01dd3272fdd23b7c3603caac141081 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sat, 8 Feb 2025 09:33:51 +0000 Subject: [PATCH] Fix typos --- CHANGELOG.md | 4 ++-- README.md | 22 +++++++++---------- ROADMAP.md | 6 ++--- pkg/app/master/command/build/flags.go | 4 ++-- pkg/app/master/command/build/kubernetes.go | 2 +- pkg/app/master/command/run/handler.go | 2 +- pkg/app/master/command/xray/cli.go | 6 ++--- pkg/app/master/kubernetes/client.go | 2 +- pkg/app/master/probe/http/custom_probe.go | 2 +- pkg/app/master/probe/http/swagger.go | 2 +- pkg/app/sensor/app.go | 2 +- pkg/app/sensor/app_test.go | 2 +- pkg/app/sensor/artifact/artifact.go | 12 +++++----- pkg/app/sensor/monitor/fanotify/monitor.go | 4 ++-- pkg/app/sensor/monitor/ptrace/monitor.go | 6 ++--- .../sensor/monitor/ptrace/monitor_arm64.go | 2 +- pkg/app/sensor/standalone/standalone.go | 4 ++-- pkg/docker/dockerimage/dockerimage.go | 2 +- pkg/docker/dockerutil/dockerutil.go | 4 ++-- pkg/docker/instruction/instruction.go | 4 ++-- pkg/docker/linter/check/id20019.go | 2 +- pkg/lambdaproxy/lambdaproxy.go | 2 +- pkg/monitor/ptrace/ptrace.go | 2 +- pkg/sysidentity/sysidentity.go | 4 ++-- pkg/test/e2e/sensor/sensor.go | 2 +- .../compose-go/loader/loader_test.go | 2 +- .../compose-go/loader/merge_test.go | 2 +- .../compose-go/loader/normalize_test.go | 4 ++-- pkg/third_party/madmo/fanotify/fanotify.go | 6 ++--- pkg/util/errutil/errutil.go | 2 +- pkg/vulnerability/epss/api/api.go | 2 +- scripts/install-slim.sh | 2 +- 32 files changed, 63 insertions(+), 63 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7384e99971..12be6d1658 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -215,13 +215,13 @@ to `Dockerfile.reversed` ### New Features - Container probe feature to use one of the compose services to test/probe the target container (`--container-probe-compose-svc` flag and `container.probe` continue-after mode) -- Ability to override the container image name and/or tag when targetting a compose service (`--target-compose-svc-image` flag) +- Ability to override the container image name and/or tag when targeting a compose service (`--target-compose-svc-image` flag) - Ability to wait before executing the HTTP probes (`--http-probe-start-wait` flag) - Ability to wait before starting each compose service (`--compose-svc-start-wait` flag) - Basic FastCGI protocol support in HTTP probes (docs TBD) - New `registry` command and a basic `pull` subcommand - `--include-new` build flag to keep new files created by target during dynamic analysis -- Supprot for stored global param in `slim.config.json` +- Support for stored global param in `slim.config.json` ### Improvements diff --git a/README.md b/README.md index ba39fcd871..82957bc5d6 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ archlinux latest ... ... 467MB ## Community -Feel free to join any of these channels or just open a new [`Github issue`](https://github.com/slimtoolkit/slim/issues) if you want to chat or if you need help. +Feel free to join any of these channels or just open a new [`GitHub issue`](https://github.com/slimtoolkit/slim/issues) if you want to chat or if you need help. * [`CNCF Slack channel`](https://cloud-native.slack.com/archives/C059QP1RH1S) * [`Discord server`](https://discord.gg/9tDyxYS) @@ -874,9 +874,9 @@ pipeline { } ``` -### Integrating Slimtoolkit in Github Actions -#### Github Action -Integrating SlimToolkit in Github Actions in your CI/CD workflow involves using the [Docker-Slim Github Action](https://github.com/marketplace/actions/docker-slim-github-action), this Action(snippet below) minifies a target docker image--IMAGE_NAME:latest in your workflow, making it smaller and adjusting the new slimmed image as IMAGE_NAME:slim. +### Integrating Slimtoolkit in GitHub Actions +#### GitHub Action +Integrating SlimToolkit in GitHub Actions in your CI/CD workflow involves using the [Docker-Slim GitHub Action](https://github.com/marketplace/actions/docker-slim-github-action), this Action(snippet below) minifies a target docker image--IMAGE_NAME:latest in your workflow, making it smaller and adjusting the new slimmed image as IMAGE_NAME:slim. ``` # Slim it! - uses: kitabisa/docker-slim-action@v1 @@ -886,8 +886,8 @@ Integrating SlimToolkit in Github Actions in your CI/CD workflow involves using target: IMAGE_NAME:latest tag: "slim" ``` -#### Github Actions Slim Workflow -You can integrate the Docker-Slim Github Action in your workflow by inserting the Action after a [Docker Build/Push Github Action](https://github.com/docker/build-push-action), before [Docker Login Github Action](https://github.com/docker/login-action) and docker tag/push commands, a customized example workflow is highlighted below. Note that the environment variable tag--{{github.run_number}} in the workflow represents a unique incremental number allocated by Github Actions each time your workflow runs. +#### GitHub Actions Slim Workflow +You can integrate the Docker-Slim GitHub Action in your workflow by inserting the Action after a [Docker Build/Push GitHub Action](https://github.com/docker/build-push-action), before [Docker Login GitHub Action](https://github.com/docker/login-action) and docker tag/push commands, a customized example workflow is highlighted below. Note that the environment variable tag--{{github.run_number}} in the workflow represents a unique incremental number allocated by GitHub Actions each time your workflow runs. ``` # Build the Docker image first - uses: docker/build-push-action@v4 @@ -915,9 +915,9 @@ You can integrate the Docker-Slim Github Action in your workflow by inserting th docker push ${{ secrets.DOCKERHUB_USERNAME }}/IMAGE_NAME:slim-{{github.run_number}} ``` The workflow above indicates four steps: -- A [Docker Build/Push Github Action](https://github.com/docker/build-push-action) for building a docker image with the image name/tag--IMAGE_NAME:{{github.run_number}}, you should give replace IMAGE_NAME with your desired image name. Note that this Action must have a false option to push the built image--given that you need the image slimmed/minified before pushing it to a container registry. -- A Docker-Slim Github Action which minifies the target image--IMAGE_NAME:{{github.run_number}}, this Action has the "slim-{{github.run_number}}" tag and adds this tag to the slimmed/minified docker image such that the image name/tag becomes IMAGE_NAME:slim-{{github.run_number}}. -- A Docker Login Github Action which logs into your DockerHub container regristry account, you should store your DockerHub username and personal access token as secrets in the github repository meant for the workflow. Suppose your container registry is not DockerHub, you can check the [Docker Login Github Action documentation](https://github.com/docker/login-action) for the use case of logging into your desired container registry. +- A [Docker Build/Push GitHub Action](https://github.com/docker/build-push-action) for building a docker image with the image name/tag--IMAGE_NAME:{{github.run_number}}, you should give replace IMAGE_NAME with your desired image name. Note that this Action must have a false option to push the built image--given that you need the image slimmed/minified before pushing it to a container registry. +- A Docker-Slim GitHub Action which minifies the target image--IMAGE_NAME:{{github.run_number}}, this Action has the "slim-{{github.run_number}}" tag and adds this tag to the slimmed/minified docker image such that the image name/tag becomes IMAGE_NAME:slim-{{github.run_number}}. +- A Docker Login GitHub Action which logs into your DockerHub container regristry account, you should store your DockerHub username and personal access token as secrets in the github repository meant for the workflow. Suppose your container registry is not DockerHub, you can check the [Docker Login GitHub Action documentation](https://github.com/docker/login-action) for the use case of logging into your desired container registry. - A docker tag command for naming/tagging the slimmed image with your DockerHub account remote repository name which could be the same name(IMAGE_NAME) as the slimmed image; A docker push command to push the slimmed image to your Dockerhub account remote repository. @@ -1011,7 +1011,7 @@ Commands in `probeCmds.json`: "resource": "/submit" }, { - "procotol": "http", + "protocol": "http", "resource": "/api/call?arg=one" }, { @@ -1415,7 +1415,7 @@ DockerSlim was a `Docker Global Hack Day` \#`dockerhackday` project. It barely w ![DHD3](assets/images/dhd/docker_global_hackday3_red.png) -Since then it's been improved and it works pretty well for its core use cases. It can be better though. That's why the project needs your help! You don't need to know much about the container internals, container runtimes and you don't need to know anything about Go. You can contribute in many different ways. For example, use Slim on your images and open Github issues documenting your experience even if it worked just fine :-) +Since then it's been improved and it works pretty well for its core use cases. It can be better though. That's why the project needs your help! You don't need to know much about the container internals, container runtimes and you don't need to know anything about Go. You can contribute in many different ways. For example, use Slim on your images and open GitHub issues documenting your experience even if it worked just fine :-) ## LICENSE diff --git a/ROADMAP.md b/ROADMAP.md index 8bed2a32d9..08304f943d 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -1,9 +1,9 @@ # High Level Project Roadmap -This is a high level roadmap that identies the current areas of focus. Note that it's not a detailed list of every possible enhancement. +This is a high level roadmap that identities the current areas of focus. Note that it's not a detailed list of every possible enhancement. * Community - * Collaborate with other CNCF projects to achieve mutually benefitial outcomes + * Collaborate with other CNCF projects to achieve mutually beneficial outcomes * Talks, outreach, community training * Engage with the community to increase project contributions @@ -23,7 +23,7 @@ This is a high level roadmap that identies the current areas of focus. Note that * Build/Optimize engine * Error and logging enhancements to improve debuggability * Improved build flag documentation with examples - * Improved CI/build tool integration documentation (including Github Actions) + * Improved CI/build tool integration documentation (including GitHub Actions) * Integrations * Consign integrations for `xray` (reporting) and `build` (signing) diff --git a/pkg/app/master/command/build/flags.go b/pkg/app/master/command/build/flags.go index aaf24154f0..67ba9a65e6 100644 --- a/pkg/app/master/command/build/flags.go +++ b/pkg/app/master/command/build/flags.go @@ -148,7 +148,7 @@ const ( FlagCBONetwork = "cbo-network" FlagCBOCacheFrom = "cbo-cache-from" - //Experimenal flags + //Experimental flags FlagObfuscateMetadata = "obfuscate-metadata" ) @@ -163,7 +163,7 @@ const ( FlagPathPermsUsage = "Set path permissions in optimized image" FlagPathPermsFileUsage = "File with path permissions to set" - FlagPreservePathUsage = "Keep path from orignal image in its initial state (changes to the selected container image files when it runs will be discarded)" + FlagPreservePathUsage = "Keep path from original image in its initial state (changes to the selected container image files when it runs will be discarded)" FlagPreservePathFileUsage = "File with paths to keep from original image in their original state (changes to the selected container image files when it runs will be discarded)" FlagIncludePathUsage = "Keep path from original image" FlagIncludePathFileUsage = "File with paths to keep from original image" diff --git a/pkg/app/master/command/build/kubernetes.go b/pkg/app/master/command/build/kubernetes.go index 86c980af13..6486e997b2 100644 --- a/pkg/app/master/command/build/kubernetes.go +++ b/pkg/app/master/command/build/kubernetes.go @@ -210,7 +210,7 @@ func (h *kubeHandler) Handle( opts.CustomImageTag, opts.AdditionalTags, opts.CBOpts, - nil, // TODO: overrrides + nil, // TODO: overrides nil, // TODO: imageOverrideSelectors, nil, // TODO: instructions, opts.DoDeleteFatImage, diff --git a/pkg/app/master/command/run/handler.go b/pkg/app/master/command/run/handler.go index f9c33cf82a..0b4dd9d762 100644 --- a/pkg/app/master/command/run/handler.go +++ b/pkg/app/master/command/run/handler.go @@ -147,7 +147,7 @@ func OnCommand( for { select { case evt := <-containerEventCh: - logger.Tracef("Exection Event: name=%s", evt.Event) + logger.Tracef("Execution Event: name=%s", evt.Event) switch evt.Event { case container.XEExitedCrash: xc.Out.Info("target.container.event", diff --git a/pkg/app/master/command/xray/cli.go b/pkg/app/master/command/xray/cli.go index 9996efd45a..ac7242be4d 100644 --- a/pkg/app/master/command/xray/cli.go +++ b/pkg/app/master/command/xray/cli.go @@ -585,7 +585,7 @@ func parseDetectUTF8(raw string) (*dockerimage.UTF8Detector, error) { return nil, fmt.Errorf("malformed find utf8: %s", raw) } outTarget = parts[0] - _ = parts[1] // TODO implemement path pattern matcher + _ = parts[1] // TODO implement path pattern matcher maxSizeBytes := parts[2] var err error detector.MaxSizeBytes, err = strconv.Atoi(maxSizeBytes) @@ -598,8 +598,8 @@ func parseDetectUTF8(raw string) (*dockerimage.UTF8Detector, error) { return nil, fmt.Errorf("malformed find utf8: %s", raw) } outTarget = parts[0] - _ = parts[1] // TODO implemement path pattern matcher - _ = parts[2] // TODO implemement data regex matcher + _ = parts[1] // TODO implement path pattern matcher + _ = parts[2] // TODO implement data regex matcher maxSizeBytes := parts[3] var err error detector.MaxSizeBytes, err = strconv.Atoi(maxSizeBytes) diff --git a/pkg/app/master/kubernetes/client.go b/pkg/app/master/kubernetes/client.go index c9d1cb9d00..221b11c190 100644 --- a/pkg/app/master/kubernetes/client.go +++ b/pkg/app/master/kubernetes/client.go @@ -95,7 +95,7 @@ func (c *Client) Delete(ctx context.Context, info *resource.Info) error { } // ResourceBuilderFunc is a helper function to avoid -// passing KuberneteOptions through unrelated code. +// passing KubernetesOptions through unrelated code. type ResourceBuilderFunc func() *resource.Builder func NewResourceBuilder(kubeOpts config.KubernetesOptions) *resource.Builder { diff --git a/pkg/app/master/probe/http/custom_probe.go b/pkg/app/master/probe/http/custom_probe.go index cc506106c7..5e28bb08b9 100644 --- a/pkg/app/master/probe/http/custom_probe.go +++ b/pkg/app/master/probe/http/custom_probe.go @@ -371,7 +371,7 @@ func (p *CustomProbe) Start() { if port == defaultFastCGIPortStr && cmd.FastCGI == nil { log.Debugf("HTTP probe - FastCGI default port (%s) used, setting up HTTP probe FastCGI wrapper defaults", port) - // Typicall the entrypoint into a PHP app. + // Typically the entrypoint into a PHP app. if cmd.Resource == "/" { cmd.Resource = "/index.php" } diff --git a/pkg/app/master/probe/http/swagger.go b/pkg/app/master/probe/http/swagger.go index 175e9f1c61..7d5bda87e7 100644 --- a/pkg/app/master/probe/http/swagger.go +++ b/pkg/app/master/probe/http/swagger.go @@ -157,7 +157,7 @@ func isOpenAPI(data []byte) bool { } func apiSpecPrefix(spec *openapi3.T) (string, error) { - //for now get the api prefix from the first server struc + //for now get the api prefix from the first server struct //later, support multiple prefixes if there's more than one server struct var prefix string for _, sinfo := range spec.Servers { diff --git a/pkg/app/sensor/app.go b/pkg/app/sensor/app.go index 0155d6bf13..44852aa49f 100644 --- a/pkg/app/sensor/app.go +++ b/pkg/app/sensor/app.go @@ -190,7 +190,7 @@ func Run() { log.Info("sensor: Instrumented containers require root and ALL capabilities enabled. Example: `docker run --user root --cap-add ALL app:v1-instrumented`") } } else { - log.Info("sensor: run finished succesfully") + log.Info("sensor: run finished successfully") } exe.Close() diff --git a/pkg/app/sensor/app_test.go b/pkg/app/sensor/app_test.go index 1d2f91adfa..48715d92a8 100644 --- a/pkg/app/sensor/app_test.go +++ b/pkg/app/sensor/app_test.go @@ -30,7 +30,7 @@ var ( "sensor: ver=", "sensor: creating monitors...", "sensor: starting monitors...", - "sensor: run finished succesfully", + "sensor: run finished successfully", } sensorLifecycleHookSequence = []string{ diff --git a/pkg/app/sensor/artifact/artifact.go b/pkg/app/sensor/artifact/artifact.go index 852e6b9a14..5a244461a5 100644 --- a/pkg/app/sensor/artifact/artifact.go +++ b/pkg/app/sensor/artifact/artifact.go @@ -260,7 +260,7 @@ type Processor interface { ArtifactsDir() string // Enumerate all files under a given root (used later on to tell the files - // that were created during probing and the existed files appart). + // that were created during probing and the existed files apart). GetCurrentPaths(root string, excludes []string) (map[string]struct{}, error) // Create the artifacts folder, preserve some files, etc. @@ -1281,7 +1281,7 @@ func (ref *store) saveSSHClient() { } for _, bpath := range binArtifacts { - bfpaths, err := resloveLink(bpath) + bfpaths, err := resolveLink(bpath) if err != nil { log.Debugf("sensor.store.saveSSHClient: error resolving link - %s (%v)", bpath, err) // still add the path... @@ -1391,7 +1391,7 @@ func (p *store) saveOSLibsNetwork() { continue } - fpaths, err := resloveLink(fpath) + fpaths, err := resolveLink(fpath) if err != nil { log.Debugf("sensor.store.saveOSLibsNetwork: error resolving link - %s", fpath) continue @@ -1420,7 +1420,7 @@ func (p *store) saveOSLibsNetwork() { } for _, bpath := range binArtifacts { - bfpaths, err := resloveLink(bpath) + bfpaths, err := resolveLink(bpath) if err != nil { log.Debugf("sensor.store.saveOSLibsNetwork: error resolving link - %s", bpath) continue @@ -1458,7 +1458,7 @@ func (p *store) saveOSLibsNetwork() { } } -func resloveLink(fpath string) ([]string, error) { +func resolveLink(fpath string) ([]string, error) { finfo, err := os.Lstat(fpath) if err != nil { return nil, err @@ -1564,7 +1564,7 @@ func (p *store) saveCertsData() { log.Debugf("sensor.store.saveCertsData.copyDirs: fsutil.CopySymlinkFile(%v,%v) error - %v", fname, dstPath, err) } } else { - log.Debugf("store.saveCertsData.copyDir: unexpected obect type - %s", fname) + log.Debugf("store.saveCertsData.copyDir: unexpected object type - %s", fname) } } } diff --git a/pkg/app/sensor/monitor/fanotify/monitor.go b/pkg/app/sensor/monitor/fanotify/monitor.go index 333666efe8..d73d1a971a 100644 --- a/pkg/app/sensor/monitor/fanotify/monitor.go +++ b/pkg/app/sensor/monitor/fanotify/monitor.go @@ -67,7 +67,7 @@ type monitor struct { artifactsDir string mountPoint string - // TODO: Move the logic behind these two fields to the artifact processig stage. + // TODO: Move the logic behind these two fields to the artifact processing stage. includeNew bool origPaths map[string]struct{} @@ -129,7 +129,7 @@ func (m *monitor) Start() error { } // Sync part of the start was successful. - // Tracking the completetion of the monitor.... + // Tracking the completion of the monitor.... go func() { logger := m.logger.WithField("op", "collector") diff --git a/pkg/app/sensor/monitor/ptrace/monitor.go b/pkg/app/sensor/monitor/ptrace/monitor.go index 7d3a0cd354..7f77e8378a 100644 --- a/pkg/app/sensor/monitor/ptrace/monitor.go +++ b/pkg/app/sensor/monitor/ptrace/monitor.go @@ -31,7 +31,7 @@ type monitor struct { runOpt AppRunOpt - // TODO: Move the logic behind these two fields to the artifact processig stage. + // TODO: Move the logic behind these two fields to the artifact processing stage. includeNew bool origPaths map[string]struct{} @@ -127,9 +127,9 @@ func (m *monitor) Start() error { // The sync part of the start was successful. - // Tracking the completetion of the monitor. + // Tracking the completion of the monitor. go func() { - logger := m.logger.WithField("op", "sensor.pt.monitor.completetion.monitor") + logger := m.logger.WithField("op", "sensor.pt.monitor.completion.monitor") logger.Info("call") defer logger.Info("exit") diff --git a/pkg/app/sensor/monitor/ptrace/monitor_arm64.go b/pkg/app/sensor/monitor/ptrace/monitor_arm64.go index 3c1d587c01..08eb1ff5e8 100644 --- a/pkg/app/sensor/monitor/ptrace/monitor_arm64.go +++ b/pkg/app/sensor/monitor/ptrace/monitor_arm64.go @@ -58,7 +58,7 @@ type monitor struct { runOpt AppRunOpt - // TODO: Move the logic behind these two fields to the artifact processig stage. + // TODO: Move the logic behind these two fields to the artifact processing stage. includeNew bool origPaths map[string]struct{} diff --git a/pkg/app/sensor/standalone/standalone.go b/pkg/app/sensor/standalone/standalone.go index 4eb59d4f95..ee96848b08 100644 --- a/pkg/app/sensor/standalone/standalone.go +++ b/pkg/app/sensor/standalone/standalone.go @@ -211,7 +211,7 @@ loop: break loop case cmd := <-s.exe.Commands(): - log.Infof("sensor: recieved control command => %s", cmd.GetName()) + log.Infof("sensor: received control command => %s", cmd.GetName()) if cmd.GetName() == command.StopMonitorName { s.stopCommandReceived = true s.signalTargetApp(mon, s.stopSignal) @@ -246,7 +246,7 @@ loop: // // to avoid competting event loops - this will simplify the code // and let us avoid subtle race conditions when the stop signal -// arrives while the app is being stoped due to the stop control command. +// arrives while the app is being stopped due to the stop control command. func (s *Sensor) runSignalForwarder(mon monitor.CompositeMonitor) { log.Debug("sensor: starting forwarding signals to target app...") diff --git a/pkg/docker/dockerimage/dockerimage.go b/pkg/docker/dockerimage/dockerimage.go index 815aa30640..742e62a78f 100644 --- a/pkg/docker/dockerimage/dockerimage.go +++ b/pkg/docker/dockerimage/dockerimage.go @@ -1014,7 +1014,7 @@ func LoadPackage(archivePath string, archivePath, configObjectFileName) - //pkg.Config might alread point to a config (v1 or DM) + //pkg.Config might already point to a config (v1 or DM) //todo: check the difference pkg.Config = &imageConfig configObjectFileName = "" diff --git a/pkg/docker/dockerutil/dockerutil.go b/pkg/docker/dockerutil/dockerutil.go index 7676c39682..2fa1abfb2f 100644 --- a/pkg/docker/dockerutil/dockerutil.go +++ b/pkg/docker/dockerutil/dockerutil.go @@ -147,8 +147,8 @@ func ListImages(dclient *dockerapi.Client, imageNameFilter string) (map[string]B // dslimexamples/* <- all image names in the 'dslimexamples' namespace // dslimexamples/ser* <- all image names starting with 'ser' in the 'dslimexamples' namespace // dslimexamples/*python* <- all image names with 'python' in them in the 'dslimexamples' namespace - // */*python* <- all image names with 'python' in them in all namesapces (except the default namespace) - // */*alpine <- all image names ending with 'alpine' in all namesapces (except the default namespace) + // */*python* <- all image names with 'python' in them in all namespaces (except the default namespace) + // */*alpine <- all image names ending with 'alpine' in all namespaces (except the default namespace) // * <- all image names with no/default namespace. note that no images with namespaces will be returned var err error if dclient == nil { diff --git a/pkg/docker/instruction/instruction.go b/pkg/docker/instruction/instruction.go index 0614984a88..2ab3dc2407 100644 --- a/pkg/docker/instruction/instruction.go +++ b/pkg/docker/instruction/instruction.go @@ -52,7 +52,7 @@ type Format struct { SupportsNameValues bool RequiresNameValues bool SupportsSubInst bool - IsDepricated bool + IsDeprecated bool } // Specs is a map of all available instructions and their format info (by name) @@ -100,7 +100,7 @@ var Specs = map[string]Format{ }, Maintainer: { Name: Maintainer, - IsDepricated: true, + IsDeprecated: true, }, Onbuild: { Name: Label, diff --git a/pkg/docker/linter/check/id20019.go b/pkg/docker/linter/check/id20019.go index 57ec998ca5..64866bdecb 100644 --- a/pkg/docker/linter/check/id20019.go +++ b/pkg/docker/linter/check/id20019.go @@ -14,7 +14,7 @@ func init() { Info: Info{ ID: "ID.20019", Name: "Unnecessary Layer", - Description: "RUN instruction will result in unnecessary layer (combine command with previous RUN instruciton)", + Description: "RUN instruction will result in unnecessary layer (combine command with previous RUN instruction)", DetailsURL: "https://lint.dockersl.im/check/ID.20019", MainMessage: "RUN instruction will result in unnecessary layer", MatchMessage: "Instruction: start=%d end=%d global_index=%d stage_id=%d stage_index=%d prev_start=%d prev_end=%d prev_global_index=%d prev_stage_index=%d", diff --git a/pkg/lambdaproxy/lambdaproxy.go b/pkg/lambdaproxy/lambdaproxy.go index 49439e52af..46ec01fa9f 100644 --- a/pkg/lambdaproxy/lambdaproxy.go +++ b/pkg/lambdaproxy/lambdaproxy.go @@ -129,7 +129,7 @@ func DecodeResponse(input []byte, options *DecodeOptions) (HTTPResponse, error) if response.IsBase64Encoded { responseBodyBytes, err := base64.StdEncoding.DecodeString(string(response.Body)) if err != nil { - log.Fatalf("Some error occured during base64 decode. Error %s", err.Error()) + log.Fatalf("Some error occurred during base64 decode. Error %s", err.Error()) } response.Body = string(responseBodyBytes) } diff --git a/pkg/monitor/ptrace/ptrace.go b/pkg/monitor/ptrace/ptrace.go index 31bfbe1404..ef780ff47f 100644 --- a/pkg/monitor/ptrace/ptrace.go +++ b/pkg/monitor/ptrace/ptrace.go @@ -687,7 +687,7 @@ func (app *App) collect() { err := syscall.PtraceSyscall(callPid, callSig) if err != nil { if strings.Contains(strings.ToLower(err.Error()), "no such process") { - // This is kinda-sorta normal situtaion when ptrace-ing: + // This is kinda-sorta normal situation when ptrace-ing: // - The tracee process might have been KILL-led // - A group-stop event in a multi-threaded program can have // a similar effect (see also https://linux.die.net/man/2/ptrace). diff --git a/pkg/sysidentity/sysidentity.go b/pkg/sysidentity/sysidentity.go index 2e90158960..bc270c379a 100644 --- a/pkg/sysidentity/sysidentity.go +++ b/pkg/sysidentity/sysidentity.go @@ -161,7 +161,7 @@ func NewReportFromData(data *DataSet) (*Report, error) { Name: record.Group, ID: record.GID, Members: record.Members, - Password: record.Password, //todo: get the actual password infor from gshadow (if any) + Password: record.Password, //todo: get the actual password info from gshadow (if any) } report.Groups[groupInfo.Name] = groupInfo @@ -268,7 +268,7 @@ type PasswdRecord struct { GID int `json:"gid"` Info string `json:"info"` //additional user identity info / GECOS Home string `json:"home"` //home directory - Shell string `json:"shell"` //shell exected when user logs in + Shell string `json:"shell"` //shell executed when user logs in RawData string `json:"raw_data"` NoLoginShell bool `json:"no_login_shell"` } diff --git a/pkg/test/e2e/sensor/sensor.go b/pkg/test/e2e/sensor/sensor.go index 8646bd63c5..5e4f529679 100644 --- a/pkg/test/e2e/sensor/sensor.go +++ b/pkg/test/e2e/sensor/sensor.go @@ -732,7 +732,7 @@ func (s *Sensor) assertTargetAppStdFileEqualsTo( } } -// Checks the presense of the expected events AND the occurrence order. +// Checks the presence of the expected events AND the occurrence order. func (s *Sensor) AssertSensorEventsFileContains( t *testing.T, ctx context.Context, diff --git a/pkg/third_party/compose-go/loader/loader_test.go b/pkg/third_party/compose-go/loader/loader_test.go index cea5117053..2ee3c7546d 100755 --- a/pkg/third_party/compose-go/loader/loader_test.go +++ b/pkg/third_party/compose-go/loader/loader_test.go @@ -840,7 +840,7 @@ volumes: assert.ErrorContains(t, err, "external_volume") } -func TestInvalidExternalAndDirverOptsCombination(t *testing.T) { +func TestInvalidExternalAndDriverOptsCombination(t *testing.T) { _, err := loadYAML(` volumes: external_volume: diff --git a/pkg/third_party/compose-go/loader/merge_test.go b/pkg/third_party/compose-go/loader/merge_test.go index 42f5f38bdc..082861aa59 100755 --- a/pkg/third_party/compose-go/loader/merge_test.go +++ b/pkg/third_party/compose-go/loader/merge_test.go @@ -877,7 +877,7 @@ func TestLoadMultipleConfigs(t *testing.T) { "foo": map[string]interface{}{ "image": "foo", "entrypoint": "echo", - "command": "hellow world", + "command": "hello world", "build": map[string]interface{}{ "context": ".", "dockerfile": "bar.Dockerfile", diff --git a/pkg/third_party/compose-go/loader/normalize_test.go b/pkg/third_party/compose-go/loader/normalize_test.go index dcc5858891..d0c7bebe63 100755 --- a/pkg/third_party/compose-go/loader/normalize_test.go +++ b/pkg/third_party/compose-go/loader/normalize_test.go @@ -36,7 +36,7 @@ func TestNormalizeNetworkNames(t *testing.T) { }, Networks: types.Networks{ "myExternalnet": { - Name: "myExternalnet", // this is automaticaly setup by loader for externa networks before reaching normalization + Name: "myExternalnet", // this is automatically setup by loader for externa networks before reaching normalization External: types.External{External: true}, }, "mynet": {}, @@ -115,7 +115,7 @@ func TestNormalizeVolumes(t *testing.T) { Networks: types.Networks{}, Volumes: types.Volumes{ "myExternalVol": { - Name: "myExternalVol", // this is automaticaly setup by loader for externa networks before reaching normalization + Name: "myExternalVol", // this is automatically setup by loader for externa networks before reaching normalization External: types.External{External: true}, }, "myvol": {}, diff --git a/pkg/third_party/madmo/fanotify/fanotify.go b/pkg/third_party/madmo/fanotify/fanotify.go index 121fe2e91d..35abc512e6 100644 --- a/pkg/third_party/madmo/fanotify/fanotify.go +++ b/pkg/third_party/madmo/fanotify/fanotify.go @@ -22,13 +22,13 @@ import ( "syscall" ) -// Flags used as first parameter to Initiliaze +// Flags used as first parameter to Initialize const ( /* flags used for fanotify_init() */ FAN_CLOEXEC = 0x00000001 FAN_NONBLOCK = 0x00000002 - /* These are NOT bitwise flags. Both bits are used togther. */ + /* These are NOT bitwise flags. Both bits are used together. */ FAN_CLASS_NOTIF = 0x00000000 FAN_CLASS_CONTENT = 0x00000004 FAN_CLASS_PRE_CONTENT = 0x00000008 @@ -73,7 +73,7 @@ const ( const ( FAN_ACCESS = 0x00000001 /* File was accessed */ FAN_MODIFY = 0x00000002 /* File was modified */ - FAN_CLOSE_WRITE = 0x00000008 /* Writtable file closed */ + FAN_CLOSE_WRITE = 0x00000008 /* Writable file closed */ FAN_CLOSE_NOWRITE = 0x00000010 /* Unwrittable file closed */ FAN_OPEN = 0x00000020 /* File was opened */ diff --git a/pkg/util/errutil/errutil.go b/pkg/util/errutil/errutil.go index a04b9b9772..49df0ecdef 100644 --- a/pkg/util/errutil/errutil.go +++ b/pkg/util/errutil/errutil.go @@ -86,7 +86,7 @@ func showInfo(info map[string]string) { } func showCommunityInfo() { - fmt.Printf("slim: message='Github discussions' info='%s'\n", consts.CommunityDiscussions) + fmt.Printf("slim: message='GitHub discussions' info='%s'\n", consts.CommunityDiscussions) fmt.Printf("slim: message='CNCF Slack' info='%s'\n", consts.CommunityCNCFSlack) fmt.Printf("slim: message='join the Discord server to get help with this failure' info='%s'\n", consts.CommunityDiscord) fmt.Printf("slim: message='join the Gitter channel to get help with this failure' info='%s'\n", consts.CommunityGitter) diff --git a/pkg/vulnerability/epss/api/api.go b/pkg/vulnerability/epss/api/api.go index 97a45aca1d..de0798592f 100644 --- a/pkg/vulnerability/epss/api/api.go +++ b/pkg/vulnerability/epss/api/api.go @@ -28,7 +28,7 @@ const ( // Used only for limiting the available resultset. qsFields = "fields" // type: string - // Limits the maximun number of records to be shown. + // Limits the maximum number of records to be shown. // Should be a number between 1 and 100. qsLimit = "limit" // type: integer diff --git a/scripts/install-slim.sh b/scripts/install-slim.sh index 58b650fffe..b9d4dcbe65 100755 --- a/scripts/install-slim.sh +++ b/scripts/install-slim.sh @@ -29,7 +29,7 @@ function get_mint() { KERNEL=$(uname -s) MACHINE=$(uname -m) - # Determine the target distrubution + # Determine the target distribution if [ "${KERNEL}" == "Linux" ]; then EXT="tar.gz" if [ "${MACHINE}" == "x86_64" ]; then