Welcome to the Linux Foundation Forum!

Lab 7.3 - unknown shorthand flag: 'i'

sudo trivy -i nginx.tar

Error: unknown shorthand flag: 'i' in -i

"i" work but next command does not ...

sudo trivy i nginx.tar
2022-12-17T19:55:22.697Z INFO Need to update DB
2022-12-17T19:55:22.698Z INFO DB Repository: ghcr.io/aquasecurity/trivy-db
2022-12-17T19:55:22.698Z INFO Downloading DB...
35.68 MiB / 35.68 MiB [---------------------------------------------------------] 100.00% 12.75 MiB p/s 3.0s
2022-12-17T19:55:26.587Z INFO Vulnerability scanning is enabled
2022-12-17T19:55:26.587Z INFO Secret scanning is enabled
2022-12-17T19:55:26.587Z INFO If your scanning is slow, please try '--security-checks vuln' to disable secret scanning
2022-12-17T19:55:26.587Z INFO Please see also https://aquasecurity.github.io/trivy/v0.35/docs/secret/scanning/#recommendation for faster secret detection
2022-12-17T19:55:27.894Z FATAL image scan error: scan error: unable to initialize a scanner: unable to initialize a docker scanner: 4 errors occurred:
* unable to inspect the image (nginx.tar): Error: No such image: nginx.tar
* unable to initialize Podman client: no podman socket found: stat podman/podman.sock: no such file or directory
* failed to parse image reference: nginx.tar
* GET https://index.docker.io/v2/library/nginx.tar/manifests/latest: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:library/nginx.tar Type:repository]]

Comments

  • I used the help provided by the trivy command and the following one worked for me:

    sudo trivy image --input nginx.tar

Categories

Upcoming Training