Stay safe
Check your Codex files for risky settings. See what each warning means and what you can do about it.
stay-safe reads settings and saved approvals from files. Only some settings are covered. The report names the defaults it uses and the checks it could not complete. It does not test live connections or what Codex will actually allow. See the full scope.
Here is a finding from a run on a test configuration:
Your config turns off Codex's sandbox. Commands Codex runs aren't limited to your project, so a mistaken command could damage files elsewhere on your computer.
How it has gone wrong: Agents have deleted a home directory and wiped a whole drive with one mistaken delete command. I1, I3 (reported, not verified).
What to do: Set
sandbox_mode = "workspace-write"(commands can write only in your workspace). Stricter:sandbox_mode = "read-only"(commands can't write files).Change it: near the top of the file, before any
[section], or ask Codex: "Edit<config-1>to setsandbox_mode = "workspace-write"; show only what you change."Rule
unrestricted_filesystem· settingconfig-1:sandbox_mode=danger-full-access
It runs on Unix with Python 3.11 or newer. No agent is needed:
git clone --branch v0.2.2 https://github.com/chalkbadger/stay-safe.git
cd stay-safe
python3 -m stay_safe
Without Git, download the v0.2.2 ZIP and extract it. Open a terminal in the folder containing the extracted stay-safe-0.2.2 folder, then run:
cd stay-safe-0.2.2
python3 -m stay_safe
By default it reads ~/.codex/config.toml ($CODEX_HOME/config.toml when CODEX_HOME is set). Usage covers the inspected files, options, --save and exit status.
Packaged release (publication pending)
Version 0.2.3 is prepared for PyPI but is not published yet. Once it is published,
users with uv can run uvx --python 3.11 stay-safe@0.2.3.
The command asks uv for Python 3.11, downloading it if needed; your system Python
stays unchanged.
The clone and ZIP commands above are available now. See the
publication steps for the remaining release check.
Ask Codex
Paste this into Codex in the ChatGPT app or the CLI:
Download stay-safe at tag v0.2.2 from https://github.com/chalkbadger/stay-safe into
a new temporary folder and run `python3 -m stay_safe` there. Show the report exactly
as printed, with its exit status, then your notes under "Agent's own report". Don't
open auth files or change files outside that folder. If the download fails, stop and
tell me.
In "Ask for approval" mode, approve the one internet request; never choose "don't ask again". If Codex can't download, see Usage.
What it checks and what it can't see
- It reads the files listed in Usage and changes nothing in your setup.
- Each warning names its rule and the setting behind it, and links to incident reports. Reading the report explains each part.
- The Codex meanings table lists the settings it checks and the sources it uses. The report says when it used a default or could not complete a check.
- The full scope explains what it does not inspect.
- It shows server, app and tool names as written. Check those names before sharing the report.
Challenge a finding
Use the challenge form to submit the finding, revision, disputed claim and evidence.
Why stay-safe exists
stay-safe is part of chalkbadger, which works on AI safety through adversarial peer review: every claim a tool makes should be open to challenge, with the evidence to check it. Each finding names the rule and the reported incidents behind it, each claim in contracts/claims.md names the test that proves it, and anyone can challenge a finding. stay-safe is built with Wirth, which keeps those claims and their tests together and reviews every change against them.
Develop
Git is required for the development tests. Run python3 check_tests.py in a
development virtual environment. Before the first run, install the build tools
with python3 -m pip install build "setuptools>=77" wheel.
This checks test-folder package markers before running unittest discovery.
Contribute
Share feedback, challenge a finding or propose a change through CONTRIBUTING.md.
License
Licensed under the Apache License, Version 2.0.
References to an archived issue or PR point to the private repository that holds this project's earlier working history.
Metadata
Release files for stay-safe 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| stay_safe-0.2.3.tar.gz | 54.9 kB | Without provenance | Details for stay_safe-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| stay_safe-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for stay_safe-0.2.3-py3-none-any.whl |
Total release size: 111.4 kB
Release files / stay_safe-0.2.3.tar.gz
| Download URL | stay_safe-0.2.3.tar.gz |
|---|---|
| Size | 54.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba0f42384ad410d766fde1c1e731349d744b79e57d8f56dcd5d2009f7b2eab64
|
|
BLAKE2b-256 checksum How to use checksums |
6e5ad70be8a8696180404d91ac1dfd43123634cf2d25a5ee0a72ea84e58b1170
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Release files / stay_safe-0.2.3-py3-none-any.whl
| Download URL | stay_safe-0.2.3-py3-none-any.whl |
|---|---|
| Size | 56.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f1ce99221d722f1ea0c65c4c3a2a77221d2bda41d319d5911cf5c4a45c18bc6d
|
|
BLAKE2b-256 checksum How to use checksums |
6dca7ae53a3b33b44855c16214b0817d3e9e9c95b1bd63e249ba6a0824b152fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Security for stay-safe 0.2.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.