Skip to content

Restrict ListBuilds link metadata targets to the bucket being listed - #1364

Merged
google-oss-prow[bot] merged 1 commit into
GoogleCloudPlatform:mainfrom
soumyadeeppaulsp:restrict-listbuilds-link-bucket
Nov 30, 2026
Merged

google-oss-prow[bot] merged 1 commit into
GoogleCloudPlatform:mainfrom
soumyadeeppaulsp:restrict-listbuilds-link-bucket

Conversation

@soumyadeeppaulsp

Copy link
Copy Markdown
Contributor

In gcs.ListBuilds, ignore x-goog-meta-link / link object metadata URLs that fail url.Parse, use a non-gs scheme, have an empty host, target a bucket other than gcsPath.Bucket(), or fail Path.SetURL.

This prevents untrusted object metadata from breaking build listing or redirecting the updater across buckets or to non-GCS schemes.

Testing

  • go test ./util/gcs/...
  • go test ./pkg/updater -run TestListBuilds

In gcs.ListBuilds, ignore x-goog-meta-link or link object metadata URLs
that fail to parse, use a non-gs scheme, have an empty host, target a
bucket other than gcsPath.Bucket(), or fail Path.SetURL. This prevents
untrusted object metadata from failing ListBuilds for the test group or
redirecting the TestGrid updater across buckets or to non-GCS schemes.
@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: saurik-saha, soumyadeeppaulsp

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow
google-oss-prow Bot merged commit 3d50f2d into GoogleCloudPlatform:main Nov 30, 2026
9 checks passed
@soumyadeeppaulsp
soumyadeeppaulsp deleted the restrict-listbuilds-link-bucket branch November 30, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants