Harden the LLM judge, redact secrets in logs, add contributor docs

- Fence the target model's output in a <target_output> block the output
  can't close, so a jailbroken reply can't steer the judge's verdict.
- Mask credentials (secret query params, Bearer tokens, x-api-key, sk-/
  sk-ant-/hf_/AKIA keys) in every log record; hold httpcore at WARNING.
- Add a localhost OpenAI/Anthropic stand-in (tests/fakes) and a
  fake_llm_api fixture; it records header names only.
- Replace any set *_API_KEY with a placeholder in tests unless marked live.
- Add CONTRIBUTING.md, CLAUDE.md, a PR template and a real SECURITY.md.
This commit is contained in:
Alexander Myasoedov committed 2026-11-25 17:51:06 +02:00
1 parent 5c24fac86d
commit 8c956e0cb4
14 files changed
+842 -14

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
## What this changes
<!-- What and why, in a few lines. Link the issue if there is one. -->
## How it was tested
<!-- Tests added or run, and what you checked by hand. Report live scans as counts only. -->
## Checklist
- [ ] No real API key, token or customer endpoint anywhere in the code, tests, docs or this description ([CONTRIBUTING.md](../CONTRIBUTING.md)).
- [ ] `pytest` passes and new behaviour has a test. Tests don't call paid APIs.
- [ ] `pre-commit run --all-files` is clean.
- [ ] Docs updated if behaviour changed.