Skip to content

fix: harden the response cache, share lookup, project credentials and release permissions - #527

Merged
mrnasil merged 3 commits into
mainfrom
fix/audit-hardening
Dec 2, 2026
Merged

mrnasil merged 3 commits into
mainfrom
fix/audit-hardening

Conversation

@mrnasil

@mrnasil mrnasil commented Dec 2, 2026

Copy link
Copy Markdown
Member

Four small fixes from a source audit, each checked against the current code first.

  • Response cache: a paraphrase matched a cached answer on the last question, system prompt and model only, so a tools-free chat could get the answer of another conversation with a different history. The semantic path now also requires the same conversation before the question. Images were keyed by presence; they are keyed by content now.
  • Shares: a symlink in a shares directory was served by the unauthenticated /s/<id> route. A cloned repository could ship one pointing at any readable file. Links are no longer served.
  • Project config: providers.<id>.credentials names the environment variable a key is read from, so a project config could send another service's secret to a provider. The table is now read only from the global config, like endpoints and headers.
  • Release workflow: the token was contents: write and actions: write for every job, including the build jobs that run third-party actions. It is read-only by default now; only publish (creates the release) gets contents: write. landing already declared its own.

Verification

  • New tests for each code change; cargo test for config, llm (response cache) and server (shares) pass.
  • Linux line coverage measured locally for whycodes-config, whycodes-llm, whycodes-server: no missed lines.
  • The release workflow change is not exercised until the next tag. homebrew only reads the release and pushes with the deploy key, so it should not need more than read; if a release job fails on permissions, that is the place to look.

🤖 Generated with Claude Code

mrnasil and others added 3 commits December 2, 2026 17:40
- response cache: a paraphrase only matches an entry with the same
  conversation before the question, and images are keyed by content, so one
  conversation cannot get another's answer;
- shares: a symlink in a shares directory is not served;
- release workflow: read-only token by default, write only in the publish job.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
The table names the environment variable a key is read from, so a cloned
repository could send another service's secret to a provider.

Co-Authored-By: Claude Fable 5.2 <[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