Skip to content

SC2002: Improving shell script to pass shellcheck - #3

Closed
cniackz wants to merge 1 commit into
dvaldivia:operator-uifrom
cniackz:useless-cat-SC2002
Closed

cniackz wants to merge 1 commit into
dvaldivia:operator-uifrom
cniackz:useless-cat-SC2002

Conversation

@cniackz

@cniackz cniackz commented Mar 1, 2023 •

Copy link
Copy Markdown

Objective:

To improve shell script to pass shellcheck, please check SC2002: https://www.shellcheck.net/wiki/SC2002

  • Many tools also accept optional filenames, e.g. grep -q foo file instead of cat file | grep -q foo.

To fix:

./web-app/check-warnings.sh:16:8: note: Useless cat. Consider 'cmd < file | ..' or 'cmd file | ..' instead. [SC2002]

@cniackz cniackz changed the title Improving shell script to pass shellcheck Improving shell script to pass shellcheck SC2002 Mar 1, 2023
@cniackz cniackz changed the title Improving shell script to pass shellcheck SC2002 SC2002: Improving shell script to pass shellcheck Mar 1, 2023
@cniackz cniackz closed this Mar 1, 2023
@cniackz
cniackz deleted the useless-cat-SC2002 branch March 1, 2023 18:27
pjuarezd added a commit that referenced this pull request May 16, 2024
```
Vulnerability #1: GO-2024-2824
    Malformed DNS message can cause infinite loop in net
  More info: https://pkg.go.dev/vuln/GO-2024-2824
  Standard library
    Found in: net@go1.22.2
    Fixed in: net@go1.22.3
    Example traces found:
Error:       #1: pkg/sidecar/http_handlers.go:51:60: sidecar.Controller.BucketSrvHandler calls core.services.Delete, which eventually calls net.Dialer.DialContext
Error:       #2: pkg/sidecar/sidecar_utils.go:80:40: sidecar.StartSideCar calls http.Server.ListenAndServe, which calls net.Listen
Error:       #3: cmd/sidecar/main.go:129:31: sidecar.main calls cli.App.Run, which eventually calls net.LookupHost

Your code is affected by 1 vulnerability from the Go standard library.
This scan found no other vulnerabilities in packages you import or modules you
require.
Use '-show verbose' for more details.
```

add binary `minio-operator-sidecar`to gotignore

Signed-off-by: pjuarezd <pjuarezd@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant