Skip to content

The agent that grows with you

test(skills): update openclaw-migration guard expectations for skills-guard-v2

ClintonEmokfaf873077905
diff --git a/tests/skills/test_openclaw_migration.py b/tests/skills/test_openclaw_migration.py
index 37a7a3bec1b..bfd69cc2d64 100644
--- a/tests/skills/test_openclaw_migration.py
+++ b/tests/skills/test_openclaw_migration.py
@@ -583,20 +583,15 @@ def test_skill_installs_cleanly_under_skills_guard():
source="official/migration/openclaw-migration",
)
- # The migration script has several known false-positive findings from the
- # security scanner. None represent actual threats — they are all legitimate
- # uses in a migration CLI tool:
- #
- # agent_config_mod — references AGENTS.md to migrate workspace instructions
- # python_os_environ — reads MIGRATION_JSON_OUTPUT to enable JSON output mode
- # (feature flag, not an env dump)
- # hermes_config_mod — print statements in the post-migration summary that
- # tell the user to *review* ~/.hermes/config.yaml;
- # the script never writes to that file
- #
- # Accept "caution" or "safe" — just not "dangerous" from a *real* threat.
- assert result.verdict in {"safe", "caution", "dangerous"}, f"Unexpected verdict: {result.verdict}"
- KNOWN_FALSE_POSITIVES = {"agent_config_mod", "python_os_environ", "hermes_config_mod"}
+ # The migration script's references to agent config files are legitimate:
+ # it mentions AGENTS.md to migrate workspace instructions and points the
+ # user at ~/.hermes/config.yaml in its post-migration summary — it never
+ # writes to either. Under skills-guard-v2 (#92021) these score as
+ # informational _ref findings (the old critical agent_config_mod /
+ # hermes_config_mod findings no longer fire for bare mentions), so the
+ # verdict is "safe" with no modification-intent findings at all.
+ assert result.verdict == "safe", f"Unexpected verdict: {result.verdict}"
+ KNOWN_FALSE_POSITIVES = {"agent_config_ref", "hermes_config_ref"}
for f in result.findings:
assert f.pattern_id in KNOWN_FALSE_POSITIVES, f"Unexpected finding: {f}"