trivy

trivy

trivy fs ./ --format template --template "@/usr/local/share/trivy/templates/html.tpl" -o report.html # 현재 경로 검색
trivy fs --format cyclonedx --scanners vuln --output sbom.json . # SBOM 작성
  • trivy [global flags…] command [flags…] target
  • command
    • image IMAGE:TAG 컨테이너 이미지 스캔
    • fs PATH 파일 시스템 스캔
    • config PATH 설정 파일 스캔(Terraform, Helm, Dockerfile 등)
    • repo GITURL GIT 저장소 스캔
    • k8s claster 클러스터 스캔
  • [global flags…]
    • –report summary
    • –format cyclonedx –output FILENAME SBOM 생성(sbom.json)
    • –format template –template “@/usr/local/share/trivy/templates/html.tpl” html 템플릿 사용. (/usr/local/share/trivy/templates/ 기본 템플릿 경로)
    • –scanners vuln 스캐너 명시(vuln 취약점)
    • –download-db-only DB 다운로드(캐시 디렉토리 공유 ~/.cache/trivy )

trivy --help

  • trivy.txt
  • 마지막으로 수정됨: 2026/04/16 01:27
  • 저자 writer