Skip to content
Leaked secrets Disclosed report Beginner

Employee's GitHub Token Found In Travis CI Build Logs

A valid GitHub token was exposed in Travis CI build logs, allowing access to a limited number of Grammarly repositories. An attacker could have used the token to access those repositories, though the company found no evidence of misuse.

Karim Rahal Follow with cdl

Originally disclosed on HackerOne

Bounty$5,000 High View original
  • Triaged in 7 hours
  • Fixed in 11 days
  • Paid in 3 days
  • Disclosed after 3 months

Summary by the program

Our Security Team was notified by researchers who identified a valid leaked Github token in Travis CI logs that allow accessing a limited number of Grammarly repositories. We immediately revoked the token and conducted investigation together with the Github support team. Based on the available access log data, we have enough evidence to state that any other party did not use the token to access our repositories.

We want to thank @karimpwnz and @cdl for providing a detailed report, efficient communication, and further verification actions.

Summary by the researcher

We would like to thank Grammarly for their cooperation and generous bounty.

This report was a part of our research on Travis CI's attack surface: https://edoverflow.com/2019/ci-knew-there-would-be-bugs-here/

The original report as published on HackerOne, by karimpwnz. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

This is a HackerOne report against Grammarly (the program is now listed as Superhuman), rated high severity for information disclosure and paid a 5,000 USD bounty. It was disclosed on 22 May 2019 and credited to @karimpwnz, with @cdl also named in the program's thanks.

The finding is a leaked GitHub token sitting in Travis CI build logs. The token was valid and gave access to a limited number of Grammarly repositories. The researcher frames the work as part of a broader study of Travis CI's attack surface, linking to a write-up titled "CI knew there would be bugs here".

The report itself is short and contains no request, payload, command or log excerpt, so there is no code to reproduce here. The sequence it describes is:

  1. A valid GitHub token was found in Travis CI build logs.
  2. The token was still valid and carried access to a limited set of the organisation's repositories.
  3. The researcher reported it to the program.
  4. The program revoked the token immediately and investigated with GitHub's support team.
  5. Using the available access log data, the program concluded there was enough evidence that no other party had used the token to reach the repositories.

The program's summary credits both researchers with a detailed report, efficient communication and follow-up verification. The researcher's summary thanks Grammarly for its cooperation and the bounty. The report gives no CVSS score and no further technical detail on how the logs were located or which repositories the token reached.

Root cause

The likely root cause is that a secret was written into CI output. Build logs are frequently world-readable, and anything a build step prints, including environment variables, command output or debug traces, ends up in that log. A GitHub token exposed this way inherits whatever repository access its owner or scope grants, so a log reader becomes a repository reader. The report does not describe the exact command or configuration that printed the token.

Impact

The token allowed access to a limited number of Grammarly repositories. The report does not say whether that access was read or write, or what the repositories contained. The program's log review found no evidence of use by anyone else, so the demonstrated impact is potential rather than realised: anyone who could read the build logs could have used the token against those repositories until it was revoked. The report is rated high severity for information disclosure.

How this kind of bug works

Continuous integration systems run untrusted or semi-trusted code and print a lot of it. Logs are kept for debugging, are often visible to anyone who can see the build, and are rarely treated as a secret store. Secrets reach them in several ways: a script that echoes an environment variable, a tool that prints its configuration on failure, verbose flags that dump request headers, or a command that includes a token in its arguments and is echoed by the shell. Once a credential is in a log, it persists in the log archive and in any mirrors or exports, so revocation is the only reliable remedy.

The bug class is secret exposure through build and application output. It happens because the boundary between "debug output" and "credential" is not enforced, and because log visibility is often wider than the set of people who should see the secret. Defences are layered: masking secrets in CI output, keeping logs private, using short-lived or narrowly scoped tokens, and scanning logs and repositories for credential patterns.

How to test for it

  1. Identify targets that use public CI. Look for build badges, links to Travis CI, CircleCI, GitHub Actions or similar in repositories, documentation or status pages.
  2. Enumerate the build logs that are publicly readable, including older builds and failed builds, which tend to be the most verbose.
  3. Read the logs for credential-shaped strings: tokens, keys, passwords, connection strings, authorisation headers. Search for common prefixes and for words such as token, secret, password and auth.
  4. When you find a candidate, verify it is live using the smallest possible action, such as an identity or metadata call that does not modify anything. Do not enumerate or read data beyond what is needed to prove access.
  5. Report the location of the log, the credential type, and the scope it grants, then stop and let the program revoke it.

A positive result is a credential in a public log that still authenticates and reaches the target's resources. Common false positives are revoked or expired tokens, placeholder values in example configurations, tokens belonging to unrelated third parties, and secrets that only grant access to public information. Check validity before reporting, but keep the check minimal.

How it is fixed

The program revoked the exposed token immediately. Longer term, teams should use tokens scoped to the minimum required repositories and permissions, prefer short-lived credentials, keep build logs private, and scan CI output for secret patterns. The program reviewed access log data to check whether the token had been used.

Hunting notes

This bug class hides in the places where systems talk to themselves: CI logs, deployment output, error pages, debug endpoints, crash reports and public artefacts. Recon signals include public build badges, repositories with CI configuration committed, status dashboards and documentation that links to pipelines. The most productive logs are failed builds and verbose runs, because that is where tools dump their state.

To get a report accepted, show that the credential is live and what it reaches, without using it beyond proof. The program credited the researchers for a detailed report, efficient communication and further verification.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 6 min read.

What happened, in plain words

This is a HackerOne report against Grammarly (the program is now listed as Superhuman). It was rated high severity for information disclosure and paid a 5,000 USD bounty. It was disclosed on 22 May 2019 and credited to @karimpwnz, with @cdl also named in the program's thanks.

