Mirkovic highlights a critical oversight in AI agent deployment: the dangerous reliance on plain-text environment variables. This Bitwarden integration is a practical, high-impact fix that every developer should adopt to move secrets from vulnerable disks to managed memory.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Your Hermes Agent Is Leaking API Keys (10-Min Fix)Added:
Hermes agent leaked my Fire crawl API key eight times in chat logs. I ran the audit and here it was Fire crawl API key in eight session transcript files.
So the problem is that Hermes agent stores the API keys and secrets on disk in the dot ENV file in plain text. To be clear, this doesn't mean that there is anything wrong with Hermes or this approach if you're running a private instance. If you're doing a lot of scraping or social media crawling or email triage where your agent can get prompt injected, then it can become a problem. Like in this example, about 10 days ago this post went viral where you have this prompt injection text here and the agent probably Hermes or OpenClaw handed over all the API keys gladly.
There are actually two different problems here. One is exposure, your key sitting in plain text on disk in the dot ENV file or the logs, and prompt injection. So malicious text on the internet that tricks your agent into giving out the keys. So to address the first issue, Immunos research just released an update for Hermes agent that allows you to integrate Bitwarden Secrets Manager directly with Hermes to move your secrets out of the ENV into Bitwarden Secrets Manager and to have one central place to manage those keys and you can rotate them easily. And that's why in this video I'm going to show you exactly how to set this up step-by-step from Bitwarden Secrets Manager to Hermes side and integrate it in 10 minutes. And once this is all finished, I will show you what this does not solve and how we can solve it with Agent Vault, which is going to be one of my next videos. So if you have not subscribed, feel free to do so and like the video if you find it useful or leave a comment if you have any issues or questions. To set up Bitwarden with Hermes agent, we're going to read the documentation in here. I'm going to leave everything in the description so you can easily access all this. And first thing is to update. If you have not updated. Just type and let it run for a few seconds. And then we are going to go into secrets manager and create a new project while this is running.
First, we need to unlock the vault with the master password. If you don't have the account, you need to go to the secrets manager here. Let me just pull it up here so you can see. So, it's secrets manager, not password manager.
If you already have a Bitwarden, you need to go to secrets manager, probably sign up for something, and so on. Make a new project. Make it Hermes keys.
You can name it whatever you want.
New secret.
It's going to be Open Router API key.
And then we are going to go to Open Router and create a new key.
I'm going to nuke all these, so don't worry.
Copy this and place it in the value section. And then we can project save.
And then we'll go to machine accounts and create a new machine account.
It can be It can be something like Hermes dev.
Add Hermes keys to this one.
Can read.
And now you have the machine account.
And then you will need the access token.
You can set the expiration if you want.
I'll leave it at never.
And then you're going to copy this and leave it somewhere secure for the time being.
And then we are going to go back to Hermes and then we're going to consult the documentation again. Hermes secrets before the setup.
Go back here.
I just pull it up so you can see.
And we need to provide the access token that we just got. It will not show up so just press one here.
And then we're going to test it.
This one.
And we can see that this is enabled and it has this access.
It has the token.
And we're going to do Hermes model here.
And then you can see that this pulled from I don't have the open router API key just so you know.
And then if we go to open router.
And you can see that it's pulling from Bitwarden secrets manager applied one secret open router API key.
And we want to keep. So just press enter here.
And we can choose any model here.
Whatever. Choose this one.
And then we can type Hermes. It's pulling from the secrets manager as you can see here.
Open router API key.
We can just type hi to see if this works.
And you can see applied one secret.
Open router API key. So you can see how easy this was. Took us what? 5 minutes to set everything up. It's now using BWS as the key storage and if you want to add more you can just go back here to secrets and then add new secret and basically have all your keys stored in here and then you have one machine key which is this one and if you need to re-walk it, reset it, you can just do so from here without having to go to 15, 20 different providers and reset all those keys. So, from that standpoint, it's much easier to manage. But, my question now is, does this prevent prompt injection attacks or to what degree? And I will look into this further, but from what I've researched, Bitwarden retrieves the keys, but it also stores them in OS environment. So, it's essentially memory, not disk. So, I'm not sure the prompt injection attack is completely negated here. And if you go and compare it to something like Agent Vault, which is a broker, not just a retrieval system, the keys are not present at all.
There is only a placeholder in the place of the keys, and it gets pulled on every request. Here, the keys go into the OS environment, so technically they are still present in raw form, just not on disk, which is a much bigger improvement, of course. Does it stop exfil on prompt injection? No, according to this research. If this is wrong, let me know in the comments or contact me, whatever. But, here, it does stop. There are no real secrets to leak.
The central location for managing the keys is Bitwarden, and it's great for that, absolutely. The setup is 5 minutes, as you've seen.
Here, it's 30 to 60 minutes, so much higher effort. Network dependencies on every call versus startup. And this is best for a single box, private box. You manage everything from one central place, and it's just easier for management.
Here is for internet-exposed agents that are running dirty tasks on social media or scraping or email triage, so it's perfect for that use case. So, that wraps it up for this video. I will do more research on this and on the agent vault and how these two compare and in one of my next videos I'll show you how to set up agent vault so you can see for yourself is it worth the trade off of your time and complexity that it adds versus the security and isolation that it brings as well. If you have any questions leave it in the comments or feel free to connect on X or LinkedIn and thank you so much for watching.
Related Videos
OpenHuman VS Hermes AI: Who Wins?
JulianGoldieSEO
285 views•2026-05-29
Long-Running Agents — Build an Agent That Never Forgets with Google ADK
suryakunju
142 views•2026-05-30
This computer is made from real human brain cells. And you can buy it.
Talktmsmedia
3K views•2026-05-28
BREAKING: Microsoft’s New Image Generating Model Beat Out GPT 1.5 and Nano Banana 2
aimmediahouse
122 views•2026-06-03
I Made the Same Anime Fight Scene in Every AI Video Generator
NobleGooseAnime
295 views•2026-05-30
Nvidia Bets Big On AI PCs | New Chip To Power Windows Laptops | Technology | AI Updates | N18S
cnnnews18
3K views•2026-06-01
I Tested NEW Opus 4.8 on Four Projects (Updated LLM Leaderboard)
AICodingDaily
298 views•2026-05-29
3D Platformer Update - NO CAPES
SolarLune
294 views•2026-05-30











