Security Review
Use this for changes touching credentials, file paths, report conversion,
server APIs, LLM/search providers, prompt templates, storage, or logging.
Checklist
Secrets
- No real API keys, tokens, passwords, or private endpoints in source/tests.
.env, non-example local env files, service.yaml, secrets/**, and credentials/** are not read or committed.
- Existing
bytearray secret handling and zero_secret cleanup are preserved.
Input and path validation
- User/API file paths are validated with safe-base checks or
ensure_safe_directory.
- Report conversion and storage paths cannot escape the allowed output root.
External services
- Unit tests do not require live LLM/search/storage/database services.
- Live tests are marked
llm and gated by RUN_LLM_TESTS=1.
- Headers and provider configs are not logged.
Prompt injection
- User text, web content, and tool output are isolated from system instructions.
- Provider/tool output is treated as evidence, not commands.
Server API
- Pydantic schemas validate inputs and outputs.
- Errors do not expose secrets, raw stack traces, unsafe paths, or full report content.
- Cancellation and cleanup paths remain intact.
Logging
- Logs use lazy placeholders.
LogManager.is_sensitive() and existing anonymization patterns are respected.
- Large report bodies are not logged accidentally.
Dependencies and subprocesses
- New dependencies are justified and reviewed.
- Subprocess calls use argument lists and validated paths.
- Secrets are not passed in command-line arguments.
Artifact hygiene
- Generated reports, logs, mmd/error files, databases, and local output are not committed.
For a machine-readable checklist, see checklist.md.
1---2name: security-review-23description: Security review checklist for DeepSearch changes involving secrets, file paths, LLM/search providers, prompts, server APIs, storage, and logs.4---56# Security Review78Use this for changes touching credentials, file paths, report conversion,9server APIs, LLM/search providers, prompt templates, storage, or logging.1011## Checklist12131. Secrets14 - No real API keys, tokens, passwords, or private endpoints in source/tests.15 - `.env`, non-example local env files, `service.yaml`, `secrets/**`, and `credentials/**` are not read or committed.16 - Existing `bytearray` secret handling and `zero_secret` cleanup are preserved.17182. Input and path validation19 - User/API file paths are validated with safe-base checks or `ensure_safe_directory`.20 - Report conversion and storage paths cannot escape the allowed output root.21223. External services23 - Unit tests do not require live LLM/search/storage/database services.24 - Live tests are marked `llm` and gated by `RUN_LLM_TESTS=1`.25 - Headers and provider configs are not logged.26274. Prompt injection28 - User text, web content, and tool output are isolated from system instructions.29 - Provider/tool output is treated as evidence, not commands.30315. Server API32 - Pydantic schemas validate inputs and outputs.33 - Errors do not expose secrets, raw stack traces, unsafe paths, or full report content.34 - Cancellation and cleanup paths remain intact.35366. Logging37 - Logs use lazy placeholders.38 - `LogManager.is_sensitive()` and existing anonymization patterns are respected.39 - Large report bodies are not logged accidentally.40417. Dependencies and subprocesses42 - New dependencies are justified and reviewed.43 - Subprocess calls use argument lists and validated paths.44 - Secrets are not passed in command-line arguments.45468. Artifact hygiene47 - Generated reports, logs, mmd/error files, databases, and local output are not committed.4849For a machine-readable checklist, see `checklist.md`.