Skip to content

Commit 0fad5f9

Browse files
authored
Merge branch 'master' into update-xenial
2 parents 9c176cc + 859062b commit 0fad5f9

12 files changed

+522
-14
lines changed

_data/snippets.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@ concurrent_jobs: |
7272
7373
- if your build depends on an external resource and might run into a race
7474
condition with concurrent jobs.
75+
enabling_access_jobs_logs: |
76+
This setting allows you to increase security by preventing access to old job logs older than 360 days. Or, in the case of a necessity, users can explicitly enable access to public and private old job log repositories.
77+
78+
The following are the available configurations:
79+
* If this setting is ON, it enables access to build job logs older than 365 days.
80+
* If this setting is OFF, access to build job logs older than 365 days is unavailable via UI or API calls.
81+
limiting_access_jobs_logs: |
82+
Similarly, this setting allows you to restrict access to build job logs for any user without write/push access rights to the repository. Limit job log visibility to only those that needed it. Enable this setting and ensure job logs are only available to users with respective read or write access to the individual repository.
83+
84+
The following are the available configurations:
85+
* If this setting is ON, it allows access to build job logs only for users with write/push permissions to this repository. Limits access to build job logs via UI and API.
86+
* If this setting is OFF, users with read access to the repository can access the build job logs.
87+
88+
Please note that the '*Limiting access to build job logs*' repository setting applies only to users with ‘write/push’ permissions.
7589
auto_cancellation: |
7690
If you are only interested in building the most recent commit on each branch you can use this new feature to automatically cancel older builds that are in the **queued** state and are not yet running.
7791
cron_jobs: |
@@ -162,9 +176,9 @@ git_repository_settings_forks_general: |
162176
163177
For Git repositories, you may manage per repository how the [environment variables](/user/environment-variables/) and the [custom SSH keys](/user/private-dependencies/#user-key) will be handled in Travis CI when a build triggered as an effect of filing a Pull Request from a forked repository. Two settings are available specifically for this purpose, allowing you to customize your security vs. collaboration setup.
164178
165-
**base repository** - a Git repository, which is forked by someone else
166-
**fork** or **forked repository** - any Git repository forked from the **base repository**
167-
**PR** - Pull Request (e.g. in GitHub, BitBucket, GitLab) or Merge Request (in Assembla).
179+
* **base repository** - a Git repository, which is forked by someone else
180+
* **fork** or **forked repository** - any Git repository forked from the **base repository**
181+
* **PR** - Pull Request (e.g. in GitHub, BitBucket, GitLab) or Merge Request (in Assembla)
168182
169183
> Please note: Repositories activated in [Travis CI](https://app.travis-ci.com ) before **March 1st, 2022** will have the `Share encrypted environment variables with forks (PRs) ` setting set to OFF. Please verify your collaboration model if necessary (especially for public repositories). The `Share SSH keys with forks (PRs)` will be set to ON for private repositories not to break too many collaboration setups.
170184
Repository settings will be set by default to OFF for any repository activated in [Travis CI](https://app.travis-ci.com) after **March 1st, 2022**. For repositories activated in Travis CI after **March 1st, 2022**, you may want to consider changing the default settings depending on your collaboration model.

_data/xcodes.yml

Lines changed: 104 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,112 @@
11
osx_images:
2+
- image: xcode14.2
3+
xcode: "14.2"
4+
osx_version: "12.6"
5+
xcode_full_version: "14.2"
6+
xcode_build_version: "14C18"
7+
image_publish_date: 2023-01-06
8+
sdks:
9+
- iphoneos16.2
10+
- iphonesimulator16.2
11+
- macosx13.1
12+
- appletvos16.1
13+
- appletvsimulator16.1
14+
- watchos9.1
15+
- watchsimulator9.1
16+
simulators:
17+
- iOS 15.0
18+
- iOS 15.2
19+
- iOS 15.4
20+
- iOS 15.5
21+
- iOS 16.0
22+
- iOS 16.2
23+
- tvOS 14.5
24+
- tvOS 15.0
25+
- tvOS 15.2
26+
- tvOS 15.4
27+
- tvOS 16.0
28+
- tvOS 16.1
29+
- watchOS 7.4
30+
- watchOS 8.0
31+
- watchOS 8.3
32+
- watchOS 8.5
33+
- watchOS 9.0
34+
- watchOS 9.1
35+
jdk: "19.0.1"
36+
- image: xcode14.1
37+
xcode: "14.1"
38+
osx_version: "12.6"
39+
xcode_full_version: "14.1"
40+
xcode_build_version: "14B47b"
41+
image_publish_date: 2022-11-11
42+
sdks:
43+
- iphoneos16.0
44+
- iphonesimulator16.0
45+
- macosx12.3
46+
- appletvos16.0
47+
- appletvsimulator16.0
48+
- watchos9.0
49+
- watchsimulator9.0
50+
simulators:
51+
- iOS 15.0
52+
- iOS 15.2
53+
- iOS 15.4
54+
- iOS 15.5
55+
- iOS 16.0
56+
- iOS 16.1
57+
- tvOS 14.5
58+
- tvOS 15.0
59+
- tvOS 15.2
60+
- tvOS 15.4
61+
- tvOS 16.0
62+
- tvOS 16.1
63+
- watchOS 7.4
64+
- watchOS 8.0
65+
- watchOS 8.3
66+
- watchOS 8.5
67+
- watchOS 9.0
68+
- watchOS 9.1
69+
jdk: "19.0.1"
70+
- image: xcode14
71+
xcode: "14"
72+
osx_version: "12.6"
73+
xcode_full_version: "14.0.1"
74+
xcode_build_version: "14A400"
75+
image_publish_date: 2022-10-27
76+
sdks:
77+
- iphoneos16.0
78+
- iphonesimulator16.0
79+
- macosx12.3
80+
- appletvos16.0
81+
- appletvsimulator16.0
82+
- watchos9.0
83+
- watchsimulator9.0
84+
simulators:
85+
- iOS 14.5
86+
- iOS 15.0
87+
- iOS 15.2
88+
- iOS 15.4
89+
- iOS 15.5
90+
- iOS 16.0
91+
- tvOS 14.4
92+
- tvOS 14.5
93+
- tvOS 15.0
94+
- tvOS 15.2
95+
- tvOS 15.4
96+
- tvOS 16.0
97+
- watchOS 7.2
98+
- watchOS 7.4
99+
- watchOS 8.0
100+
- watchOS 8.3
101+
- watchOS 8.5
102+
- watchOS 9.0
103+
jdk: "19"
2104
- image: xcode13.4
3105
xcode: "13.4"
4106
osx_version: "12.4"
5107
xcode_full_version: "13.4.1"
6108
xcode_build_version: "13F100"
7-
image_publish_date: 2021-06-08
109+
image_publish_date: 2022-06-08
8110
sdks:
9111
- iphoneos15.5
10112
- iphonesimulator15.5
@@ -37,7 +139,7 @@ osx_images:
37139
osx_version: "12.3"
38140
xcode_full_version: "13.2.1"
39141
xcode_build_version: "13E113"
40-
image_publish_date: 2021-03-23
142+
image_publish_date: 2022-03-23
41143
sdks:
42144
- iphoneos15.4
43145
- iphonesimulator15.4

_includes/sidebar.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,9 @@ <h3>Encrypting Files and Data</h3>
108108
<li><a href="/user/bb-oauth-scopes/">Bitbucket Permissions used by Travis CI</a></li>
109109
<li><a href="/user/assembla-oauth-scopes/">Assembla Permissions used by Travis CI</a></li>
110110
<li><a href="/user/gl-oauth-scopes/">GitLab Permissions used by Travis CI</a></li>
111+
<li><a href="/user/disable-job-logs/">Disable Job Logs Availability</a></li>
111112
<li><a href="/user/best-practices-security/">Best Practices in Securing Your Data</a></li>
113+
<li><a href="/user/securely-signing-software">Securely Signing Software</a></li>
112114
</ul>
113115

114116
<h3>Integrations and Notifications</h3>
@@ -126,6 +128,7 @@ <h3>Integrations and Notifications</h3>
126128
<li><a href="/user/build-feeds/">Atom Feeds</a></li>
127129
<li><a href="/user/cc-menu/">CCMenu / CCTray Feeds</a></li>
128130
<li><a href="/user/integration/platformio/">Embedded Builds with PlatformIO</a></li>
131+
<li><a href="/user/hashicorp-vault-integration">Hashicorp Vault</a></li>
129132
<li><a href="/user/apps/">3rd Party Apps, Clients and Tools</a></li>
130133
</ul>
131134

user/best-practices-security.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@ Please make sure your secret is never related to the repository or branch name,
1313

1414
> The beta Windows support does not obfuscate secure environment variables leaked into the build log. Please keep reading the next section, [on how to avoid leaking secrets to build logs](https://docs.travis-ci.com/user/best-practices-security/#recommendations-on-how-to-avoid-leaking-secrets-to-build-logs)
1515
16+
### Log Scans
17+
18+
Travis CI has also enabled a mandatory post-job log scan in an attempt to find any other potential leakage of secrets. These scans are carried out on the the raw job log files shortly after the build job is completed. Scans are executed using [Trivy](https://github.com/aquasecurity/trivy) and [detect-secrets](https://github.com/Yelp/detect-secrets), Open Source scanners made available by their maintainers via means of a permissive OSS license. If the scanning process finds an unmasked secret-like entry in the job log, Travis CI, as a precautionary action, will mask the full line in the job log with asterisks (`*`) and produce a log scan report, available to the repository administrators for 7 days.
19+
20+
The job log scan report contains details on found potential secrets, referring to the line numbers in the **raw** job log file, and is meant to help review and find the source of the possible leak and if this proves to be an actual exposition of the secret, the scan fixes that.
21+
22+
When the additional post-job scanning process finds a potential leak in the build-job log, a graphical status in the Travis CI Web UI will present the log scan results. The *log scan: failing* is displayed over the repository page and in the dashboard for the next 7 days or until at least one of the repository administrators visits the job log scan report page, whichever condition is satisfied first.
23+
24+
Since the job log scan is executed by the tools looking for secret-like entries, the notifications must be treated as a warning about the **potential** issue and verified by the repository administrator. Therefore, we recommend the following verification steps:
25+
26+
* Reviewing the exact build instructions in the repository `.travis.yml` file (particularly if any unencrypted secrets are used) and build scripts called from within the `.travis.yml` recipe.
27+
* Re-running suspicious jobs and reviewing the build job log on the go. Particularly around the preemptively censored area (please mind it will re-trigger the job log scan and any potential notifications in the process).
28+
29+
> Please note: The scan results may produce false positives and/or miss some items due to the nature of the scanners (searching for secret-like patterns). This is continuous work, and we expect it to improve over time based on findings and feedback. Also, we closely monitor the number of warnings raised by the job log scan process and decide later on to enable respective email notifications on top of existing visual indicators.
30+
31+
1632
## Recommendations on how to avoid leaking secrets to build logs
1733
Despite our best efforts, there are however many ways in which secure information can accidentally be exposed. These vary according to what tools you are using and what settings you have enabled. Some things to look out for are:
1834

@@ -31,6 +47,30 @@ Preventing commands from displaying any output is one way to avoid accidentally
3147
git push url-with-secret >/dev/null 2>&1
3248
```
3349

50+
While using Travis CI, you may want to consider the additional means to decrease the risk of exposing secrets in the build job logs:
51+
52+
### Always use encrypted secrets
53+
Travis CI offers the ability to either [encrypt your secret](/user/encryption-keys/) with the Travis-CLI (command line interface tool) or define the secret in the [Travis CI Repository Settings](/user/environment-variables/#defining-variables-in-repository-settings).
54+
55+
Shall the secret be stored in an encrypted file within your source code repository, you may instead [encrypt a file with a secret](/user/encrypting-files/) and use it during the build job. Decrypt your file for the shortest time needed and remove any temporary environment variables from the build job environment as soon as these are not necessary.
56+
57+
Please mind that at some point, the secret, in order to be used, must be decrypted for the build job environment. Thus debug outputs to the standard outputs may still result in secret exposure. The additional post-job log scanning process is meant to find these as much as possible.
58+
59+
### Use the Hashicorp Vault KMS integration
60+
If you manage your secrets using the Hashicorp Vault KMS (Key Management System), then you may use the existing [Travis CI - Hashicorp integration](/user/hashicorp-vault-integration) to obtain secrets directly to the build job.
61+
62+
Again, please be wary of any possible debug outputs to the standard outputs in the build job environment. The additional post-job log scanning process is meant to find these as much as possible. The advantage of pulling the secret from a KMS managed by you is the ability to rotate it from a single secret repository in case of any incident. We strongly recommend using Hashicorp Vault credentials limited to a specific set of CI/CD-related secrets to limit the threat scope for the KMS.
63+
64+
### Limit access to the job logs
65+
Review who and why should have access to the build job logs and set the appropriate options in the [Travis CI Repository Settings](/user/disable-job-logs/).
66+
67+
### Review the settings for builds triggered from forked Git repositories
68+
Review the [Travis CI Repository Settings](/user/pull-requests#pull-requests-and-security-restrictions) and adjust what should be shared with forks. This is meant for a collaboration pattern when a forked repository can file a Pull Request to the base repository, thus triggering a CI/CD build job with automated build and tests as a part of the Pull Request validation and approval process. Assess the risks and adjust settings to your scenario.
69+
70+
### Run builds requiring secrets in private repositories
71+
If this is a viable option, consider running builds requiring the usage of secrets as a CI/CD for private repositories with a carefully reviewed collaborator list. Combined with the above options, it should decrease the risk of secret exposition in the build job log.
72+
73+
3474
## If you think that you might have exposed secure information
3575

3676
As an initial step, it’s possible to delete logs containing any secure information by clicking the *Remove log* button on the build log page of Travis CI.

user/build-config-imports.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,23 @@ import:
218218
```
219219
{: data-file=".travis.yml"}
220220

221+
This mode first merges your `.travis.yml` contents into the `one.yml` file (i.e., items in the .travis.yml file “win”, if the merge mode deep_merge would be used and will overwrite keys on respective levels in `one.yml`).
222+
223+
Respectively:
224+
225+
```yaml
226+
import:
227+
- source: one.yml
228+
mode: deep_merge # deep merge
229+
- source: two.yml
230+
mode: deep_merge # deep merge
231+
```
232+
{: data-file=".travis.yml"}
233+
234+
This mode first merges your `.travis.yml` contents into the `one.yml` file (overwriting, if required, sections in `one.yml` with content from `.travis.yml`). The results are merged into the `two.yml` file (again, items in the result of the previous merge win over what’s in this one, as the `deep_merge` mode is specified here).
235+
236+
The reasoning behind this is that in many cases when you import something to your `.travis.yml’ file, you want to be able to overwrite or customize that imported configuration with config in your `.travis.yml` file.
237+
221238
### Merge
222239

223240
The merge mode `merge` performs a shallow merge.
@@ -239,4 +256,19 @@ When triggering a build through the Travis API or the web UI, the order of ascen
239256
- Config from the API build request payload, if given
240257
- Imported configs from the API build request payload, if given, in the order listed (following a depth-first search pattern in case those imported configs import other configs)
241258
- Config from `.travis.yml`
242-
- Imported configs from `.travis.yml`, in the order listed (following a depth-first search pattern in case those imported configs import other configs)
259+
- Imported configs from `.travis.yml`, in the order listed (following a depth-first search pattern in case those imported configs import other configs).
260+
261+
## FAQ
262+
263+
### Can I import a shared build config at a specific job level?
264+
265+
No. The parsed YAML trees must be merged. Thus, the `import` keyword is accepted only at the root level. If it suits your scenario, you can specify your job template in, e.g., `job.yml` and import it into your `.travis.yml` with the `mode: deep_merge`, adding in the `.travis,yml` specifics to be overridden in the imported template.
266+
267+
### Is it possible to create and use anchors via the shared configs mechanism?
268+
269+
Unfortunately, it’s not supported.
270+
As much as we encourage [using YAML as a build configuration language](/user/build-config-yaml), anchors and aliases, referring to these anchors must be defined and used within a single `.yml` file and will be expanded before any *import* action (merging parse trees) occurs. For the same reason, attempts to assign an anchor within `.travis.yml` to an *imported* key will not work — both `.travis.yml` and `imported.yml` must be parsed before the merge action can occur.
271+
272+
See also *native-api* concise [explanation in the Community Forum](https://travis-ci.community/t/imported-anchors-not-working/10035/2)
273+
274+

user/conditional-builds-stages-jobs.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ You can find more information on the build config format in our [Travis CI Build
1111

1212
You can configure Travis CI to only run builds when certain conditions are met. Any builds that do not meet these conditions are listed in the *Requests* tab of your repository, even though the actual build is not generated.
1313

14+
> Travis CI’s system fetches and processes the .travis.yml config file from the repository and the branch explicitly specified in the build request
15+
1416
For example, this allows builds only to run on the `master` branch:
1517

1618
```yaml

0 commit comments

Comments
 (0)