Skip to content

Publish and resolve the deployed scrubber allowlist identity - #3763

Open
cotti wants to merge 1 commit into
mainfrom
changelog-scrubber-allowlist-identity
Open

Publish and resolve the deployed scrubber allowlist identity#3763
cotti wants to merge 1 commit into
mainfrom
changelog-scrubber-allowlist-identity

Conversation

@cotti

@cotti cotti commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Why

The changelog scrubber's link allowlist is embedded from config/assembler.yml at build time, so the allowlist the deployed Lambda actually runs with is not observable today. Backfill planning must validate every attributed repository against the deployed allowlist — otherwise links are silently stripped on publication and surface only as public-gate failures — and the epic's prerequisites call for publishing the deployed identity and pinning it in every plan and ledger.

Closes elastic/docs-eng-team#671 (sub-issue of the backfill epic elastic/docs-eng-team#656).

What

Publication (zero IAM changes): the scrubber build workflow computes the embedded allowlist's SHA-256 (sha256sum config/assembler.yml at the release tag ref) plus the build commit, and emits a changelog-scrubber-allowlist.json identity document. The release deploy job attaches it to the GitHub release only after aws lambda update-function-code succeeded — asset presence on a release attests that the release's allowlist was deployed.

Consumption: a new docs-builder changelog scrubber-allowlist command and ScrubberAllowlistIdentityService resolve the deployed identity from the newest non-draft release carrying the asset (the most recent gated deploy — a release whose deploy never completed is skipped), or from an explicit --tag. When a local assembler.yml is available the command reports match/skew; skew is a warning, unresolvable identity is a hard failure (exit non-zero), matching the acceptance criterion that a plan cannot be approved without a resolvable identity.

The hash format (sha256: + 64 hex) and the commit field line up with the ScrubberAllowlist contract introduced in #3681, without depending on it — planning can map the resolved identity straight into plan/ledger pinning.

The scrubber's Program.cs is deliberately untouched to avoid conflicting with the registry-ownership stack (#3738#3761).

The scrubber's link allowlist is baked in from config/assembler.yml at
build time, so the deployed allowlist was not observable: backfill
planning could only validate links against the local checkout, and
allowlist skew surfaced only as silent link stripping on publication.

The build workflow now computes the embedded allowlist's SHA-256 and
build commit, and the release workflow attaches the identity document
to the GitHub release only after a successful Lambda deploy — asset
presence attests the deploy. A new `changelog scrubber-allowlist`
command (and ScrubberAllowlistIdentityService for programmatic
consumers) resolves the identity from the newest release carrying the
asset, or a specific tag, and compares it against a local
assembler.yml.

Closes elastic/docs-eng-team#671

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants