Skip to content

Commit 9d9269f

Browse files
committed
Merge branch 'gh-pages' of github.com:travis-ci/docs-travis-ci-com into gh-pages
2 parents ad05f1e + a4eb9b0 commit 9d9269f

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

_includes/sidebar.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ <h3>Integrations and Notifications</h3>
9191
<li><a href="/user/browserstack/">BrowserStack</a></li>
9292
<li><a href="/user/sauce-connect/">Sauce Labs</a></li>
9393
<li><a href="/user/sonarqube/">SonarQube.com</a></li>
94+
<li><a href="/user/sourceclear/">SourceClear</a></li>
9495
<li><a href="/user/build-feeds/">Atom Feeds</a></li>
9596
<li><a href="/user/cc-menu/">CCMenu / CCTray Feeds</a></li>
9697
<li><a href="/user/integration/platformio/">Embedded Builds with PlatformIO</a></li>

images/srcclr-travis.png

64.1 KB
Loading

user/sourceclear.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
title: Using SourceClear with Travis CI
3+
layout: en
4+
permalink: /user/sourceclear/
5+
---
6+
[SourceClear](https://www.sourceclear.com) is security for open-source code.
7+
8+
When you add SourceClear to your TravisCI projects you'll get automated security analysis inside every build. You’ll get complete analysis of your open-source dependencies, including security vulnerabilities, out-of-date libraries, and license reports.
9+
10+
## Creating your Authentication Token
11+
12+
In order to set up the SourceClear agent for Travis-CI, you must be logged into [SourceClear](http://app.sourceclear.com/login), and then perform the following steps:
13+
14+
**1.** From the left sidebar, select **Agents**, then **New Agent**.
15+
16+
**2.** In the agent setup page, select **Travis-CI**
17+
18+
**3.** Select **Create Authentication Token**, and copy it to your clipboard. You will use this to authenticate with SourceClear during scans.
19+
20+
## Setting the Environment Variable
21+
22+
Setting an environment variable in Travis-CI occurs on a per repository basis:
23+
24+
**1.** Select the repository you wish to scan from your Travis-CI environment >
25+
**More Options** > **Settings**
26+
27+
**2.** On the Environment Variables page, add `SRCCLR_API_TOKEN` and assign your authentication token to it. Make sure to toggle the button labeled **Display value** in build log* to the **OFF** position to ensure your token is kept secret.
28+
29+
<img src="/images/srcclr-travis.png" alt="SourceClear" width="100%"/>
30+
31+
32+
## Configuring your Travis-CI repository
33+
34+
In order to scan using SourceClear, add the following to your `.travis.yml` file:
35+
36+
```
37+
addons:
38+
srcclr: true
39+
```
40+
41+
If you want verbose output during the scan, you can add the `debug` key:
42+
43+
```
44+
addons:
45+
srcclr:
46+
debug: true
47+
```
48+
49+
Commit these changes to trigger a build for your repository, and SourceClear will perform a scan, displaying results to your SourceClear environment.
50+
51+
If you wish to add SourceClear scanning to other repositories, simply add the installation and scan code above to whatever `.travis.yml` files you wish, as well as the `SRCCLR_API_TOKEN` environment variable and you will be able to perform scans on each new build.

0 commit comments

Comments
 (0)