LoginSignup
0
0

More than 3 years have passed since last update.

trivyでDockerイメージのスキャン実行時にタイムアウトエラー

Last updated at Posted at 2021-03-18

trivyを使ってDockerイメージをスキャンした際にエラーが発生しました。
エラー内容を検索しても、それらしい記事が見つからなかったのでメモします。
オプションを1つ追加するだけで解決しました。

エラーログ
$ trivy -s "HIGH,CRITICAL" -o trivy_result.txt centos7:test01
2021-03-17T07:46:41.617Z        FATAL   error in image scan: failed analysis: analyze error: timeout: context deadline exceeded

--timeoutオプション追加

ログ(オプション追加)
$ trivy --timeout 10m -s "HIGH,CRITICAL" -o trivy_result.txt centos7:test01
2021-03-17T08:31:42.321Z        INFO    Detecting RHEL/CentOS vulnerabilities...
2021-03-17T08:31:43.305Z        INFO    Trivy skips scanning programming language libraries because no supported file was detected

centos7:test01 (centos 7.9.2009)
================================
Total: 3 (HIGH: 3, CRITICAL: 0)

以上です。

参考:
https://github.com/aquasecurity/trivy/issues/139
https://github.com/aquasecurity/trivy/pull/143
https://aquasecurity.github.io/trivy/v0.16.0/usage/image/

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0