Skip to content
Leaked secrets Write-up Beginner

Instagram GitHub Token with public_scope found In Travis CI Build Logs

A GitHub token with public_repo scope was exposed in Travis CI build logs for an Instagram repository. An attacker could use it to star repositories or perform other public actions on GitHub as the bot account.

Philippe Harewood Follow

Published on philippeharewood.com

In https://travis-ci.org/Instagram/IGListKit/ lists a Github token with publicscope, since this user is a member of the Instagram organization this might have undesirable effects.

Philippe, on philippeharewood.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the CI configuration printed the token to build logs, and the token was intentionally given only public_repo scope as a trade-off to allow bot actions on pull requests.

Impact

The token could be used to perform public actions such as starring repositories or commenting on open-source projects, but its scope limited the impact to public resources.

What the attacker needed

Access to public Travis CI build logs; no authentication needed

The fix

The token should be kept secret and not printed in build logs, and its scope should be minimised.

How it was found

  1. Go to the Travis CI job page for the Instagram repository.
  2. Find the exported token in the build log.
  3. Check the token's scope using a GitHub API call.
  4. Use the token to star a repository as a test.
  5. Verify the star on the bot's GitHub profile.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

A GitHub token is like a password that lets a program act on GitHub. This token was accidentally shown in public build logs, so anyone could copy it and use it to do things like star repositories. The token only had permission to access public repositories, so the damage was limited.

What is Leaked secrets?

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

More by Philippe Harewood

View all

12 more disclosed reports, best first.

More from Meta

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.