pytest-wardenbot 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. pytest_wardenbot-0.1.0/.gitignore +67 -0
  2. pytest_wardenbot-0.1.0/BUILD-PLAN.md +332 -0
  3. pytest_wardenbot-0.1.0/LICENSE.md +201 -0
  4. pytest_wardenbot-0.1.0/PKG-INFO +171 -0
  5. pytest_wardenbot-0.1.0/README.md +126 -0
  6. pytest_wardenbot-0.1.0/pyproject.toml +143 -0
  7. pytest_wardenbot-0.1.0/src/pytest_wardenbot/__init__.py +27 -0
  8. pytest_wardenbot-0.1.0/src/pytest_wardenbot/_corpus_override.py +108 -0
  9. pytest_wardenbot-0.1.0/src/pytest_wardenbot/_errors.py +33 -0
  10. pytest_wardenbot-0.1.0/src/pytest_wardenbot/_formatting.py +97 -0
  11. pytest_wardenbot-0.1.0/src/pytest_wardenbot/_redaction.py +77 -0
  12. pytest_wardenbot-0.1.0/src/pytest_wardenbot/_util.py +29 -0
  13. pytest_wardenbot-0.1.0/src/pytest_wardenbot/adapters/__init__.py +36 -0
  14. pytest_wardenbot-0.1.0/src/pytest_wardenbot/adapters/_sync_bridge.py +51 -0
  15. pytest_wardenbot-0.1.0/src/pytest_wardenbot/adapters/anthropic_msgs.py +221 -0
  16. pytest_wardenbot-0.1.0/src/pytest_wardenbot/adapters/base.py +100 -0
  17. pytest_wardenbot-0.1.0/src/pytest_wardenbot/adapters/http.py +259 -0
  18. pytest_wardenbot-0.1.0/src/pytest_wardenbot/adapters/openai_chat.py +221 -0
  19. pytest_wardenbot-0.1.0/src/pytest_wardenbot/business_truth.py +174 -0
  20. pytest_wardenbot-0.1.0/src/pytest_wardenbot/canary.py +99 -0
  21. pytest_wardenbot-0.1.0/src/pytest_wardenbot/corpus/__init__.py +37 -0
  22. pytest_wardenbot-0.1.0/src/pytest_wardenbot/corpus/encoded_payloads.py +65 -0
  23. pytest_wardenbot-0.1.0/src/pytest_wardenbot/corpus/indirect_injection.py +68 -0
  24. pytest_wardenbot-0.1.0/src/pytest_wardenbot/corpus/jailbreak.py +44 -0
  25. pytest_wardenbot-0.1.0/src/pytest_wardenbot/corpus/multi_turn.py +69 -0
  26. pytest_wardenbot-0.1.0/src/pytest_wardenbot/corpus/off_topic.py +32 -0
  27. pytest_wardenbot-0.1.0/src/pytest_wardenbot/corpus/refusal_bypass.py +36 -0
  28. pytest_wardenbot-0.1.0/src/pytest_wardenbot/corpus/system_prompt_leak.py +30 -0
  29. pytest_wardenbot-0.1.0/src/pytest_wardenbot/grading/__init__.py +60 -0
  30. pytest_wardenbot-0.1.0/src/pytest_wardenbot/grading/deterministic.py +362 -0
  31. pytest_wardenbot-0.1.0/src/pytest_wardenbot/grading/judge.py +428 -0
  32. pytest_wardenbot-0.1.0/src/pytest_wardenbot/plugin.py +323 -0
  33. pytest_wardenbot-0.1.0/src/pytest_wardenbot/quickstart.py +320 -0
  34. pytest_wardenbot-0.1.0/src/pytest_wardenbot/remediation.py +60 -0
  35. pytest_wardenbot-0.1.0/src/pytest_wardenbot/runners/__init__.py +10 -0
  36. pytest_wardenbot-0.1.0/src/pytest_wardenbot/runners/base.py +43 -0
  37. pytest_wardenbot-0.1.0/src/pytest_wardenbot/tests/__init__.py +11 -0
  38. pytest_wardenbot-0.1.0/src/pytest_wardenbot/tests/test_business_truth.py +25 -0
  39. pytest_wardenbot-0.1.0/src/pytest_wardenbot/tests/test_canary_leak.py +52 -0
  40. pytest_wardenbot-0.1.0/src/pytest_wardenbot/tests/test_encoded_payloads.py +85 -0
  41. pytest_wardenbot-0.1.0/src/pytest_wardenbot/tests/test_indirect_injection.py +57 -0
  42. pytest_wardenbot-0.1.0/src/pytest_wardenbot/tests/test_multi_turn.py +67 -0
  43. pytest_wardenbot-0.1.0/src/pytest_wardenbot/tests/test_off_topic.py +54 -0
  44. pytest_wardenbot-0.1.0/src/pytest_wardenbot/tests/test_prompt_injection.py +54 -0
  45. pytest_wardenbot-0.1.0/src/pytest_wardenbot/tests/test_refusal_bypass.py +46 -0
  46. pytest_wardenbot-0.1.0/src/pytest_wardenbot/tests/test_semantic.py +43 -0
  47. pytest_wardenbot-0.1.0/src/pytest_wardenbot/tests/test_system_prompt_leak.py +47 -0
  48. pytest_wardenbot-0.1.0/tests/__init__.py +0 -0
  49. pytest_wardenbot-0.1.0/tests/conftest.py +6 -0
  50. pytest_wardenbot-0.1.0/tests/fixtures/__init__.py +0 -0
  51. pytest_wardenbot-0.1.0/tests/fixtures/mock_chatbot.py +198 -0
  52. pytest_wardenbot-0.1.0/tests/fixtures/stub_vendor_clients.py +175 -0
  53. pytest_wardenbot-0.1.0/tests/test_adapters.py +259 -0
  54. pytest_wardenbot-0.1.0/tests/test_anthropic_adapter.py +163 -0
  55. pytest_wardenbot-0.1.0/tests/test_async_http_adapter.py +146 -0
  56. pytest_wardenbot-0.1.0/tests/test_business_truth.py +225 -0
  57. pytest_wardenbot-0.1.0/tests/test_canary.py +56 -0
  58. pytest_wardenbot-0.1.0/tests/test_corpus.py +127 -0
  59. pytest_wardenbot-0.1.0/tests/test_corpus_override.py +96 -0
  60. pytest_wardenbot-0.1.0/tests/test_errors.py +32 -0
  61. pytest_wardenbot-0.1.0/tests/test_formatting.py +87 -0
  62. pytest_wardenbot-0.1.0/tests/test_grading.py +273 -0
  63. pytest_wardenbot-0.1.0/tests/test_judge.py +342 -0
  64. pytest_wardenbot-0.1.0/tests/test_openai_adapter.py +226 -0
  65. pytest_wardenbot-0.1.0/tests/test_plugin.py +787 -0
  66. pytest_wardenbot-0.1.0/tests/test_quickstart.py +193 -0
  67. pytest_wardenbot-0.1.0/tests/test_redaction.py +70 -0
  68. pytest_wardenbot-0.1.0/tests/test_remediation.py +41 -0
  69. pytest_wardenbot-0.1.0/tests/test_runners.py +57 -0
  70. pytest_wardenbot-0.1.0/tests/test_util.py +32 -0
