Skip to content

Report whether this server trusts anything beyond the official publisher - #24

Draft
lr00rl wants to merge 2 commits into
integrationfrom
feat/zeus-task0012-trust-endpoint
Draft

Report whether this server trusts anything beyond the official publisher#24
lr00rl wants to merge 2 commits into
integrationfrom
feat/zeus-task0012-trust-endpoint

Conversation

@lr00rl

@lr00rl lr00rl commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

TASK-0012 server half — the field athena needs for the trust banner.

Shape is hers, and she checked the thing that would have broken first: /api/plugin-contributions returns a bare array consumed as PluginView[], so hanging a sibling field off it breaks every current client. New endpoint instead.

GET /api/plugin-trust      // withAuth("") — the banner must show for whoever is looking
{ "non_official": true, "publishers": ["devkey-somebody"], "allow_unsigned_host_risk": false }
  • Names, never keys — pinned by a test that fails loudly (it prints the leaked key when broken).
  • Absence must never look like safety — the object is always emitted, "non_official": false included, so a banner gated on field presence cannot confuse "normal" with "never answered".
  • allow_unsigned_host_risk raises the condition alone: turning off signature enforcement is worse than one extra publisher.

Verified: gofmt clean, vet clean, 4/4 under -race. Each guard was then broken deliberately to confirm the test fails — the naming test and the key-leak test both fired, and the leak test printed the material it caught.

https://claude.ai/code/session_01CoVXeAw726rrKNf8tDLNk1

lr00rl added 2 commits July 28, 2026 02:39
TASK-0012's server half, shaped by athena's proposal after she checked the thing that
would have broken: /api/plugin-contributions returns a BARE ARRAY and the dashboard
consumes PluginView[], so carrying a sibling field there would break every current
client. New read-only GET /api/plugin-trust instead, withAuth("") because the banner
must appear for whoever is looking at the screen, not only for admins.

Two properties she asked for explicitly, both now pinned by tests:

  - names, never keys. The operator needs to know WHICH publisher is trusted, never
    its value. Proved by breaking it: leaking the key makes the test print it.
  - absence must never look like safety. The object is ALWAYS emitted, including
    "non_official": false, so a banner gated on a field's presence cannot confuse
    "trust is normal" with "the server never told me".

allow_unsigned_host_risk raises the condition on its own: disabling signature
enforcement is categorically worse than one extra trusted publisher.
The endpoint tells the dashboard; this tells a server nobody is looking at. Two
independent surfaces for one condition, and the log follows the same rule as the
payload: names only, never key material.
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