test(ci): пробник HIGH-находки для bandit (B602) — Refs #17
ci / lint (push) Failing after 30s
ci / unit (push) Has been skipped
ci / security (push) Has been skipped
contract-openapi / openapi-contract (push) Failing after 28s
contract-openapi / ts-client-is-current (push) Failing after 38s
ci / build (push) Has been skipped
ci / image-scan (push) Has been skipped
ci / push (push) Has been skipped

This commit is contained in:
2026-10-28 22:39:20 +03:00
parent 66864a3be7
commit 4dcda61ec9
+15
View File
@@ -0,0 +1,15 @@
"""CI-пробник для негативного прогона гейта security (bandit).
Содержит намеренно небезопасный вызов `subprocess.call(..., shell=True)` —
bandit B602, severity HIGH. Файл живёт только в ветке `ci/17-gate-negative`
и удаляется вместе с ней; в `main`/`feat/*` его нет.
"""
from __future__ import annotations
import subprocess
def run_probe(cmd: str) -> int:
"""Намеренно небезопасно: shell=True (bandit B602 -> HIGH)."""
return subprocess.call(cmd, shell=True) # noqa: S602