# API tokens saved as plain text in Grokbot

**URL:** <https://forum.cursor.com/t/api-tokens-saved-as-plain-text-in-grokbot/178000>\
**Category:** Bug Reports\
**Tags:** grok-bot, security\
**Created:** [November 10, 2026, 8:19pm UTC](https://forum.cursor.com/t/api-tokens-saved-as-plain-text-in-grokbot/178000 "2026-11-10T20:19:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bee](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bee](https://forum.cursor.com/u/bee)\
**Post date:** [November 10, 2026, 8:19pm UTC](https://forum.cursor.com/t/api-tokens-saved-as-plain-text-in-grokbot/178000/1 "2026-11-10T20:19:39Z")

</div>

### Where does the bug appear (feature/product)?

Grok Bot

### Describe the Bug

Not a bug, it is built this way by design.

The secure box that comes up when a bot asks you put an API token in there is not stored how passwords are stored in the vault.

This is a huge security flaw because when the bot asks you to give them a API token they make sound like it is secure and safe similar to how login credentials are stored in the vault.

However, they are not. They are stored in a text file something like “secure\_box” and are called upon by commands the bot runs when the API token is needed.

I was lucky to have caught this because it silently happened 2 times last week, and 4 times this morning. How i caught it is because i have a script that runs to scan for env, secrets, passwords, and other various things.

I am only able to pick 1 OS for what my computer was using but this happened both on Windows 11 and Ubuntu 26.04.1

### Steps to Reproduce

Give Grokbot a API token from Github, specifically in this scenario it was a “fine grain API token”.

I have not tested this with other tokens from other sources and oddly i was only able to find this is 6 places, when i have the bots use that token to do tons of things and they use it probably dozens of times per day.

### Expected Behavior

To not paste API tokens into plain text on to documents that could be public facing.

To have some level of security in place that acts like the Vaults Login holders, if not to bare minimum to inform the user prior to having the user put the token into the secure box the full level of risks involved.

### Operating System

Linux

### Version Information

Grokbot version 0.79.3

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [November 11, 2026, 9:46am UTC](https://forum.cursor.com/t/api-tokens-saved-as-plain-text-in-grokbot/178000/5 "2026-11-11T09:46:06Z")

</div>

Hi @bee, you have the mechanism right. A token entered in the secure card is saved on your bot’s computer and passed to the bot’s Shell commands as an environment variable. It isn’t handled the way Vault logins are. Output from those commands is masked, but nothing stops a command from writing the value into a file. This is known to the team.

Since the token turned up in files, I’d revoke it on GitHub now and create a new one limited to the repos your bots need.

Could you tell us where the 6 copies were: the file paths or file types, and whether they were on the bot’s computer or on your own Windows and Ubuntu machines? Please leave the token itself out. That shows whether the bot wrote them or they are copies of the secret store.

---

<div class="post-metadata">

**Author:** ![bee](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bee](https://forum.cursor.com/u/bee)\
**Post date:** [November 11, 2026, 12:58pm UTC](https://forum.cursor.com/t/api-tokens-saved-as-plain-text-in-grokbot/178000/8 "2026-11-11T12:58:37Z")

</div>

here is the print out from grokbot.

All the copies were on my computer, the bot’s computer. None were on your Windows or Ubuntu machines. My own commands wrote every one of them; none was a copy of the secret store. Here’s a reply you can paste:

> Thanks Colin. All of them were on the bot’s own computer, none on my Windows or Ubuntu machines, and the bot wrote every one itself. It wasn’t a copy of the secret store. In each case the bot built the token into a git remote URL (`https://<token>@github.com/...`) instead of passing it per command:
> 
> - 4 copies: `.git/config` files in 4 audit clones of my repos (Nov 10, about 7:20 AM CT), stored in the remote URL.
> - 1 copy: `.git/config` of a throwaway clone under `/tmp` (Nov 9, 7:57 PM CT), same pattern.
> - Shell command history: git push/pull commands with the token in the URL (Oct 22 and Oct 25).
> 
> All of them have been deleted. A full sweep of 286k files found no other real copy, apart from two terminal logs from Nov 6 holding a token-shaped string that isn’t the current token. I’m revoking the token and replacing it with one limited to the repos the bots need.

My concern isn’t so much that it happens, more so that the wordage of the secure box card would make a user who is not so knowledgeable believe it is “safe”.

I personally have multiple scripts that run checks for all types of sensitive information before documents go anywhere public.

Just a thought, what about using some kind of file package like snap/flatpak to hold a isolated terminal for the bots using some kind of PGP to handle the API token storage and inputs so a command can happen inside of a box with limited access so the output can placed inside of an area it needs to go with out the bot having direct access to the token itself. Cause if a box is locked and that box holds files that are also locked but named by the user then a box could place the needed thing into the box to have the correct information printed on to it by unlocking the token but if the value is only printed inside of that box then no one would see it. Just a thought

---

<div class="post-metadata">

**Author:** ![Colin](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/colin/32/90452_2.png) [@Colin](https://forum.cursor.com/u/Colin)\
**Post date:** [November 11, 2026, 2:36pm UTC](https://forum.cursor.com/t/api-tokens-saved-as-plain-text-in-grokbot/178000/12 "2026-11-11T14:36:56Z")

</div>

Hi @bee, that settles it: the token wasn’t copied out of the secret store, your bot built it into those git remote URLs, and a clone with the token in the URL saves it into that repo’s `.git/config`. Bots are instructed to never write a secret’s value anywhere, but as you saw, that isn’t enforced.

Until that changes, I’d give your bots a standing instruction: never put a token in a clone or remote URL, keep remotes as plain `https://github.com/owner/repo.git`, and pass the token through a git credential helper that reads the environment variable.

---

<div class="post-metadata">

**Author:** ![bee](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@bee](https://forum.cursor.com/u/bee)\
**Post date:** [November 11, 2026, 3:10pm UTC](https://forum.cursor.com/t/api-tokens-saved-as-plain-text-in-grokbot/178000/13 "2026-11-11T15:10:36Z")

</div>

that’s how it was caught, cause i have multiple scripts that scan for sensitive data and Grokbot was like woah hold up my command just plain text entered this API token into a file.

The bot immediately stopped and handled it, but the prior times it slipped.

I will also add that the token is used constantly daily, like dozens of times. So only finding 6 instances where it leaked out somewhere is good but they were silent.

Also, these API tokens aren’t related to anything sensitive. I purposely use the bots/cursor in very brutish ways to force issues and errors to occur, because mistakes mean something is learned and the process can be refined.

Thank you for the suggestions and your time, greatly appreciated as always.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [November 13, 2026, 3:11pm UTC](https://forum.cursor.com/t/api-tokens-saved-as-plain-text-in-grokbot/178000/14 "2026-11-13T15:11:13Z")

</div>

Closed on November 13, 2026, 3:11pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
