Dashboard › publish › Distillation
f99d8aab-a8d9-463d-8ba1-a9bc76e060a7["lore_tm_v1_ZdOZK4oNFPtY7Pt9ksWYCOCBAncYg_t4nrVfThNh7bw","lore_tm_v1_TuiI0rKsvWJBKfNmhp_-f4jU0tK3yuKIuRCSD-2asfg","lore_tm_v1_QexhPMNODdTzWaJ7NC8jIUSxd30yXm2nfoPnsOdK2do","lore_tm_v1_ZsYEsMHsf9XaoFRNyD8aawgOgmIhAxi_swTTfTmts8I","lore_tm_v1_Cf1V1KF-3PMWtNJwVlSNwI_qO4a09PS5GndmY_qCvm8","lore_tm_v1_O-BDstjJFTu5jBEJAQ_TmDo1iU5foPk6UQTg_nt0l_I","lore_tm_v1_3JcU16igb7thbZj1xLQH2jGV4Lff11PpEFpdD1_CjoY","lore_tm_v1_pu6qQpSN9oXbtFvKw98wEiIYK1iSksi9G6I8y5u4hDc","lore_tm_v1_TY09tf6oPiVW5JOxYBmM5wE48ydZDLP_a9vO80lPLdg","lore_tm_v1_XidWGf01lFuDFDPkt8vOCoWisPpaH9YFWXVRC1BV8ls"]
Date: Aug 28, 2026
task_result; assistant nevertheless identified two security races: an unproven ci-ready label can initiate publishing, and re-approval can occur between the CI poller’s final validation and its label transition.accepted event and require that proof before publication.ci-ready..github/workflows/ci-poller.yml excerpts. The workflow triggers on issues labeled events; has waiting-for-ci and production-environment jobs; uses actions/create-github-app-token@v3; invokes approval validation with APPROVAL_ISSUE_REPOSITORY: ${{ github.repository }}, APPROVAL_ISSUE_NUMBER: ${{ github.event.issue.number }}, and APPROVAL_TOKEN: ${{ github.token }}; rejects invalid approvals by commenting “Approval is invalid or could not be verified. Re-add the accepted label to retry after resolving the issue.”; and includes a comment that the poller’s later --add-label is guaranteed to trigger on the happy path.ci-ready.200 open issues; before initial CI processing calls node src/publish/validate-approval-attestation.js; extracts an issue SHA via grep -oP '(?<=commit/)[0-9a-f]{40}(?=/checks)'; evaluates commit statuses and check runs; and, after CI is ready, revalidates approval immediately before adding ci-ready. On failed revalidation it comments and avoids the transition; on success it logs CI passed! Adding ci-ready label.accepted event and title; the poller will create this CI-ready proof before applying ci-ready; publication will require both approval proof and CI-ready proof.src/publish/validate-approval-attestation.js (119 lines). validateApprovalAttestation({ attestationAuthor, issueNumber, issueTitle, repository }) concurrently retrieves the issue, all events, and all comments; requires the fetched title to equal issueTitle, an active accepted label, a non-null currentAcceptedEvent(events), and a matching trusted approval attestation. GitHub API calls use APPROVAL_TOKEN, Accept: application/vnd.github+json, and X-GitHub-Api-Version: "2026-03-10"; paginated records use per_page=100; required CLI environment variables are APPROVAL_TOKEN, APPROVAL_ISSUE_NUMBER, APPROVAL_ISSUE_REPOSITORY, APPROVAL_ISSUE_TITLE, and APPROVAL_ATTESTATION_AUTHOR.src/modules/approval-attestation.js (108 lines). It used ATTESTATION_PREFIX = "<!-- publish-approval " and ATTESTATION_SUFFIX = " -->"; createApprovalAttestation() base64url-encoded { actor, eventId: String(eventId), title }; currentAcceptedEvent() selected the numerically latest valid accepted label event; and hasApprovalAttestation() required a trusted comment whose parsed actor, event ID, and title exactly match the current accepted event and issue title.src/modules/approval-attestation.js.src/modules/approval-attestation.js (190 lines). It adds APPROVAL_ATTESTATION_PREFIX = "<!-- publish-approval ", CI_READY_ATTESTATION_PREFIX = "<!-- publish-ci-ready ", generic createAttestation(prefix, value), createCiReadyAttestation({ acceptedEvent, ciReadyEvent, title }), parseCiReadyAttestation(), currentLabeledEvent(events, labelName), currentCiReadyEvent(events), and hasCiReadyAttestation({ comments, acceptedEvent, ciReadyEvent, title, attestationAuthor }). A valid CI-ready attestation must bind acceptedActor, acceptedEventId, ciReadyActor, ciReadyEventId, and title to the current events and title, and be posted by attestationAuthor.src/modules/approval-attestation.js: generic parseAttestation(body, prefix) slices the encoded body starting at start + ATTESTATION_PREFIX.length, but ATTESTATION_PREFIX no longer exists after the constants were renamed to APPROVAL_ATTESTATION_PREFIX and CI_READY_ATTESTATION_PREFIX; it should use prefix.length. As shown, parsing either attestation would throw a ReferenceError, be caught, and return null, causing approval/CI-ready attestations to fail validation. No fix or test result for this defect was shown.