MCPcopy Index your code
hub / github.com/geekcomputers/Python / is_safe_app_path

Function is_safe_app_path

JARVIS/apps.py:30–36  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

28
29
30def is_safe_app_path(path):
31 suffix = path.suffix.lower()
32 if suffix not in {".lnk", ".exe"}:
33 return False
34 name = normalize_text(app_name_from_path(path))
35 parts = {normalize_text(part) for part in path.parts}
36 return name not in BLOCKED_APPS and not (parts & BLOCKED_APPS)
37
38
39def build_application_index():

Callers 1

build_application_indexFunction · 0.85

Calls 2

normalize_textFunction · 0.85
app_name_from_pathFunction · 0.85

Tested by

no test coverage detected