Skip to content

feat(cloud-environment): pages-publish reads its config from Key Vault when no file exists - #756

Merged
kyle-sexton merged 2 commits into
mainfrom
feat/pages-publish-kv-config
Oct 10, 2026
Merged

kyle-sexton merged 2 commits into
mainfrom
feat/pages-publish-kv-config

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

No related issue: operator request to let cloud sessions run pages-publish without per-environment config variables.

Summary

pages-publish now reads its config from the Key Vault secret pages-publish-config when <passwd home>/.config/pages-publish/config does not exist. An existing file still wins and gets the same owner, mode 0600 and symlink checks as before.

Fix

  • components/cloud-environment/pages-publish: config parsing moved into parse_config (KEY=VALUE text on stdin, same validators), and source selection into one load_config function, so a later move to another source replaces only that function. With no file it runs env -u VAULT_EXEC_VAULT vault-exec --env PP_CONFIG=pages-publish-config -- bash -c 'printf "%s" "$PP_CONFIG"', so the value stays off argv and a repository env block cannot point the read at another vault. A missing vault-exec, a failed read, an empty value or invalid text exits 5 with one stderr line. A line that is not KEY=VALUE is now reported by line number instead of echoing its text, so neither source can print a value in an error.
  • pages-publish.test.sh: the vault-exec stub answers pages-publish-config from a fixture file and logs the VAULT_EXEC_VAULT it saw. New cases: Key Vault config uploads with its endpoint and tokens; vault-exec failure, invalid text, a non-KEY=VALUE line (not echoed) and an empty secret each exit 5 with no curl call and one stderr line; a file present (or a symlinked file) never reads Key Vault; a caller VAULT_EXEC_VAULT is unset for the read.
  • README.md: the Config paragraph, the exit-5 row, Trusted inputs and the Setup PAGES_PUBLISH_* bullet describe the file-then-Key-Vault order. setup.sh is unchanged; its writer is now optional.

Verification

  • bash components/cloud-environment/pages-publish.test.sh: 258 PASS, 0 FAIL.
  • shellcheck -x on both scripts: clean. shfmt -d: no diff. markdownlint-cli2 on the README: 0 issues. Pre-commit hooks (editorconfig, typos, markdownlint, shellcheck, gitleaks) passed.

Related

  • Secret creation in kv-melo-devtools-prod is a separate operator step; until it exists, a session with no config file exits 5 as it does today.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EQPrCTBQPb5b1XtbAH7tMA

…t when no file exists

The passwd-home config file stays an override with the same owner, mode
and symlink checks. With no file, the same KEY=VALUE text is read from
the Key Vault secret pages-publish-config with VAULT_EXEC_VAULT unset,
and parsed by the same function. Source selection lives in load_config.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EQPrCTBQPb5b1XtbAH7tMA
@kyle-sexton
kyle-sexton marked this pull request as ready for review October 10, 2026 16:43
@claude

claude Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 4m 11s —— View job


Code review complete

  • Gather context (diff, changed files, PR description)
  • Review pages-publish script changes
  • Review pages-publish.test.sh changes
  • Review README.md changes
  • Post findings

Summary

Reviewed the Key Vault config-source fallback in components/cloud-environment/pages-publish (load_config/parse_config), the new test cases in pages-publish.test.sh, and the README updates, scoped to the diff against origin/main.

