File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ * .tar
2+ * .html
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -euo pipefail
4+
5+ # Check dependencies
6+ for cmd in podman osv-scanner; do
7+ if ! command -v " $cmd " & > /dev/null; then
8+ echo " Error: $cmd is not installed." >&2
9+ exit 1
10+ fi
11+ done
12+
13+ # Check if podman machine is running
14+ if ! podman info & > /dev/null; then
15+ echo " Podman machine is not running. Starting it now..."
16+ podman machine start
17+ echo " Podman machine started."
18+ fi
19+
20+ echo " Building container image..."
21+ podman build . -t " localhost/novnc:latest"
22+
23+ echo " Saving container image to novnc.tar..."
24+ podman save --format=docker-archive " localhost/novnc:latest" > novnc.tar
25+
26+ echo " Scanning image with OSV-Scanner..."
27+ osv-scanner scan image --format html --archive novnc.tar > osv-scan.html
28+
29+ echo " Scan complete. Report saved to osv-scan.html"
You can’t perform that action at this time.
0 commit comments