GitGuardian CI/CD integration with Travis CI is performed through our CLI application:
ggshield is a wrapper around the GitGuardian API for secrets detection, an API key is required for authentication.
Service accounts are recommended to run this integration.
Please note that service accounts are only available for workspaces under our Business plan, and their administration is restricted to Managers. If your workspace is under the Free plan, you can still use a personal access token to run this integration.
- Create a service account from the API section of your GitGuardian workspace (or a personal access token if you are on the Free plan).
- Add this API key to the
GITGUARDIAN_API_KEYenvironment variable in your project settings.
- In order to add ggshield to your pipelines, configure your
.travis.ymlto add a ggshield scanning job.
jobs: include: - name: GitGuardian Scan language: python python: 3.8 install: - pip install ggshield script: - ggshield secret scan ci
For further explanations about how to define encrypted variables in Travis CI, please read their documentation.