Compare commits

..

No commits in common. "6a74f3c7d0b22d68751201e683ae3d9a70cddaa9" and "80112f5125360b3fdc72d181b2f5aea6dc591c95" have entirely different histories.

4 changed files with 6 additions and 39 deletions

View File

@ -1,19 +0,0 @@
#!/bin/sh
# SPDX-License-Identifier: LicenseRef-CMSD-1.0
set -e
# Writable cache dir for the posture snapshot (service runs as secubox).
if getent passwd secubox >/dev/null 2>&1; then
install -d -o secubox -g secubox -m 0750 /var/lib/secubox/security-posture 2>/dev/null || true
fi
#DEBHELPER#
# Reload nginx so the /api/v1/security-posture/ route drop-in takes effect.
if command -v nginx >/dev/null 2>&1; then
if nginx -t >/dev/null 2>&1; then
nginx -s reload >/dev/null 2>&1 || true
fi
fi
exit 0

View File

@ -27,7 +27,3 @@ override_dh_auto_install:
# Sidebar menu entry (self-contained — folds PR #616)
install -d $(DESTDIR)/usr/share/secubox/menu.d
[ -d menu.d ] && cp -r menu.d/. $(DESTDIR)/usr/share/secubox/menu.d/ || true
# nginx route drop-in (own socket — not aggregator-served)
install -d $(DESTDIR)/etc/nginx/secubox-routes.d
cp nginx/security-posture.conf $(DESTDIR)/etc/nginx/secubox-routes.d/

View File

@ -1,9 +0,0 @@
# Installed by secubox-security-posture into /etc/nginx/secubox-routes.d/
# Unlike most modules (served in-process by secubox-aggregator), security-posture
# runs its own uvicorn service on /run/secubox/security-posture.sock, so route the
# public API straight to that socket (the trailing :/ strips the location prefix).
location /api/v1/security-posture/ {
proxy_pass http://unix:/run/secubox/security-posture.sock:/;
include /etc/nginx/snippets/secubox-proxy.conf;
proxy_intercept_errors on;
}

View File

@ -19,9 +19,8 @@
<link rel="stylesheet" href="/shared/sidebar.css">
<link rel="stylesheet" href="posture.css">
</head>
<body class="module-wall">
<nav class="sidebar" id="sidebar"></nav>
<main class="main">
<body>
<div class="main">
<header class="page">
<h1>🎚️ Security Posture <span class="ver" id="ver">v2.0.0</span></h1>
<div class="actions">
@ -33,7 +32,7 @@
<div id="error" class="banner err" hidden></div>
<div id="loading" class="banner info">Computing posture…</div>
<div id="content" hidden>
<main id="content" hidden>
<!-- Hero: DEFCON gauge + overall score -->
<section class="hero">
<div class="gauge-wrap">
@ -89,10 +88,10 @@
<table class="audit-table" id="tpnTable"></table>
</details>
</section>
</div>
</main>
</main>
</div>
<script src="/shared/sidebar.js"></script>
<script src="/shared/sidebar.js" defer></script>
<script src="posture.js" defer></script>
</body>
</html>