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

Method test_sc3_base64_exec

tests/unit/test_patterns.py:243–251  ·  view source on GitHub ↗

Detection of base64 decode + exec.

(self)

Source from the content-addressed store, hash-verified

241 assert any(f.rule_id == "SC2" for f in findings)
242
243 def test_sc3_base64_exec(self) -> None:
244 """Detection of base64 decode + exec."""
245 content = """
246import base64
247exec(base64.b64decode("aW1wb3J0IG9z"))
248"""
249 findings = supply_chain_module.analyze(content, "script.py", "python")
250 assert len(findings) >= 1
251 assert any(f.rule_id == "SC3" for f in findings)
252
253 def test_sc3_marshal_loads(self) -> None:
254 """Detection of marshal.loads."""

Callers

nothing calls this directly

Calls 1

analyzeMethod · 0.80

Tested by

no test coverage detected