fix(security): minimize runtime images and enforce complete vulnerability scans
This commit is contained in:
1 parent
0c1fb38e31
commit
f685616ae8
13 files changed
+2736
-37
No files matched your search
@@ -4,7 +4,7 @@ set -eu
|
||||
# Docker creates a fresh named volume as root:root 0755. The artifact store
|
||||
# deliberately rejects that mode: before starting the API, provision exactly
|
||||
# the private root its pinned-directory checks require.
|
||||
if [ "$#" -gt 0 ] && [ "$1" = "admin-api" ]; then
|
||||
provision_storage_root() {
|
||||
storage_root="${CRANK_STORAGE_ROOT:-/var/lib/crank/storage}"
|
||||
case "$storage_root" in
|
||||
/*) ;;
|
||||
@@ -20,6 +20,17 @@ if [ "$#" -gt 0 ] && [ "$1" = "admin-api" ]; then
|
||||
umask 077
|
||||
mkdir -p -- "$storage_root"
|
||||
chmod 0700 -- "$storage_root"
|
||||
}
|
||||
|
||||
# The dedicated init service calls this entrypoint as `crank-storage-init`; it
|
||||
# provisions the artifact root and exits without running a server binary.
|
||||
if [ "${1:-}" = "crank-storage-init" ]; then
|
||||
provision_storage_root
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "${1:-}" = "admin-api" ]; then
|
||||
provision_storage_root
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
Reference in new issue
Block a user