Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

How to prevent Codex from reading sensitive files

62,443 görüntüleme • 2 ay önce •via X (Twitter)

21 Yorum

Jens Becker profil fotoğrafı
Jens Becker2 ay önce

I am also using a similar setting in Claude Code. But it's important to note that this will not completely prevent the agent from reading it. It will still find workarounds. The safest approach is to not have plain text secrets in env files at all.

Nimish profil fotoğrafı
Nimish2 ay önce

Or just

Chris Jones profil fotoğrafı
Chris Jones2 ay önce

Not enough people are customizing their agent's config and the options change so fast it is difficult to keep up. I wish they shipped the config with defaults or commented out options.

Jonathan Riche profil fotoğrafı
Jonathan Riche2 ay önce

Wait till it uses a python or perl script to read it lol?

Indra Zulfi🧢 profil fotoğrafı
Indra Zulfi🧢2 ay önce

Plot twist, paste the key to insert into .env

Alex Sidorenko profil fotoğrafı
Alex Sidorenko2 ay önce

Permission profiles are still in beta, though

Keven Girard profil fotoğrafı
Keven Girard2 ay önce

Cancel your subscription

Kakegurui profil fotoğrafı
Kakegurui2 ay önce

Hooks probably

gil profil fotoğrafı
gil2 ay önce

Tn-proto is useful for the times that you want to protect certain data from certain agents because sometimes you want agents to read parts of a file but. Its saved a lot of governence headaches.

Sergey Atroshchenko profil fotoğrafı
Sergey Atroshchenko2 ay önce

How to prevent Codex from doing what it was not asked to do?

Sergey Atroshchenko profil fotoğrafı
Sergey Atroshchenko2 ay önce

@grok What is this?

Grok profil fotoğrafı
Grok2 ay önce

This is the logo/icon for **OpenAI Codex** (the new local CLI coding agent from The thread is about securing it — .gitignore isn't enough. Use sandboxing (sandbox-exec on macOS, Landlock/bwrap on Linux, or config permissions) to block reads of .env, keys, etc.

Sergey Atroshchenko profil fotoğrafı
Sergey Atroshchenko2 ay önce

@asidorenko_ And how does it help with my problem I stated above?

Grok profil fotoğrafı
Grok2 ay önce

Sandboxing enforces hard limits on what Codex can actually execute, even if the model tries to read .env/keys or take other unrequested steps. Codex itself supports this via built-in modes (workspace-write, read-only) using macOS seatbelt, Linux restrictions, or containers, plus approval policies that require your OK before risky actions. .gitignore is just a suggestion to the AI; sandboxing + approvals make unauthorized behavior impossible at runtime.

Arturo profil fotoğrafı
Arturo2 ay önce

What about claude?

the profil fotoğrafı
the2 ay önce

Could mount an empty file over .env if codex runs in a container

Innokai Tech profil fotoğrafı
Innokai Tech2 ay önce

Codexignore stops the built-in reader but not the shell path — codex can still `cat` or `grep` blocked files if bash is available. Real fix is sandboxing at command level, not file level.

Maatq profil fotoğrafı
Maatq2 ay önce

permissions block reads but what about grep from logs, pasted stack traces, git history? the secret is never in one file, it is in the surface area

Jurgen profil fotoğrafı
Jurgen2 ay önce

I already made a tool for it called aichu check it out its free :)

Davlatjon Sh profil fotoğrafı
Davlatjon Sh2 ay önce

Codex and GPT-5.5 is smart enough to follow instructions about do not read .env file. If it is written in AGENTS file it never reads.

Alex Sidorenko profil fotoğrafı
Alex Sidorenko2 ay önce

grep bypasses that, permissions block an agent from ever accessing a file in any way

Benzer Videolar