MCPcopy Create free account
hub / github.com/ParzivalHack/PySpector / test_rule_metadata

Method test_rule_metadata

tests/unit/test_ai_rules.py:112–116  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

110
111class TestAI206:
112 def test_rule_metadata(self):
113 rule = _ai_rule("AI206")
114 assert rule["severity"] == "High"
115 assert rule["cwe"] == "CWE-94"
116 assert rule["ast_match"] == AI206_MATCHER
117
118 def test_matcher_targets_true_keyword_only(self):
119 true_code = 'AutoModelForCausalLM.from_pretrained("example/model", trust_remote_code=True)'

Callers

nothing calls this directly

Calls 1

_ai_ruleFunction · 0.85

Tested by

no test coverage detected