sensitive-logging-audit

A review guide for finding and fixing places where a Python application’s logs, errors, or diagnostics might expose user data.

In plain words
What is it for?
Use it to inspect logging code, trace sensitive values, fix confirmed leaks, and test that redaction works even with deliberately difficult inputs.
Why use it?
It helps reveal leaks that simple text searches may miss, especially when sensitive values pass through exceptions, tracebacks, tool names, or other shared runtime paths.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/openai/openai-agents-python/sensitive-logging-audit
Any agent
npx skills add openai/openai-agents-python --skill sensitive-logging-audit
Clone the repo
git clone --depth 1 https://github.com/openai/openai-agents-python

Made for: Claude Code, Codex.

Per session 59 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 887 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00059 $0.00887
Opus 5 $0.00030 $0.00443
Sonnet 5 $0.00012 $0.00177
Haiku 4.5 $0.00006 $0.00089

Measured 2d ago against content hash 8bf2b53052c7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

sensitive-logging-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/inventory_logging.py, scripts/test_inventory.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/sensitive-logging-audit/SKILL.md · 79 lines

How it starts

The opening of the file, as written. The whole thing — 79 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sensitive Logging Audit

Objective

Find candidate output sinks, trace their values manually, fix demonstrated leaks at shared runtime boundaries, and prove redaction with adversarial tests.

The collector is only a syntax-based search aid. It does not resolve Python aliases or control flow, certify policy guards, or prove that an absent candidate is safe.

Workflow

1. Establish the review surface

  • Work in the current checkout and preserve unrelated changes.
  • Read src/agents/_debug.py, src/agents/logger.py, and the affected callers.
  • Treat exception messages, arguments, tracebacks, causes, contexts, notes, names, URLs, and arbitrary values as potentially sensitive.
  • Read the Python redaction validation matrix.

Run the collector tests, then collect candidates:

uv run python .agents/skills/sensitive-logging-audit/scripts/test_inventory.py
uv run python .agents/skills/sensitive-logging-audit/scripts/inventory_logging.py \
  --format json --output /tmp/sensitive-logging-candidates.json

The report intentionally contains no policy, safe, or guard classification.

2. Supplement the collector with source search

The collector does not follow assignments such as emit = logger.error. Search the source directly and inspect aliases, callbacks, wrappers, and reflective dispatch:

rg -n '\.(debug|info|warning|warn|error|exception|critical|fatal|log)\b' src/agents
rg -n '\b(print|pprint|pp|warn|warn_explicit|write|writelines|print_exc|print_exception)\b' src/agents
rg -n 'DONT_LOG_(MODEL|TOOL)_DATA|log_(model|tool|model_and_tool)_action' src/agents

Do not turn collector coverage or a textual guard into a security conclusion. Trace producers and callers.

3. Classify manually

Assign each reviewed path one disposition:

  • model: model requests, responses, Realtime events, or derived values.
  • tool: tool arguments, outputs, MCP data, tool events, or derived values.
  • model+tool: either class may reach the sink.
  • operational: demonstrated to contain only non-sensitive SDK metadata.
  • intentional-output: explicitly user-facing output rather than diagnostics.
  • uncertain: source tracing is incomplete.

Read the full file on GitHub · 79 lines

Files

What ships with it

4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 79 lines · 59 tokens per session scan A 8bf2b53052c7

Subscribe to this mod's changes

sensitive-logging-audit is a skill published in the GitHub repository openai/openai-agents-python (29,123 stars, last pushed yesterday), licensed MIT. It adds 59 tokens to every session and 887 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories