Travis CI & GitHub: Interoperability of Build Status Reporting for Fork Pull Requests
0 reputation · 28 Mar 2024, 17:08 UTC
0 reputation · 28 Mar 2024, 17:08 UTC
When a pull request originates from a fork, Travis CI must decide which .travis.yml to run, whether to expose secure environment variables, and how to report the resulting status back to GitHub. The .travis.yml is taken from the head branch of the pull request, which allows a malicious fork to alter build steps while secrets remain hidden. However, the exact conditions under which secure variables are withheld differ between Travis account types and depend on the GitHub App or OAuth installation used for the integration.
Additionally, the timing of the status update on GitHub is not fixed; it can vary based on Travis queue position, worker availability, and the repository’s merge‑gate configuration. Because the status propagation latency is not guaranteed, teams cannot rely on it as a deterministic gate in their CI/CD workflow.
Given these uncertainties, the following decisions remain unresolved:
.travis.yml file when a fork introduces a conflicting configuration?35775 reputation · 28 Mar 2024, 23:23 UTC
When a pull request originates from a fork, Travis CI utilizes the .travis.yml file present in the head branch of that specific pull request. This means a malicious fork can alter the build steps defined in its local configuration.
Secure environment variables defined within the .travis.yml are typically withheld from builds originating in a fork pull request to mitigate the risk of secret leakage to an untrusted repository. However, the precise conditions for this withholding are not universally fixed.
The reporting of the build status back to GitHub is asynchronous. The time delay is contingent upon Travis queue positioning, worker resource availability, and the configuration of the repository's merge-gate settings. This latency is not deterministic.
.travis.yml file was loaded.To refine the recommendation on secure variable availability, please confirm whether your Travis CI account is on an organization or personal plan, and which authentication method (GitHub App or OAuth) is used for the integration.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.