@@ -0,0 +1,67 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ *.so
6
+ .Python
7
+ build/
8
+ develop-eggs/
9
+ dist/
10
+ downloads/
11
+ eggs/
12
+ .eggs/
13
+ lib/
14
+ lib64/
15
+ parts/
16
+ sdist/
17
+ var/
18
+ wheels/
19
+ share/python-wheels/
20
+ *.egg-info/
21
+ .installed.cfg
22
+ *.egg
23
+ MANIFEST
24
+
25
+ # Virtual environments
26
+ .venv/
27
+ venv/
28
+ ENV/
29
+ env/
30
+
31
+ # Testing
32
+ .pytest_cache/
33
+ .coverage
34
+ .coverage.*
35
+ coverage.xml
36
+ htmlcov/
37
+ .tox/
38
+ .nox/
39
+
40
+ # Type checkers
41
+ .mypy_cache/
42
+ .pyright/
43
+ .pyre/
44
+ .ruff_cache/
45
+
46
+ # IDEs
47
+ .vscode/
48
+ .idea/
49
+ *.swp
50
+ *.swo
51
+
52
+ # OS
53
+ .DS_Store
54
+ Thumbs.db
55
+
56
+ # Secrets / local config
57
+ .env
58
+ .env.local
59
+ *.local
60
+
61
+ # Docs build
62
+ site/
63
+ _site/
64
+
65
+ # Evaluation harness output (per-user, model-version-specific)
66
+ scripts/evaluation/results/
67
+ .pytest-eval-work/
@@ -0,0 +1,332 @@
1
+ # pytest-wardenbot — Build Plan
2
+
3
+ The plan for shipping `pytest-wardenbot` v0.1.0 to PyPI. ~7 sessions, each roughly half-day to full-day of focused work. Pulled forward from Wave 5 of the main WardenBot AI roadmap (see `~/Code/wardenbot/docs/implementation/14-execution-plan.md` §W5.13–W5.14) so the OSS funnel can seed dev mindshare before the managed Continuous Monitoring SaaS launches.
4
+
5
+ ## Context
6
+
7
+ **What this is:** An open-source pytest plugin (Apache 2.0) that ships curated tests for chatbots and LLM apps. Developers `pip install pytest-wardenbot`, point it at their chatbot, run `pytest`, get back pass/fail with agent-ready remediation prompts for any failures.
8
+
9
+ **Why now:** Three reasons.
10
+
11
+ 1. The plugin is genuinely standalone — no backend, no Stripe, no infra. It can ship before the managed SaaS does.
12
+ 2. Promptfoo (now OpenAI) and Giskard are racing toward our segment. A live PyPI package with stars and momentum plants a competitive flag.
13
+ 3. The attack corpus is something we need anyway. Building the plugin first means the corpus gets curated and battle-tested by real users before paid customers depend on it.
14
+
15
+ **What this is NOT:**
16
+ - Not the managed SaaS (that's Wave 6 of the main roadmap).
17
+ - Not a sales tool with a "buy now" CTA (until the SaaS exists, the CTA points to the [intake form](https://wardenbot.ai/intake/)).
18
+ - Not RAMPART-based (see §RAMPART below).
19
+ - Not a way to call our hosted API (Sentry-tier customers get that via a separate authenticated mode in v0.3+).
20
+
21
+ **Commitments we're making:**
22
+ - Apache 2.0 license, forever.
23
+ - Semver. No breaking changes within a major version.
24
+ - No telemetry by default. Ever.
25
+ - No bait-and-switch CTAs. The plugin's value proposition stands alone.
26
+ - ~10–20% of one engineer's time ongoing — the plugin is a marketing budget line, not a revenue line.
27
+
28
+ ---
29
+
30
+ ## RAMPART decision: defer to v0.2
31
+
32
+ The user asked specifically about including RAMPART. Decision: **defer to v0.2**. Reasoning:
33
+
34
+ | Concern | Detail |
35
+ |---|---|
36
+ | **Alpha software** | RAMPART v0.1.0 released 2026-05-19. Microsoft AI Red Team, 4 maintainers. APIs explicitly subject to change. Pinning to an alpha dependency in a *stable* OSS release of our own would be a chronic source of breakage. |
37
+ | **Agentic-only relevance** | RAMPART models XPIA (Cross-Prompt Injection Attack) — planting malicious instructions in data an agent reads, then triggering. The verdict logic returns UNDETERMINED for pure chatbots without tool calls. Our v0.1 users mostly have pure chatbots. |
38
+ | **Hard dependency conflict** | RAMPART pins `pyrit==0.13.0`. That collides with anyone else holding PyRIT. Bad neighbor for a general-purpose pytest plugin. |
39
+ | **No built-in chatbot adapters** | RAMPART ships zero adapters for OpenAI / Anthropic / LangChain / MCP / HTTP. We'd write them ourselves. Worth doing, but not before v0.1 ships. |
40
+
41
+ **v0.2 path:** ship RAMPART as an optional extras install — `pip install pytest-wardenbot[agentic]` — gated to users who declare their bot has tools. The `AttackRunner` adapter pattern in v0.1 makes this drop-in (we just register a `RampartAttackRunner` alongside the deterministic / DeepEval-judge runners).
42
+
43
+ Architecture decision: **v0.1 ships the adapter abstraction even though only one or two runners use it.** The cost is a Protocol class and a registry; the benefit is RAMPART (and any future runners) drop in without refactor.
44
+
45
+ ---
46
+
47
+ ## v0.1 scope
48
+
49
+ **Tests we ship in v0.1** (target: 15 deterministic + 5 optional LLM-judge):
50
+
51
+ | Category | Count | Grading | Requires API key? |
52
+ |---|---|---|---|
53
+ | Prompt-injection probes (regex on bad output) | 5 | deterministic | no |
54
+ | System-prompt leak elicitation (substring on canary) | 3 | deterministic | no |
55
+ | Refusal-bypass patterns (regex on disallowed-content tokens) | 3 | deterministic | no |
56
+ | Business-truth assertion helpers (numeric / exact / substring match) | 2 (helpers; user-configured) | deterministic | no |
57
+ | Off-topic deflection (substring on refusal markers) | 2 | deterministic | no |
58
+ | Optional: semantic-equivalence checks via DeepEval | 5 | LLM judge | user's API key |
59
+
60
+ The 15-deterministic-test floor matters: a new user runs `pytest` and sees 15 tests run in under 30 seconds against their bot with zero API spend. That's the install-to-first-green-test path that converts.
61
+
62
+ **Chatbot adapters in v0.1:**
63
+ - `HTTPChatbotAdapter` — generic HTTP POST with configurable auth (bearer / api-key header / custom header)
64
+ - `OpenAIChatAdapter` — OpenAI Chat Completions API (optional extra: `pip install pytest-wardenbot[openai]`)
65
+ - `AnthropicMessagesAdapter` — Anthropic Messages API (optional extra: `pip install pytest-wardenbot[anthropic]`)
66
+
67
+ LangChain, MCP, OpenAI Assistants, Slack/Teams/Discord adapters: v0.2+.
68
+
69
+ **Tech stack:**
70
+ - Python 3.11+ (matches RAMPART; modern enough for `Protocol` + `Self` types).
71
+ - `pytest >= 8` as the core runtime.
72
+ - `pydantic >= 2` for adapter / response models.
73
+ - `httpx` for HTTP transport.
74
+ - `pytest-asyncio` for async-fixture tests.
75
+ - Optional: `openai`, `anthropic`, `deepeval` — extras only.
76
+
77
+ **Package structure:**
78
+
79
+ ```
80
+ pytest-wardenbot/
81
+ ├── README.md
82
+ ├── LICENSE.md # Apache 2.0 (already in place)
83
+ ├── BUILD-PLAN.md # this doc
84
+ ├── pyproject.toml
85
+ ├── .gitignore
86
+ ├── .github/workflows/ci.yml
87
+ ├── src/pytest_wardenbot/
88
+ │ ├── __init__.py
89
+ │ ├── plugin.py # pytest plugin entry point + fixtures
90
+ │ ├── adapters/
91
+ │ │ ├── __init__.py
92
+ │ │ ├── base.py # ChatbotAdapter Protocol
93
+ │ │ ├── http.py # generic HTTP adapter
94
+ │ │ ├── openai_chat.py # optional
95
+ │ │ └── anthropic_msgs.py # optional
96
+ │ ├── runners/
97
+ │ │ ├── __init__.py
98
+ │ │ └── base.py # AttackRunner Protocol (for RAMPART hook in v0.2)
99
+ │ ├── tests/ # the shipped tests
100
+ │ │ ├── __init__.py
101
+ │ │ ├── test_prompt_injection.py
102
+ │ │ ├── test_system_prompt_leak.py
103
+ │ │ ├── test_refusal_bypass.py
104
+ │ │ ├── test_business_truth.py
105
+ │ │ ├── test_off_topic.py
106
+ │ │ └── test_semantic.py # optional, requires [judge] extra
107
+ │ ├── grading/
108
+ │ │ ├── __init__.py
109
+ │ │ ├── deterministic.py
110
+ │ │ └── judge.py # optional, requires [judge] extra
111
+ │ ├── corpus/ # canonical attack strings
112
+ │ │ ├── __init__.py
113
+ │ │ ├── jailbreak.py
114
+ │ │ ├── leak_elicitation.py
115
+ │ │ └── refusal_patterns.py
116
+ │ └── remediation.py # agent-ready Markdown formatter
117
+ ├── tests/ # tests OF the plugin itself
118
+ │ ├── conftest.py
119
+ │ ├── test_adapters.py
120
+ │ ├── test_grading.py
121
+ │ ├── test_plugin.py
122
+ │ └── fixtures/
123
+ │ └── mock_chatbot.py
124
+ ├── examples/
125
+ │ ├── README.md
126
+ │ ├── basic_http.py
127
+ │ ├── openai_assistant.py
128
+ │ └── github_actions.yml
129
+ └── docs/
130
+ └── (deferred to session 6 — mkdocs-material)
131
+ ```
132
+
133
+ ---
134
+
135
+ ## Session breakdown
136
+
137
+ Each session is sized for ~half-day to full-day of focused work. Doable across 2–3 weekends or 2 weeks of evening sessions.
138
+
139
+ ### Session 1 — Scaffold + first working test (today)
140
+
141
+ **Scope:** Get to a state where `pip install -e .` works AND `pytest` discovers and runs at least one wardenbot test against a mock chatbot.
142
+
143
+ **Deliverables:**
144
+ - `pyproject.toml` with metadata, deps, extras
145
+ - `.gitignore` for Python projects
146
+ - `src/pytest_wardenbot/__init__.py` + version
147
+ - `src/pytest_wardenbot/adapters/base.py` — `ChatbotAdapter` Protocol
148
+ - `src/pytest_wardenbot/adapters/http.py` — `HTTPChatbotAdapter`
149
+ - `src/pytest_wardenbot/plugin.py` — pytest plugin entry point with a `chatbot` fixture
150
+ - `src/pytest_wardenbot/tests/test_prompt_injection.py` — ONE deterministic prompt-injection test
151
+ - `src/pytest_wardenbot/corpus/jailbreak.py` — small starter corpus (5 entries)
152
+ - `src/pytest_wardenbot/grading/deterministic.py` — `assert_no_harmful_content` helper
153
+ - `src/pytest_wardenbot/remediation.py` — basic Markdown formatter
154
+ - `tests/fixtures/mock_chatbot.py` — in-memory chatbot for testing the plugin itself
155
+ - `tests/test_plugin.py` — at least one assertion that the plugin loads + the test runs
156
+ - `.github/workflows/ci.yml` — lint + test on push
157
+ - README slightly improved (still minimal; full marketing wait until launch)
158
+
159
+ **DoD:**
160
+ - `pip install -e .` succeeds locally
161
+ - `pytest tests/` passes (plugin's own tests)
162
+ - A user can write a `conftest.py` that registers an `HTTPChatbotAdapter`, then `pytest --pyargs pytest_wardenbot.tests` runs the shipped test against it
163
+ - CI passes on push
164
+
165
+ ### Session 2 — Fill out the deterministic test corpus
166
+
167
+ **Scope:** Author the remaining 14 deterministic tests + their corpus entries.
168
+
169
+ **Deliverables:**
170
+ - 5 prompt-injection variants (jailbreak fragments, "ignore previous instructions" variants, prompt-leak triggers, payload smuggling)
171
+ - 3 system-prompt leak elicitation tests
172
+ - 3 refusal-bypass tests (role-play, "for educational purposes", DAN-style)
173
+ - 2 business-truth helpers (`assert_truth_fact_match`, supports exact / substring / numeric)
174
+ - 2 off-topic deflection tests
175
+ - Each test ships with a structured failure message + agent-ready remediation Markdown
176
+ - Corpus entries grow to a reasonable starter set (~50 attack strings across categories)
177
+
178
+ **DoD:**
179
+ - All 15 deterministic tests pass against a known-safe mock chatbot
180
+ - Each test fails predictably against a known-vulnerable mock chatbot (a fixture that intentionally fails specific patterns)
181
+ - 80%+ coverage on the plugin code
182
+
183
+ ### Session 3 — Optional LLM-judge tests (DeepEval extra)
184
+
185
+ **Scope:** Add the 5 optional tests that require an LLM judge.
186
+
187
+ **Deliverables:**
188
+ - `src/pytest_wardenbot/grading/judge.py` — DeepEval wrapper
189
+ - `src/pytest_wardenbot/tests/test_semantic.py` — 5 semantic checks (semantic equivalence, brand alignment, hallucination, off-policy answer, refusal quality)
190
+ - DAG-style rubrics following the three-layer-grading discipline from the main plan (`15-continuous-monitoring.md §4.1`)
191
+ - Clear documentation about API key requirement
192
+ - Tests are auto-skipped if `[judge]` extra isn't installed
193
+
194
+ **DoD:**
195
+ - `pip install pytest-wardenbot[judge]` works
196
+ - LLM-judge tests run against a known-correct chatbot using a user-supplied API key
197
+ - LLM-judge tests skip gracefully if extra not installed or API key missing
198
+ - Cost-per-run for the 5 LLM-judge tests is documented (~$0.02 against Haiku)
199
+
200
+ ### Session 4 — DX polish + quickstart command
201
+
202
+ **Scope:** Make the install-to-first-test path under 60 seconds.
203
+
204
+ **Deliverables:**
205
+ - `pytest-wardenbot --quickstart` CLI command (via pytest entry point) that generates a starter `conftest.py` + `test_my_bot.py` in the current directory
206
+ - Industry templates: e-commerce, SaaS support, generic
207
+ - Verbose failure messages with agent-ready Markdown
208
+ - Custom pytest markers: `@pytest.mark.wardenbot`, `@pytest.mark.severity('high'|'medium'|'low')`
209
+ - `examples/` directory with 3 worked examples (basic HTTP, OpenAI Assistant, GitHub Actions integration)
210
+ - Updated README with the install-to-first-test quickstart
211
+
212
+ **DoD:**
213
+ - A new user can go from `pip install pytest-wardenbot` to first green test in under 60 seconds (verified by stopwatch)
214
+ - Examples all run cleanly against test fixtures
215
+
216
+ ### Session 5 — CI + repo polish
217
+
218
+ **Scope:** GitHub repo hygiene that makes the project look maintained.
219
+
220
+ **Deliverables:**
221
+ - GitHub Actions: lint (`ruff`), typecheck (`pyright` strict), tests across Python 3.11/3.12/3.13, coverage report
222
+ - `pre-commit` config
223
+ - Issue templates (bug report, feature request, test request)
224
+ - Pull request template
225
+ - `CONTRIBUTING.md` with the "out of scope" rule documented (anything the SaaS does is out of scope for the plugin)
226
+ - `CODE_OF_CONDUCT.md`
227
+ - `SECURITY.md` (per pytest-dev convention)
228
+ - Badges in README: PyPI version, Python versions supported, CI status, coverage, downloads/month
229
+
230
+ **DoD:**
231
+ - All CI runs green
232
+ - 85%+ test coverage
233
+ - Pre-commit hooks catch issues locally
234
+
235
+ ### Session 6 — Docs site
236
+
237
+ **Scope:** A real documentation site, not just a README.
238
+
239
+ **Deliverables:**
240
+ - `mkdocs-material` setup in `/docs`
241
+ - Site published via GitHub Pages at `pytest-wardenbot.wardenbot.ai` (or `wardenbot.github.io/pytest-wardenbot` for v0.1)
242
+ - Pages: Quickstart (60-second install-to-test), Per-test docs (what each test catches, why it matters), Adapter how-to ("add your chatbot"), Custom tests how-to, FAQ, Changelog, API reference auto-generated
243
+ - Cross-link from README
244
+
245
+ **DoD:**
246
+ - Docs site live and navigable
247
+ - Quickstart actually works for a new user following only the docs
248
+
249
+ ### Session 7 — Launch
250
+
251
+ **Scope:** Coordinated PyPI release + community launch sequence.
252
+
253
+ **Deliverables:**
254
+ - PyPI release of `pytest-wardenbot 0.1.0`
255
+ - GitHub repo: tagged release with release notes
256
+ - Submit PR to pytest-dev/pytest plugin list
257
+ - Launch posts (drafted in advance; published staggered):
258
+ - Day 1: personal dev.to / blog post
259
+ - Day 2: /r/Python "Show /r/Python"
260
+ - Day 3: /r/LangChain "I built a pytest plugin for chatbot testing"
261
+ - Day 4: Show HN
262
+ - Day 5: Twitter/X with demo GIF
263
+ - Day 6–7: DM ~20 LLM-app maintainers with personalized pitch
264
+ - README updated with marketing-flavored hero section
265
+
266
+ **DoD:**
267
+ - Package live on PyPI; `pip install pytest-wardenbot` works for anyone
268
+ - First external star / issue / install
269
+ - Listed on pytest's official plugin list
270
+
271
+ ---
272
+
273
+ ## Working metrics (month 1 post-launch)
274
+
275
+ From the plugin-distribution research:
276
+
277
+ | Metric | Healthy | Failing |
278
+ |---|---|---|
279
+ | PyPI installs/week | 500+ | <100 |
280
+ | GitHub stars | 100+ | <20 |
281
+ | Inbound real-user issues | 5+ | 0 |
282
+ | External blog mentions | 3+ | 0 |
283
+ | Click-through on upgrade footer | 2%+ | <0.5% |
284
+
285
+ If at week 6 we're <100 installs/week with no external mentions, the *framing* is wrong (not the channel). Re-evaluate before sinking more time.
286
+
287
+ ---
288
+
289
+ ## Out of scope for v0.1 (deferred to v0.2+)
290
+
291
+ To keep v0.1 launchable, these wait:
292
+
293
+ - RAMPART runner (v0.2 — gated to `[agentic]` extra)
294
+ - LangChain / MCP / Slack / Discord adapters (v0.2)
295
+ - Authenticated "run against your WardenBot AI subscription" mode (v0.3, requires the SaaS to exist)
296
+ - Custom corpus uploads (v0.3 — Sentry+ tier feature)
297
+ - Multi-turn attack chains beyond basic (v0.2 — full PyRIT integration)
298
+ - Browser-recon adapter (Castle/Sentry feature; doesn't belong in OSS)
299
+ - `pytest-wardenbot --report-html` (nice-to-have, defer to v0.2)
300
+ - pytest-html report integration (v0.2)
301
+
302
+ ---
303
+
304
+ ## Upgrade CTA strategy (intake form for now)
305
+
306
+ Until the managed SaaS launches, the plugin's footer message on every test run:
307
+
308
+ ```
309
+ 30 tests passed. ✅
310
+ Want continuous monitoring across all your bots, daily? Tell us about your setup → wardenbot.ai/intake/
311
+ ```
312
+
313
+ No "subscribe now" CTAs. No bait-and-switch. The plugin's value stands alone; the upgrade path is honest about the SaaS not being live yet.
314
+
315
+ When the SaaS launches in Wave 6, this footer changes to a real signup link.
316
+
317
+ ---
318
+
319
+ ## Maintenance commitment
320
+
321
+ - ~10–20% of one engineer's time, indefinitely.
322
+ - Triage rule: anything the SaaS will do is **out of scope** for the plugin (documented in CONTRIBUTING.md). Politely decline PRs that try to add SaaS-like features.
323
+ - Monthly minor release on the second Tuesday: dependency updates, small test additions, bug fixes.
324
+ - Major releases (breaking changes): no more than annually, with 6-month deprecation warnings.
325
+ - Telemetry: **opt-in only**. Never default-on. Never phone home.
326
+ - License: Apache 2.0 forever. **No license rugpulls** (HashiCorp / ElasticSearch / MongoDB taught the lesson).
327
+
328
+ ---
329
+
330
+ ## TL;DR
331
+
332
+ 7 sessions, ~2–3 weeks of focused founder time, to ship `pytest-wardenbot 0.1.0`. Defer RAMPART to v0.2 (alpha software + agentic-only relevance). Ship 30 deterministic tests + 5 optional LLM-judge case factories + opt-in canary-leak test. Lean install, frictionless first-test path, honest intake-form CTA. Start today with Session 1.
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.