Skip to main content

Module security

Module security 

Source
Expand description

Security checks for code indexing. Ports logic from src/gobby/code_index/security.py.

Functions§

glob_match
Simple glob matching supporting * and ? wildcards.
has_secret_extension
Check if file extension suggests secret content.
is_binary
Check if file appears to be binary (has null bytes anywhere in the stream).
is_symlink_safe
Check that a symlink target is still within root.
should_exclude_path
Check if a path should be excluded.
validate_path
Check that path resolves within root (prevents directory traversal).