docs(748): record that permissions: binds, measured by matched probe
Adds `docs/ci-cd.md` -> "Workflow token scope" (the section the inline comments
on all six workflows point at) and corrects `ci.actions-credential-scoping`,
which had carried "whether `permissions:` is honored here is still UNPROBED"
and an explicit "do NOT add a `permissions:` key" since 2026-08-05.
Settled by a matched scratch-base probe pair on Gitea 1.27.1, differing only in
the gate job's single permission unit:
code: write -> job success, `Posted review-verdict/h10-PROBE=success`,
status creator: null
code: read -> job failure at the POST, curl exit 22 (HTTP >=400 under -f),
NO status written
Both reached the classify step's start marker and both logged the retarget
fence as trusted, so the read units were exercised and neither run was the #751
dropped-step shape. Both ran while the owner default was still `permissive`,
which is what establishes the declaration binds irrespective of that default.
The negative control is the load-bearing half: a green positive alone is
equally consistent with `permissions:` being a no-op sitting beside a
permissive default.
Also corrects the two places that framed the persisted checkout credential's
write-capability as decided by the instance default; since this change it is
decided by `ci-image.yml`'s own `code: read` declaration.
Decisions-Edit: yes
Refs: #748
This commit is contained in:
+66
-3
@@ -147,14 +147,77 @@ A backup, fetch, or migration-smoke failure aborts before the live container is
|
||||
|
||||
**Also avoid firing several pushes back-to-back** (e.g. a `[skip ci]` commit, then `main`, then a tag, all within ~1s). Observed once on this Gitea instance: the later events were silently dropped — no `ActionRun` records created at all, even though the runner was online and the workflow `active`. Pushing again, spaced out, created the runs normally. If a push/tag doesn't produce a run, re-push (or push an empty commit) rather than assuming the runner is broken.
|
||||
|
||||
## Workflow token scope (`permissions:`, ersatztv#748)
|
||||
|
||||
Every workflow in this repo declares `permissions:`. Five declare `code: read` at the top level;
|
||||
`review-verdict.yml` declares `code: write` + `issues: read` + `pull-requests: read` on its
|
||||
`set-verdict-status` job and nothing at the top level. That is the whole convention — a new workflow
|
||||
should declare the narrowest set it needs, and say at the declaration why it needs write if it does.
|
||||
|
||||
**Declaring `permissions:` is exhaustive, not additive.** A unit omitted is a unit not granted, and
|
||||
that holds *at any owner-level default* — it is not conditional on the instance default being
|
||||
Restricted. This is the property that makes the block load-bearing rather than decorative, and it is
|
||||
also what makes a wrong one dangerous: the gate job's API calls are `curl -sf` under
|
||||
`set -euo pipefail`, so a missing unit is a 403 that kills the step, and `review-verdict/h10` is
|
||||
never posted. That blocks **every** merge to `main`, including the PR that would repair it, and
|
||||
since ersatztv#743 (`block_admin_merge_override: true`) there is no force-merge escape.
|
||||
|
||||
`code: write` and not something narrower because **Gitea has no `statuses` scope**.
|
||||
`POST /repos/{o}/{r}/statuses/{sha}` is gated by `reqRepoWriter(unit.TypeCode)`, so status-write *is*
|
||||
Code-write (`ci.actions-credential-scoping`). `contents: write` would also work but additionally
|
||||
grants `releases: write`, which nothing here uses. The two read units are not spare: the job GETs
|
||||
`/issues/{n}/timeline` (the ersatztv#706 retarget fence) and, through
|
||||
`scripts/pr-changed-files.sh`, `/pulls/{n}` and `/pulls/{n}/files` (the ersatztv#698 exemption path).
|
||||
|
||||
No workflow needs a `packages:` unit. All five `container:` blocks in `docker-build.yml` carry
|
||||
explicit `credentials:` using the scoped `REGISTRY_*` PAT, so no job pulls the toolchain image with
|
||||
the injected token.
|
||||
|
||||
### The binding was measured, not assumed (2026-08-27, Gitea 1.27.1)
|
||||
|
||||
`ci.actions-credential-scoping` recorded for three weeks that whether `permissions:` is honored on
|
||||
this instance was **unprobed** — 1.26.0 was the version it was said to start binding at, from
|
||||
release notes rather than from an experiment. It was settled with the scratch-base probe below, run
|
||||
as a matched pair that differed **only** in one unit:
|
||||
|
||||
| Control | Gate job unit | Result |
|
||||
|---|---|---|
|
||||
| Positive | `code: write` | job `success`; `Posted review-verdict/h10-PROBE=success`; `creator: null` |
|
||||
| Negative | `code: read` | job `failure`; `curl` exit 22 (HTTP ≥400 under `-f`) at the POST; **no status written** |
|
||||
|
||||
Both runs logged `Retarget fence: 0 retarget event(s) … (trusted=yes)` and both reached the classify
|
||||
step's start marker, so the reads succeeded in both and neither failure was the ersatztv#751
|
||||
dropped-step shape. The negative control is the load-bearing half: it is what shows the declaration
|
||||
*binds* rather than being a no-op that happens to sit next to a permissive default. Both ran while
|
||||
the owner default was still `permissive`, which is what establishes that the block is not
|
||||
conditional on Restricted.
|
||||
|
||||
`creator: null` on the positive control matters separately: it is the provenance signal
|
||||
`review-verdict.yml` relies on to tell a machine-written status from a reviewer's
|
||||
(`ci.exemption-provenance`, ersatztv#742). Approach A — scoping the built-in token — preserves it.
|
||||
Moving status writes onto a PAT (approach B) would not, which is why B stays blocked.
|
||||
|
||||
**What this does and does not close.** Scoping bounds what a job may *do*; it never bounds whether
|
||||
attacker YAML *runs* — that needs a trigger filter (ersatztv#744). And `review-verdict.yml` still
|
||||
holds repo-write. The property gained is not "workflows can no longer assert the verdict"; it is
|
||||
that *only a workflow visibly opting into repo-write can*, instead of every job on the instance
|
||||
holding write implicitly. Real, and weaker than closed.
|
||||
|
||||
⚠️ **Changing any of these blocks requires the scratch-base probe**, not CI-green on the editing PR
|
||||
— `review-verdict.yml` is base-resolved and is never exercised by its own PR. See the probe recipe
|
||||
in the review-verdict gate section below.
|
||||
|
||||
## Checkouts drop the persisted credential (ersatztv#746)
|
||||
|
||||
Every `actions/checkout` in this repo **except `ci-image.yml`'s** (see the carve-out below) sets
|
||||
`persist-credentials: false`. Without it the action leaves an `Authorization` header in
|
||||
`.git/config`, and a head-resolved job then hands that credential to every script it runs, not just
|
||||
to the checkout. That header is write-capable: this instance's Actions default token permission is
|
||||
`permissive`, where it stands after a Restricted trial was reverted on 2026-08-05, and flipping it
|
||||
back is ersatztv#748. No job that checks out
|
||||
to the checkout. That header is write-capable *only while the job's token is*: this instance's Actions
|
||||
default token permission is `permissive`, where it stands after a Restricted trial was reverted on
|
||||
2026-08-05. Since ersatztv#748 that default no longer governs this repo's jobs — every workflow
|
||||
declares `permissions:` explicitly (see the section above), so `ci-image.yml`'s persisted header is
|
||||
read-only by declaration rather than by instance setting. Re-applying the owner-level default is
|
||||
server-management#714. No job that checks out
|
||||
loses anything: none of them push with git, and anonymous access covers the fetches because the repo
|
||||
is public — `private: false`, and `GET /info/refs?service=git-upload-pack` answers unauthenticated,
|
||||
measured 2026-08-26 from the LAN. That measures the repository, not a runner's network path to it,
|
||||
|
||||
@@ -38,7 +38,7 @@ the link for rationale. Superseded/retired history lives in `archive/`. Regenera
|
||||
| `blazor.rollback-tag` | The commit immediately preceding the Blazor-removal merge is tagged `blazor-final` (not a `v*` tag, so it doesn't trigger a prod release build) as the documented rollback/restore path. | 2026-07-11 | [link](records/blazor/rollback-tag.md) |
|
||||
| `blazor.ui-removed` | The legacy Blazor Server UI (`Pages/`, `Shared/`, `ViewModels/`, `Validators/`, MudBlazor + 8 other packages, Blazor Startup wiring) is fully deleted now that the SPA has parity; the legacy `MapWhen` branch is kept only for controllers/docs/OpenAPI/`LegacyUiRedirects`, and the catch-all fallback 302s any unmatched non-api/artwork/docs/openapi path to `/app`. | 2026-07-11 | [link](records/blazor/ui-removed.md) |
|
||||
| `channel.origin-marker` | A new `Channel.Origin` (`ChannelOrigin` enum — `Unknown`/`UserCreated`/`AutoTuned`) records how a channel row was created and is stamped exactly once at insert (`AutoTuned` in `CreateChannelFromLineupHandler`, `UserCreated` in `CreateChannelHandler`), and is never mutated on a later edit. It is surfaced as a raw `origin` field on `ChannelResponseModel`; the SPA badges only `AutoTuned`. Rows predating the column read `Unknown` — provenance is **not** back-filled. | 2026-07-23 | [link](records/channel/origin-marker.md) |
|
||||
| `ci.actions-credential-scoping` | Any credential reachable from an Actions job is scoped to what that job needs. The container-registry secret `REGISTRY_PASSWORD` is a personal access token scoped `write:package` + `read:repository` — never an account PASSWORD. This matters because Gitea has NO `status` token scope: `POST /repos/{o}/{r}/statuses/{sha}` is gated by `reqRepoWriter(unit.TypeCode)`, so ANY credential that can write the repository can forge `review-verdict/h10`, the required context that is supposed to make merge-consent derived rather than assertable. Package-write IS a separate scope, so the registry credential can be made status-incapable at no cost: `scripts/ci-detect-already-validated.sh` only GETs. Do NOT add a `permissions:` key to constrain the injected `GITEA_TOKEN` on the assumption that it binds — below Gitea 1.26.0 it is silently a NO-OP, which is worse than absent because it reads in review as a constraint. That version precondition NO LONGER HOLDS: this instance was upgraded 1.25.4 -> 1.27.1 on 2026-08-05. What has NOT changed is that the consequence is unverified — whether `permissions:` is honored here is still UNPROBED, and there is still no API surface for it (`/api/v1/settings/actions` 404s at 1.27.1). The instance default HAS since been probed and is NOT unknown: it was set to Restricted, verified, and reverted to `permissive` on 2026-08-05 (#748), which is where it stands. Probe before relying on it; do not read the upgrade alone as the constraint now working. Scoping is necessary and not sufficient: it bounds what a job may DO, never whether attacker YAML runs at all, so a self-referencing trigger needs its own filter (`ci-image.yml`, tracked in #744 — deliberately NOT bundled here, because editing that file re-points `ci-image-pin` at the editing commit and reddens a blocking job). A second, separate consequence of the same boundary: `actions/checkout` persists a write-capable credential into `.git/config` unless `persist-credentials: false` is set, and 15 of this repo's 16 checkouts now set it (#746), `ci-image.yml`'s being excluded for the reason in that section. Ordering is part of the rule: unmask the dependent fetches FIRST, because until then a credential regression presents as an empty changed-file set and a silently skipped check rather than a red job. This record closes ONE route. It does not close the class, and the later sections say exactly what survives — read them before citing this record as a mitigation. | 2026-08-05 | [link](records/ci/actions-credential-scoping.md) |
|
||||
| `ci.actions-credential-scoping` | Any credential reachable from an Actions job is scoped to what that job needs. The container-registry secret `REGISTRY_PASSWORD` is a personal access token scoped `write:package` + `read:repository` — never an account PASSWORD. This matters because Gitea has NO `status` token scope: `POST /repos/{o}/{r}/statuses/{sha}` is gated by `reqRepoWriter(unit.TypeCode)`, so ANY credential that can write the repository can forge `review-verdict/h10`, the required context that is supposed to make merge-consent derived rather than assertable. Package-write IS a separate scope, so the registry credential can be made status-incapable at no cost: `scripts/ci-detect-already-validated.sh` only GETs. `permissions:` on a workflow/job DOES bind on this instance — MEASURED 2026-08-27 on 1.27.1 by matched scratch-base probe PRs differing only in one unit (`code: write` posted the probe status; `code: read` 403ed the POST, curl exit 22, no status written), so every workflow here now declares it (#748). Two properties that make it usable: the declaration is EXHAUSTIVE, not additive — a unit omitted is not granted — and it binds REGARDLESS of the owner-level default, so it is not conditional on Restricted being enabled. The earlier form of this rule said the opposite ("do NOT add a `permissions:` key on the assumption that it binds — below Gitea 1.26.0 it is silently a NO-OP"); that was correct at 1.25.4 and is retained here only so a reader meeting the old advice recognises it as superseded rather than contradicted. There is still no API surface for the owner-level default (`/api/v1/settings/actions` 404s at 1.27.1). The instance default HAS since been probed and is NOT unknown: it was set to Restricted, verified, and reverted to `permissive` on 2026-08-05 (#748), which is where it stands. Probe before relying on it; do not read the upgrade alone as the constraint now working. Scoping is necessary and not sufficient: it bounds what a job may DO, never whether attacker YAML runs at all, so a self-referencing trigger needs its own filter (`ci-image.yml`, tracked in #744 — deliberately NOT bundled here, because editing that file re-points `ci-image-pin` at the editing commit and reddens a blocking job). A second, separate consequence of the same boundary: `actions/checkout` persists a write-capable credential into `.git/config` unless `persist-credentials: false` is set, and 15 of this repo's 16 checkouts now set it (#746), `ci-image.yml`'s being excluded for the reason in that section. Ordering is part of the rule: unmask the dependent fetches FIRST, because until then a credential regression presents as an empty changed-file set and a silently skipped check rather than a red job. This record closes ONE route. It does not close the class, and the later sections say exactly what survives — read them before citing this record as a mitigation. | 2026-08-05 | [link](records/ci/actions-credential-scoping.md) |
|
||||
| `ci.batch-pushes-no-cancel-route` | Hold review fixes, doc corrections and format fixes locally and push **once** — a superseded run cannot be cancelled from the agent side and holds a runner slot until it finishes. | 2026-07-21 | [link](records/ci/batch-pushes-no-cancel-route.md) |
|
||||
| `ci.build-once-rejected` | CI build-once (a shared compile artifact across jobs) was implemented, measured, and rejected for a 40-85% wall-clock regression; keep the #420 cross-run tree-identity skip instead. | 2026-07-18 | [link](records/ci/build-once-rejected.md) |
|
||||
| `ci.cancelled-is-not-a-verdict` | Treat a `cancelled` conclusion as "no verdict" — never as pass or fail — and report FAILED and CANCELLED counts separately in any CI monitor. THE COMBINED COMMIT-STATUS ENDPOINT CANNOT EXPRESS THIS: `GET /repos/{o}/{r}/commits/{sha}/status` has states `success`/`failure`/`pending`/`error` and NO `cancelled`, so it reports a cancelled job as `failure`. Anything polling that endpoint — which is what a CI monitor naturally polls, because it is the per-sha view the merge gate reads — must resolve the job-level `conclusion` via `actions/runs/{id}/jobs` before reporting a red. | 2026-07-21 | [link](records/ci/cancelled-is-not-a-verdict.md) |
|
||||
|
||||
@@ -5,7 +5,7 @@ status: active
|
||||
since: '2026-08-05'
|
||||
supersedes: none
|
||||
superseded-by: none
|
||||
rule: 'Any credential reachable from an Actions job is scoped to what that job needs. The container-registry secret `REGISTRY_PASSWORD` is a personal access token scoped `write:package` + `read:repository` — never an account PASSWORD. This matters because Gitea has NO `status` token scope: `POST /repos/{o}/{r}/statuses/{sha}` is gated by `reqRepoWriter(unit.TypeCode)`, so ANY credential that can write the repository can forge `review-verdict/h10`, the required context that is supposed to make merge-consent derived rather than assertable. Package-write IS a separate scope, so the registry credential can be made status-incapable at no cost: `scripts/ci-detect-already-validated.sh` only GETs. Do NOT add a `permissions:` key to constrain the injected `GITEA_TOKEN` on the assumption that it binds — below Gitea 1.26.0 it is silently a NO-OP, which is worse than absent because it reads in review as a constraint. That version precondition NO LONGER HOLDS: this instance was upgraded 1.25.4 -> 1.27.1 on 2026-08-05. What has NOT changed is that the consequence is unverified — whether `permissions:` is honored here is still UNPROBED, and there is still no API surface for it (`/api/v1/settings/actions` 404s at 1.27.1). The instance default HAS since been probed and is NOT unknown: it was set to Restricted, verified, and reverted to `permissive` on 2026-08-05 (#748), which is where it stands. Probe before relying on it; do not read the upgrade alone as the constraint now working. Scoping is necessary and not sufficient: it bounds what a job may DO, never whether attacker YAML runs at all, so a self-referencing trigger needs its own filter (`ci-image.yml`, tracked in #744 — deliberately NOT bundled here, because editing that file re-points `ci-image-pin` at the editing commit and reddens a blocking job). A second, separate consequence of the same boundary: `actions/checkout` persists a write-capable credential into `.git/config` unless `persist-credentials: false` is set, and 15 of this repo''s 16 checkouts now set it (#746), `ci-image.yml`''s being excluded for the reason in that section. Ordering is part of the rule: unmask the dependent fetches FIRST, because until then a credential regression presents as an empty changed-file set and a silently skipped check rather than a red job. This record closes ONE route. It does not close the class, and the later sections say exactly what survives — read them before citing this record as a mitigation.'
|
||||
rule: 'Any credential reachable from an Actions job is scoped to what that job needs. The container-registry secret `REGISTRY_PASSWORD` is a personal access token scoped `write:package` + `read:repository` — never an account PASSWORD. This matters because Gitea has NO `status` token scope: `POST /repos/{o}/{r}/statuses/{sha}` is gated by `reqRepoWriter(unit.TypeCode)`, so ANY credential that can write the repository can forge `review-verdict/h10`, the required context that is supposed to make merge-consent derived rather than assertable. Package-write IS a separate scope, so the registry credential can be made status-incapable at no cost: `scripts/ci-detect-already-validated.sh` only GETs. `permissions:` on a workflow/job DOES bind on this instance — MEASURED 2026-08-27 on 1.27.1 by matched scratch-base probe PRs differing only in one unit (`code: write` posted the probe status; `code: read` 403ed the POST, curl exit 22, no status written), so every workflow here now declares it (#748). Two properties that make it usable: the declaration is EXHAUSTIVE, not additive — a unit omitted is not granted — and it binds REGARDLESS of the owner-level default, so it is not conditional on Restricted being enabled. The earlier form of this rule said the opposite ("do NOT add a `permissions:` key on the assumption that it binds — below Gitea 1.26.0 it is silently a NO-OP"); that was correct at 1.25.4 and is retained here only so a reader meeting the old advice recognises it as superseded rather than contradicted. There is still no API surface for the owner-level default (`/api/v1/settings/actions` 404s at 1.27.1). The instance default HAS since been probed and is NOT unknown: it was set to Restricted, verified, and reverted to `permissive` on 2026-08-05 (#748), which is where it stands. Probe before relying on it; do not read the upgrade alone as the constraint now working. Scoping is necessary and not sufficient: it bounds what a job may DO, never whether attacker YAML runs at all, so a self-referencing trigger needs its own filter (`ci-image.yml`, tracked in #744 — deliberately NOT bundled here, because editing that file re-points `ci-image-pin` at the editing commit and reddens a blocking job). A second, separate consequence of the same boundary: `actions/checkout` persists a write-capable credential into `.git/config` unless `persist-credentials: false` is set, and 15 of this repo''s 16 checkouts now set it (#746), `ci-image.yml`''s being excluded for the reason in that section. Ordering is part of the rule: unmask the dependent fetches FIRST, because until then a credential regression presents as an empty changed-file set and a silently skipped check rather than a red job. This record closes ONE route. It does not close the class, and the later sections say exactly what survives — read them before citing this record as a mitigation.'
|
||||
signals: 'admin password in CI secrets, registry credential scope, ETV_STATUS_AUTH can write statuses, forge review-verdict/h10, head-resolved workflow holds credentials, persist-credentials on actions/checkout, credential left in .git/config, masked git fetch yields empty changed set, Gitea token scopes, no status scope, write:package vs write:repository, permissions key no-op, GITEA_TOKEN default read/write, Restricted default token permissions, orphan secret, deploy key in secret store, toolchain image overwrite, prod floating tag write · paths: `.gitea/workflows/docker-build.yml`, `.gitea/workflows/pr-checks.yml`, `.gitea/workflows/dependency-scan.yml`, `.gitea/workflows/ci-image.yml`, `.gitea/workflows/renovate.yml`, `scripts/ci-detect-already-validated.sh` · issues: #697, #672, #698, #742, #743, #746, #748, #835, #420, server-management#714'
|
||||
mechanics: 'PAT `ci-registry-scoped-697`, scopes `write:package,read:repository`, stored as repo Actions secret `REGISTRY_PASSWORD`; `REGISTRY_USER` remains `timothy`. Verified 2026-08-05 on Gitea 1.25.4: registry push of a probe tag SUCCEEDED; `GET /commits/{sha}/status` 200; `POST /statuses/{sha}` REFUSED HTTP 403 `token does not have at least one of required scope(s), required=[write:repository], token scope=write:package,read:repository`. Probe artifacts deleted, confirmed 404. NOT measured with this token: the `container:` pull, the buildcache write and the base-image pull. Those rest on Gitea''s scope model (write implies read per category, read at tag `v1.25.4`) — INFERRED. Note WHICH run proves which: only the `container:` pull is exercised by a PR. `cache-to`/`cache-from` and the base-image pull are confined to the `build` job, which carries `if: github.event_name != ''pull_request''`, so they are first exercised on the post-merge push to `main` — AFTER the merge gate has passed. A wrong inference there reddens main, not the PR.'
|
||||
---
|
||||
@@ -72,9 +72,11 @@ reach the runner's docker daemon.
|
||||
|
||||
**The persisted checkout credential (#746).** `actions/checkout` writes an `Authorization` header
|
||||
into `.git/config` unless `persist-credentials: false` is set, so a job hands that credential to
|
||||
every script it runs, not only to the checkout — and it is write-capable while this instance's
|
||||
Actions default token permission is `permissive` — where it stands after a Restricted trial was
|
||||
reverted on 2026-08-05 (#748). 15 of the repo's 16 checkouts
|
||||
every script it runs, not only to the checkout — and it was write-capable while this instance's
|
||||
Actions default token permission is `permissive` — where that default still stands after a
|
||||
Restricted trial was reverted on 2026-08-05. Since #748 the default no longer decides it:
|
||||
`ci-image.yml` declares `code: read`, so the credential it persists is read-only by declaration
|
||||
rather than by instance setting. 15 of the repo's 16 checkouts
|
||||
now set it: `docker-build.yml` (8), `pr-checks.yml` (5), `dependency-scan.yml` (1) and
|
||||
`review-verdict.yml` (1, pre-existing). No job that checks out pushes with git, so none of them
|
||||
loses a capability; `renovate.yml` does push, but has no checkout step and uses `RENOVATE_TOKEN`.
|
||||
@@ -103,6 +105,17 @@ be written without an exemption list once #744 has landed.
|
||||
docs, NOT verified (2026-08-05): `permissions:` landed in 1.26.0 (Gitea PR #36173); no `app.ini` lever
|
||||
at any version; Gitea rejects GitHub's `statuses`/`checks` scopes.
|
||||
|
||||
MEASURED 2026-08-27 on 1.27.1 (#748), superseding the "honored here is UNPROBED" caveat above: a
|
||||
matched pair of scratch-base probe PRs, identical except for the gate job's single permission unit.
|
||||
`code: write` -> job success, `Posted review-verdict/h10-PROBE=success`, status `creator: null`.
|
||||
`code: read` -> job failure at the POST, `curl` exit 22 (HTTP >=400 under `-f`), NO status written.
|
||||
Both logged `Retarget fence: 0 retarget event(s) ... (trusted=yes)` and both reached the classify
|
||||
step's start marker, so the `issues: read` and `pull-requests: read` units were exercised and
|
||||
neither run was the #751 dropped-step shape. Both ran while the owner default was `permissive`,
|
||||
which is what establishes the declaration is not conditional on Restricted. The negative control is
|
||||
the load-bearing half — without it a green positive is equally consistent with `permissions:` being
|
||||
a no-op beside a permissive default. Probe branches and PRs (#851, #852) deleted after reading.
|
||||
|
||||
**Version caveat — this record's measurements are pinned to 1.25.4, the instance is now 1.27.1.**
|
||||
The instance was upgraded mid-session on 2026-08-05 (#743). Everything above measured on 1.25.4 is
|
||||
therefore a *dated* claim, not a current one: the scope enum, the `reqRepoWriter` gate and the 403
|
||||
@@ -114,13 +127,15 @@ re-probing. Re-verification of the 1.25.4-pinned claims across the CI docs is tr
|
||||
`write:repository` bot PAT in the same store and still cannot be scoped down, because Renovate needs
|
||||
repo write; what changed is that a verdict posted with it is no longer *inherited* — `renovate` is not
|
||||
in `H10_REVIEWERS`, so `review-verdict.yml` re-derives it (#742). It remains status-capable, so it can
|
||||
still overwrite a status; it can no longer impersonate a reviewer. The injected `GITEA_TOKEN` is write-capable in every job;
|
||||
only Gitea >=1.26 with the Actions default set to **Restricted** binds it (server-management#714).
|
||||
Both halves of that condition have now been checked and it does not hold, because of the second one:
|
||||
the version half IS satisfied (1.27.1), while the default was set to Restricted, verified, and
|
||||
reverted to `permissive` on 2026-08-05 because this repo is not ready for it (#748). So the route is
|
||||
open, and open for a known reason rather than an unprobed one — waiting on a further Gitea upgrade
|
||||
would be waiting on the wrong thing. A
|
||||
still overwrite a status; it can no longer impersonate a reviewer. The injected `GITEA_TOKEN` was write-capable in every job.
|
||||
That is no longer the mechanism: #748 declared `permissions:` on all six workflows (2026-08-27), and
|
||||
because the declaration binds irrespective of the owner default, five of them now hold `code: read`
|
||||
and only `review-verdict.yml`'s gate job holds write. The owner-level Restricted default
|
||||
(server-management#714) is therefore no longer what gates this route for THIS repo — it remains
|
||||
worth applying as the instance-wide floor for repos that declare nothing, and it is now safe to
|
||||
apply here, which was the blocker. What is NOT closed: `review-verdict.yml` still holds repo-write,
|
||||
so the property is "only a workflow visibly opting into write can assert the verdict", not "no
|
||||
workflow can". Scoping still bounds what a job may DO, never whether attacker YAML RUNS. A
|
||||
collaborator's own token always can — and after #742 an ALLOW-LISTED collaborator's still is
|
||||
inherited, which is the residual the allow-list explicitly does not touch. `docker-build.yml` publishes `:prod` from a `v*` tag push and a tag
|
||||
may point at ANY commit — a prod image with no PR, review or status (tag protections are empty).
|
||||
|
||||
Reference in New Issue
Block a user