ci: keep image scan outputs out of docs/
ci/woodpecker/push/eco Pipeline is pending
ci/woodpecker/pr/eco Pipeline is pending

Default scan reports to .build and refuse writing under docs/.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-11-27 19:42:00 +08:00
1 parent 896324d876
commit 5de20d5723
1 file changed
+13 -2
+13 -2
View File
@@ -7,16 +7,27 @@
# - a fail-closed provenance check that consumers pin immutable tags
#
# Usage:
# ci/images/scan.sh [--out docs/evidence/ci-image-scan]
# ci/images/scan.sh [--out <dir>]
# Output is a CI/local artifact directory only. Do not commit scan reports into
# the repository; record results on the tracking Issue or as pipeline assets.
set -euo pipefail
root="$(cd "$(dirname "$0")/../.." && pwd)"
registry="${MARQDO_CI_REGISTRY:-git.cflmy.cn/cflmy}"
version="${MARQDO_CLI_VERSION:-3.0.0-rc.5}"
out="${1:-$root/docs/evidence/ci-image-scan-$version}"
out="$root/.build/ci-image-scan-$version"
if [[ "${1:-}" == "--out" ]]; then
out="${2:?}"
elif [[ -n "${1:-}" ]]; then
out="$1"
fi
mkdir -p "$out"
# Refuse to write under tracked docs/ — that inflates the repository.
case "$out" in
"$root/docs"|"$root/docs"/*)
echo "scan.sh: refuse output under docs/; use .build/ or a CI workspace" >&2
exit 2
;;
esac
images=(
"marqdo-ci-shell:$version"
"marqdo-ci-rust:$version"