Travis Personal Token

ID

travis_token

Severity

critical

Vendor

Travis CI

Family

API Token

Description

Travis CI is a hosted continuous integration service used to build and test software projects hosted on GitHub and Bitbucket.

Security

Any hardcoded Travis CI Token is a potential secret reported by this detector.

Accidentally checking-in the token to source control repositories could compromise the Travis CI account and data.

Examples

steps:
  - name: "gcr.io/cloud-builders/docker"
    args: ["build", "-t", "$REPO_NAME:$COMMIT_SHA", "-t", "$REPO_NAME:latest", "."]
  - name: "ci-build"
    secretEnv: ["TRAVIS_TOKEN"]
timeout: 1200s
secrets:
  - kmsKeyName: projects/cluster/locations/global/keyRings/dummy-build/cryptoKeys/hackgt-build-key
    secretEnv:
      TRAVIS_CI_TOKEN: WKto9_eZf33Nw348shUfaRh

Mitigation / Fix

  1. Remove the Token from the source code or committed configuration file.

  2. Follow your policy for handling leaked secrets, which typically require revoking the secret in the target system(s).

At this moment Travis CI does not allow users to revoke their token so you will need to contact support to revoke it.
  1. If under a git repository, you may remove unwanted files from the repository history using tools like git filter-repo or BFG Repo-Cleaner. You may follow the procedure listed here for GitHub.

You should consider any sensitive data in commits with secrets as compromised.

Remember that secrets may be removed from history in your projects, but not in other users' cloned or forked repositories.