Filesystem

Scan a local project including language-specific files.

  1. $ trivy fs /path/to/project

Local Project

Trivy will look for vulnerabilities based on lock files such as Gemfile.lock and package-lock.json.

  1. $ trivy fs ~/src/github.com/aquasecurity/trivy-ci-test

Result

  1. 2020-06-01T17:06:58.652+0300 WARN OS is not detected and vulnerabilities in OS packages are not detected.
  2. 2020-06-01T17:06:58.652+0300 INFO Detecting pipenv vulnerabilities...
  3. 2020-06-01T17:06:58.691+0300 INFO Detecting cargo vulnerabilities...
  4. Pipfile.lock
  5. ============
  6. Total: 10 (UNKNOWN: 2, LOW: 0, MEDIUM: 6, HIGH: 2, CRITICAL: 0)
  7. +---------------------+------------------+----------+-------------------+------------------------+------------------------------------+
  8. | LIBRARY | VULNERABILITY ID | SEVERITY | INSTALLED VERSION | FIXED VERSION | TITLE |
  9. +---------------------+------------------+----------+-------------------+------------------------+------------------------------------+
  10. | django | CVE-2020-7471 | HIGH | 2.0.9 | 3.0.3, 2.2.10, 1.11.28 | django: potential |
  11. | | | | | | SQL injection via |
  12. | | | | | | StringAgg(delimiter) |
  13. + +------------------+----------+ +------------------------+------------------------------------+
  14. | | CVE-2019-19844 | MEDIUM | | 3.0.1, 2.2.9, 1.11.27 | Django: crafted email address |
  15. | | | | | | allows account takeover |
  16. + +------------------+ + +------------------------+------------------------------------+
  17. | | CVE-2019-3498 | | | 2.1.5, 2.0.10, 1.11.18 | python-django: Content |
  18. | | | | | | spoofing via URL path in |
  19. | | | | | | default 404 page |
  20. + +------------------+ + +------------------------+------------------------------------+
  21. | | CVE-2019-6975 | | | 2.1.6, 2.0.11, 1.11.19 | python-django: |
  22. | | | | | | memory exhaustion in |
  23. | | | | | | django.utils.numberformat.format() |
  24. +---------------------+------------------+----------+-------------------+------------------------+------------------------------------+
  25. ...