@@ -29,7 +29,6 @@ RELEASE="$WORKFLOWS/release.yaml"
2929RSA=" $WORKFLOWS /rsa.yaml"
3030SETUP_ACTION=" $ACTIONS /setup/action.yaml"
3131TOOLCHAIN_ACTION=" $ACTIONS /setup-toolchain/action.yaml"
32- SCORECARD_ACTION=" $ACTIONS /scorecard/action.yaml"
3332MANIFEST=" $ROOT /.config/target-matrix.json"
3433TOOL_ARCHIVES=" $ROOT /.config/ci-tool-archives.tsv"
3534CARGO_CONFIG=" $ROOT /.cargo/config.toml"
@@ -129,7 +128,6 @@ require_file "$RELEASE"
129128require_file " $RSA "
130129require_file " $SETUP_ACTION "
131130require_file " $TOOLCHAIN_ACTION "
132- require_file " $SCORECARD_ACTION "
133131require_file " $MANIFEST "
134132require_file " $TOOL_ARCHIVES "
135133require_file " $CARGO_CONFIG "
267265bash -eu -o pipefail -c 'source " $1 " ; ci_tool_validate_manifest' _ " $TOOL_INTEGRITY " \
268266 || fail " direct CI tool archive manifest is invalid"
269267
270- if grep -ERn 'uses:[[:space:]]+( dtolnay/rust-toolchain|ossf/scorecard-action) @' \
268+ if grep -ERn 'uses:[[:space:]]+dtolnay/rust-toolchain@' \
271269 " $WORKFLOWS " " $ACTIONS " >/dev/null; then
272270 fail " CI must not delegate installation to an action with an unauthenticated executable fallback"
273271fi
@@ -394,12 +392,12 @@ grep -Fq 'ci_tool_download codecov' "$INSTALL_CODECOV" \
394392# shellcheck disable=SC2016 # GitHub expression is an intentional literal contract.
395393grep -Fq ' binary: ${{ steps.codecov.outputs.binary } }' "$WEEKLY" \
396394 || fail "Codecov action must use the repository-verified CLI"
397- [[ $(yq eval ' .jobs.scorecard.steps[] | select(.name == " Run Scorecard" ) | .uses' "$SCORECARD") \
398- == "./.github/actions/ scorecard" ]] \
399- || fail "Scorecard must use the repository-owned digest-pinned action"
400- scorecard_image= $(yq eval -r ' .runs.image ' "$SCORECARD_ACTION")
401- [[ "$scorecard_image" =~ ^docker://ghcr\.io/ossf/scorecard-action@sha256:[0-9a-f]{64}$ ]] \
402- || fail "Scorecard container must use an OCI digest "
395+ scorecard_action= $(yq eval ' .jobs.scorecard.steps[] | select(.name == " Run Scorecard" ) | .uses' "$SCORECARD")
396+ [[ "$scorecard_action" =~ ^ossf/ scorecard-action@[0-9a-f]{40}$ ]] \
397+ || fail "Scorecard publication must call the official action at an immutable commit "
398+ [[ $(yq eval ' .jobs.scorecard.steps[] | select(.name == " Run Scorecard " ) | .with.publish_results ' "$SCORECARD") \
399+ == "true" ]] \
400+ || fail "Scorecard must publish results "
403401
404402[[ $(count_feature_sets "$FEATURE_PROFILES" COMPILE_FEATURE_SETS) -eq 58 ]] \
405403 || fail "compile feature matrix must retain all 58 profiles"
0 commit comments