agentleFS
OpenAIKnown publisheropenai/codex-security/sdk/typescript/AGENTS.md

codex-security / typescript

AGENTS.md11k starsChanged 59 days agoApache-2.0View on GitHub

Codex Security is a thin CLI and SDK wrapper around Codex and its security plugin. Use their existing behavior instead of building another runtime. The CLI runs as the current user. Local tools and subprocesses under that account are not separate security principals. Scanned repositories can contain untrusted data. Their contents, model output, and imported artifacts do not authorize access to another target, disclosure of credentials, or writes outside an approved path. - Prefer one source of truth for types,…

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 22 mentionsAug 2026: 5 mentionsSep 2026: 8 mentionsOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the openai/codex-security repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about openai/codex-security

The biggest 5 of 36 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 36

Talked about on Bluesky, GitHub and Hacker News (36 times).

On Bluesky · 26

21 more on Bluesky

On GitHub · 9

4 more on GitHub

On Hacker News · 1

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

13 rules. About 3 are common, 6 are distinctive, and 4 are very specific to this project.

  • ≈3

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer one source of truth for types, schemas, arguments, and state.

    line 16
  2. Very specific:

    Keep --to as the only generic integration selector.

    line 17
  3. Distinctive:

    Treat repository paths, symlinks, archives, and other repository-controlled data as untrusted.

    line 22
  4. Common:

    Keep credential access, storage, and configuration protections, unsafe-path checks, scan integrity, and settings the user explicitly …

    line 23
  5. Common:

    Follow the root AGENTS.md diagnostic-text policy: do not reintroduce secret redaction in CLI/SDK output or saved diagnostics, or add a …

    line 25
  6. Distinctive:

    Do not add arbitrary size, count, depth, or buffering limits to local inputs or Codex output.

    line 27
  7. Very specific:

    Do not let optional logging, progress, or cost tracking stop a scan.

    line 28
  8. Very specific:

    Add focused Bun tests in tests-ts/<module>.test.ts.

    line 35
  9. Common:

    Use deterministic fixtures, injected dependencies, and synthetic credentials.

    line 38
  10. Distinctive:

    Use separate temporary repository and output directories.

    line 40
  11. Very specific:

    Use native path helpers and argument arrays.

    line 41
  12. Distinctive:

    Keep shared tests enabled on Linux, macOS, and Windows.

    line 42
  13. Distinctive:

    After the implementation is verified, keep the test in the final change only when it provides meaningful, durable regression coverage.

    line 56

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Codex Security CLI

Codex Security is a thin CLI and SDK wrapper around Codex and its security plugin. Use their existing behavior instead of building another runtime.

Threat model

The CLI runs as the current user. Local tools and subprocesses under that account are not separate security principals. Scanned repositories can contain untrusted data. Their contents, model output, and imported artifacts do not authorize access to another target, disclosure of credentials, or writes outside an approved path.

Keep it simple

  • Prefer one source of truth for types, schemas, arguments, and state.
  • Keep --to as the only generic integration selector. Namespace other integration-specific options, such as --linear-* and --jira-*; do not generalize fields whose semantics differ across integrations.
  • Reuse Codex APIs and shared helpers instead of adding extra trust gates or orchestration.
  • Root read and workspace write are enough for the sandbox.
  • Treat repository paths, symlinks, archives, and other repository-controlled data as untrusted.
  • Keep credential access, storage, and configuration protections, unsafe-path checks, scan integrity, and settings the user explicitly requests.
  • Follow the root AGENTS.md diagnostic-text policy: do not reintroduce secret redaction in CLI/SDK output or saved diagnostics, or add a setting to control it.
  • Do not add arbitrary size, count, depth, or buffering limits to local inputs or Codex output. Keep limits required by an actual security boundary or an upstream contract.
  • Do not let optional logging, progress, or cost tracking stop a scan. Still enforce limits the user requests, such as --max-cost.
  • Preserve completed scan artifacts and keep database migrations append-only.
  • Support Windows as well as Unix. Use platform-aware path and process APIs, and test realistic Windows paths and directory links when relevant.
  • Favor direct flows and clear errors over defensive fallbacks for implausible cases.

Unit tests

Add focused Bun tests in tests-ts/<module>.test.ts. Cover observable behavior, accepted and rejected inputs, and each real bug or security boundary.

  • Use deterministic fixtures, injected dependencies, and synthetic credentials. Avoid the network, real credentials, shared state, timing-sensitive assertions, and tests of exact Markdown wording.
  • Restore spies, module mocks, timers, environment variables, and other global changes after each test. Isolate persistent ESM module mocks in a subprocess.
  • Use separate temporary repository and output directories. Compare canonical paths and remove fixtures afterward; do not change the process working directory.
  • Use native path helpers and argument arrays. Cover Windows drives, spaces, directory links, HOME and USERPROFILE, PATHEXT, and file URLs when relevant.
  • Keep shared tests enabled on Linux, macOS, and Windows. Test built or installed entrypoints when packaging behavior matters.

From the SDK directory, run a focused test while iterating, then run the package checks:

bun test --timeout 30000 tests-ts/<module>.test.ts
pnpm run test --seed 12345
pnpm run types
pnpm run format
pnpm run test

Tests run in random order by default. To reproduce a failure, use the seed printed in Bun's test summary.

After the implementation is verified, keep the test in the final change only when it provides meaningful, durable regression coverage. If it is merely disposable implementation scaffolding, duplicates existing coverage, or would add brittle or low-value maintenance burden, remove it before committing or opening a PR and do not include it in the submitted change.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.