MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / safe_member_name

Function safe_member_name

scripts/ci/verify-release-selection.py:251–259  ·  view source on GitHub ↗
(name: str)

Source from the content-addressed store, hash-verified

249
250
251def safe_member_name(name: str) -> bool:
252 if not name or "\\" in name or "\x00" in name or name.startswith("/"):
253 return False
254 pure = pathlib.PurePosixPath(name)
255 return (
256 not pure.is_absolute()
257 and pure.as_posix() == name
258 and all(part not in ("", ".", "..") for part in pure.parts)
259 )
260
261
262def hash_stream(stream: BinaryIO, *, declared_size: int, label: str) -> tuple[str, int]:

Callers 2

verify_tarFunction · 0.85
verify_zipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected