Add VedAstro secret and renderer audit tools
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
from scripts.configure_vedastro_secret import update_env_text
|
||||
|
||||
|
||||
def test_update_env_text_adds_and_replaces_vedastro_settings():
|
||||
text = "VEDASTRO_API_ENDPOINT=https://old.example/api\nOTHER=value\n"
|
||||
updated = update_env_text(
|
||||
text,
|
||||
{
|
||||
"VEDASTRO_API_KEY": "sample-secret",
|
||||
"VEDASTRO_API_ENDPOINT": "https://api.vedastro.org/api",
|
||||
"VEDASTRO_ENABLE_NETWORK": "1",
|
||||
},
|
||||
)
|
||||
assert "VEDASTRO_API_ENDPOINT=https://api.vedastro.org/api" in updated
|
||||
assert "VEDASTRO_API_KEY=sample-secret" in updated
|
||||
assert "VEDASTRO_ENABLE_NETWORK=1" in updated
|
||||
assert "OTHER=value" in updated
|
||||
assert "https://old.example/api" not in updated
|
||||
@@ -0,0 +1,9 @@
|
||||
from scripts.report_renderer_isolation_poc import run_poc
|
||||
|
||||
|
||||
def test_report_renderer_isolation_poc_never_claims_pass_without_browser() -> None:
|
||||
result = run_poc()
|
||||
assert result["status"] in {"pass", "fail", "blocked"}
|
||||
if result["status"] == "pass":
|
||||
assert result["http_probe_requests"] == 0
|
||||
assert result["blocked_resource_count"] >= 2
|
||||
Reference in New Issue
Block a user