-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrivy_opensearch.sh
18 lines (14 loc) · 1.02 KB
/
trivy_opensearch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
# Run Trivy file system scan on OpenSearch directories
# Run Trivy on OpenSearch directories and save results
trivy fs /usr/share/opensearch/ >> /tmp/opensearch_1.txt --scanners vuln --include-dev-deps
trivy fs /etc/opensearch/ >> /tmp/opensearch_1.txt --scanners vuln --include-dev-deps
trivy fs /var/lib/opensearch/ >> /tmp/opensearch_1.txt --scanners vuln --include-dev-deps
trivy fs /opt/opensearch/ >> /tmp/opensearch_1.txt --scanners vuln --include-dev-deps
# Run Trivy on OpenSearch Dashboards directories and save results
trivy fs /usr/share/opensearch-dashboards/ >> /tmp/opensearch_dashboards_1.txt --scanners vuln --include-dev-deps
trivy fs /etc/opensearch-dashboards/ >> /tmp/opensearch_dashboards_1.txt --scanners vuln --include-dev-deps
trivy fs /var/lib/opensearch-dashboards/ >> /tmp/opensearch_dashboards_1.txt --scanners vuln --include-dev-deps
trivy fs /opt/opensearch-dashboard/ >> /tmp/opensearch_dashboards_1.txt --scanners vuln --include-dev-deps
# Notification
echo "Trivy scan completed."