feat(audit): publish structured HardeningKitty JSON
This commit is contained in:
1 parent
349b95fbc6
commit
f60d102233
7 files changed
+1033
-116
No files matched your search
@@ -0,0 +1,236 @@
|
||||
<!-- Comitari / HardeningKitty - WAPT Console Mustache audit view.
|
||||
Section=hardeningkitty; key=hardeningkitty.
|
||||
Keep this file on WAPT CONSOLE machines, not on audited endpoints.
|
||||
All dynamic values use HTML-escaped Mustache tags. No JavaScript. -->
|
||||
<style>
|
||||
.hk-report {
|
||||
box-sizing: border-box; background: #fff; color: #202b3b;
|
||||
font-family: "Segoe UI", Arial, sans-serif; font-size: 13px;
|
||||
line-height: 1.45; padding: 20px; max-width: 1500px; margin: 0 auto;
|
||||
}
|
||||
.hk-report *, .hk-report *:before, .hk-report *:after { box-sizing: border-box; }
|
||||
.hk-report .hk-header { display:flex; align-items:center; justify-content:space-between; gap:14px; padding-bottom:18px; border-bottom:1px solid #e3e8ee; }
|
||||
.hk-report .hk-brand { font-size:11px; letter-spacing:2px; font-weight:800; color:#4c6b8b; text-transform:uppercase; }
|
||||
.hk-report h1 { font-size:23px; color:#132a45; margin:3px 0 2px; line-height:1.2; }
|
||||
.hk-report h2 { font-size:16px; color:#132a45; margin:24px 0 11px; }
|
||||
.hk-report p { margin:4px 0 8px; }
|
||||
.hk-report .hk-muted { color:#65758a; font-size:12px; }
|
||||
.hk-report .hk-overall { display:inline-block; padding:6px 13px; border-radius:5px; font-size:12px; font-weight:800; letter-spacing:.3px; background:#edf2f7; color:#31465d; }
|
||||
.hk-report .hk-overall-ERROR { background:#fde8e7; color:#a52a23; }
|
||||
.hk-report .hk-overall-WARNING { background:#fff1db; color:#8d5400; }
|
||||
.hk-report .hk-overall-OK { background:#dff5e9; color:#096b3f; }
|
||||
.hk-report .hk-meta { margin:15px 0 18px; display:flex; flex-wrap:wrap; gap:8px 24px; color:#5d7188; font-size:12px; }
|
||||
.hk-report .hk-meta strong { color:#243c58; }
|
||||
.hk-report .hk-score-layout { display:flex; gap:15px; align-items:stretch; flex-wrap:wrap; }
|
||||
.hk-report .hk-score { background:#f4f7fb; border:1px solid #e5ebf1; border-radius:9px; flex:1 1 270px; padding:17px 18px; min-width:220px; }
|
||||
.hk-report .hk-score-label { font-size:12px; color:#586a7c; margin:0; }
|
||||
.hk-report .hk-score-number { font-size:38px; line-height:1.15; font-weight:750; color:#17395e; margin:4px 0 11px; }
|
||||
.hk-report .hk-score-number span { font-size:19px; font-weight:500; color:#728197; }
|
||||
.hk-report .hk-track { height:9px; background:#d8e3ee; border-radius:20px; overflow:hidden; }
|
||||
.hk-report .hk-fill { height:100%; background:#278e65; max-width:100%; }
|
||||
.hk-report .hk-score-foot { display:flex; justify-content:space-between; gap:12px; margin-top:9px; color:#66798b; font-size:11px; }
|
||||
.hk-report .hk-kpis { flex:3 1 460px; display:grid; grid-template-columns:repeat(3,minmax(110px,1fr)); gap:10px; }
|
||||
.hk-report .hk-kpi { border:1px solid #e5ebf1; border-radius:9px; background:#fff; padding:12px 14px; }
|
||||
.hk-report .hk-kpi strong { display:block; font-size:25px; line-height:1.15; color:#203752; }
|
||||
.hk-report .hk-kpi span { display:block; margin-top:3px; font-size:11px; color:#687b90; }
|
||||
.hk-report .hk-kpi.hk-high strong { color:#c23b34; }
|
||||
.hk-report .hk-kpi.hk-medium strong { color:#b77910; }
|
||||
.hk-report .hk-kpi.hk-low strong { color:#9d8a22; }
|
||||
.hk-report .hk-kpi.hk-passed strong { color:#178256; }
|
||||
.hk-report .hk-banner { padding:12px 15px; border:1px solid #f3d9a2; background:#fff9eb; color:#74531f; border-radius:7px; margin:16px 0; }
|
||||
.hk-report .hk-banner-error { border-color:#f0bebc; background:#fff1f0; color:#882b26; }
|
||||
.hk-report .hk-section { border:1px solid #e3e9f0; border-radius:8px; overflow:hidden; margin:14px 0; }
|
||||
.hk-report .hk-section > summary { cursor:pointer; padding:12px 15px; background:#f7f9fc; color:#243e58; font-size:14px; font-weight:700; }
|
||||
.hk-report .hk-section > summary:hover { background:#eff5fc; }
|
||||
.hk-report .hk-section-content { padding:4px 13px 14px; }
|
||||
.hk-report .hk-scroll { overflow-x:auto; max-width:100%; }
|
||||
.hk-report .hk-table { width:100%; border-collapse:collapse; border-spacing:0; min-width:690px; text-align:left; }
|
||||
.hk-report .hk-table th { padding:9px 9px; color:#62758b; background:#f5f8fb; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.35px; border-bottom:1px solid #dfe7ef; }
|
||||
.hk-report .hk-table td { padding:10px 9px; vertical-align:top; border-bottom:1px solid #edf0f4; overflow-wrap:anywhere; }
|
||||
.hk-report .hk-table tbody tr:hover { background:#f7fafe; }
|
||||
.hk-report .hk-table tbody tr:last-child td { border-bottom:0; }
|
||||
.hk-report .hk-table .hk-id { white-space:nowrap; font-family:Consolas,monospace; color:#54708a; }
|
||||
.hk-report .hk-table .hk-control-title { font-weight:600; color:#223b54; }
|
||||
.hk-report .hk-badge { display:inline-block; white-space:nowrap; border-radius:5px; padding:2px 7px; font-size:11px; font-weight:700; background:#edf2f7; color:#54677c; }
|
||||
.hk-report .hk-sev-high { background:#fce6e6; color:#a52b28; }
|
||||
.hk-report .hk-sev-medium { background:#fff0d4; color:#9d5e03; }
|
||||
.hk-report .hk-sev-low { background:#fff9db; color:#947d17; }
|
||||
.hk-report .hk-sev-unknown { background:#ebeff4; color:#58677c; }
|
||||
.hk-report .hk-state-passed { color:#118159; font-weight:650; }
|
||||
.hk-report .hk-state-failed { color:#b04335; font-weight:650; }
|
||||
.hk-report .hk-state-skipped, .hk-report .hk-state-unknown, .hk-report .hk-state-ignored { color:#8c5810; font-weight:650; }
|
||||
.hk-report .hk-value { font-family:Consolas,"Courier New",monospace; font-size:11px; color:#344c66; word-break:break-word; }
|
||||
.hk-report .hk-small { color:#64748b; font-size:11px; }
|
||||
.hk-report .hk-detail { margin:5px 0 0; }
|
||||
.hk-report .hk-detail summary { cursor:pointer; display:inline; color:#245b94; font-weight:600; }
|
||||
.hk-report .hk-detail-content { margin:8px 0 4px; padding:8px 10px; background:#f6f9fc; border-left:3px solid #b7ccde; color:#465c74; font-size:11px; }
|
||||
.hk-report .hk-detail-content p { margin:4px 0; }
|
||||
.hk-report .hk-filters { padding:12px 0 8px; }
|
||||
.hk-report .hk-filters input[type=radio] { position:absolute; opacity:0; height:1px; width:1px; }
|
||||
.hk-report .hk-filters label { display:inline-block; margin:0 5px 8px 0; padding:5px 12px; border-radius:6px; border:1px solid #dbe4ed; cursor:pointer; color:#556e85; font-weight:600; font-size:12px; }
|
||||
.hk-report .hk-filters label:hover { background:#f1f5f9; }
|
||||
.hk-report #hk-filter-all:checked + label,
|
||||
.hk-report #hk-filter-issues:checked + label,
|
||||
.hk-report #hk-filter-high:checked + label,
|
||||
.hk-report #hk-filter-passed:checked + label { background:#275d93; color:white; border-color:#275d93; }
|
||||
.hk-report #hk-filter-issues:checked ~ .hk-scroll .hk-row-passed,
|
||||
.hk-report #hk-filter-issues:checked ~ .hk-scroll .hk-row-excluded,
|
||||
.hk-report #hk-filter-issues:checked ~ .hk-scroll .hk-row-not_applicable { display:none; }
|
||||
.hk-report #hk-filter-high:checked ~ .hk-scroll .hk-row:not(.hk-row-failed),
|
||||
.hk-report #hk-filter-high:checked ~ .hk-scroll .hk-row:not(.hk-risk-high) { display:none; }
|
||||
.hk-report #hk-filter-passed:checked ~ .hk-scroll .hk-row:not(.hk-row-passed) { display:none; }
|
||||
.hk-report .hk-note { border-left:3px solid #b9c9db; padding:8px 10px; margin:14px 0; font-size:12px; color:#5b6f84; background:#f6f9fc; }
|
||||
.hk-report .hk-footer { padding-top:11px; margin-top:22px; border-top:1px solid #e6eaf0; color:#73859a; font-size:11px; }
|
||||
.hk-report .hk-no-data { margin:18px 0; padding:15px; border:1px solid #e8dfba; border-radius:6px; background:#fffaf0; }
|
||||
@media (max-width:750px) {
|
||||
.hk-report { padding:10px; }
|
||||
.hk-report .hk-kpis { grid-template-columns:repeat(2,minmax(110px,1fr)); }
|
||||
.hk-report h1 { font-size:18px; }
|
||||
}
|
||||
</style>
|
||||
<div class="hk-report">
|
||||
<div class="hk-header">
|
||||
<div>
|
||||
<div class="hk-brand">COMITARI / HARDENINGKITTY</div>
|
||||
<h1>Audit de durcissement Windows</h1>
|
||||
<div class="hk-muted">Analyse des écarts par rapport au référentiel de sécurité</div>
|
||||
</div>
|
||||
<span class="hk-overall hk-overall-{{status}}">{{status}}</span>
|
||||
</div>
|
||||
|
||||
{{#error}}
|
||||
<div class="hk-banner hk-banner-error">
|
||||
<strong>Audit incomplet ou indisponible.</strong>
|
||||
<p>Code : {{error.code}} — type : {{error.type}}</p>
|
||||
<p>{{error.description}}</p>
|
||||
<p>Vérifier les journaux de l'agent WAPT sur le poste concerné.</p>
|
||||
</div>
|
||||
{{/error}}
|
||||
|
||||
{{#summary}}
|
||||
<div class="hk-meta">
|
||||
<span><strong>Machine :</strong> {{host.os_caption}} {{host.display_version}} (build {{host.build}})</span>
|
||||
<span><strong>Référentiel :</strong> {{benchmark.name}}</span>
|
||||
<span><strong>Source :</strong> {{scan.source}}</span>
|
||||
<span><strong>Audit UTC :</strong> {{scan.date_utc}}</span>
|
||||
</div>
|
||||
<div class="hk-score-layout">
|
||||
<div class="hk-score">
|
||||
<p class="hk-score-label">Taux de conformité</p>
|
||||
<div class="hk-score-number">{{compliant_percent}} <span>%</span></div>
|
||||
<div class="hk-track"><div class="hk-fill" style="width:{{compliant_percent}}%;"></div></div>
|
||||
<div class="hk-score-foot"><span>{{passed}} conformes</span><span>{{expected}} attendus</span></div>
|
||||
</div>
|
||||
<div class="hk-kpis">
|
||||
<div class="hk-kpi hk-high"><strong>{{high}}</strong><span>Écarts élevés</span></div>
|
||||
<div class="hk-kpi hk-medium"><strong>{{medium}}</strong><span>Écarts moyens</span></div>
|
||||
<div class="hk-kpi hk-low"><strong>{{low}}</strong><span>Écarts faibles</span></div>
|
||||
<div class="hk-kpi hk-passed"><strong>{{passed}}</strong><span>Conformes</span></div>
|
||||
<div class="hk-kpi"><strong>{{unknown}}</strong><span>Inconnus</span></div>
|
||||
<div class="hk-kpi"><strong>{{skipped}}</strong><span>Non exécutés</span></div>
|
||||
</div>
|
||||
</div>
|
||||
{{/summary}}
|
||||
|
||||
{{#summary}}
|
||||
{{#privacy.current_values_published}}
|
||||
<p class="hk-note">Valeurs constatées : publication activée. Vérifier les droits d'accès aux données d'audit.</p>
|
||||
{{/privacy.current_values_published}}
|
||||
{{^privacy.current_values_published}}
|
||||
<p class="hk-note">Les valeurs effectivement lues sur le poste ne sont pas publiées par défaut. Le CSV détaillé reste disponible localement sur le poste audité.</p>
|
||||
{{/privacy.current_values_published}}
|
||||
|
||||
<h2>Écarts à examiner en priorité</h2>
|
||||
<p class="hk-muted">{{priority_total}} résultats non conformes ou non évalués. Aperçu limité à 25 contrôles, classés par gravité puis catégorie (pas par risque exploitabilité).</p>
|
||||
<div class="hk-section">
|
||||
<div class="hk-scroll">
|
||||
<table class="hk-table">
|
||||
<thead><tr><th>ID</th><th>Catégorie</th><th>Gravité</th><th>État</th></tr></thead>
|
||||
<tbody>
|
||||
{{#priority_findings}}
|
||||
<tr>
|
||||
<td class="hk-id">{{id}}</td>
|
||||
<td>{{category}}</td>
|
||||
<td><span class="hk-badge hk-sev-{{severity}}">{{severity}}</span></td>
|
||||
<td><span class="hk-state-{{status}}">{{status}}</span></td>
|
||||
</tr>
|
||||
{{/priority_findings}}
|
||||
{{^priority_findings}}
|
||||
<tr><td colspan="4" class="hk-muted">Aucun écart prioritaire.</td></tr>
|
||||
{{/priority_findings}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<details class="hk-section" open>
|
||||
<summary>Répartition par catégorie</summary>
|
||||
<div class="hk-section-content hk-scroll">
|
||||
<table class="hk-table">
|
||||
<thead><tr><th>Catégorie</th><th>Contrôles</th><th>Conformes</th><th>Haut</th><th>Moyen</th><th>Faible</th><th>Non évalués</th><th>Conformité</th></tr></thead>
|
||||
<tbody>
|
||||
{{#Items categories}}
|
||||
<tr>
|
||||
<td class="hk-control-title">{{key}}</td>
|
||||
<td>{{value.expected}}</td>
|
||||
<td>{{value.passed}}</td>
|
||||
<td>{{value.high}}</td>
|
||||
<td>{{value.medium}}</td>
|
||||
<td>{{value.low}}</td>
|
||||
<td>{{value.unknown}}</td>
|
||||
<td><strong>{{value.compliant_percent}} %</strong></td>
|
||||
</tr>
|
||||
{{/Items}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</details>
|
||||
|
||||
<details class="hk-section">
|
||||
<summary>Tous les contrôles du benchmark ({{summary.expected}})</summary>
|
||||
<div class="hk-section-content">
|
||||
<p class="hk-muted">Sélectionner un filtre. Les détails de chaque contrôle contiennent la justification et la méthode de vérification.</p>
|
||||
<div class="hk-filters">
|
||||
<input type="radio" id="hk-filter-all" name="hk-filter" checked><label for="hk-filter-all">Tous</label>
|
||||
<input type="radio" id="hk-filter-issues" name="hk-filter"><label for="hk-filter-issues">Écarts / Inconnus</label>
|
||||
<input type="radio" id="hk-filter-high" name="hk-filter"><label for="hk-filter-high">Élevés uniquement</label>
|
||||
<input type="radio" id="hk-filter-passed" name="hk-filter"><label for="hk-filter-passed">Conformes</label>
|
||||
<div class="hk-scroll">
|
||||
<table class="hk-table">
|
||||
<thead><tr><th>ID</th><th>Contrôle et analyse</th><th>Catégorie</th><th>Gravité</th><th>État</th><th>Valeur cible</th>{{#privacy.current_values_published}}<th>Valeur observée</th>{{/privacy.current_values_published}}</tr></thead>
|
||||
<tbody>
|
||||
{{#Items controls}}
|
||||
<tr class="hk-row hk-row-{{value.status}} hk-risk-{{value.severity}}">
|
||||
<td class="hk-id">{{key}}</td>
|
||||
<td>
|
||||
<div class="hk-control-title">{{value.name}}</div>
|
||||
<details class="hk-detail">
|
||||
<summary>Voir l'analyse</summary>
|
||||
<div class="hk-detail-content">
|
||||
<p>{{value.explanation}}</p>
|
||||
{{#value.reason}}<p><strong>Justification :</strong> {{value.reason}}</p>{{/value.reason}}
|
||||
{{#value.method}}<p><strong>Méthode :</strong> {{value.method}}</p>{{/value.method}}
|
||||
{{#value.method_argument}}<p><strong>Argument :</strong> <span class="hk-value">{{value.method_argument}}</span></p>{{/value.method_argument}}
|
||||
{{#value.registry_path}}<p><strong>Registre :</strong> <span class="hk-value">{{value.registry_path}}</span></p>{{/value.registry_path}}
|
||||
{{#value.registry_item}}<p><strong>Valeur registre :</strong> <span class="hk-value">{{value.registry_item}}</span></p>{{/value.registry_item}}
|
||||
{{#value.operator}}<p><strong>Comparaison :</strong> {{value.operator}}</p>{{/value.operator}}
|
||||
</div>
|
||||
</details>
|
||||
</td>
|
||||
<td>{{value.category}}</td>
|
||||
<td><span class="hk-badge hk-sev-{{value.severity}}">{{value.severity_label}}{{^value.severity_label}}{{value.severity}}{{/value.severity_label}}</span></td>
|
||||
<td><span class="hk-state-{{value.status}}">{{value.status_label}}{{^value.status_label}}{{value.status}}{{/value.status_label}}</span></td>
|
||||
<td class="hk-value">{{value.recommended}}</td>
|
||||
{{#privacy.current_values_published}}<td class="hk-value">{{value.current}}</td>{{/privacy.current_values_published}}
|
||||
</tr>
|
||||
{{/Items}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
{{/summary}}
|
||||
|
||||
<div class="hk-footer">HardeningKitty / Comitari · Synthèse informative uniquement, aucune correction automatique · Référentiel : {{benchmark.name}}</div>
|
||||
</div>
|
||||
Reference in new issue
Block a user