Files
app-catalog-felhom.eu/scripts/check-security-scan.py
T

22 lines
1.0 KiB
Python
Executable File

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""check-security-scan.py — runs the SHARED dependency and secret scanner on this repo (R-986).
The gate itself lives in ONE place, `felhom.eu/scripts/security_scan_gate.py` (the reuse_refs_check.py rule: never
copied), and is WARN-FIRST — it lists hits and exits 0. This repo has no Go module, so it runs gitleaks on the pushed
commits only. If the sibling felhom.eu clone is absent this FAILS and names the path it tried: a runner that quietly
skips a gate is the inert-seam failure this project has shipped four times.
"""
import os
import subprocess
import sys
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
SHARED = os.path.join(os.path.dirname(ROOT), "felhom.eu", "scripts", "security_scan_gate.py")
if __name__ == "__main__":
if not os.path.isfile(SHARED):
print("FAIL: the shared gate is MISSING beside this clone (tried %s) — a failure, never a skip" % SHARED)
sys.exit(1)
sys.exit(subprocess.call([sys.executable, SHARED, ROOT]))