fusiontest 0.2.45__tar.gz → 0.2.47__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.
- {fusiontest-0.2.45 → fusiontest-0.2.47}/PKG-INFO +1 -1
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/agent/verify.py +5 -1
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/__init__.py +7 -1
- fusiontest-0.2.47/fusiontest/bench/security.py +647 -0
- fusiontest-0.2.47/fusiontest/bench/suites/billing-security.yaml +104 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/shop-hard.yaml +5 -1
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/cli.py +243 -4
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/action_model.py +13 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/goal_verifier.py +4 -0
- fusiontest-0.2.47/fusiontest/security/__init__.py +11 -0
- fusiontest-0.2.47/fusiontest/security/checks.py +1034 -0
- fusiontest-0.2.47/fusiontest/security/config.py +117 -0
- fusiontest-0.2.47/fusiontest/security/engine.py +86 -0
- fusiontest-0.2.47/fusiontest/security/findings.py +93 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/PKG-INFO +1 -1
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/SOURCES.txt +7 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/entry_points.txt +3 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/pyproject.toml +4 -1
- {fusiontest-0.2.45 → fusiontest-0.2.47}/README.md +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/agent/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/agent/mcp_server.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/sites/shop/bugs.js +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/sites/shop/help.html +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/sites/shop/index.html +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/diffs/order-retry.diff +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/diffs/sale-banner.diff +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/diffs/stock-check.diff +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/shop-bugs.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/shop-intent.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/shop.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/bench/suites/todomvc.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/app_errors.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/bugs.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/netguard.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/promise_checker.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/replay.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/reproduce.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/runner.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/screen_parser.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/secrets.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/shared_traces.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/core/tokens.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/fusiontest_dashboard.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/github.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/hacker_news.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/httpbin.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/todomvc.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/demos/wikipedia.yaml +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/desktop/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/desktop/macos_adapter.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/desktop/playwright_adapter.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/desktop/windows_adapter.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/discovery/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/discovery/goal_generator.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/discovery/intent.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/guardrails/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/guardrails/engine.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/mobile/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/mobile/android_adapter.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/mobile/ios_adapter.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/reporting/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/reporting/reporter.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/training/__init__.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/training/data_collector.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/training/dataset_builder.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest/training/trainer.py +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/dependency_links.txt +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/not-zip-safe +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/requires.txt +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/fusiontest.egg-info/top_level.txt +0 -0
- {fusiontest-0.2.45 → fusiontest-0.2.47}/setup.cfg +0 -0
|
@@ -316,7 +316,11 @@ def read_change(diff_path: str | None = None, git_range: str | None = None,
|
|
|
316
316
|
except FileNotFoundError as exc:
|
|
317
317
|
raise RuntimeError("git isn't installed: pass the change as a diff") from exc
|
|
318
318
|
if done.returncode != 0:
|
|
319
|
-
|
|
319
|
+
if "not a git repository" in done.stderr.lower():
|
|
320
|
+
raise RuntimeError(f"{Path(cwd or '.').resolve()} isn't a git repository: run from "
|
|
321
|
+
"your project, or pass the change as a diff file or goals")
|
|
322
|
+
first = (done.stderr.strip().splitlines() or ["no output"])[0]
|
|
323
|
+
raise RuntimeError(f"`{' '.join(args)}` failed: {first[:200]}")
|
|
320
324
|
if not done.stdout.strip():
|
|
321
325
|
raise RuntimeError(f"`{' '.join(args)}` is empty: nothing changed to verify "
|
|
322
326
|
"(give a git range for committed changes, or goals to check)")
|
|
@@ -26,6 +26,9 @@ what was planted:
|
|
|
26
26
|
Bug suites can also list decoys: behaviour that looks broken but is correct
|
|
27
27
|
and explained on screen. A report about a decoy is a false report, counted as
|
|
28
28
|
a decoy trip.
|
|
29
|
+
|
|
30
|
+
A *security suite* (`kind: security`, ADR-011) measures Security checks the
|
|
31
|
+
same way, on a multi-user fixture app; see fusiontest/bench/security.py.
|
|
29
32
|
"""
|
|
30
33
|
|
|
31
34
|
from __future__ import annotations
|
|
@@ -42,6 +45,7 @@ from pathlib import Path
|
|
|
42
45
|
|
|
43
46
|
import yaml
|
|
44
47
|
|
|
48
|
+
from fusiontest.bench.security import SecuritySuite, load_security_suite
|
|
45
49
|
from fusiontest.core.runner import FusionTestRunner, RunnerConfig, RunResult, StepResult
|
|
46
50
|
|
|
47
51
|
EXPECTATIONS = ("pass", "fail")
|
|
@@ -136,7 +140,7 @@ def builtin_suites() -> list[str]:
|
|
|
136
140
|
if p.name.endswith(".yaml"))
|
|
137
141
|
|
|
138
142
|
|
|
139
|
-
def load_suite(name_or_path: str) -> Suite | BugSuite | IntentSuite:
|
|
143
|
+
def load_suite(name_or_path: str) -> Suite | BugSuite | IntentSuite | SecuritySuite:
|
|
140
144
|
"""A built-in suite by name, or a suite YAML file by path."""
|
|
141
145
|
path = Path(name_or_path)
|
|
142
146
|
if path.suffix in (".yaml", ".yml") and path.exists():
|
|
@@ -153,6 +157,8 @@ def load_suite(name_or_path: str) -> Suite | BugSuite | IntentSuite:
|
|
|
153
157
|
return _load_bug_suite(data, name_or_path)
|
|
154
158
|
if data.get("kind") == "intent":
|
|
155
159
|
return _load_intent_suite(data, name_or_path, base)
|
|
160
|
+
if data.get("kind") == "security":
|
|
161
|
+
return load_security_suite(data, name_or_path)
|
|
156
162
|
cases = []
|
|
157
163
|
for i, raw in enumerate(data.get("cases") or [], 1):
|
|
158
164
|
expect = str(raw.get("expect", "")).lower()
|