Image

Container Images

Simply specify an image name (and a tag).

  1. $ trivy image [YOUR_IMAGE_NAME]

For example:

  1. $ trivy image python:3.4-alpine

Result

  1. 2019-05-16T01:20:43.180+0900 INFO Updating vulnerability database...
  2. 2019-05-16T01:20:53.029+0900 INFO Detecting Alpine vulnerabilities...
  3. python:3.4-alpine3.9 (alpine 3.9.2)
  4. ===================================
  5. Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 0, CRITICAL: 0)
  6. +---------+------------------+----------+-------------------+---------------+--------------------------------+
  7. | LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
  8. +---------+------------------+----------+-------------------+---------------+--------------------------------+
  9. | openssl | CVE-2019-1543 | MEDIUM | 1.1.1a-r1 | 1.1.1b-r1 | openssl: ChaCha20-Poly1305 |
  10. | | | | | | with long nonces |
  11. +---------+------------------+----------+-------------------+---------------+--------------------------------+

Tar Files

  1. $ docker save ruby:2.3.0-alpine3.9 -o ruby-2.3.0.tar
  2. $ trivy image --input ruby-2.3.0.tar

Result

  1. 2019-05-16T12:45:57.332+0900 INFO Updating vulnerability database...
  2. 2019-05-16T12:45:59.119+0900 INFO Detecting Debian vulnerabilities...
  3. ruby-2.3.0.tar (debian 8.4)
  4. ===========================
  5. Total: 7447 (UNKNOWN: 5, LOW: 326, MEDIUM: 5695, HIGH: 1316, CRITICAL: 105)
  6. +------------------------------+---------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
  7. | LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
  8. +------------------------------+---------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
  9. | apt | CVE-2019-3462 | CRITICAL | 1.0.9.8.3 | 1.0.9.8.5 | Incorrect sanitation of the |
  10. | | | | | | 302 redirect field in HTTP |
  11. | | | | | | transport method of... |
  12. + +---------------------+----------+ +----------------------------------+-----------------------------------------------------+
  13. | | CVE-2016-1252 | MEDIUM | | 1.0.9.8.4 | The apt package in Debian |
  14. | | | | | | jessie before 1.0.9.8.4, in |
  15. | | | | | | Debian unstable before... |
  16. + +---------------------+----------+ +----------------------------------+-----------------------------------------------------+
  17. | | CVE-2011-3374 | LOW | | | |
  18. +------------------------------+---------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------+
  19. | bash | CVE-2016-7543 | HIGH | 4.3-11 | 4.3-11+deb8u1 | bash: Specially crafted |
  20. | | | | | | SHELLOPTS+PS4 variables allows |
  21. | | | | | | command substitution |
  22. + +---------------------+ + +----------------------------------+-----------------------------------------------------+
  23. | | CVE-2019-9924 | | | 4.3-11+deb8u2 | bash: BASH_CMD is writable in |
  24. | | | | | | restricted bash shells |
  25. + +---------------------+----------+ +----------------------------------+-----------------------------------------------------+
  26. | | CVE-2016-0634 | MEDIUM | | 4.3-11+deb8u1 | bash: Arbitrary code execution |
  27. | | | | | | via malicious hostname |
  28. + +---------------------+----------+ +----------------------------------+-----------------------------------------------------+
  29. | | CVE-2016-9401 | LOW | | 4.3-11+deb8u2 | bash: popd controlled free |
  30. + +---------------------+ + +----------------------------------+-----------------------------------------------------+
  31. | | TEMP-0841856-B18BAF | | | | |
  32. +------------------------------+---------------------+----------+----------------------------+----------------------------------+-----------------------------------------------------
  33. ...