gitgalaxy 2.0.0__tar.gz → 2.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gitgalaxy-2.0.0/gitgalaxy.egg-info → gitgalaxy-2.0.2}/PKG-INFO +1 -1
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/galaxyscope.py +2 -2
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/recorders/llm_recorder.py +2 -2
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/recorders/record_keeper.py +94 -90
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2/gitgalaxy.egg-info}/PKG-INFO +1 -1
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/pyproject.toml +1 -1
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/LICENSE +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/MANIFEST.in +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/README.md +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/__init__.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/cobol_refractor_controller.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/cobol_to_java_controller.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/core/__init__.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/core/aperture.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/core/detector.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/core/guidestar_lens.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/core/network_risk_sensor.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/core/prism.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/core/state_rehydrator.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/physics/__init__.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/physics/chronometer.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/physics/neural_auditor.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/physics/signal_processor.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/physics/spectral_auditor.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/recorders/__init__.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/recorders/audit_recorder.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/recorders/gpu_recorder.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/security/__init__.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/security/security_auditor.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/security/security_lens.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/standards/__init__.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/standards/analysis_lens.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/standards/gitgalaxy_config.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/standards/language_lens.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/standards/language_standards.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/__init__.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/ai_guardrails/ai_appsec_sensor.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/ai_guardrails/dev_agent_firewall.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_agent_task_forge.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_compiler_forge.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_dag_architect.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_etl_unpacker.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_graveyard_finder.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_jcl_auditor.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_jcl_forge.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_lexical_patcher.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_microservice_slicer.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_schema_forge.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_system_limits_reporter.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_java/batch_test_harness.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_java/cobol_to_java_agent_forge.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_java/cobol_to_java_api_contract_forge.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_java/cobol_to_java_build_forge.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_java/cobol_to_java_decoder_forge.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_java/cobol_to_java_service_forge.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_java/cobol_to_java_spring_forge.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/compliance/sbom_generator.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/network_auditing/full_api_network_map.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/supply_chain_security/binary_anomaly_detector.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/supply_chain_security/supply_chain_firewall.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/supply_chain_security/vault_sentinel.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/terabyte_log_scanning/pii_leak_hunter.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/terabyte_log_scanning/terabyte_log_scanner.py +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy.egg-info/SOURCES.txt +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy.egg-info/dependency_links.txt +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy.egg-info/entry_points.txt +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy.egg-info/top_level.txt +0 -0
- {gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitgalaxy
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: An AST-free, zero-trust static analysis engine for mapping architectural risk, securing CI/CD pipelines, and modernizing legacy monoliths.
|
|
5
5
|
Author: Joseph Michael Esquibel
|
|
6
6
|
Project-URL: Homepage, https://gitgalaxy.io
|
|
@@ -41,8 +41,8 @@ from gitgalaxy.recorders.llm_recorder import LLMRecorder
|
|
|
41
41
|
from gitgalaxy.recorders.record_keeper import RecordKeeper
|
|
42
42
|
from gitgalaxy.security.security_lens import SecurityLens
|
|
43
43
|
from gitgalaxy.security.security_auditor import SecurityAuditor
|
|
44
|
-
from gitgalaxy.ai_guardrails.dev_agent_firewall import DevAgentFirewall
|
|
45
|
-
from gitgalaxy.ai_guardrails.ai_appsec_sensor import AIAppSecSensor
|
|
44
|
+
from gitgalaxy.tools.ai_guardrails.dev_agent_firewall import DevAgentFirewall
|
|
45
|
+
from gitgalaxy.tools.ai_guardrails.ai_appsec_sensor import AIAppSecSensor
|
|
46
46
|
from gitgalaxy.standards.gitgalaxy_config import APERTURE_CONFIG, PRIORITY_WHITELIST, GUIDESTAR_CONFIG, EXACT_FILE_MATCH, STATIC_ARCHETYPES, ORCHESTRATOR_RULES, COMMENT_DEFINITIONS
|
|
47
47
|
from gitgalaxy.standards.language_standards import LANGUAGE_DEFINITIONS, PROJECT_OVERRIDES
|
|
48
48
|
from gitgalaxy.standards.analysis_lens import ThreatPolicy, PATH_MODIFIERS, PHYSICS_ASSET_MASKS
|
|
@@ -1106,9 +1106,9 @@ class LLMRecorder:
|
|
|
1106
1106
|
repo_macro_species, repo_z_score, max_algorithmic_complexity, max_db_complexity,
|
|
1107
1107
|
{", ".join(self.RISK_SCHEMA)}
|
|
1108
1108
|
)
|
|
1109
|
-
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, {", ".join(['?'] * len(self.RISK_SCHEMA))})
|
|
1109
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, {", ".join(['?'] * len(self.RISK_SCHEMA))})
|
|
1110
1110
|
''', (
|
|
1111
|
-
p, Path(p).name, c_name, star.get("lang_id"), star.get("lock_tier"),
|
|
1111
|
+
p, Path(p).name, parent_entity, c_name, star.get("lang_id"), star.get("lock_tier"),
|
|
1112
1112
|
star.get("total_loc"), star.get("coding_loc"), star.get("doc_loc", 0), star.get("file_impact"),
|
|
1113
1113
|
tel.get("control_flow_ratio"), tel.get("author_distribution"), tel.get("ownership_entropy"),
|
|
1114
1114
|
tel.get("raw_churn_freq"), tel.get("densities", {}).get("cog_raw"), tel.get("ownership"), pop_count,
|
|
@@ -153,6 +153,10 @@ class RecordKeeper:
|
|
|
153
153
|
pct_z_above_15 REAL DEFAULT 0.0,
|
|
154
154
|
file_archetype TEXT,
|
|
155
155
|
file_fingerprint TEXT,
|
|
156
|
+
repo_macro_species TEXT,
|
|
157
|
+
repo_z_score REAL,
|
|
158
|
+
max_algorithmic_complexity TEXT,
|
|
159
|
+
max_db_complexity INTEGER,
|
|
156
160
|
ai_threat_score REAL,
|
|
157
161
|
is_malware INTEGER,
|
|
158
162
|
has_credentials INTEGER,
|
|
@@ -171,7 +175,6 @@ class RecordKeeper:
|
|
|
171
175
|
{", ".join(hit_cols)}
|
|
172
176
|
)
|
|
173
177
|
''')
|
|
174
|
-
|
|
175
178
|
cursor.execute('''
|
|
176
179
|
CREATE TABLE IF NOT EXISTS class_data (
|
|
177
180
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
@@ -373,6 +376,7 @@ class RecordKeeper:
|
|
|
373
376
|
tel.get("ownership", "Unknown"), ai_threat_class, ai_threat,
|
|
374
377
|
func_z_max, func_z_mean, func_z_median, pct_z_above_5, pct_z_above_15,
|
|
375
378
|
file_archetype, file_fingerprint_str,
|
|
379
|
+
repo_macro, repo_z,
|
|
376
380
|
tel.get("max_algorithmic_complexity", "O(N)"), int(tel.get("max_db_complexity", 0)),
|
|
377
381
|
ai_score, is_malware, has_creds, bin_anomaly, glassworm,
|
|
378
382
|
file_token_mass, file_read_cost, is_black_hole, req_hitl,
|
|
@@ -386,7 +390,7 @@ class RecordKeeper:
|
|
|
386
390
|
|
|
387
391
|
cursor.execute(f'''
|
|
388
392
|
INSERT INTO file_data (
|
|
389
|
-
repo_name, commit_date, commit_hash, file_name, file_path, language, constellation,
|
|
393
|
+
repo_name, commit_date, commit_hash, file_name, file_path, parent_entity, language, constellation,
|
|
390
394
|
total_loc, coding_loc, structural_mass, cog_raw, ownership_entropy, silo_risk,
|
|
391
395
|
raw_churn_freq, popularity, import_count, pagerank_score, normalized_blast_radius, betweenness_score, closeness_score, producer_ratio, ecosystem_role,
|
|
392
396
|
control_flow_ratio, function_count, class_count,
|
|
@@ -398,7 +402,7 @@ class RecordKeeper:
|
|
|
398
402
|
repo_macro_species, repo_z_score,
|
|
399
403
|
max_algorithmic_complexity, max_db_complexity,
|
|
400
404
|
ai_threat_score, is_malware, has_credentials, binary_anomaly, glassworm_flag,
|
|
401
|
-
token_mass, financial_read_cost, agentic_black_hole, requires_hitl, appsec_rce_funnel, appsec_god_mode, appsec_exfiltration,
|
|
405
|
+
token_mass, financial_read_cost, agentic_black_hole, requires_hitl, appsec_rce_funnel, appsec_god_mode, appsec_exfiltration, hallucination_zone, silent_mutation_risk,
|
|
402
406
|
{", ".join([f"risk_{r.replace('-', '_')}" for r in self.RISK_SCHEMA])},
|
|
403
407
|
{", ".join([self.SHORT_KEY_MAP.get(h, h) for h in self.SIGNAL_SCHEMA])}
|
|
404
408
|
) VALUES ({placeholders})
|
|
@@ -460,7 +464,7 @@ class RecordKeeper:
|
|
|
460
464
|
func_placeholders = ",".join(["?"] * len(func_rows[0]))
|
|
461
465
|
cursor.executemany(f'''
|
|
462
466
|
INSERT INTO function_data
|
|
463
|
-
(file_id, func_name, complexity, loc, args, usage_status, keyword_density, func_archetype, func_z_score, big_o_depth, is_recursive, db_complexity, docstring, calls_out_to, token_mass, {", ".join([self.SHORT_KEY_MAP.get(h, h) for h in self.SIGNAL_SCHEMA])})
|
|
467
|
+
(file_id, parent_class_id, func_name, complexity, loc, args, usage_status, keyword_density, func_archetype, func_z_score, big_o_depth, is_recursive, db_complexity, docstring, calls_out_to, token_mass, {", ".join([self.SHORT_KEY_MAP.get(h, h) for h in self.SIGNAL_SCHEMA])})
|
|
464
468
|
VALUES ({func_placeholders})
|
|
465
469
|
''', func_rows)
|
|
466
470
|
|
|
@@ -519,7 +523,7 @@ class RecordKeeper:
|
|
|
519
523
|
) VALUES ({repo_placeholders})
|
|
520
524
|
''', repo_row_data)
|
|
521
525
|
|
|
522
|
-
|
|
526
|
+
# 4. DARK MATTER LEDGER INSERTION
|
|
523
527
|
dark_rows = []
|
|
524
528
|
for dark in singularity:
|
|
525
529
|
path = dark.get("path", "")
|
|
@@ -530,89 +534,89 @@ class RecordKeeper:
|
|
|
530
534
|
])
|
|
531
535
|
|
|
532
536
|
if dark_rows:
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
for star in stars:
|
|
546
|
-
file_path = star.get("path", "")
|
|
547
|
-
parts = file_path.split('/')[:-1] # Strip the filename to get directories
|
|
548
|
-
|
|
549
|
-
# Determine all parent paths (e.g., src/api/auth -> src, src/api, src/api/auth)
|
|
550
|
-
paths_to_update = ["."] if not parts else []
|
|
551
|
-
current_path = ""
|
|
552
|
-
for part in parts:
|
|
553
|
-
current_path = f"{current_path}/{part}" if current_path else part
|
|
554
|
-
paths_to_update.append(current_path)
|
|
555
|
-
|
|
556
|
-
# Extract file metrics
|
|
557
|
-
loc = star.get("total_loc", 0)
|
|
558
|
-
coding_loc = star.get("coding_loc", 0)
|
|
559
|
-
mass = star.get("file_impact", 0.0)
|
|
560
|
-
func_count = len(star.get("satellites", []))
|
|
561
|
-
class_count = len(star.get("gas_giants", []))
|
|
562
|
-
|
|
563
|
-
tel = star.get("telemetry", {})
|
|
564
|
-
cog_raw = tel.get("densities", {}).get("cog_raw", 0.0)
|
|
565
|
-
churn = tel.get("raw_churn_freq", 0.0)
|
|
566
|
-
|
|
567
|
-
rv = star.get("risk_vector", [])
|
|
568
|
-
tech_debt = rv[debt_idx] if debt_idx >= 0 and len(rv) > debt_idx else 0.0
|
|
569
|
-
|
|
570
|
-
# Roll metrics upwards
|
|
571
|
-
for p in paths_to_update:
|
|
572
|
-
if p not in folder_stats:
|
|
573
|
-
folder_stats[p] = {
|
|
574
|
-
"file_count": 0, "total_loc": 0, "total_coding_loc": 0,
|
|
575
|
-
"total_functions": 0, "total_classes": 0, "total_mass": 0.0,
|
|
576
|
-
"cog_loads": [], "tech_debts": [], "churns": []
|
|
577
|
-
}
|
|
578
|
-
fs = folder_stats[p]
|
|
579
|
-
fs["file_count"] += 1
|
|
580
|
-
fs["total_loc"] += loc
|
|
581
|
-
fs["total_coding_loc"] += coding_loc
|
|
582
|
-
fs["total_functions"] += func_count
|
|
583
|
-
fs["total_classes"] += class_count
|
|
584
|
-
fs["total_mass"] += mass
|
|
585
|
-
fs["cog_loads"].append(cog_raw)
|
|
586
|
-
fs["tech_debts"].append(tech_debt)
|
|
587
|
-
fs["churns"].append(churn)
|
|
588
|
-
|
|
589
|
-
# Calculate Domain Averages and Insert
|
|
590
|
-
folder_rows = []
|
|
591
|
-
for f_path, stats in folder_stats.items():
|
|
592
|
-
avg_cog = sum(stats["cog_loads"]) / len(stats["cog_loads"]) if stats["cog_loads"] else 0.0
|
|
593
|
-
max_cog = max(stats["cog_loads"]) if stats["cog_loads"] else 0.0
|
|
594
|
-
|
|
595
|
-
avg_debt = sum(stats["tech_debts"]) / len(stats["tech_debts"]) if stats["tech_debts"] else 0.0
|
|
596
|
-
max_debt = max(stats["tech_debts"]) if stats["tech_debts"] else 0.0
|
|
597
|
-
|
|
598
|
-
avg_churn = sum(stats["churns"]) / len(stats["churns"]) if stats["churns"] else 0.0
|
|
599
|
-
|
|
600
|
-
folder_rows.append((
|
|
601
|
-
repo_name, commit_hash, f_path,
|
|
602
|
-
stats["file_count"], stats["total_loc"], stats["total_coding_loc"],
|
|
603
|
-
stats["total_functions"], stats["total_classes"], round(stats["total_mass"], 2),
|
|
604
|
-
round(avg_cog, 3), round(avg_debt, 3), round(max_cog, 3), round(max_debt, 3), round(avg_churn, 3)
|
|
605
|
-
))
|
|
537
|
+
cursor.executemany('''
|
|
538
|
+
INSERT INTO dark_matter_data
|
|
539
|
+
(repo_name, commit_hash, file_path, extension, exclusion_reason, size_bytes)
|
|
540
|
+
VALUES (?, ?, ?, ?, ?, ?)
|
|
541
|
+
''', dark_rows)
|
|
542
|
+
|
|
543
|
+
# ==============================================================================
|
|
544
|
+
# 5. FOLDER-LEVEL ROLLUP (MATERIALIZED PATH AGGREGATION)
|
|
545
|
+
# ==============================================================================
|
|
546
|
+
folder_stats = {}
|
|
547
|
+
debt_idx = self.RISK_SCHEMA.index("tech_debt") if "tech_debt" in self.RISK_SCHEMA else -1
|
|
606
548
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
549
|
+
for star in stars:
|
|
550
|
+
file_path = star.get("path", "")
|
|
551
|
+
parts = file_path.split('/')[:-1] # Strip the filename to get directories
|
|
552
|
+
|
|
553
|
+
# Determine all parent paths (e.g., src/api/auth -> src, src/api, src/api/auth)
|
|
554
|
+
paths_to_update = ["."] if not parts else []
|
|
555
|
+
current_path = ""
|
|
556
|
+
for part in parts:
|
|
557
|
+
current_path = f"{current_path}/{part}" if current_path else part
|
|
558
|
+
paths_to_update.append(current_path)
|
|
559
|
+
|
|
560
|
+
# Extract file metrics
|
|
561
|
+
loc = star.get("total_loc", 0)
|
|
562
|
+
coding_loc = star.get("coding_loc", 0)
|
|
563
|
+
mass = star.get("file_impact", 0.0)
|
|
564
|
+
func_count = len(star.get("satellites", []))
|
|
565
|
+
class_count = len(star.get("gas_giants", []))
|
|
566
|
+
|
|
567
|
+
tel = star.get("telemetry", {})
|
|
568
|
+
cog_raw = tel.get("densities", {}).get("cog_raw", 0.0)
|
|
569
|
+
churn = tel.get("raw_churn_freq", 0.0)
|
|
570
|
+
|
|
571
|
+
rv = star.get("risk_vector", [])
|
|
572
|
+
tech_debt = rv[debt_idx] if debt_idx >= 0 and len(rv) > debt_idx else 0.0
|
|
573
|
+
|
|
574
|
+
# Roll metrics upwards
|
|
575
|
+
for p in paths_to_update:
|
|
576
|
+
if p not in folder_stats:
|
|
577
|
+
folder_stats[p] = {
|
|
578
|
+
"file_count": 0, "total_loc": 0, "total_coding_loc": 0,
|
|
579
|
+
"total_functions": 0, "total_classes": 0, "total_mass": 0.0,
|
|
580
|
+
"cog_loads": [], "tech_debts": [], "churns": []
|
|
581
|
+
}
|
|
582
|
+
fs = folder_stats[p]
|
|
583
|
+
fs["file_count"] += 1
|
|
584
|
+
fs["total_loc"] += loc
|
|
585
|
+
fs["total_coding_loc"] += coding_loc
|
|
586
|
+
fs["total_functions"] += func_count
|
|
587
|
+
fs["total_classes"] += class_count
|
|
588
|
+
fs["total_mass"] += mass
|
|
589
|
+
fs["cog_loads"].append(cog_raw)
|
|
590
|
+
fs["tech_debts"].append(tech_debt)
|
|
591
|
+
fs["churns"].append(churn)
|
|
592
|
+
|
|
593
|
+
# Calculate Domain Averages and Insert
|
|
594
|
+
folder_rows = []
|
|
595
|
+
for f_path, stats in folder_stats.items():
|
|
596
|
+
avg_cog = sum(stats["cog_loads"]) / len(stats["cog_loads"]) if stats["cog_loads"] else 0.0
|
|
597
|
+
max_cog = max(stats["cog_loads"]) if stats["cog_loads"] else 0.0
|
|
598
|
+
|
|
599
|
+
avg_debt = sum(stats["tech_debts"]) / len(stats["tech_debts"]) if stats["tech_debts"] else 0.0
|
|
600
|
+
max_debt = max(stats["tech_debts"]) if stats["tech_debts"] else 0.0
|
|
601
|
+
|
|
602
|
+
avg_churn = sum(stats["churns"]) / len(stats["churns"]) if stats["churns"] else 0.0
|
|
603
|
+
|
|
604
|
+
folder_rows.append((
|
|
605
|
+
repo_name, commit_hash, f_path,
|
|
606
|
+
stats["file_count"], stats["total_loc"], stats["total_coding_loc"],
|
|
607
|
+
stats["total_functions"], stats["total_classes"], round(stats["total_mass"], 2),
|
|
608
|
+
round(avg_cog, 3), round(avg_debt, 3), round(max_cog, 3), round(max_debt, 3), round(avg_churn, 3)
|
|
609
|
+
))
|
|
610
|
+
|
|
611
|
+
if folder_rows:
|
|
612
|
+
cursor.executemany('''
|
|
613
|
+
INSERT INTO folder_data (
|
|
614
|
+
repo_name, commit_hash, folder_path, file_count, total_loc, total_coding_loc,
|
|
615
|
+
total_functions, total_classes, total_mass, avg_cognitive_load, avg_tech_debt,
|
|
616
|
+
max_cognitive_load, max_tech_debt, avg_churn_freq
|
|
617
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
618
|
+
''', folder_rows)
|
|
619
|
+
|
|
620
|
+
conn.commit()
|
|
621
|
+
conn.close()
|
|
622
|
+
self.logger.info(f"Database sealed. Exported {len(stars)} files and {len(folder_rows)} folders to {db_file.name}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitgalaxy
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.2
|
|
4
4
|
Summary: An AST-free, zero-trust static analysis engine for mapping architectural risk, securing CI/CD pipelines, and modernizing legacy monoliths.
|
|
5
5
|
Author: Joseph Michael Esquibel
|
|
6
6
|
Project-URL: Homepage, https://gitgalaxy.io
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_agent_task_forge.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_graveyard_finder.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_microservice_slicer.py
RENAMED
|
File without changes
|
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_cobol/cobol_system_limits_reporter.py
RENAMED
|
File without changes
|
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_java/cobol_to_java_agent_forge.py
RENAMED
|
File without changes
|
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_java/cobol_to_java_build_forge.py
RENAMED
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_java/cobol_to_java_decoder_forge.py
RENAMED
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_java/cobol_to_java_service_forge.py
RENAMED
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/cobol_to_java/cobol_to_java_spring_forge.py
RENAMED
|
File without changes
|
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/network_auditing/full_api_network_map.py
RENAMED
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/supply_chain_security/binary_anomaly_detector.py
RENAMED
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/supply_chain_security/supply_chain_firewall.py
RENAMED
|
File without changes
|
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/terabyte_log_scanning/pii_leak_hunter.py
RENAMED
|
File without changes
|
{gitgalaxy-2.0.0 → gitgalaxy-2.0.2}/gitgalaxy/tools/terabyte_log_scanning/terabyte_log_scanner.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|