fix: scope the auth header to the Gitea server; README trust note

- review.yml and git.push set http.<GITHUB_SERVER_URL>/.extraHeader, so the bot token
  is sent only to the Gitea server; git.push falls back to the unscoped key when no
  server is known.
- README: a same-repository PR runs the caller workflow from its head, so the
  safeguards bound PR content, not edits to the caller; drafter: local fails the job.
- Tests: the source-grep fetch test is replaced by a behavioral one over a resumed run
  (fetch ends options, push uses the scoped key); the no-op summary test is dropped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jaredandClaude Opus 5.5 committed 2026-11-12 15:06:30 -05:00
1 parent 7783b6e78f
commit 70c762bf8a
7 files changed
+64 -23

No files matched your search

+6 -1
View File
@@ -34,6 +34,11 @@ uncovered and unguided flags for the whole repository in one issue. With
- It never merges anything.
- It posts nothing when nothing is flagged.
For a pull request from a branch of the same repository, Gitea runs the caller workflow
from the pull request's head, so anyone who can push a branch can change the caller's
inputs. The safeguards in this README bound what the pull request's content can do, not
what an edited caller workflow file can do.
## What is sent to Anthropic
Nothing is sent unless the repository sets `drafter: claude`. With it, the drafter
@@ -99,7 +104,7 @@ The package can also be run by hand: `python3 -m docs_review pr|closed|monthly -
| Input | Default | Meaning |
|---|---|---|
| `drafter` | `none` | `none` flags only. `claude` also drafts edits. `local` is accepted but not yet built. Any other value, including a misspelling, behaves as `none`. |
| `drafter` | `none` | `none` flags only. `claude` also drafts edits. `local` is accepted but not yet built: it fails the job with "local drafter not built yet". Any other value, including a misspelling, behaves as `none`. |
| `docs` | required | Newline-separated patterns for the living documents. |
| `generated` | none | Patterns for generated files. |
| `top_level` | `README.md` | The subset of `docs` the monthly pass re-reads in full. |