The implementation holds up well under close reading:

  • File-present-wins ordering, the -e || -L check (so a broken symlink is refused rather than silently falling through to Key Vault), owner/mode 0600 enforcement, and the unknown-line vs. not-KEY=VALUE error paths (the latter now reports by line number instead of echoing the raw line, so a malformed line can't leak a value) all check out against the code.
  • env -u VAULT_EXEC_VAULT -u PP_CONFIG scoped to just the vault-exec child process is sound defense-in-depth, consistent with the existing unset PP_TOKEN ... pattern in send().
  • README's exit-5 row, Config paragraph, Trusted inputs, and the PAGES_PUBLISH_* bullet all match the code and setup.sh's (unmodified) writer.

One finding posted inline:

  • components/cloud-environment/pages-publish.test.sh (test-coverage, around line 438): the new vault-exec-not-on-PATH exit-5 branch (pages-publish L133-L134) has no dedicated test, unlike every sibling exit-5 branch added in this PR.

Notes on verification

I could not execute bash components/cloud-environment/pages-publish.test.sh, shellcheck, or shfmt myself in this environment (command execution requires an approval step not available here), so the PR's "258 PASS, 0 FAIL" / shellcheck / shfmt / markdownlint claims are author-reported and unverified by me — review above is based on static reading of the diff only.

@claude

claude Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 4m 43s —— View job


Security review — /review:security-review

  • Gather context (PR diff, changed files)
  • Check skip gate / instruction-surface lens
  • Review pages-publish for logic flaws, injection, secret handling
  • Review pages-publish.test.sh for test coverage of security paths
  • Review README.md changes for accuracy vs. implementation
  • Adversarial hunt/verify pass (independent review:lane-verifier hunter)
  • Post final review

No security findings.

Scope: this PR adds a Key Vault fallback (secret pages-publish-config) to components/cloud-environment/pages-publish when the operator config file is absent, splitting config parsing into parse_config/load_config. No CLAUDE.md/AGENTS.md/rules/skill/agent/hook files are touched, so the instruction-surface-deletion lens doesn't apply here.

Checked specifically, and found no concrete exploit path for any of:

  • TOCTOU/symlink races between the file-existence, ownership (uid+mode 0600) and symlink checks in load_config and the later read — the window pre-exists the same shape in the prior code, and exploiting it already requires write access to the operator's own home directory, which the README's existing trust statement already covers.
  • Vault redirection / argv smuggling — load_config runs env -u VAULT_EXEC_VAULT -u PP_CONFIG vault-exec ... (L136) so a repository env: block can't point the read at another vault (confirmed against vault-exec's own VAULT_EXEC_VAULT handling), and the secret value only ever crosses through environment (PP_CONFIG) into a printf builtin, never argv.
  • Secret-value leakage — every new die 5 message names only a path, source label, key, or line number; none interpolate $value/$text. The test suite asserts a bad line's text is never echoed.
  • Validation gaps in parse_config — the new KEY=VALUE shape check and the existing endpoint/vault-secret-name regexes still bound every value before it reaches send()'s vault-exec/curl call; vault-exec re-validates secret names independently.
  • Fail-open on a symlinked/special config path — [[ -e "$config" || -L "$config" ]] plus the inner [[ -f && ! -L ]] check fails closed (exit 5) instead of silently falling through to Key Vault; covered by the new "a symlinked config file skips the Key Vault read" test.

Note for context, not a finding: send()'s own vault-exec calls (unchanged by this PR) still don't isolate VAULT_EXEC_VAULT the way the new load_config read does — that's pre-existing behavior, not introduced here.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dfff5c12e4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-10T16:47:51.077678Z dfff5c1 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

claude-review has reviewed this pull request through 646dd9b; a later push is reviewed from there.

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

claude-security-review has reviewed this pull request through 646dd9b; a later push is reviewed from there.

… config path

Key Vault is used only when stat confirms the config file does not exist;
any other lookup failure exits 5. The token reads in send() also unset
VAULT_EXEC_VAULT, and the README notes the vault's own audit logs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EQPrCTBQPb5b1XtbAH7tMA
@claude

claude Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 5m 51s —— View job


Security review — /review:security-review (incremental)

  • Gather context (incremental diff since dfff5c1, PR description, prior review comments)
  • Review changes to pages-publish
  • Review changes to pages-publish.test.sh
  • Review changes to README.md
  • Adversarial hunt/verify pass (independent review:lane-verifier check)
  • Post final review

No security findings.

