chore: finalize lab7 security verification
CI / verify (pull_request) Failing after 3m27s

This commit is contained in:
2026-11-06 21:39:31 +03:00
parent 5ac64f51fa
commit 97a52eeee6
41 changed files with 759 additions and 150 deletions
+38
View File
@@ -0,0 +1,38 @@
#!/bin/sh
set -eu
[ "${DOCKER_WORKSPACE_MIRROR:-0}" = "1" ] || exit 0
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
repo_dir=$(CDPATH= cd -- "$script_dir/.." && pwd)
mode=${1:-sync}
case "$mode" in
sync|--pull-scan) ;;
*) echo "usage: $0 [--pull-scan]" >&2; exit 2 ;;
esac
[ -f "$repo_dir/compose.yaml" ] || {
echo "repository checkout is incomplete" >&2
exit 1
}
container=$(docker create --network none \
-v "$repo_dir:/workspace" \
alpine:3.24.2 /bin/true)
cleanup() {
docker rm -f "$container" >/dev/null 2>&1 || true
}
trap cleanup EXIT HUP INT TERM
if [ "$mode" = "--pull-scan" ]; then
destination=$repo_dir/evidence/runtime/security-scan
mkdir -p "$destination"
docker cp "$container:/workspace/evidence/runtime/security-scan/." "$destination"
exit 0
fi
docker cp "$repo_dir/." "$container:/workspace"