> SecretDrop
Back to Blog
Security Best Practices Developer Workflow

Why Developers Should Stop Sharing Secrets in Slack and Email

| SecretDrop Team

Most development teams have done it. A new team member needs database credentials. A contractor needs an API key. A deploy is stuck because someone needs the production password. The fastest path is always the same: paste it into Slack, send it over email, move on.

It works. Until it does not.

The Problem With Chat-Based Secret Sharing

When you paste a credential into a Slack channel or email thread, you are creating a permanent copy of that secret in a system you do not control. That message is now indexed, searchable, backed up, and accessible to anyone with access to the channel — today and in the future.

Here is what happens in practice:

  • Slack retains message history. On paid plans, message history is retained indefinitely. Every secret you have ever pasted is sitting in a searchable archive. A single compromised Slack account exposes every credential ever shared in channels that account can access.

  • Email is stored in plain text. Most email providers store message bodies without encryption at rest. Forwarding, auto-archiving, and backup systems create additional copies. A credential sent via email may exist in five or more locations within minutes.

  • Screenshots and logs capture secrets. Screen sharing during calls, automated logging tools, and clipboard managers can all capture secrets that were only meant to be seen once.

  • Access scopes change over time. A private channel today may have new members tomorrow. A shared inbox gets reassigned. The contractor whose access was revoked still has the email in their personal archive.

Why This Matters More Than You Think

The 2023 Verizon Data Breach Investigations Report found that stolen credentials were involved in nearly 50% of all breaches. The most common source was not sophisticated attacks — it was credentials that were exposed through internal tools, shared documents, and messaging platforms.

For development teams specifically, the risk compounds:

  • API keys grant programmatic access. A leaked API key does not just expose data — it allows automated extraction, modification, or deletion at scale.
  • Database credentials are often shared with broad permissions. The credentials shared for convenience rarely follow least-privilege principles.
  • Secrets shared in chat persist beyond rotation. Even after rotating a credential, the old value remains in message history. If the rotation was prompted by a suspected breach, the attacker may already have the old value from the same source.

Common Excuses and Why They Fall Short

“It’s a private channel.” Private channels are only as secure as the least careful member. One compromised account, one accidental screenshot, one forwarded message — and the secret is exposed.

“I’ll delete it after.” Deleting a Slack message removes it from the visible UI but does not guarantee removal from backups, compliance archives, or the recipient’s local cache. Email deletion is even less reliable.

“It’s just a staging key.” Staging environments often mirror production data structures. A staging credential may provide access to real user data, internal infrastructure, or a path to escalate into production systems.

“We rotate credentials regularly.” Rotation helps, but only if the old credential is no longer accessible anywhere. If it is still sitting in Slack history, the rotation window is effectively zero.

What Secure Secret Sharing Looks Like

A secure approach to sharing credentials between team members should meet these criteria:

  1. Encryption before transit. The secret should be encrypted on the sender’s device before it leaves their machine. The server facilitating the transfer should never have access to the plaintext value.

  2. Expiration by default. Shared secrets should have a time-to-live. After the recipient has accessed the value, the shared copy should become inaccessible — automatically, without relying on anyone to remember to delete it.

  3. Access controls. The sender should be able to limit who can access the secret, how many times it can be downloaded, and what happens after failed access attempts.

  4. No persistent copies. The system should not retain the decrypted value. Once the recipient has it, the shared mechanism should hold only encrypted data that cannot be recovered without the original password.

  5. No account required for recipients. Forcing a recipient to create an account adds friction and creates another credential to manage. A password-protected link is simpler and more secure than adding another login to the chain.

A Better Workflow

Instead of pasting secrets into chat, consider this workflow:

  1. Encrypt the credential or file locally using a password only you and the recipient know.
  2. Upload the encrypted bundle to a service that stores only the ciphertext.
  3. Share the link through your normal communication channel (Slack, email — it does not matter, because the link alone is useless without the password).
  4. Communicate the password through a separate channel — in person, via a phone call, or through a different messaging platform.
  5. Set the bundle to expire after a single download or after a short time window.

This approach means that even if the link is intercepted, the attacker has an encrypted blob with no way to decrypt it. The password never touches the same channel as the link. And the bundle disappears after use.

Moving Forward

Changing team habits is difficult, but the cost of a credential leak — in incident response time, customer trust, and regulatory exposure — far outweighs the minor inconvenience of using a proper secret-sharing tool.

The first step is acknowledging that convenience and security are often in tension, and that chat-based secret sharing resolves that tension in the wrong direction.

Start by auditing your team’s Slack history for credentials. You may be surprised by what you find. Then establish a policy: secrets never go into chat. Use a tool designed for the purpose. Your future self, responding to a security incident at 2 AM, will thank you.