트리비 시트
제품정보
Trivy는 컨테이너, Infrastructure as Code (IaC) 및 파일 시스템의 종합 보안 스캐너입니다. Docker 이미지, Kubernetes 표, Terraform 파일 등을 포함한 여러 형식의 취약점, misconfigurations, secrets 및 소프트웨어 라이센스를 감지합니다.
핵심 특징
- Multi-format Support: Docker 이미지, Kubernetes, Terraform, CloudFormation, Helm 차트
- ** 취약점 탐지 **: OS 패키지, 언어별 패키지 및 애플리케이션 의존성
- Misconfiguration Detection: IaC 파일에 있는 보안 misconfigurations
- Secret Detection: API 키, 암호 및 기타 민감한 정보
- ** 면허 탐지 **: 소프트웨어 라이센스 준수 스캐닝
- SBOM Generation: 재료 제작 소프트웨어 빌
- CI/CD 통합 : GitHub Actions, GitLab CI, 젠킨스 지원
설치하기
Binary 설치
카지노사이트
패키지 관리자 설치
카지노사이트
Docker 설치
카지노사이트
소스에서
카지노사이트
기본 사용
Container 이미지 스캐닝
카지노사이트
파일 시스템 Scanning
카지노사이트
저장소 스캐닝
카지노사이트
Code Scanning의 인프라
카지노사이트
고급 구성
Severity 필터링
카지노사이트
Vulnerability Database 관리
카지노사이트
산출 체재
ο 회원 관리
필터 및 Ignoring
카지노사이트
구성 파일
.trivyignore의 특징 파일 형식
카지노사이트
구성 파일 (trivy.yaml)
카지노사이트
구성 파일 사용
카지노사이트
CI/CD 통합
GitHub 작업
카지노사이트
프로젝트
카지노사이트
Jenkins 파이프 라인
카지노사이트
고급 스캔 기술
Multi-Stage 도커 스캐닝
카지노사이트
Kubernetes 통합
오프화이트
SBOM 세대 및 분석
카지노사이트
사용자 정의 정책 및 규칙
사용자 정의 정책 만들기
오프화이트
사용자 정의 정책 사용
카지노사이트
성능 최적화
캐싱 전략
카지노사이트
Database 최적화
카지노사이트
자동화 스크립트
대량 이미지 스캐닝
카지노사이트
자동화된 보고
카지노사이트
CI/CD 통합 스크립트
카지노사이트
모니터링 및 Alerting
Prometheus 미터
```bash
Export metrics for Prometheus
trivy image --format json python:3.4-alpine | \ jq -r '.Results[]?.Vulnerabilities[]? | "trivy_vulnerability{severity=\"" + .Severity + "\",cve=\"" + .VulnerabilityID + "\"} 1"' ```의 경우
Slack 알림
```bash
!/bin/bash
slack-notify.sh
SLACK_WEBHOOK_URL="your-webhook-url" SCAN_RESULTS="trivy-results.json"
Parse results
| critical_count=$(jq '[.Results[]?.Vulnerabilities[]? | select(.Severity == "CRITICAL")] | length' "$SCAN_RESULTS") | | high_count=$(jq '[.Results[]?.Vulnerabilities[]? | select(.Severity == "HIGH")] | length' "$SCAN_RESULTS") |
Send notification
curl -X POST -H 'Content-type: application/json' \ --data "{ \"text\": \"Trivy Security Scan Results\", \"attachments\": [{ \"color\": \"danger\", \"fields\": [{ \"title\": \"Critical Vulnerabilities\", \"value\": \"$critical_count\", \"short\": true }, { \"title\": \"High Vulnerabilities\", \"value\": \"$high_count\", \"short\": true }] }] }" \ "$SLACK_WEBHOOK_URL" ```에 대하여
문제 해결
일반적인 문제
```bash
Database update issues
trivy image --reset
Clear cache
trivy image --clear-cache
Debug mode
trivy image --debug python:3.4-alpine
Check version
trivy version
Verify installation
trivy image --help ```의 경우
성능 문제
```bash
Increase timeout
trivy image --timeout 10m python:3.4-alpine
Reduce parallel processes
trivy image --parallel 1 python:3.4-alpine
Skip database update
trivy image --skip-db-update python:3.4-alpine
Use offline mode
trivy image --offline-scan python:3.4-alpine ```에 대하여
네트워크 문제
```bash
Use proxy
export HTTP_PROXY=http://proxy.example.com:8080 export HTTPS_PROXY=http://proxy.example.com:8080 trivy image python:3.4-alpine
Custom registry
trivy image --registry-token token registry.example.com/myapp:latest
Insecure registry
trivy image --insecure registry.example.com/myapp:latest ```의 경우
최고의 연습
보안 스캔 전략
- Shift Left: 개발 초기에 Trivy 통합
- Multi-Layer Scanning: 스캔 이미지, IaC 및 파일 시스템
- ** 지속적인 모니터링 **: CI/CD 파이프의 일반 스캔
- 명세 Severity Thresholds: 허용된 위험 수준 정의
- 명세 Remediation Workflow: 취약점 대응 프로세스 구축
성능 최적화
- ** 캐시 관리 **: persistent 캐시 디렉토리 사용
- Parallel Processing: 사용 가능한 리소스 최적화
- Selective Scanning: 불필요한 파일 및 디렉토리를 건너
- 명세 Database 관리 : vulnerability 데이터베이스 업데이트
- 명세 ** 자원 할당 ** : 충분한 메모리와 CPU를 할당
통합 가이드라인
- CI/CD 통합: 높은 신뢰성 취약점에 실패
- Reporting: 팀에 대한 작업 가능한 보고서 생성
- Automation: Automate 스캐닝 및 보고 과정
- 명세 Monitoring: 시간에 따른 취약점 동향
- 명세 Compliance: 보안 규정 준수 요구 사항
이 포괄적 인 Trivy cheatsheet는 기본 사용에서부터 고급 자동화 및 통합 시나리오에 이르기까지 전문 컨테이너 및 인프라 보안 검사에 필요한 모든 것을 제공합니다.