You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Harden pull-request webhook deliveries on GitLab, Gitea and Bitbucket #16097
Harden how VCS webhook deliveries are trusted on providers whose webhook secret is instance-wide: GitLab, Gitea/Gogs/Forgejo and Bitbucket.
The shared deployment path checks that a push delivery's commit is the provider's current branch head before it builds. That check does not run for pull-request deliveries. Pull-request deliveries never create a deployment, so no build or live deployment is affected. They can still lead to a PR comment and a commit status being written for the repository named in the delivery.
Tracks code scanning alert 4980, dismissed as hardening tracked here.
Proposed hardening
Compute the external flag on the server, from the provider's own pull-request record, instead of trusting the parsed delivery body.
In the GitLab, Gitea and Bitbucket adapters, treat a delivery that omits repository identifiers as external rather than internal.
Extend the branch-head check to pull-request deliveries, so every delivery shape enforces the same invariant.
Scope the repository lookup by the owning project or installation, so a delivery cannot name another project's repository.
Add a regression test on the shared deployment trait that covers both delivery shapes.
Context
Push-delivery verification against the branch head is already in place.
GitHub deliveries are signed per installation, so the gap applies only to the providers listed above.
Activity