Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
lint: Fix semgrep scanning of extensionless Python scripts.
Anders Kaseorgf4768b00300f
diff --git a/requirements/dev.in b/requirements/dev.inindex d9f61d71f4c..6ae065efaa9 100644--- a/requirements/dev.in+++ b/requirements/dev.in@@ -62,7 +62,7 @@ cairosvgpython-debian# Pattern-based lint tool-semgrep<1.38.0 # https://github.com/returntocorp/semgrep/issues/8669+semgrep# Contains Pysa, a security-focused static analyzerpyre-checkdiff --git a/tools/lint b/tools/lintindex dcd3e53fa90..f992b894a83 100755--- a/tools/lint+++ b/tools/lint@@ -180,17 +180,18 @@ def run() -> None:semgrep_command = ["semgrep",- "--config=./tools/semgrep.yml",+ "scan",+ "--scan-unknown-extensions","--error","--disable-version-check","--quiet",]linter_config.external_linter("semgrep-py",- [*semgrep_command, "--lang=python"],+ [*semgrep_command, "--config=./tools/semgrep-py.yml"],["py"],fix_arg="--autofix",- description="Syntactic grep (semgrep) code search tool (config: ./tools/semgrep.yml)",+ description="Syntactic grep (semgrep) code search tool (config: ./tools/semgrep-py.yml)",)linter_config.external_linter(diff --git a/tools/semgrep.yml b/tools/semgrep-py.ymlsimilarity index 100%rename from tools/semgrep.ymlrename to tools/semgrep-py.yml