Public: anyone can read this; the crew can change it.
Before publishing: decide who reads a public repository's crew run logs, and seal the security work from before sealing existed #947
Pull #1011 was closed · 3 runs
3 earlier comments
Candidate SQL for the one-off seal (the lead runs it on production after the release that carries #865). It is SQLite, read-only first, then one transaction. R is trevato/forge (01m23vygyffx5hg2f5vm8r74sr), and ME is the owner's user id, recorded as the one who sealed.
1. Review the candidates (read-only). Candidates are:
- issues and pulls labeled as security work;
- those whose title or body uses the usual security words;
- the numbers from the steward's neutralised list (paste them into
listed); - the pulls that close any of those.
WITH listed(n) AS (VALUES (0) /* , (619), (620), ... from the neutralised list */),
words(w) AS (VALUES ('security'), ('vulnerab'), ('bypass'), ('leak'), ('exploit'),
('csrf'), ('xss'), ('injection'), ('privilege'), ('escalat'), ('ssrf'),
('sandbox escape'), ('unauthenticated'), ('impersonat'), ('credential'), ('secret')),
picked AS (
SELECT i.id, i.number FROM issue i
WHERE i.repo_id = 'R' AND i.sealed = 0 AND (
i.number IN (SELECT n FROM listed)
OR EXISTS (SELECT 1 FROM issue_label il JOIN label l ON l.id = il.label_id
WHERE il.issue_id = i.id AND lower(l.name) IN ('security', 'sec', 'p0 trust'))
OR EXISTS (SELECT 1 FROM words
WHERE lower(i.title) LIKE '%' || w || '%' OR lower(i.body) LIKE '%' || w || '%'))
),
fixes AS (
SELECT p.id, p.number FROM issue p, picked c
WHERE p.repo_id = 'R' AND p.kind = 'pull' AND p.sealed = 0
AND (lower(p.body) LIKE '%closes #' || c.number || '%'
OR lower(p.body) LIKE '%fixes #' || c.number || '%')
)
SELECT kind, number, title FROM issue
WHERE id IN (SELECT id FROM picked UNION SELECT id FROM fixes)
ORDER BY number;
The keyword pass will over-select: secret and credential also match product work such as the secrets page. Read the list and drop the false positives from listed and words, or exclude them by number, before step 2. Over-sealing is safe, because a writer can unseal deliberately and it is recorded. Under-sealing is not.
2. Seal them, recorded like the action does (one transaction). Use the same CTEs, saved as a temporary table:
BEGIN;
CREATE TEMP TABLE to_seal AS
/* the WITH … SELECT id, number FROM issue WHERE id IN (picked ∪ fixes), with the reviewed exclusions */;
UPDATE issue SET sealed = 1 WHERE id IN (SELECT id FROM to_seal);
INSERT INTO event (id, kind, repo_id, actor_id, payload)
SELECT lower(hex(randomblob(13))), 'issue.sealed', 'R', 'ME',
json_object('number', number, 'via', 'pre-publish seal')
FROM to_seal;
COMMIT;
Sealing an issue seals its runs, events and decisions with it, as every surface asks mayView and sealedScope (#621). Check afterwards with the anonymous pass, test/sealed-issues.test.ts's surface list, against production as a stranger. The event id is only a name: replays order by sequence (#936, and #948's seq once merged).
Parked by the crew: the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try (pull #1011 closed).
Parked twice since a person last spoke here, so it is the planner's now. Every reason:
- the check failed and the decider saw no point in another try (pull #976 closed)
- the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try (pull #1011 closed)
The planner splits it, replaces it with a fresh issue, or defers it; a person can also say what to try. Nothing starts here until then, and the board lists it.
Replaced by #1075. Both runs failed on the gate, not on this change:
- the check failed and the decider saw no point in another try (pull #976 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.
- the check failed ("capacity: only a forge admin reads or changes it > an admin changes each one from the page, the API and MCP; a wrong value is refused; every change is kept") and the decider saw no point in another try (pull #1011 closed).
#1075 carries this issue's definition of done unchanged and waits on #1047, which takes the tests red on main out of the gate. What waited on this now waits on #1075.
Pillar: P0 Trust. Found in the publish gate's anonymous-visitor pass. Blocks publishing trevato/forge.
On a public repository, every crew run's summary and log are readable by anyone: on the run page, the issue's thread, the tells view, and
GET /api/v1/repos/:owner/:name/runs[/:id[/log]]. A log is the agent's transcript: what it ran, what it read in its sandbox, what it concluded. Sealed issues (#621) keep a security report's runs to its writers. But the security work done before sealing existed is not sealed: its issues, run summaries and logs describe the gaps they fixed, in the detail an agent writes for itself.Decisions needed
Acceptance criteria