Repository navigation
Conversation
The comment workflow has pull-requests: write but was reading the PR number from an artifact written by the pull_request run, which a fork PR fully controls. A fork could forge the number and have the bot post on any PR in the repo. Now the PR is found by matching the triggering run's head SHA, which GitHub sets, against open PRs. The log body is still attacker-controlled, but at least it can only land on the PR that produced it. Allows dropping the pr_number.txt step from the builder. Since workflow_run only executes the default-branch copy of the comment workflow, putting the verification in that workflow secures it against PRs that try to change it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Now will not fail (potentially silently) because of drift in definition of DOCS_FAILURE_ARTIFACT between the two workflows.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
samsrabin
marked this pull request as draft
November 2, 2026 19:49
samsrabin
force-pushed
the
more-workflow-improvements
branch
from
November 2, 2026 19:56
ca353d2 to
6025d62
Compare
samsrabin
marked this pull request as ready for review
November 2, 2026 19:57
Member
Author
|
@nusbaume This is ready for integration! I just cherry-picked stuff from the CTSM repo, so it should all work. |
nusbaume
self-requested a review
November 5, 2026 20:21
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bringing in some improvements from the CLM tutorial repo:
--nitpick).