torusguard 1.3.2 → 1.3.3

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.
@@ -231,7 +231,7 @@
231
231
  <header>
232
232
  <div class="logo-group">
233
233
  <h1><span class="shield-icon">&#128737;</span> TorusGuard Security Posture</h1>
234
- <div class="project-meta">Workspace: <strong>TorusGuard</strong> &middot; Stack: <strong>TypeScript</strong> &middot; 2026-09-08 11:54:16 IST</div>
234
+ <div class="project-meta">Workspace: <strong>TorusGuard</strong> &middot; Stack: <strong>TypeScript</strong> &middot; 2026-09-08 14:07:32 IST</div>
235
235
  </div>
236
236
  <div class="status-badge">&check; Local Governance Active</div>
237
237
  </header>
@@ -131,7 +131,12 @@ def generate_html_dashboard(telemetry: dict[str, Any]) -> str:
131
131
  stack = [detected["language"]]
132
132
  if detected.get("framework") and detected["framework"] != "None":
133
133
  stack.append(detected["framework"])
134
- stack_label = ", ".join(stack) if stack else "Universal Polyglot Application"
134
+ if stack:
135
+ stack_label = ", ".join(stack)
136
+ else:
137
+ # Avoid hardcoding "Universal Polyglot Application" if stack is empty
138
+ detected_lang = telemetry.get("detected_stack", {}).get("language", "Unknown")
139
+ stack_label = detected_lang if detected_lang != "Unknown" else "Polyglot Application"
135
140
 
136
141
  recipes = [p for p in patterns if p.get("pattern_type") == "golden_fix_recipe"]
137
142
  regressions = [p for p in patterns if p.get("pattern_type") == "regression_watch"]
@@ -208,7 +213,7 @@ def generate_html_dashboard(telemetry: dict[str, Any]) -> str:
208
213
  regression_rows_html = "<tr><td colspan='3' class='empty-cell'>Zero active security regressions or suppressions. Posture clean.</td></tr>"
209
214
 
210
215
  stack_info = telemetry.get("detected_stack", {})
211
- primary_lang = stack_info.get("language", "Universal")
216
+ primary_lang = stack_info.get("language", "Unknown")
212
217
  if primary_lang in ("Unknown", "None", "", None):
213
218
  root_path = Path(telemetry.get("root_dir", "."))
214
219
  if (root_path / "tsconfig.json").is_file() or list(root_path.glob("*.ts")) or list((root_path / "src").glob("*.ts*")):
@@ -220,7 +225,7 @@ def generate_html_dashboard(telemetry: dict[str, Any]) -> str:
220
225
  elif (root_path / "go.mod").is_file():
221
226
  primary_lang = "Go"
222
227
  else:
223
- primary_lang = "Universal Polyglot"
228
+ primary_lang = "Unknown"
224
229
 
225
230
  primary_fw = stack_info.get("framework", "None")
226
231
  primary_orm = stack_info.get("data_layer", "None")