From e90cf55fe76615befdbc46c11128d52ecb886a57 Mon Sep 17 00:00:00 2001 From: "botantler-1[bot]" <185060876+botantler-1[bot]@users.noreply.github.com> Date: Mon, 16 Nov 2026 06:20:27 +0000 Subject: [PATCH] chore: sync changes from the upstream template Signed-off-by: botantler --- docs/REFERENCE.md | 28 ++++++++- scripts/fixtures/own-publisher.yaml | 38 +++++++++++++ scripts/publish-pin-approved.sh | 60 ++++++++++++++++++++ scripts/publish-pin-approved.test.sh | 51 +++++++++++++++++ scripts/workflow-caller-pin-contract.test.sh | 47 +++++++++++---- 5 files changed, 210 insertions(+), 14 deletions(-) create mode 100644 scripts/fixtures/own-publisher.yaml diff --git a/docs/REFERENCE.md b/docs/REFERENCE.md index 8e1d06f..9723fab 100644 --- a/docs/REFERENCE.md +++ b/docs/REFERENCE.md @@ -92,6 +92,7 @@ the template excludes, add the line `!` to your list. | `CLAUDE.md` | `@AGENTS.md` shim | | `docs/REFERENCE.md` | This reference | | `scripts/workflow-caller-pin-contract.test.sh` (*tenant*) | Runs in each tenant's required CI and rejects malformed, divergent, or rolled-back reusable-workflow pins, and a version comment that does not name the tag of the pinned commit | +| `scripts/fixtures/own-publisher.yaml` (*tenant*) | Direct-action compatibility input used by the portable caller and approval checks; sync it with those checks | | `scripts/publish-pin-approved.sh`, `scripts/publish-pin-approved.test.sh` (*tenant*) | The check a tenant's required CI runs to refuse a changed publisher identity until Platform approves it for that tenant. Legacy revisions use the existing approved set; maintained publishers require an exact canonical approval. The default `ci.yaml` runs the `publish-pin-approved` job and includes it in `ci-required-checks`; this unregistered template runs its tests only. Older tenants that own `ci.yaml` add the job themselves | | `zizmor.yml` | GitHub Actions pinning policy enforced by the security scan | @@ -103,14 +104,14 @@ never re-synced, so a tenant still carrying these from an older sync can delete | `stacks/` | The Go and .NET stack sources the scaffold copies once; the copies are then yours | | `scripts/scaffold.sh` (+ its test) | One-shot stack and tenancy scaffold; its test scaffolds every combination and checks what each leaves | | `.github/workflows/validate-stacks.yaml` | Scaffolds each stack as a tenant, then builds, tests, lints, renders `deploy/`, builds the image and checks it serves `GET /` under the restricted container settings | -| `.github/workflows/validate-scaffold.yaml` | Renders `deploy/`, schema-validates every resource, applies the live Platform/shared Kyverno policies, and exercises a pinned Kubernetes API. The live checks prove the template publishes through the pinned signing workflow; Platform still wires the private GHCR pull credential to the tenant identity and cosign-verifying OCI source; and Flux consumes that source while impersonating and targeting the managed `restricted` namespace for both KRO and manual registrations. They then prove the Deployment passes Pod Security `restricted`, the tenant identity can reconcile every rendered kind, and cluster-scoped or interactive privileges remain denied. It gates template PRs, re-validates `main` after every merge, and rechecks upstream drift every day at 06:17 UTC (or on manual dispatch), keeping one tracking issue open while that scheduled check fails on `main`; structural mutation tests keep every layer fail-closed. The workflow no-ops in tenants and is scaffold-time only | +| `.github/workflows/validate-scaffold.yaml` | Renders `deploy/`, schema-validates every resource, applies the live Platform/shared Kyverno policies, and exercises a pinned Kubernetes API. The live checks prove the template publishes through the pinned signing workflow; Platform pulls the public tenant artifact without a credential through a cosign-verifying OCI source; and Flux consumes that source while impersonating and targeting the managed `restricted` namespace for both KRO and manual registrations. They then prove the Deployment passes Pod Security `restricted`, the tenant identity can reconcile every rendered kind, and cluster-scoped or interactive privileges remain denied. It gates template PRs, re-validates `main` after every merge, and rechecks upstream drift every day at 06:17 UTC (or on manual dispatch), keeping one tracking issue open while that scheduled check fails on `main`; structural mutation tests keep every layer fail-closed. The workflow no-ops in tenants and is scaffold-time only | | `scripts/rename-placeholders.sh` (+ its test) | One-shot rename of the placeholder app to your tenant name | | `scripts/agent-instructions.test.sh` | Fails closed if the one-time agent scaffold loses its ownership, dependency-bot, external-code, exact-head review, pinned-merge, or user-path evaluation boundaries, or regains a retired rule | | `scripts/workflow-caller-contract.test.sh` | Keeps the portable caller-pin contract wired into tenant CI while validating template-only publisher, release, ownership, and scaffold invariants | | `scripts/tenant-ci-contract.test.sh` | Keeps default tenant PR CI least-privilege and fail-closed over both the image build and rendered manifests | | `scripts/pod-security-admission*.test.sh` | Proves the rendered Deployment is accepted at Pod Security `restricted` while unsafe mutations are denied, and pins that live gate against structural bypasses | | `scripts/tenant-rbac*.test.sh` | Proves the Platform tenant reconciliation identity can manage every rendered scaffold resource while cluster-scoped and interactive privileges stay denied | -| `scripts/platform-tenant-envelope*.test.sh` | Binds the template's signed publisher and those workload-level models to Platform's live KRO and manual tenant registrations: private GHCR pull identity, cosign-verifying OCI source, managed Pod Security namespace, `tenant-edit` ServiceAccount binding, Flux source/impersonation/target namespace, and the exact OpenBao policy and Kubernetes-auth role that let the renamed tenant read and seed only its own app secrets | +| `scripts/platform-tenant-envelope*.test.sh` | Binds the template's signed publisher and those workload-level models to Platform's live KRO and manual tenant registrations: credential-free GHCR pull, cosign-verifying OCI source, managed Pod Security namespace, `tenant-edit` ServiceAccount binding, Flux source/impersonation/target namespace, and the exact OpenBao policy and Kubernetes-auth role that let the renamed tenant read and seed only its own app secrets | | `scripts/platform-network-floor*.test.sh` | Binds Platform's generated default-deny, DNS, and standard NetworkPolicy floor to the scaffold's required Gateway, namespace, CNPG, Kubernetes API, and DNS paths, reporting a check that cannot read its input separately from a policy verdict | | `scripts/platform-vpa-floor*.test.sh` | Uses Kyverno to evaluate Platform's Deployment GeneratingPolicy and keeps the scaffold's initial CPU request at or above the generated VPA floor, with mutation coverage | @@ -226,10 +227,33 @@ The Platform approval and verification policy must be deployed before a live tenant adopts that caller. This compatibility check does not activate publishing or authorize a tenant's caller pin. +The envelope check also accepts the minimal direct `actions/publish-app` caller +frame validated by the portable approval check. It instantiates the generic +Tenant's exact own-release rule with a fixed sample repository and release tag, +then compares that producer with the decoded rule. A shared-only default or an +explicit shared-publisher revision cannot authorize this producer. Execution +environment overrides and branch publication remain refused. This offline +compatibility check neither switches the starter's publisher nor proves that a +real release was signed, admitted or reconciled. + > **Convention:** the Deployment's container `name` MUST equal the repository > name โ€” `publish-app` pins the built image digest into the container with that > name (`app-name: ${{ github.event.repository.name }}` in `cd.yaml`). +## Staging a publisher migration + +Existing tenants keep their own `deploy/` tree and CI workflow. Land the updated portable caller +check, approval check, their tests and `scripts/fixtures/own-publisher.yaml` while keeping the +current publisher unchanged. The required approval job executes the checker from its base revision, +so the guard update must merge in the consumer before a later PR changes its publishing job. + +After that consumerโ€™s base contains the updated checks, switch its publisher in a separate PR. +Keep support for both `deploy/deployment.yaml` and `deploy/base/deployment.yaml`: template sync does +not move tenant-owned manifests. The prepared direct-action contract accepts either fixed path or +the exact file-selection expression in the compatibility fixture. The existing reusable-workflow +caller still requires its original Platform approval; the new direct caller retains immutable pins, +a minimal signing job, credential-free checkout and an unskippable publisher. + ## Validate locally Native required CI also inspects workflow startup failures at the pull-request diff --git a/scripts/fixtures/own-publisher.yaml b/scripts/fixtures/own-publisher.yaml new file mode 100644 index 0000000..86b7164 --- /dev/null +++ b/scripts/fixtures/own-publisher.yaml @@ -0,0 +1,38 @@ +name: ๐Ÿš€ CD + +on: + push: + tags: + - "v*" + +permissions: {} + +jobs: + publish: + name: Publish + # The upstream template has no application to publish; its ID survives renames. + if: github.repository_id != '1253884448' + runs-on: ubuntu-latest + timeout-minutes: 60 + concurrency: + group: publish-${{ github.repository }} + cancel-in-progress: false + permissions: + contents: read + packages: write + id-token: write + steps: + - name: ๐Ÿ”’ Harden runner + uses: step-security/harden-runner@1d88384fd173af6ecb012dfd0264a306b711241a # v2.22.4 + with: + egress-policy: audit + - name: ๐Ÿ“ฅ Checkout + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - name: ๐Ÿ“ฆ Publish signed application + id: publish + uses: devantler-tech/.github/actions/publish-app@3cab796adef97dcde0c55724866a0b19397aba39 # v21.6.2 + with: + app-name: ${{ github.event.repository.name }} + app-manifest: ${{ hashFiles('deploy/base/deployment.yaml') != '' && 'base/deployment.yaml' || 'deployment.yaml' }} diff --git a/scripts/publish-pin-approved.sh b/scripts/publish-pin-approved.sh index 367bac8..93d77cf 100644 --- a/scripts/publish-pin-approved.sh +++ b/scripts/publish-pin-approved.sh @@ -32,8 +32,61 @@ fail() { [ "$#" -eq 2 ] || fail 'usage: publish-pin-approved.sh ' # One complete publisher identity, not just a SHA that could belong to another repository. +publish_manifest_choice=$(cat <<'EXPRESSION' +${{ hashFiles('deploy/base/deployment.yaml') != '' && 'base/deployment.yaml' || 'deployment.yaml' }} +EXPRESSION +) +export publish_manifest_choice + publish_identity() { [ -f "$1" ] || fail "no cd.yaml at $1" + yq eval-all -e '[.] | length == 1' "$1" >/dev/null || + fail "$1 must contain exactly one publisher document" + if yq eval -e '.jobs.publish | has("steps")' "$1" >/dev/null 2>&1; then + # A direct action signs as this repository, independently of the action's + # revision. Retain a minimal, tag-only, credential-free execution frame; + # the required caller-pin check binds its SHA to the catalogue release. + # Workflow-level env and defaults can also change the action's execution. + # shellcheck disable=SC2016 + yq eval -e ' + (keys - ["name", "on", "permissions", "jobs"] | length) == 0 + and (.permissions | length) == 0 + and (.["on"] | keys | join(",")) == "push" + and (.["on"].push | keys | join(",")) == "tags" + and (.["on"].push.tags | length) == 1 + and .["on"].push.tags[0] == "v*" + and (.jobs | keys | join(",")) == "publish" + and (.jobs.publish | keys | sort | join(",")) == "concurrency,if,name,permissions,runs-on,steps,timeout-minutes" + and .jobs.publish.if == "github.repository_id != '\''1253884448'\''" + and .jobs.publish."runs-on" == "ubuntu-latest" + and .jobs.publish."timeout-minutes" == 60 + and .jobs.publish.concurrency.group == "publish-${{ github.repository }}" + and .jobs.publish.concurrency."cancel-in-progress" == false + and (.jobs.publish.permissions | length) == 3 + and .jobs.publish.permissions.contents == "read" + and .jobs.publish.permissions.packages == "write" + and .jobs.publish.permissions."id-token" == "write" + and (.jobs.publish.steps | length) == 3 + and (.jobs.publish.steps[0] | keys | sort | join(",")) == "name,uses,with" + and (.jobs.publish.steps[0].uses | test("^step-security/harden-runner@[0-9a-f]{40}$")) + and (.jobs.publish.steps[0].with | length) == 1 + and .jobs.publish.steps[0].with."egress-policy" == "audit" + and (.jobs.publish.steps[1] | keys | sort | join(",")) == "name,uses,with" + and (.jobs.publish.steps[1].uses | test("^actions/checkout@[0-9a-f]{40}$")) + and (.jobs.publish.steps[1].with | length) == 1 + and .jobs.publish.steps[1].with."persist-credentials" == false + and (.jobs.publish.steps[2] | keys | sort | join(",")) == "id,name,uses,with" + and .jobs.publish.steps[2].id == "publish" + and (.jobs.publish.steps[2].uses | test("^devantler-tech/[.]github/actions/publish-app@[0-9a-f]{40}$")) + and (.jobs.publish.steps[2].with | keys | sort | join(",")) == "app-manifest,app-name" + and .jobs.publish.steps[2].with."app-name" == "${{ github.event.repository.name }}" + and (.jobs.publish.steps[2].with."app-manifest" == "base/deployment.yaml" + or .jobs.publish.steps[2].with."app-manifest" == "deployment.yaml" + or .jobs.publish.steps[2].with."app-manifest" == strenv(publish_manifest_choice)) + ' "$1" >/dev/null || fail "$1 does not retain the minimal own-release signing contract" + yq eval -r '.jobs.publish.steps[2].uses' "$1" + return + fi uses=$(yq eval -r '.jobs.publish.uses // ""' "$1") || fail "could not read the publish-app.yaml pin from $1" # Validate the whole reference first: a bare SHA, or another workflow pinned by SHA, is not a @@ -51,6 +104,13 @@ base_identity=$(publish_identity "$1") head_identity=$(publish_identity "$2") head_pin=${head_identity##*@} +case "$head_identity" in +devantler-tech/.github/actions/publish-app@*) + printf 'Publisher signs as the own release workflow; shared-workflow revision approval does not apply.\n' + exit 0 + ;; +esac + if [ "$base_identity" = "$head_identity" ]; then printf 'publish-app.yaml pin unchanged at %s; nothing to check.\n' "$head_pin" exit 0 diff --git a/scripts/publish-pin-approved.test.sh b/scripts/publish-pin-approved.test.sh index 226c438..c472b05 100644 --- a/scripts/publish-pin-approved.test.sh +++ b/scripts/publish-pin-approved.test.sh @@ -164,6 +164,57 @@ expect 'canonical columns are bound by header, not position' 0 'is approved' "$w rm "$work/canonical.tsv" expect 'an unreadable canonical set fails closed' 1 'could not read' "$work/ok.tsv" "$candidate" example-tenant .github +# Exercise the direct caller contract, including the old-to-own identity transition. +# Shared-publisher approval records remain mandatory for every legacy case above. +cp "$script_dir/fixtures/own-publisher.yaml" "$work/own.yaml" +cd_file base.yaml "$main_pin" .github +status=0 +output=$(PUBLISH_PIN_CONSUMER=example-tenant PUBLISH_PIN_APPROVED_SET="$work/missing.tsv" \ + sh "$subject" "$work/base.yaml" "$work/own.yaml" 2>&1) || status=$? +if [ "$status" -eq 0 ] && printf '%s\n' "$output" | grep -Fq 'own release workflow'; then + pass=$((pass + 1)) +else + printf 'FAIL: direct caller transition (exit %s)\n%s\n' "$status" "$output" >&2 + failures=$((failures + 1)) +fi +for manifest in deployment.yaml base/deployment.yaml; do + MANIFEST=$manifest yq eval '.jobs.publish.steps[2].with."app-manifest" = strenv(MANIFEST)' \ + "$work/own.yaml" >"$work/fixed-path.yaml" + if sh "$subject" "$work/base.yaml" "$work/fixed-path.yaml" >"$work/result" 2>&1; then + pass=$((pass + 1)) + else + printf 'FAIL: supported manifest path refused: %s\n' "$manifest" >&2 + cat "$work/result" >&2 + failures=$((failures + 1)) + fi +done +for mutation in \ + '.env.BASH_ENV = "publisher-hook.sh"' \ + '.defaults.run.shell = "bash -e {0}"' \ + '.jobs.publish.steps[2].uses = "other-owner/repo/action@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"' \ + '.jobs.publish.steps[2].uses = "devantler-tech/.github/actions/publish-app@main"' \ + '.jobs.publish.steps[1].with."persist-credentials" = true' \ + '.jobs.publish.steps[2].if = "false"' \ + '.jobs.publish.steps[2].with."app-manifest" = "other/deployment.yaml"' \ + '.jobs.publish.permissions.issues = "write"' \ + '.jobs.publish.steps += [.jobs.publish.steps[2]]' \ + '.jobs.shadow = .jobs.publish' \ + '.jobs.publish.uses = "devantler-tech/.github/.github/workflows/publish-app.yaml@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"'; do + yq eval "$mutation" "$work/own.yaml" >"$work/unsafe.yaml" + if sh "$subject" "$work/base.yaml" "$work/unsafe.yaml" >"$work/result" 2>&1; then + printf 'FAIL: unsafe own caller accepted: %s\n' "$mutation" >&2 + failures=$((failures + 1)) + else + if grep -Fq 'minimal own-release signing contract' "$work/result"; then + pass=$((pass + 1)) + else + printf 'FAIL: own caller refused for the wrong reason: %s\n' "$mutation" >&2 + cat "$work/result" >&2 + failures=$((failures + 1)) + fi + fi +done + printf 'publish-pin-approved: %s passed, %s failed\n' "$pass" "$failures" completed=1 [ "$failures" -eq 0 ] diff --git a/scripts/workflow-caller-pin-contract.test.sh b/scripts/workflow-caller-pin-contract.test.sh index 3349cfc..d5f5cba 100644 --- a/scripts/workflow-caller-pin-contract.test.sh +++ b/scripts/workflow-caller-pin-contract.test.sh @@ -53,8 +53,21 @@ validate_pins() { cd_file=$1 release_file=$2 template_sync_file=$3 - yq eval -e '.jobs.publish.uses | test("^devantler-tech/[.]github/[.]github/workflows/publish-app[.]yaml@[0-9a-f]{40}$")' "$cd_file" >/dev/null || - fail 'the publish caller must pin canonical publish-app.yaml to a commit SHA' + if yq eval -e '.jobs.publish | has("uses")' "$cd_file" >/dev/null 2>&1; then + yq eval -e '.jobs.publish | has("steps") | not' "$cd_file" >/dev/null || + fail 'the publish caller must pin exactly one publisher' + cd_selector='.jobs.publish.uses' + cd_pattern='^devantler-tech/[.]github/[.]github/workflows/publish-app[.]yaml@[0-9a-f]{40}$' + cd_floor=v7.23.0 + else + yq eval -e '[.jobs.publish.steps[] | select(.id == "publish")] | length == 1' "$cd_file" >/dev/null || + fail 'the publish caller must pin exactly one publisher' + cd_selector='(.jobs.publish.steps[] | select(.id == "publish")).uses' + cd_pattern='^devantler-tech/[.]github/actions/publish-app@[0-9a-f]{40}$' + cd_floor=v21.6.2 + fi + PUB_PATTERN=$cd_pattern yq eval -e "$cd_selector | test(strenv(PUB_PATTERN))" "$cd_file" >/dev/null || + fail 'the publish caller must pin the canonical publisher to a commit SHA' yq eval -e '.jobs.release.uses | test("^devantler-tech/\\.github/\\.github/workflows/create-release\\.yaml@[0-9a-f]{40}$")' "$release_file" >/dev/null || fail 'the release caller must pin canonical create-release.yaml to a commit SHA' yq eval -e '.jobs."template-sync".uses | test("^devantler-tech/\\.github/\\.github/workflows/template-sync\\.yaml@[0-9a-f]{40}$")' "$template_sync_file" >/dev/null || @@ -63,15 +76,15 @@ validate_pins() { pinned_ref_of() { yq eval -r "$2 | sub(\".*@\"; \"\")" "$1"; } # Read the human version comment bound to that immutable commit. pinned_version_of() { yq eval -r "$2 | line_comment" "$1"; } - cd_ref=$(pinned_ref_of "$cd_file" '.jobs.publish.uses') + cd_ref=$(pinned_ref_of "$cd_file" "$cd_selector") release_ref=$(pinned_ref_of "$release_file" '.jobs.release.uses') sync_ref=$(pinned_ref_of "$template_sync_file" '.jobs."template-sync".uses') [ "$release_ref" = "$sync_ref" ] || fail 'canonical release and template-sync callers must pin the same commit' - cd_version=$(pinned_version_of "$cd_file" '.jobs.publish.uses') + cd_version=$(pinned_version_of "$cd_file" "$cd_selector") release_version=$(pinned_version_of "$release_file" '.jobs.release.uses') sync_version=$(pinned_version_of "$template_sync_file" '.jobs."template-sync".uses') [ "$release_version" = "$sync_version" ] || fail 'canonical release and template-sync callers must carry the same version comment' - validate_version .github "$cd_ref" "$cd_version" v7.23.0 + validate_version .github "$cd_ref" "$cd_version" "$cd_floor" validate_version .github "$release_ref" "$release_version" v6.1.0 # The reviewed canonical floor enables alignment by default. Keep the # temporary rollout input out of tenants so its declaration can be retired. @@ -87,9 +100,9 @@ validate_pins "$cd_workflow" "$release_workflow" "$template_sync_workflow" mutation_dir=$(mktemp -d) trap 'rm -rf "$mutation_dir"' EXIT mutations_run=0 -# Start each negative control with independent copies of the real callers. +# Start each control with the direct-caller fixture and real release/sync callers. reset_mutation() { - cp "$cd_workflow" "$mutation_dir/cd.yaml" + cp "$script_dir/fixtures/own-publisher.yaml" "$mutation_dir/cd.yaml" cp "$release_workflow" "$mutation_dir/release.yaml" cp "$template_sync_workflow" "$mutation_dir/template-sync.yaml" } @@ -112,15 +125,25 @@ single_mutation() { mutate "$2" "$3" rejected "$1" "$4" } -single_mutation 'moving publisher' cd '.jobs.publish.uses = "devantler-tech/.github/.github/workflows/publish-app.yaml@main"' 'publish caller must pin' -single_mutation 'legacy publisher rollback' cd '.jobs.publish.uses = "devantler-tech/actions/.github/workflows/publish-app.yaml@ea4df9004d4ab43b6c9af5b0c5f55712f7211328"' 'publish caller must pin' +# Existing tenants can receive the portable check before changing their caller. +# Verify that the retained legacy arm still checks a real, tagged publisher. +reset_mutation +validate_pins "$mutation_dir/cd.yaml" "$mutation_dir/release.yaml" "$mutation_dir/template-sync.yaml" +yq eval ' + del(.jobs.publish.steps, .jobs.publish."runs-on", .jobs.publish."timeout-minutes", .jobs.publish.concurrency) + | .jobs.publish.uses = "devantler-tech/.github/.github/workflows/publish-app.yaml@af042c540ce8db4d64add98c34b5c57691e0e812" + | .jobs.publish.uses line_comment = "v19.0.5" +' "$mutation_dir/cd.yaml" >"$mutation_dir/legacy.yaml" +validate_pins "$mutation_dir/legacy.yaml" "$mutation_dir/release.yaml" "$mutation_dir/template-sync.yaml" +single_mutation 'moving publisher' cd '.jobs.publish.steps[2].uses = "devantler-tech/.github/actions/publish-app@main"' 'publish caller must pin' +single_mutation 'legacy publisher rollback' cd '.jobs.publish.steps[2].uses = "devantler-tech/actions/.github/workflows/publish-app.yaml@ea4df9004d4ab43b6c9af5b0c5f55712f7211328"' 'publish caller must pin' single_mutation 'moving release' release '.jobs.release.uses = "devantler-tech/.github/.github/workflows/create-release.yaml@main"' 'release caller must pin' single_mutation 'short sync SHA' template-sync '.jobs."template-sync".uses = "devantler-tech/.github/.github/workflows/template-sync.yaml@1234567"' 'template-sync caller must pin' single_mutation 'legacy release rollback' release '.jobs.release.uses = "devantler-tech/actions/.github/workflows/create-release.yaml@df7fd4f83edade31c121a9de563d9a7b9b1f900d"' 'release caller must pin' single_mutation 'wrong sync path' template-sync '.jobs."template-sync".uses |= sub("template-sync"; "publish-app")' 'template-sync caller must pin' single_mutation 'canonical SHA divergence' release '.jobs.release.uses |= sub("@.*"; "@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")' 'must pin the same commit' single_mutation 'canonical comment divergence' release '.jobs.release.uses line_comment = "v6.0.6"' 'must carry the same version comment' -single_mutation 'publisher leading-zero version' cd '.jobs.publish.uses line_comment = "v07.23.0"' 'version comment of the form' +single_mutation 'publisher leading-zero version' cd '.jobs.publish.steps[2].uses line_comment = "v021.6.2"' 'version comment of the form' single_mutation 'consumer npm alignment disabled' release '.jobs.release.with."align-npm-with-consumer-contract" = false' 'use default consumer npm alignment' single_mutation 'redundant consumer npm alignment opt-in' release '.jobs.release.with."align-npm-with-consumer-contract" = true' 'use default consumer npm alignment' # Change a whole catalogue family to test its version floor and tag identity. @@ -130,7 +153,7 @@ repin_mutation() { ref=$3 version=$4 if [ "$family" = publish ]; then - mutate cd ".jobs.publish.uses = \"devantler-tech/.github/.github/workflows/publish-app.yaml@$ref\" | .jobs.publish.uses line_comment = \"$version\"" + mutate cd ".jobs.publish.steps[2].uses = \"devantler-tech/.github/actions/publish-app@$ref\" | .jobs.publish.steps[2].uses line_comment = \"$version\"" else mutate release ".jobs.release.uses = \"devantler-tech/.github/.github/workflows/create-release.yaml@$ref\" | .jobs.release.uses line_comment = \"$version\"" mutate template-sync ".jobs.\"template-sync\".uses = \"devantler-tech/.github/.github/workflows/template-sync.yaml@$ref\" | .jobs.\"template-sync\".uses line_comment = \"$version\"" @@ -138,7 +161,7 @@ repin_mutation() { rejected "$1" "$5" } repin_mutation 'publisher below floor' publish 77cfa9cfc5514ebe1429f64e681afd181cf4515d v7.22.0 'older than the reviewed floor' -repin_mutation 'publisher forged version' publish 77cfa9cfc5514ebe1429f64e681afd181cf4515d v7.23.0 'the comment must name the tag' +repin_mutation 'publisher forged version' publish 77cfa9cfc5514ebe1429f64e681afd181cf4515d v21.6.2 'the comment must name the tag' repin_mutation 'canonical below floor' .github 4b00bd6698af033dc472b39a7e609173fe38dfb1 v6.0.6 'older than the reviewed floor' repin_mutation 'canonical forged version' .github 4b00bd6698af033dc472b39a7e609173fe38dfb1 v6.1.0 'the comment must name the tag' repin_mutation 'canonical leading-zero version' .github e271b7ff25d4ce97b067612e7ba0c5d657b6a17a v6.01.0 'version comment of the form'