MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _ensure_git_safe_dir

Function _ensure_git_safe_dir

webapp_modern.py:9250–9265  ·  view source on GitHub ↗

Whitelist the checkout in the running user's global git config so root operating on a 'ragnar'-owned tree doesn't hit 'detected dubious ownership'. --add only when missing so repeated updates don't pile up duplicates.

(repo_path: str)

Source from the content-addressed store, hash-verified

9248
9249 # Sync vulnerability count
9250 sync_vulnerability_count()
9251
9252 # ==============================================================================
9253 # PRIMARY DATA SOURCE: Read from SQLite database
9254 # ==============================================================================
9255
9256 aggregated_targets = 0
9257 aggregated_ports = 0 # Count total port instances across all hosts
9258 total_target_count = 0
9259 inactive_target_count = 0
9260 current_snapshot = {}
9261 discovered_macs = set()
9262 port_debug_info = [] # Track which hosts contribute to port count
9263
9264 # Read from SQLite database
9265 try:
9266 db = get_db(currentdir=shared_data.currentdir)
9267 hosts = db.get_all_hosts()
9268

Callers 2

_prepare_git_repoFunction · 0.85
check_updatesFunction · 0.85

Calls 1

runMethod · 0.45

Tested by

no test coverage detected