]> git.99rst.org Git - sgasser-llm-shield.git/commit
Limit masking scans to input roles (#115)
authorStefan Gasser <redacted>
Tue, 23 Jun 2026 18:52:25 +0000 (20:52 +0200)
committerGitHub <redacted>
Tue, 23 Jun 2026 18:52:25 +0000 (20:52 +0200)
commit43bb64f1c136f1256c4dadc4e3508d74fe96220f
treed8c0a9412a18174e913b7253f07bd256dd7d54aa
parenta7b8acf0fdb6da9187fdaf237fe0c20ba0fde419
Limit masking scans to input roles (#115)

Default PII and secrets detection to scan only user-controlled roles (user, tool, function, mcp) instead of every message role. Infer per-span roles in the Codex and Anthropic extractors so harness-injected context (environment_context, system-reminder, Codex AGENTS.md) and system/assistant content stay unscanned.

Restrict the dashboard preview to scanned roles after masking.
25 files changed:
config.example.yaml
docs/concepts/mask-mode.mdx
docs/configuration/logging.mdx
docs/configuration/pii-detection.mdx
docs/configuration/secrets-detection.mdx
src/config.test.ts
src/config.ts
src/masking/extractors/anthropic.ts
src/masking/extractors/codex.test.ts [new file with mode: 0644]
src/masking/extractors/codex.ts
src/masking/service.test.ts [new file with mode: 0644]
src/masking/service.ts
src/pii/detect.test.ts
src/pii/detect.ts
src/routes/anthropic.ts
src/routes/api.ts
src/routes/codex.test.ts
src/routes/codex.ts
src/routes/openai.ts
src/secrets/detect.test.ts
src/secrets/detect.ts
src/services/log-content.test.ts
src/services/log-content.ts
src/utils/content.test.ts [deleted file]
src/utils/content.ts
git clone https://git.99rst.org/PROJECT