shuke987 opened a new pull request, #71037:
URL: https://github.com/apache/doris/pull/71037

   ### Background
   
   GitHub Actions requests a short-lived OIDC token to submit approved TeamCity 
builds to Function Compute (FC). The repository variable 
`TEAMCITY_FC_TRIGGER_URL` supplies the destination.
   
   ### What problem does this PR solve?
   
   Issue Number: None
   Related PR: #70984
   PR Type: Build/CI/Chore
   
   Problem Summary:
   
   The submission helper accepted any HTTPS host with the path `/trigger`. A 
typo in the host could send the token to a different service. Check the full 
URL against the approved Hong Kong FC endpoint before requesting the token.
   
   ### Details
   
   - **Affected** — The Bash submission helper used by the comment-triggered 
TeamCity workflow and its Python tests.
   - **Behavior change:** An empty or mismatched URL stops submission before 
either HTTP request. The configured production URL continues to work.
   - **Developer and release impact:** Migrating the endpoint requires updating 
the pinned URL and its test in a reviewed change alongside the repository 
variable.
   - **CI permissions and secrets:** The existing job requests the same OIDC 
audience. The change restricts where the token can be sent.
   - **License and third-party** — None.
   - **Rollback** — Revert the change to restore the previous URL validation.
   
   ### Testing
   
   - On macOS, the new test failed against the original helper when an 
alternate HTTPS host reached the mocked HTTP client. All 21 helper and workflow 
tests passed with the fix. The tests cover an empty value, a different host, a 
trailing slash, a query string, plain HTTP, and successful submission to the 
approved URL using a mock.
   - `bash -n` and `git diff --check` passed.
   
   ### Release note
   
   None.
   
   ### Check List (For Author)
   
   - Behavior changed: Yes (TeamCity submission accepts only the approved FC 
endpoint)
   - Does this need documentation: No
   - Pre-submission status: Ready. Verified locally with mocked HTTP. A live 
build was outside the scope of this change.
   
   ### AI Disclosure
   
   - Tool: OpenAI Codex
   - Generated: Shell change, tests and PR description.
   - Human review: Pending.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to