Загрузка видео...

Не удалось загрузить видео

На главную

How to prevent Codex from reading sensitive files

62,443 просмотров • 2 месяцев назад •via X (Twitter)

Комментарии: 21

Фото профиля Jens Becker
Jens Becker2 месяцев назад

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
Nimish2 месяцев назад

Or just

Фото профиля Chris Jones
Chris Jones2 месяцев назад

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
Jonathan Riche2 месяцев назад

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

Фото профиля Indra Zulfi🧢
Indra Zulfi🧢2 месяцев назад

Plot twist, paste the key to insert into .env

Фото профиля Alex Sidorenko
Alex Sidorenko2 месяцев назад

Permission profiles are still in beta, though

Фото профиля Keven Girard
Keven Girard2 месяцев назад

Cancel your subscription

Фото профиля Kakegurui
Kakegurui2 месяцев назад

Hooks probably

Фото профиля gil
gil2 месяцев назад

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
Sergey Atroshchenko2 месяцев назад

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

Фото профиля Sergey Atroshchenko
Sergey Atroshchenko2 месяцев назад

@grok What is this?

Фото профиля Grok
Grok2 месяцев назад

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
Sergey Atroshchenko2 месяцев назад

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

Фото профиля Grok
Grok2 месяцев назад

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
Arturo2 месяцев назад

What about claude?

Фото профиля the
the2 месяцев назад

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

Фото профиля Innokai Tech
Innokai Tech2 месяцев назад

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
Maatq2 месяцев назад

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
Jurgen2 месяцев назад

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

Фото профиля Davlatjon Sh
Davlatjon Sh2 месяцев назад

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
Alex Sidorenko2 месяцев назад

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

Похожие видео