Skip to content

Commit 0218056

Browse files
pargraph replacing to appropriate section
1 parent f513a5b commit 0218056

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

user/best-practices-security.md

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -46,26 +46,7 @@ Preventing commands from displaying any output is one way to avoid accidentally
4646
git push url-with-secret >/dev/null 2>&1
4747
```
4848

49-
## If you think that you might have exposed secure information
50-
51-
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.
52-
53-
![remove log button](/images/remove-log.png "remove log button")
54-
55-
If you discover a leak in one of your build logs it’s essential that you revoke the leaked token or environment variable, and update any build scripts or commands that caused the leak.
56-
57-
### Alternative methods of deleting logs
58-
59-
Instead of deleting build logs manually, you can do so using the [Travis CI CLI](https://github.com/travis-ci/travis.rb#logs) or the [API](https://developer.travis-ci.com/resource/log#delete).
60-
61-
> Note that if you're still using [travis-ci.org](http://www.travis-ci.org) you need to use the [open source API](https://developer.travis-ci.org/resource/log#delete) instead.
62-
63-
## Rotate tokens and secrets periodically
64-
Rotate your tokens and secrets regularly. GitHub OAuth tokens can be found in your [Developer Settings](https://github.com/settings/developers) on the GitHub site. Please regularly rotate credentials for other third-party services as well.
65-
66-
## How to prevent secrets from being exposed in the build job logs
67-
68-
While using Travis CI, you may want to consider the following means to decrease the risk of exposing secrets in the build job logs:
49+
While using Travis CI, you may want to consider the additional means to decrease the risk of exposing secrets in the build job logs:
6950

7051
### Always use encrypted secrets
7152
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).
@@ -89,6 +70,23 @@ Review the [Travis CI Repository Settings](/user/pull-requests#pull-requests-and
8970
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.
9071

9172

73+
## If you think that you might have exposed secure information
74+
75+
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.
76+
77+
![remove log button](/images/remove-log.png "remove log button")
78+
79+
If you discover a leak in one of your build logs it’s essential that you revoke the leaked token or environment variable, and update any build scripts or commands that caused the leak.
80+
81+
### Alternative methods of deleting logs
82+
83+
Instead of deleting build logs manually, you can do so using the [Travis CI CLI](https://github.com/travis-ci/travis.rb#logs) or the [API](https://developer.travis-ci.com/resource/log#delete).
84+
85+
> Note that if you're still using [travis-ci.org](http://www.travis-ci.org) you need to use the [open source API](https://developer.travis-ci.org/resource/log#delete) instead.
86+
87+
## Rotate tokens and secrets periodically
88+
Rotate your tokens and secrets regularly. GitHub OAuth tokens can be found in your [Developer Settings](https://github.com/settings/developers) on the GitHub site. Please regularly rotate credentials for other third-party services as well.
89+
9290
## More information
9391
The suggestions in this document reflect general recommendations that the Travis CI team and community encourage everyone to follow. However, suggestions here are not exhaustive, and you should use your best judgement to determine security processes for your project. If you have any questions about security at Travis CI or suspect you may have found a vulnerability, please contact us at <[email protected]>.
9492

0 commit comments

Comments
 (0)