A surprisingly large number of developers are posting their Slack login credentials to GitHub and other public websites, a practice that in many cases allows anyone to surreptitiously eavesdrop on their conversations and download proprietary data exchanged over the chat service.

According to a blog post published Thursday, company researchers recently estimated that about 1,500 access tokens were publicly available, some belonging to people who worked for Fortune 500 companies, payment providers, Internet service providers, and health care providers. The researchers privately reported their findings to Slack, and the chat service said it regularly monitors public sites for posts that publish the sensitive tokens.

Still, a current search on GitHub returned more than 7,400 pages containing "xoxp." That's the prefix contained in tokens that in many cases allow automated scripts to access a Slack account, even when it's protected by two-factor authentication. A separate search uncovered more than 4,100 Slack tokens with the prefix "xoxb." Not all results contained the remainder of the token that's required for logging in, but many appeared to do just that. By including valid tokens in code that's made available to the world, developers make it possible for unscrupulous people to access the private conversations between the developers and the companies they work for and to download files and private Web links they exchange.

"In the worst case scenario, these tokens can leak production database credentials, source code, files with passwords and highly sensitive information," Thursday's post stated. "The Detectify team have already been able to find thousands of tokens by simply searching GitHub; and new tokens are becoming publicly available every day."

The scripts allow the connected accounts to automatically carry out all kinds of different tasks, such as send reminders of regularly scheduled meetings, or remind workers to stretch throughout the day, or provide contact details to other users. Many developers post the source code for these so-called bots on GitHub or other public repositories.

As bad as it is, the practice of posting sensitive login credentials to GitHub and other public sources is by no means new. In a blunder that led to a database breach exposing private information for more than 50,000 Uber drivers, a developer for the ride-hailing service stored a database security key on two GitHub pages. Subsequent reviews show that GitHub remains awash with passwords posted by tens of thousands—and possibly millions—of people. Ars first warned of the danger in 2013.

In a statement, Slack officials wrote:

Slack is clear and specific that tokens should be treated just like passwords. We warn developers when they generate a token never to share it with other users or applications. Our customers' security is of paramount importance to us, and we will continue to improve our documentation and communications to ensure that this message is urgently expressed. We are monitoring for publicly posted tokens, and when we find any, we revoke the tokens and notify both the users who created them, as well as the owners of affected teams.

Slack deserves credit for watching for publicly posted tokens. Still, tokens get posted so often and to so many places that it's likely a quick-acting hacker may discover them before they're revoked. Developers posting Slack-related scripts online should never include the access token in their code. Instead, they should use environmental variables that allow the credential to remain completely separate from the code. Detectify said users may also improve exchange of credentials over Slack by stripping a password of its username and sharing it over a service like onetimesecret.com, but this advice leaves me uncomfortable.

If the past is any guide, a large number of developers will fail to heed this latest warning from Detectify. And when their companies get hacked the way Uber did, they'll have only themselves to blame.