Repository navigation
fix(build,chart): review hazards — authz failureMode guard (#770), build-id guard, dead Makefile targets, image-layer targets (#772) - #774
Merged
Conversation
) (#772) `charts/aether/templates/agent-daemonset.yaml` compared the raw value against the literal "ALLOW". `allow`, `Allow` or a stray trailing space therefore rendered the agent WITHOUT `--authz-sidecar-failure-mode-allow` — fail-CLOSED on an authorization control, with no error, no warning, and nothing in `helm lint`. - `_helpers.tpl`: new `aether.proxy.authzFailureMode`, which normalises with `upper (trim (toString ...))` and `fail`s on anything that is not ALLOW or DENY. Refusing is deliberate: silently picking a failure mode for the operator is how this bug worked. - `agent-daemonset.yaml` consumes the helper, and also invokes it once at the top of the file so a typo is rejected when it is written rather than when someone later flips `proxy.authzSidecar.enabled` on. - `values.yaml`: document that the key is case/whitespace-insensitive and validated at render time. - New `//bazel/helm:defs.bzl helm_template_fail_test`: rules_helm can assert a chart renders, never that it refuses to. An untested `{{ fail }}` guard is indistinguishable from an absent one, which is exactly how #770 shipped. It passes only when helm exits non-zero AND prints the expected message, so an unrelated render failure cannot keep it green. - Two new targets in `//charts/aether`: `aether_authz_failure_mode_test` (`failureMode=allow` must render `--authz-sidecar-failure-mode-allow`, the flag that makes the agent emit `failure_mode_allow: true`) and `aether_authz_failure_mode_invalid_test` (`failureMode=maybe` must be rejected). - Chart version 0.92.18 -> 0.92.19. Verification: `bazel test //charts/...` — 11/11 pass. Both new tests were proven non-vacuous by temporarily restoring the old `eq .Values... "ALLOW"` comparison: both FAIL against it. Direct `helm template` matrix on the packaged chart: ALLOW/allow/" allow " render the flag, DENY/deny do not, `maybe` and `""` exit 1 with `proxy.authzSidecar.failureMode must be ALLOW or DENY, got "maybe"`. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…772) `//tools/buildid:release_build_ids` asserts that every binary shipping in a released image carries a content-derived GNU build-ID and that no two are equal — the collision that made Pyroscope symbol upload unsafe (#653). It listed six ELFs and omitted `//prober/cmd/prober`, which has had its own chart (`//charts/prober`) and its own published image since the external SLI prober landed, and whose symbols are uploaded under exactly that build-ID. Verification: `bazel build //tools/buildid:release_build_ids` now reports 7 distinct IDs (prober = 02e51d65...); `bazel test //tools/buildid/...` passes. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
…772) `publish` was dead AND broken: no reference to it exists anywhere in the repo, and both commands it ran name packages that do not exist (`bazel query //charts/agent:agent.push_registry` → `no such package 'charts/agent'`; same for `charts/registrar`). Worse, its `push-all` prerequisite runs first, so anyone following it pushed four images and then hard-failed — a half-publish. `.github/workflows/publish.yaml` is the real publisher and is serialised (#692). `push-proxy-image` had zero references outside the Makefile and duplicated what `.github/workflows/proxy-release.yml` owns end to end (`bazel run //:push`, native arm64 runner, fully automated in #703/#727) — a second, unaudited way to write the released proxy tag. Its sibling `load-proxy-image` is documented (docs/runbook.md:56, proxy/README.md:28) and stays. Both replaced by a comment pointing at the workflow that does the job, so the next reader does not re-add them. No documentation referenced either target: `grep -rn 'make publish|push-proxy-image'` over `docs/ CLAUDE.md AGENTS.md README.md` is empty. `push-all` and every `load-*`/`push-*-image` target that docs DO reference (CLAUDE.md:56, README.md:117, docs/runbook.md:56,174) are untouched. Verification: `make -n push-all` and `make -n load-proxy-image` still resolve; `make -n publish` and `make -n push-proxy-image` report no such rule. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
The aether chart has no `spire.trustDomain` key — it was retired precisely because it could disagree with what SPIRE actually issues, and every component now resolves its trust domain from its own SVID (charts/aether/values.yaml:86). Helm accepts unknown `--set` paths without complaint, so both multicluster harnesses have been passing a no-op that reads, on a mesh-identity setting, as if the harness were pinning the trust domain. `TRUST_DOMAIN` itself stays: it is still what configures SPIRE in kind (`global.spire.trustDomain` on the spire chart, and the `spiffe://$TRUST_DOMAIN/...` authorized delegate). Only the aether `--set` goes. Verification: `bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //e2e/...` clean (shellcheck sees no newly-unused variable — `TRUST_DOMAIN` has four remaining uses per script). Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
) The comment claimed "`e2e.yaml` already covers `main` pushes", which is the justification for main.yaml not repeating the e2e leg. `e2e.yaml`'s `on:` block is `workflow_dispatch` + `schedule: 17 4 * * *` — there is no `push` trigger, so a `main` push is covered by the next nightly, not immediately. Reader-facing only: no trigger is changed, and the conclusion (don't repeat e2e here) still holds. Verification: the file still parses as YAML; the `on:` blocks of both workflows are unchanged. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
`go_multi_arch_image` declared `image_layer(name = "additional_layer")`
unconditionally, but wired it into `image_manifest` only `if image_tars_layer`.
Every image package that passes no `tars_layer` therefore carried an empty layer
target that nothing referenced and nothing could reference — confirmed by
`bazel query 'rdeps(//..., //controller/cmd/controller:additional_layer)'`
returning only itself, against 24 rdeps for the agent's.
Indenting the declaration under the same condition removes four dangling
targets:
before: agent, mesh-dns, cni-install, controller, e2e/udsecho, prober, registrar
after: agent, mesh-dns, cni-install
(`bazel query 'kind(".*", //...)' | grep additional_layer`, 7 -> 3; the three
that remain are exactly the three BUILD files that pass `tars_layer`.)
Verification: all 52 image targets (`image_index`/`image_manifest`/`image_load`/
`image_push`/`image_layer`/`container_structure_test` across the 7 image
packages) build. All 7 `:image_test` container-structure tests pass FROM CACHE —
i.e. every image tarball is byte-identical to before, which is the proof that
the removed layer never reached an image.
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase A1 of #772. Closes #770.
fix(charts): normalise and validate proxy.authzSidecar.failureMode (#770) (#772)
charts/aether/templates/agent-daemonset.yamlcompared the raw value againstthe literal "ALLOW".
allow,Allowor a stray trailing space thereforerendered the agent WITHOUT
--authz-sidecar-failure-mode-allow— fail-CLOSED onan authorization control, with no error, no warning, and nothing in
helm lint._helpers.tpl: newaether.proxy.authzFailureMode, which normalises withupper (trim (toString ...))andfails on anything that is not ALLOW orDENY. Refusing is deliberate: silently picking a failure mode for the operator
is how this bug worked.
agent-daemonset.yamlconsumes the helper, and also invokes it once at thetop of the file so a typo is rejected when it is written rather than when
someone later flips
proxy.authzSidecar.enabledon.values.yaml: document that the key is case/whitespace-insensitive andvalidated at render time.
//bazel/helm:defs.bzl helm_template_fail_test: rules_helm can assert achart renders, never that it refuses to. An untested
{{ fail }}guard isindistinguishable from an absent one, which is exactly how chart: proxy.authzSidecar.failureMode is compared with a raw string equality, so any spelling variance silently selects fail-closed #770 shipped. It
passes only when helm exits non-zero AND prints the expected message, so an
unrelated render failure cannot keep it green.
//charts/aether:aether_authz_failure_mode_test(
failureMode=allowmust render--authz-sidecar-failure-mode-allow, the flagthat makes the agent emit
failure_mode_allow: true) andaether_authz_failure_mode_invalid_test(failureMode=maybemust berejected).
Verification:
bazel test //charts/...— 11/11 pass. Both new tests were provennon-vacuous by temporarily restoring the old
eq .Values... "ALLOW"comparison:both FAIL against it. Direct
helm templatematrix on the packaged chart:ALLOW/allow/" allow " render the flag, DENY/deny do not,
maybeand""exit 1with
proxy.authzSidecar.failureMode must be ALLOW or DENY, got "maybe".fix(buildid): cover the prober in the #653 build-id collision guard (#772)
//tools/buildid:release_build_idsasserts that every binary shipping in areleased image carries a content-derived GNU build-ID and that no two are equal
— the collision that made Pyroscope symbol upload unsafe (#653). It listed six
ELFs and omitted
//prober/cmd/prober, which has had its own chart(
//charts/prober) and its own published image since the external SLI proberlanded, and whose symbols are uploaded under exactly that build-ID.
Verification:
bazel build //tools/buildid:release_build_idsnow reports 7distinct IDs (prober = 02e51d65...);
bazel test //tools/buildid/...passes.chore(make): drop the dead
publishandpush-proxy-imagetargets (#772)publishwas dead AND broken: no reference to it exists anywhere in the repo,and both commands it ran name packages that do not exist (
bazel query //charts/agent:agent.push_registry→no such package 'charts/agent'; same forcharts/registrar). Worse, itspush-allprerequisite runs first, so anyonefollowing it pushed four images and then hard-failed — a half-publish.
.github/workflows/publish.yamlis the real publisher and is serialised (#692).push-proxy-imagehad zero references outside the Makefile and duplicated what.github/workflows/proxy-release.ymlowns end to end (bazel run //:push,native arm64 runner, fully automated in #703/#727) — a second, unaudited way to
write the released proxy tag. Its sibling
load-proxy-imageis documented(docs/runbook.md:56, proxy/README.md:28) and stays.
Both replaced by a comment pointing at the workflow that does the job, so the
next reader does not re-add them.
No documentation referenced either target:
grep -rn 'make publish|push-proxy-image'over
docs/ CLAUDE.md AGENTS.md README.mdis empty.push-alland everyload-*/push-*-imagetarget that docs DO reference (CLAUDE.md:56,README.md:117, docs/runbook.md:56,174) are untouched.
Verification:
make -n push-allandmake -n load-proxy-imagestill resolve;make -n publishandmake -n push-proxy-imagereport no such rule.fix(e2e): drop the silently ignored
--set spire.trustDomain=(#772)The aether chart has no
spire.trustDomainkey — it was retired preciselybecause it could disagree with what SPIRE actually issues, and every component
now resolves its trust domain from its own SVID (charts/aether/values.yaml:86).
Helm accepts unknown
--setpaths without complaint, so both multiclusterharnesses have been passing a no-op that reads, on a mesh-identity setting, as
if the harness were pinning the trust domain.
TRUST_DOMAINitself stays: it is still what configures SPIRE in kind(
global.spire.trustDomainon the spire chart, and thespiffe://$TRUST_DOMAIN/...authorized delegate). Only the aether--setgoes.Verification:
bazel build --config=lint --@aspect_rules_lint//lint:fail_on_violation //e2e/...clean (shellcheck sees no newly-unused variable —
TRUST_DOMAINhas fourremaining uses per script).
docs(ci): correct the main.yaml comment about what e2e.yaml covers (#772)
The comment claimed "
e2e.yamlalready coversmainpushes", which is thejustification for main.yaml not repeating the e2e leg.
e2e.yaml'son:blockis
workflow_dispatch+schedule: 17 4 * * *— there is nopushtrigger, soa
mainpush is covered by the next nightly, not immediately. Reader-facingonly: no trigger is changed, and the conclusion (don't repeat e2e here) still
holds.
Verification: the file still parses as YAML; the
on:blocks of both workflowsare unchanged.
fix(bazel): declare
additional_layeronly when there is one (#772)go_multi_arch_imagedeclaredimage_layer(name = "additional_layer")unconditionally, but wired it into
image_manifestonlyif image_tars_layer.Every image package that passes no
tars_layertherefore carried an empty layertarget that nothing referenced and nothing could reference — confirmed by
bazel query 'rdeps(//..., //controller/cmd/controller:additional_layer)'returning only itself, against 24 rdeps for the agent's.
Indenting the declaration under the same condition removes four dangling
targets:
before: agent, mesh-dns, cni-install, controller, e2e/udsecho, prober, registrar
after: agent, mesh-dns, cni-install
(
bazel query 'kind(".*", //...)' | grep additional_layer, 7 -> 3; the threethat remain are exactly the three BUILD files that pass
tars_layer.)Verification: all 52 image targets (
image_index/image_manifest/image_load/image_push/image_layer/container_structure_testacross the 7 imagepackages) build. All 7
:image_testcontainer-structure tests pass FROM CACHE —i.e. every image tarball is byte-identical to before, which is the proof that
the removed layer never reached an image.
🤖 Generated with Claude Code
https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr