본문으로 건너뛰기
cccskills
무료GitHub에 공개

sensitive-logging-audit

Audit Python SDK logs, exceptions, and telemetry for sensitive data exposure. Trace values to their sources, fix confirmed leaks, and test that redaction hides sensitive information while preserving the caller's expected behavior.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

원문원문 설명 보기

Audit or fix sensitive-data exposure in Python SDK diagnostics, exceptions, logging, and telemetry.

설치 방법 보기

이럴 때 유용합니다

  • Audit logs and exceptions for sensitive data exposure
  • Fix leaks involving model or tool data
  • Test redaction and caller behavior
  • Review credentials and parameters exposed through MCP URLs

포함된 파일(5)

  • SKILL.md4.0 KB
  • agents/openai.yaml244 B
  • references/redaction-validation.md4.2 KB
  • scripts/inventory_logging.py11.7 KB
  • scripts/test_inventory.py5.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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.

Record evidence in the audit report. The script does not validate or inherit dispositions.

4. Fix runtime boundaries

Before changing runtime behavior, use $implementation-strategy.

  • Check the relevant _debug.DONT_LOG_MODEL_DATA and _debug.DONT_LOG_TOOL_DATA flags before formatting or inspecting sensitive values.
  • Redact mixed model/tool values when either flag disables data logging.
  • In redacted mode, emit a fixed message and omit sensitive args, extra, and exc_info.
  • Build diagnostic-only context lazily so redacted mode never reads it.
  • Preserve useful diagnostics when sensitive-data logging is explicitly enabled.
  • Keep logging failure from changing fallback, cleanup, event, rejection, or cancellation behavior.
  • For MCP URLs, remove credentials, query parameters, and fragments in diagnostic mode; never use sanitized names as a substitute for fixed redacted messages.

5. Prove caller behavior

Add tests at every changed caller boundary. Inspect the complete LogRecord, not only rendered text. Test both redacted policies, diagnostic mode, hostile objects, exception chains, and the caller's observable fallback or cleanup behavior as applicable.

6. Re-run and close out

Re-run the collector, the manual searches, focused tests, and applicable repository gates. Use $code-change-verification for runtime or test changes and $pr-draft-summary when required.

Report candidate counts as search coverage only. Lead with confirmed leaks fixed, retained intentional output, reviewed uncertainty, and verification results. Never report a clean collector result as proof that no sensitive logging path exists.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Run final checks on reviewed SDK changes, covering code formatting, linting for code issues, type checking, and tests. Confirm completion only after every required check succeeds, with wrappers for macOS, Linux, and Windows.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Verify runtime code changes after review
  • Run final checks after test or build configuration changes
  • Rerun required checks after fixing a failure
openai/openai-agents-python3만2026년 10월 18일 업데이트

Fix a small formatting bug in a credit note shell script while keeping the output label as credit and the amount positive. Run the specified targeted test and summarize the bug, fix, and verification command.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Fix a credit note output formatting bug
  • Check the credit label and positive amount
  • Run the specified test and report the fix
openai/openai-agents-python3만2026년 10월 18일 업데이트

Analyze CSV files with Python and get concise numerical summaries. The skill checks column structure before calculating requested aggregates, includes units when available, and explains assumptions when data is missing or incorrectly formatted.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Quick summaries of CSV data
  • Calculating requested aggregates
  • Reporting assumptions about missing or malformed data
openai/openai-agents-python3만2026년 10월 18일 업데이트

docs-sync

무료

Compare SDK implementation with English documentation to find missing features, incorrect defaults, and outdated behavior descriptions. Report evidence and suggested locations, or make requested updates while keeping navigation consistent and following the repository’s documentation checks.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Auditing documentation for a specific SDK feature
  • Updating English docs after implementation changes
  • Correcting outdated settings and default values
openai/openai-agents-python3만2026년 10월 18일 업데이트

Review logs and source files from a completed manual example run. Check that results are current and complete, verify intended behavior beyond successful exit codes, and distinguish product defects from environment or credential problems.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Review results after a manual example run
  • Verify behavior in examples that exited successfully
  • Separate product failures from environment problems
openai/openai-agents-python3만2026년 10월 18일 업데이트

Compare a Python SDK release plan or candidate with the previous release to assess compatibility, versioning, and proven regressions. Produce a ship-or-block recommendation, documentation handoff, and key changes for minor releases.

한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.

  • Plan the next patch or minor SDK release
  • Assess whether a release candidate can ship
  • Check compatibility and migration paths
openai/openai-agents-python3만2026년 10월 18일 업데이트

openai의 스킬 모두 보기

이 스킬의 문제 신고