Skip to content

ci: gate fork followers on artifact presence, not actor - #360

Merged
AndreasIgel merged 1 commit into
java-helpers:mainfrom
igel-devin-ai:feature/follower-artifact-gate
Oct 22, 2026
Merged

AndreasIgel merged 1 commit into
java-helpers:mainfrom
igel-devin-ai:feature/follower-artifact-gate

Conversation

@igel-devin-ai

Copy link
Copy Markdown
Contributor

Fixes the two githubactions:S8232 MAJOR findings SonarCloud reported on #357's merge: the job if used github.event.workflow_run.actor.login, a forgeable event context value, for a trust decision.

Fix: instead of checking who triggered the run, gate on what it produced. A small gate job in fork-sonar.yml (analysis-inputs) and fork-coverage.yml (coverage-payload) lists the completed CI run's artifacts via the Actions API and outputs present; the real job runs through needs: only when the artifact exists and is unexpired.

This subsumes the previous actor check and is more correct generally: any skipped build job (not just igel-devin-ai's opened runs) concludes success but produces no artifacts, so the followers now skip cleanly in every such case. jq logic verified locally (present / absent / expired-artifact cases).

SonarCloud githubactions:S8232 flags gating job execution on
forgeable github.event.workflow_run context (actor.login). Gate on a
fact of the completed run instead: a gate job checks whether the CI
run produced its artifact (sonar-analysis-inputs / codecov-payload)
via the Actions API, and the real job only runs through needs: when
it exists. This covers any skipped CI run - including the ones the
igel-devin-ai actor guard produces - rather than just that actor.
@AndreasIgel
AndreasIgel merged commit 010450c into java-helpers:main Oct 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants