-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathentrypoint.sh
More file actions
40 lines (32 loc) · 879 Bytes
/
entrypoint.sh
File metadata and controls
40 lines (32 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
set -e
# Copyright 2025 Veritensor
# Entrypoint script for the Docker container.
# 1. Capture arguments
INPUT_PATH="$1"
INPUT_REPO="$2"
INPUT_IMAGE="$3"
INPUT_FORCE="$4"
INPUT_FORMAT="$5"
# 2. Build command
# FIX: Added quotes around path to handle spaces in filenames
CMD="veritensor scan \"$INPUT_PATH\""
# 3. Append flags
if [ -n "$INPUT_REPO" ]; then
echo "::notice::Verifying integrity against Hugging Face repo: $INPUT_REPO"
CMD="$CMD --repo $INPUT_REPO"
fi
if [ -n "$INPUT_IMAGE" ]; then
echo "::notice::Container signing enabled for: $INPUT_IMAGE"
CMD="$CMD --image $INPUT_IMAGE"
fi
if [ "$INPUT_FORCE" = "true" ]; then
echo "::warning::Break-glass mode enabled. Build will NOT fail on threats."
CMD="$CMD --force"
fi
if [ "$INPUT_FORMAT" = "json" ]; then
CMD="$CMD --json"
fi
# 4. Execute
echo "Running: $CMD"
eval "$CMD"