The finding is a leaked GitHub token sitting in Travis CI build logs. The token was valid and gave access to a limited number of Grammarly repositories. The researcher frames the work as part of a broader study of Travis CI's attack surface, linking to a write-up titled "CI knew there would be bugs here".

The report itself is short and contains no request, payload, command or log excerpt, so there is no code to reproduce here. The sequence it describes is:

  1. A valid GitHub token was found in Travis CI build logs.
  2. The token was still valid and carried access to a limited set of the organisation's repositories.
  3. The researcher reported it to the program.
  4. The program revoked the token immediately and investigated with GitHub's support team.
  5. Using the available access log data, the program concluded there was enough evidence that no other party had used the token to reach the repositories.

The program's summary credits both researchers with a detailed report, efficient communication and follow-up verification. The researcher's summary thanks Grammarly for its cooperation and the bounty. The report gives no CVSS score and no further technical detail on how the logs were located or which repositories the token reached.

Root cause

The likely root cause is that a secret was written into CI output. Build logs are frequently world-readable, and anything a build step prints, including environment variables, command output or debug traces, ends up in that log. A GitHub token exposed this way inherits whatever repository access its owner or scope grants, so a log reader becomes a repository reader. The report does not describe the exact command or configuration that printed the token.

Impact

The token allowed access to a limited number of Grammarly repositories. The report does not say whether that access was read or write, or what the repositories contained. The program's log review found no evidence of use by anyone else, so the demonstrated impact is potential rather than realised: anyone who could read the build logs could have used the token against those repositories until it was revoked. The report is rated high severity for information disclosure.

How this kind of bug works

Continuous integration systems run untrusted or semi-trusted code and print a lot of it. Logs are kept for debugging, are often visible to anyone who can see the build, and are rarely treated as a secret store. Secrets reach them in several ways: a script that echoes an environment variable, a tool that prints its configuration on failure, verbose flags that dump request headers, or a command that includes a token in its arguments and is echoed by the shell. Once a credential is in a log, it persists in the log archive and in any mirrors or exports, so revocation is the only reliable remedy.

The bug class is secret exposure through build and application output. It happens because the boundary between "debug output" and "credential" is not enforced, and because log visibility is often wider than the set of people who should see the secret. Defences are layered: masking secrets in CI output, keeping logs private, using short-lived or narrowly scoped tokens, and scanning logs and repositories for credential patterns.

How to test for it

  1. Identify targets that use public CI. Look for build badges, links to Travis CI, CircleCI, GitHub Actions or similar in repositories, documentation or status pages.
  2. Enumerate the build logs that are publicly readable, including older builds and failed builds, which tend to be the most verbose.
  3. Read the logs for credential-shaped strings: tokens, keys, passwords, connection strings, authorisation headers. Search for common prefixes and for words such as token, secret, password and auth.
  4. When you find a candidate, verify it is live using the smallest possible action, such as an identity or metadata call that does not modify anything. Do not enumerate or read data beyond what is needed to prove access.
  5. Report the location of the log, the credential type, and the scope it grants, then stop and let the program revoke it.

A positive result is a credential in a public log that still authenticates and reaches the target's resources. Common false positives are revoked or expired tokens, placeholder values in example configurations, tokens belonging to unrelated third parties, and secrets that only grant access to public information. Check validity before reporting, but keep the check minimal.

How it is fixed

The program revoked the exposed token immediately. Longer term, teams should use tokens scoped to the minimum required repositories and permissions, prefer short-lived credentials, keep build logs private, and scan CI output for secret patterns. The program reviewed access log data to check whether the token had been used.

Hunting notes

This bug class hides in the places where systems talk to themselves: CI logs, deployment output, error pages, debug endpoints, crash reports and public artefacts. Recon signals include public build badges, repositories with CI configuration committed, status dashboards and documentation that links to pipelines. The most productive logs are failed builds and verbose runs, because that is where tools dump their state.

To get a report accepted, show that the credential is live and what it reaches, without using it beyond proof. The program credited the researchers for a detailed report, efficient communication and further verification.

Glossary

  • HackerOne: a platform where security researchers report bugs to companies and companies can pay bounties.
  • Bounty: a reward, here 5,000 USD, paid by the program for a valid report.
  • Severity: a rating of how serious a bug is; here high.
  • Information disclosure: a bug where information that should stay private becomes visible to someone who should not see it.
  • CVSS: a standard scoring system for vulnerability severity; the report gives no score.
  • Token: a long random string that acts like a password for a service, letting whoever holds it act as the account it belongs to.
  • GitHub: a website for hosting and collaborating on code repositories.
  • Repository: a project's collection of code and its history on GitHub.
  • Travis CI: a continuous integration service that automatically builds and tests code and keeps logs of each build.
  • Continuous integration (CI): an automated system that runs builds and tests whenever code changes.
  • Build log: the recorded output of an automated build, including anything the build steps printed.
  • World-readable: visible to anyone on the internet, without logging in.
  • Environment variable: a named value passed to a program by the system, often used to hold configuration or secrets.
  • Credential: any secret used to prove identity, such as a token, password or key.
  • Scope: the set of permissions and resources a credential can reach.
  • Revoke: to cancel a credential so it no longer works.
  • Access log: a record of who accessed what and when, used to check whether a leaked credential was used.
  • Attack surface: all the places an attacker could try to get in or find information.
  • False positive: a finding that looks like a bug but is not actually exploitable.
  • Masking: hiding secret values in output so they are replaced by placeholders.
  • Recon: short for reconnaissance, the information-gathering phase before testing.

More from Superhuman (formerly Grammarly)

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Leaked secrets and credentials

The lesson behind this report.

Keys, tokens or passwords left in public code, apps, logs or responses, that grant real access.