Scope: incremental review of what changed since dfff5c1 (the commit the prior claude-security-review pass covered) — components/cloud-environment/{README.md,pages-publish,pages-publish.test.sh} — per .claude-lane/incremental.diff. This commit (646dd9b) directly addresses the two Codex findings left open on dfff5c1:

  • Fail-closed on an untraversable config directory (pages-publish#L124-L130): when [[ -e || -L ]] can't tell whether the file exists (e.g. a chmod 000 ancestor directory), load_config now runs stat -- "$config" and only falls through to the Key Vault read when the error text is exactly No such file or directory (confirmed ENOENT); any other reason (permission denied, etc.) exits 5. I dispatched an independent review:lane-verifier pass to adversarially hunt for a bypass of this (locale/platform stat message collision between ENOENT/EACCES text, a TOCTOU race between the existence check and the stat call, stat shadowing via PATH, and basic bash correctness of local inside the if block). It came back REFUTED on all points: LC_ALL=C (set at L39) pins the error text to the fixed glibc/BSD/busybox C-locale strings for ENOENT vs. EACCES, which share no substring, and every TOCTOU outcome it traced still resolves to die 5 rather than a silent, incorrect fallback. (It couldn't execute stat -n/bash -n/live chmod itself in its sandbox, so platform-message confirmation is reasoned from glibc/BSD/busybox strerror semantics rather than empirically run — consistent with the static-only verification this lane has throughout, noted below.)
  • send() now also unsets VAULT_EXEC_VAULT (pages-publish#L171): the token/Access-pair read now scopes env -u VAULT_EXEC_VAULT the same way load_config's Key Vault read already did, closing the gap the earlier security review flagged as "pre-existing, not introduced here." The unset is scoped to the vault-exec child process only and doesn't leak into the inner bash -c, which never references the variable — the inner script only sees the PP_* values vault-exec injects via --env.
  • New test coverage (pages-publish.test.sh L452-L463 and L465-L472) exercises both the untraversable-directory exit-5 path (skipped under root, where chmod 000 doesn't block traversal) and the vault-exec-missing-from-PATH exit-5 path the prior claude-review lane flagged as untested — closing that gap too. Each run() call clears $tmp/calls/* first (L100), so the new -e "$tmp/calls/vault-env" assertions are correctly scoped to the single run they check, not stale state from earlier cases.

One documentation note, not a finding (no concrete exploit path, so it doesn't meet this lane's bar): the README addition at README.md#L206-L209 answers the earlier Codex P1 ("record successful Key Vault config reads") by asserting that Azure Key Vault's own diagnostic logs already audit every read with caller identity. That's an infrastructure/platform claim this repo doesn't configure or evidence anywhere else in-tree (no diagnostic-settings config found), so it's accurate only if diagnostic logging is actually enabled on kv-melo-devtools-prod — worth confirming with whoever owns that vault's Azure config, but outside this script's or this PR's control.

Verification

I don't have execution approval in this environment (same limitation the prior claude-review pass on this PR noted), so I could not run bash components/cloud-environment/pages-publish.test.sh, shellcheck, or shfmt myself — the review above is static reading of the diff plus one independent adversarial verification subagent, not a test run.

@claude

claude Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Claude finished @kyle-sexton's task in 3m 41s —— View job


Code review (incremental: dfff5c1 → 646dd9b)

  • Gather context (incremental diff, PR description)
  • Review components/cloud-environment/pages-publish changes since dfff5c1
  • Review components/cloud-environment/pages-publish.test.sh changes since dfff5c1
  • Review components/cloud-environment/README.md changes since dfff5c1
  • Post findings

Summary

This incremental pass reviews only what changed since dfff5c1 (.claude-lane/incremental.diff): the two fixups in commit 646dd9b that respond to the earlier Codex and claude-review findings on this PR.

No findings. The changes correctly close all three outstanding items:

  • Fail-closed on ambiguous existence (Codex P2, pages-publish#L124-L130): load_config now inverts the -e/-L check and, only when both are false, runs stat -- to distinguish a confirmed ENOENT ("No such file or directory" in the LC_ALL=C-forced stderr, set globally at pages-publish#L39) from any other lookup failure (e.g. an untraversable parent directory), which now dies with 5 instead of silently falling through to Key Vault. The new test (pages-publish.test.sh:453-464) correctly reproduces this with chmod 000 on the config directory, skips under root (where permission checks don't apply), and restores the mode before asserting so later cases aren't affected.
  • Missing test coverage for vault-exec absent from PATH (flagged in the prior claude-review pass): now covered at pages-publish.test.sh:466-475, with a command -v guard that skips if a real vault-exec happens to be on /usr/bin or /bin.
  • VAULT_EXEC_VAULT isolation extended to send()'s token reads (noted as pre-existing, non-blocking context in the prior claude-security-review pass): send()'s vault-exec call is now also wrapped in env -u VAULT_EXEC_VAULT (pages-publish#L171), with new assertions confirming both the file-present and Key-Vault-fallback paths log VAULT_EXEC_VAULT=<unset> for every vault-exec call, not just the config read.
  • The Codex P1 (audit logging) finding is addressed by documentation rather than new code: the README's Config paragraph now states reads are audited by the vault's own diagnostic logs (caller identity recorded) and that the secret itself holds no credential values, only endpoints and secret names — consistent with pages-publish-config's schema (PUBLIC_ENDPOINT, PRIVATE_TOKEN_SECRET, etc., all names/URLs, never resolved credentials).

Traced the new test's state dependencies (run() clears $tmp/calls/* every invocation at pages-publish.test.sh:100, so the vault-env existence assertion in the new untraversable-directory case isn't polluted by earlier calls; skip_case is defined in harness/shell/lib.sh, not this file) — no issues found.

Notes on verification

I could not execute bash components/cloud-environment/pages-publish.test.sh or shellcheck in this environment (command execution requires an approval step not available here), same limitation as the prior review pass on this PR. The review above is based on static reading of the incremental diff and the surrounding unchanged code/test harness.

@kyle-sexton
kyle-sexton merged commit 5698b16 into main Oct 10, 2026
22 checks passed
@kyle-sexton
kyle-sexton deleted the feat/pages-publish-kv-config branch October 10, 2026 17:01
kyle-sexton added a commit that referenced this pull request Oct 10, 2026
…Vault at session start (#758)

No related issue: follow-up to #756; the rendered-views preference never
reached cloud sessions because claude.ai passes environment variables to
the session, not the setup script.

## Summary

`write_rendered_views` in `setup.sh` writes `rendered-views.md` from
`RENDERED_VIEWS_MD`, but claude.ai passes an environment's variables
only to the session, never to the setup script, so the file was never
written. The session cannot copy the variable either: a repository's
`.claude/settings.json` `env` block can set it, and the preference file
is a trusted layer.

## Fix

- New `components/cloud-environment/rendered-views-sync`, installed by
`setup.sh` to `~/.local/bin/rendered-views-sync` by its marker line,
like `pages-publish`. It runs only when `CLAUDE_CODE_REMOTE=true`. It
reads Key Vault secret `rendered-views-md` through the `vault-exec`
beside it (`--optional`, `VAULT_EXEC_VAULT` unset, a 20-second budget, a
fixed `PATH`; the value is never in argv), and writes a non-empty value
atomically to `${CLAUDE_CONFIG_DIR:-$HOME/.claude}/rendered-views.md`.
An absent or empty secret, or one holding a CR, leaves the file alone.
It always exits 0, prints nothing to stdout (SessionStart stdout becomes
session context), and logs one stderr line on failure.
- `setup.sh` registers it as a user-scope SessionStart hook in
`${CLAUDE_CONFIG_DIR:-$HOME/.claude}/settings.json`.
`register_session_hook` removes any earlier entry for the same command
before it appends, so a re-run is byte-identical, and every other key
and hook is kept. It registers only after this build installed the
script.
- README: no longer says the environment's variables reach the setup
script, and documents the hook. `write_rendered_views` and
`write_pages_publish_config` stay.
- CI runs the new test file. `SCRIPT_VERSION` is now `2026-10-10.1`.

## Verification

- `bash harness/shell/run-tests.sh` over the cloud-environment tests and
cloud-bootstrap: 5 files passed (setup 125 PASS, rendered-views-sync 23
PASS).
- `shellcheck --rcfile .shellcheckrc` and `shfmt -d` are clean.
markdownlint on the README is clean.

## Related

- #756 (pages-publish Key Vault fallback, same pattern)
- https://code.claude.com/docs/en/hooks (SessionStart hook shape, as of
2026-10-10)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01EQPrCTBQPb5b1XtbAH7tMA

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
kyle-sexton added a commit that referenced this pull request Oct 10, 2026
No related issue: follow-up to #706 re-adding pages-publish with
admission evidence

## Summary

Re-adds the `pages-publish` component to the sync manifest for
`melodic-software/dotfiles`, which 6554be9 removed because the
admitting change lacked the evidence
[`docs/component-lifecycle.md`](docs/component-lifecycle.md#admission-evidence)
requires. This PR carries that evidence below. `rendered-views-sync`
(cloud-only; exits 0 unless `CLAUDE_CODE_REMOTE`) and `vault-exec` (the
cloud variant differs from dotfiles' own) stay out.

## Fix

Re-applies exactly what 6554be9 removed:

- `distribution/sync-manifest.yml`: the `pages-publish` component
(`components/cloud-environment/pages-publish` ->
`dot_local/bin/executable_pages-publish`), and `pages-publish` in the
`melodic-software/dotfiles` managed list.
- `components/managed-files-guard/managed-files-guard-fleet.yml`:
`dot_local/bin/executable_pages-publish` in the guarded `paths:`, in
sorted position.

## Admission evidence

Per [`docs/component-lifecycle.md` § Admission
evidence](docs/component-lifecycle.md#admission-evidence).

- **Live consumer**: the `explain-change` skill in claude-code-plugins
(melodic-software/claude-code-plugins#6426, merged 2026-10-07) publishes
its digest pages with `pages-publish` when the hosted medium is
configured. The dotfiles target is the consumer of the shared bytes
here: it materializes them to `~/.local/bin/pages-publish` on local
machines.
- **Owner and outcome**: owner is the operator (melodic-software).
Outcome: one shared page host that any rotated Claude account can
publish to, locally and in cloud sessions. Acceptance condition: a
stamped page published from a local machine returns a 200 page URL and
deletes cleanly, as the cloud check below did. Rollback: drop
`pages-publish` from the dotfiles managed list and remove
`dot_local/bin/executable_pages-publish` in dotfiles in a coordinated
PR, following the distribution lifecycle (deletion is never inferred
from deselection). Operating instructions live beside the script in
`components/cloud-environment/README.md`.
- **Delivery boundary**: standards owns the script
(`components/cloud-environment/pages-publish`). Exact materialization
through this repository puts the same bytes on local machines via
dotfiles. Cloud sessions keep getting them from
`components/cloud-environment/setup.sh`. One source file, two delivery
paths, no second copy to drift.
- **Alternatives and overlap**: built-in Claude Artifacts are bound to
one account, so a page published from one rotated account is not
reachable from another; that limit is the reason for this work. GitHub
Pages and Netlify were considered and rejected by the operator. Overlap:
none with existing components. In the claude-code-plugins consumer the
Artifact stays the default; the hosted medium is opt-in personal
configuration.
- **Operational fit**: the PLAN 7.4 cloud live check on 2026-10-10, from
a Claude Code cloud session. The `setup.sh`-installed `pages-publish`
read its config from the Key Vault secret `pages-publish-config` (#756),
published a page at `https://pages.melodicsoftware.com/<id>/` that
returned 200 with a `content-security-policy` header and `noindex`,
private routing worked, and the page returned 404 after delete. No
permission prompt and no classifier denial fired; the allow rule
`Bash(pages-publish *)` is in the standards permissions floor (#706).
The local dotfiles path was checked the same day; see "Local consumer
check (2026-10-10)" below. Requirements: bash 4+, curl, awk, coreutils
`realpath`/`stat`; `gitleaks` is used when present. There is no `getent`
dependency, so the local path is not limited to Linux and WSL.
Credentials: bearer tokens and the Access service-token pair are
resolved by `vault-exec` and reach curl only on stdin, never argv.
Failure behavior: distinct exit codes (2 usage, 3 not a stamped temp-dir
page, 4 credential content, 5 config missing or invalid, 6 upload
failed), and the credential scan runs before any network call.
- **Upstream health**: first-party script with no third-party upstream;
its only runtime dependencies are base OS tools.
- **Legal and security fit**: first-party code in this repository, so
there is no upstream license to record. The repository declares
`"license": "UNLICENSED"` (`package.json`) and ships no LICENSE file. No
vendored or downloaded artifact. Provenance and integrity: the sync
copies the tracked, clean source bytes and their executable mode exactly
(`distribution/sync-manifest.sh` rejects untracked or dirty sources);
they reach dotfiles only through the reviewed standards-sync PR; and the
managed-files guard blocks hand edits to the destination there. Network
boundary: HTTPS only (`--proto =https`) to the two configured upload
origins. Security review: a fresh-context review of this diff against
`conventions/review/security.md` found no injection and no argv
credential exposure. It found one P3 issue in the existing script,
tracked in #760: a user-written `~/.config/pages-publish/config` could
name any vault secret and any https endpoint, and the floor pre-approves
`Bash(pages-publish *)` but not `vault-exec`. The P3 issue (#760) was
fixed by #761 before this PR merged: config now comes only from Key
Vault, so no file write can redirect secrets. The script landed through
#706, #756 and #761; this PR changes no script bytes.
- **Update path**: no independent dependency root, so no updater entry.
The script changes through standards PRs and reaches dotfiles through
the normal sync.
- **Verification**: `components/cloud-environment/pages-publish.test.sh`
is the behavioral suite and runs in `pr-require-checks.yml`; the
managed-files-guard and sync-manifest suites cover the materialization.

## Local consumer check (2026-10-10)

PLAN 7.4 local: the dotfiles delivery path on a local WSL2 Linux machine
(kernel 6.18, bash), with the exact bytes this sync delivers.

- **vault-exec**: rendered from dotfiles `main` at 7ddb14c with `chezmoi
--source <fresh worktree> apply ~/.local/bin/vault-exec`. The preview
diff was only the name map from melodic-software/dotfiles#1106:
+`pages-publish-config` and the four `cloudflare-pages-*` names,
-`cloudflare-r2-pages-public`/`-private`, all under
`kv-melo-devtools-prod`. This is dotfiles' own `az`-based resolver, not
the cloud variant.
- **pages-publish**: installed to `~/.local/bin/pages-publish` (mode
0755) from standards `main` at 41282ac,
`components/cloud-environment/pages-publish`. Git blob
`126013899fd8777cd714b259b9c03fa2d14d1e4d`, matching the blob at that
ref and the source this PR syncs; sha256
`d03ecf8decca2df02382ddb1e802abc65c45693f19e3a6b18d1ce93b676ba995`. Once
the standards-sync PR lands, chezmoi manages this file with the same
bytes.
- **Consumer**: explain-change's `publish-hosted.mjs` (the script from
melodic-software/claude-code-plugins#6783) published a builder-stamped
digest page of claude-code-plugins#6783 with `--repo
melodic-software/claude-code-plugins`. The repository visibility lookup
returned public, and the page went to
`https://pages.melodicsoftware.com/Cr_e5xdZNGSKuNo-NQsSWQ/`, which
returned HTTP 200 with `content-security-policy: default-src 'none';
...; sandbox allow-scripts allow-downloads` and `x-robots-tag: noindex,
nofollow`. pages-publish read its config only from the Key Vault secret
`pages-publish-config` through the local vault-exec.
- **Private routing**: the same page with `--repo
melodic-software/architecture` (private) routed to
`https://pages-private.melodicsoftware.com/bVYsWtKUIE6evlGNobHc3A/`. An
unauthenticated request got HTTP 302 to the Cloudflare Access login
(`melodic.cloudflareaccess.com`) with a `www-authenticate:
Cloudflare-Access` header and no page content.
- **Delete**: `pages-publish --delete <id> --visibility public|private`
removed both pages, each with exit 0; the public URL then returned 404.
- **Permissions**: no permission prompt and no classifier denial fired
for `pages-publish` or `publish-hosted.mjs` in this session.

## Verification

Run locally in the worktree:

- `bash distribution/sync-manifest.sh validate` -> `Manifest valid: 42
components, 13 targets`
- `bash distribution/sync-manifest.test.sh` (after `npm ci --prefix
distribution`) -> 336 PASS, 0 FAIL
- `bash harness/shell/run-tests.sh
components/managed-files-guard/managed-files-guard.test.sh
components/cloud-environment/pages-publish.test.sh` -> 2 passed, 0
failed
- lefthook pre-commit (editorconfig, typos, gitleaks) passed on the
commit

## Related

- #706 (pages-publish and the permissions floor allow rule)
- #756 (Key Vault config secret `pages-publish-config`)
- #758 (rendered-views preference sync)
- 6554be9 (the removal this re-applies)
- melodic-software/claude-code-plugins#6426 (explain-change hosted
medium, the live consumer)
- melodic-software/claude-code-plugins#6783 (publish-hosted looks up
repository visibility itself; used in the local check)
- melodic-software/dotfiles#1106 (local vault-exec map for the
pages-publish secrets)
- #760 (pages-publish config-override hardening, found in this PR's
security review; closed by #761)
- #761 (pages-publish reads config only from Key Vault)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01EQPrCTBQPb5b1XtbAH7tMA

Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant