This commit is contained in:
2026-04-22 01:45:53 +09:00
parent 4913a12050
commit a0e8a7faf4
16 changed files with 78 additions and 78 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
* Palette comes from /public/assets/css/style.css
* #1A1A1A = page bg #272727 = block bg
* #202020 = input bg #3a3a3a = border
* #E0E0E0 = tx #939393 = tx-alt
* #E0E0E0 = tx #939393 = light-grey-alt
* #00C878 = bright-green #00C0FF = bright-blue
* ===================================================== */
+4 -4
View File
@@ -16,7 +16,7 @@
notgood: "bright-yellow",
bad: "bright-red",
serious: "bright-purple",
info: "tx-alt",
info: "light-grey-alt",
};
const SEV_LABEL = {
good: "GOOD",
@@ -44,7 +44,7 @@
row.className = "tls-log-row";
const cat = document.createElement("span");
cat.className = "tls-log-cat text-tx-alt";
cat.className = "tls-log-cat text-light-grey-alt";
cat.textContent = "[" + normalizeStep(category) + "]";
row.appendChild(cat);
@@ -60,13 +60,13 @@
// Title is always in the default text color (white). Severity is
// communicated by the coloured label tag, not by tinting the title.
const msgText = document.createElement("span");
msgText.className = "text-tx";
msgText.className = "textlight-grey";
msgText.textContent = body || "";
msg.appendChild(msgText);
row.appendChild(msg);
const det = document.createElement("span");
det.className = "tls-log-detail text-tx-alt";
det.className = "tls-log-detail text-light-grey-alt";
det.textContent = detail || "";
row.appendChild(det);
+3 -3
View File
@@ -9,7 +9,7 @@
{% block content %}
<section class="tls-landing">
<h1 class="tls-landing-title"><span class="font-bold">Nercone</span> <span class="font-weight-300">TLS Test</span></h1>
<p class="tls-landing-subtitle text-tx-alt">ただのTLS/SSL設定分析サービス</p>
<p class="tls-landing-subtitle text-light-grey-alt">ただのTLS/SSL設定分析サービス</p>
<form method="POST" action="/tools/tls-test/" class="tls-landing-form">
<input type="text" name="target" required autocomplete="off" spellcheck="false"
value="{{ last_target or '' }}"
@@ -21,8 +21,8 @@
<p class="tls-landing-error text-bright-red font-small">{{ error }}</p>
{% endif %}
<p class="tls-landing-links">
<a href="#notes" class="text-tx-alt text-underline">注意事項</a>
<a href="#api" class="text-tx-alt text-underline">API</a>
<a href="#notes" class="text-light-grey-alt text-underline">注意事項</a>
<a href="#api" class="text-light-grey-alt text-underline">API</a>
</p>
</section>
+47 -47
View File
@@ -34,12 +34,12 @@
<div class="tls-results-meta flex-1">
<h1 class="tls-results-target">{{ result.target or job.target }}</h1>
<p class="tls-results-metaline">
<span class="text-tx-alt">実行日時</span>
<span class="text-light-grey-alt">実行日時</span>
<span>{{ finished_at_display or job.finished_at or "—" }}</span>
<span class="text-tx-alt">所要時間</span>
<span class="text-light-grey-alt">所要時間</span>
<span>{{ "%.0f"|format((result.duration or 0) * 1000) }}ms</span>
</p>
<p class="tls-results-testid"><code class="text-tx-alt">{{ test_id }}</code></p>
<p class="tls-results-testid"><code class="text-light-grey-alt">{{ test_id }}</code></p>
{% if result.error %}
<p class="text-bright-red">{{ result.error }}</p>
{% endif %}
@@ -69,12 +69,12 @@
#}
{% macro finding_row(f) -%}
<div class="tls-log-row">
<span class="tls-log-cat text-tx-alt">[{{ (f.step or f.group or f.category or 'info')|replace('_','-')|lower }}]</span>
<span class="tls-log-cat text-light-grey-alt">[{{ (f.step or f.group or f.category or 'info')|replace('_','-')|lower }}]</span>
<span class="tls-log-msg">
<span class="text-{{ f.color }} font-bold">{{ f.severity_label|upper }}</span>
<span class="text-tx">{{ f.title }}</span>
<span class="textlight-grey">{{ f.title }}</span>
</span>
<span class="tls-log-detail text-tx-alt">{{ f.detail or '' }}</span>
<span class="tls-log-detail text-light-grey-alt">{{ f.detail or '' }}</span>
</div>
{%- endmacro %}
@@ -89,26 +89,26 @@
「未確認 no OCSP URL」. #}
{% macro rev_cell(r, kind) -%}
{%- if not r -%}
<span class="text-tx-alt"></span>
<span class="text-light-grey-alt"></span>
{%- elif r.checked and not r.revoked -%}
<span class="text-bright-green">失効していません</span>
{%- if r.source %} <span class="font-small text-tx-alt">({{ r.source }})</span>{% endif -%}
{%- if r.source %} <span class="font-small text-light-grey-alt">({{ r.source }})</span>{% endif -%}
{%- elif r.checked and r.revoked -%}
<span class="text-bright-red">失効しています</span>
{%- if r.reason %} <span class="font-small text-tx-alt">({{ r.reason }})</span>{% endif -%}
{%- if r.reason %} <span class="font-small text-light-grey-alt">({{ r.reason }})</span>{% endif -%}
{%- else -%}
{%- set err = (r.error or '')|string -%}
{%- if 'no OCSP URL' in err or 'no AIA' in err -%}
<span class="text-tx-alt">{{ kind }} URL が提供されていません</span>
<span class="text-light-grey-alt">{{ kind }} URL が提供されていません</span>
{%- elif 'no CRL DP' in err or 'no http CRL URL' in err -%}
<span class="text-tx-alt">{{ kind }} URL が提供されていません</span>
<span class="text-light-grey-alt">{{ kind }} URL が提供されていません</span>
{%- elif 'all CRLs unreachable' in err -%}
<span class="text-bright-yellow">{{ kind }} レスポンダに到達できません</span>
{%- elif err -%}
<span class="text-bright-yellow">確認失敗</span>
<span class="font-small text-tx-alt">({{ err }})</span>
<span class="font-small text-light-grey-alt">({{ err }})</span>
{%- else -%}
<span class="text-tx-alt">未確認</span>
<span class="text-light-grey-alt">未確認</span>
{%- endif -%}
{%- endif -%}
{%- endmacro %}
@@ -121,7 +121,7 @@
{% if summary %}
{% for f in summary %}{{ finding_row(f) }}{% endfor %}
{% else %}
<div class="tls-log-row"><span class="tls-log-cat text-tx-alt">[info]</span><span class="tls-log-msg text-tx-alt">該当項目なし</span></div>
<div class="tls-log-row"><span class="tls-log-cat text-light-grey-alt">[info]</span><span class="tls-log-msg text-light-grey-alt">該当項目なし</span></div>
{% endif %}
</div>
</div>
@@ -140,21 +140,21 @@
<tbody>
{% for c in chain %}
<tr>
<td class="text-tx-alt">{{ loop.index }}</td>
<td class="text-light-grey-alt">{{ loop.index }}</td>
<td>
<div>{{ c.common_name or c.subject or '—' }}</div>
{% if c.sans %}<div class="font-small text-tx-alt">SAN: {{ (c.sans or [])|join(', ') }}</div>{% endif %}
{% if c.sans %}<div class="font-small text-light-grey-alt">SAN: {{ (c.sans or [])|join(', ') }}</div>{% endif %}
</td>
<td>{{ c.issuer or '—' }}</td>
<td>
<div>{{ c.not_after or '—' }}</div>
{% if c.is_expired %}<span class="text-bright-red font-bold">期限切れ</span>
{% elif c.days_until_expiry is defined and c.days_until_expiry is not none %}<span class="font-small text-tx-alt">残 {{ c.days_until_expiry }} 日</span>{% endif %}
{% elif c.days_until_expiry is defined and c.days_until_expiry is not none %}<span class="font-small text-light-grey-alt">残 {{ c.days_until_expiry }} 日</span>{% endif %}
</td>
<td>{{ (c.signature_hash_algorithm or '—')|upper }}</td>
<td>
{{ c.public_key_algorithm or '—' }}{% if c.public_key_size_bits %} {{ c.public_key_size_bits }}-bit{% endif %}
{% if c.public_key_curve %}<span class="font-small text-tx-alt"> ({{ c.public_key_curve }})</span>{% endif %}
{% if c.public_key_curve %}<span class="font-small text-light-grey-alt"> ({{ c.public_key_curve }})</span>{% endif %}
</td>
</tr>
{% endfor %}
@@ -175,7 +175,7 @@
<tr>
<td>{{ t.platform }}</td>
<td>{{ yn(t.trusted, '信頼', '未信頼') }}</td>
<td class="text-tx-alt">{{ t.error or '—' }}</td>
<td class="text-light-grey-alt">{{ t.error or '—' }}</td>
</tr>
{% endfor %}
</tbody>
@@ -197,10 +197,10 @@
<tr><th>CRL</th><td>{{ rev_cell(crl, 'CRL') }}</td></tr>
<tr><th>HSTS</th><td>
{%- if not hsts or hsts.error -%}
<span class="text-tx-alt"></span>
<span class="text-light-grey-alt"></span>
{%- elif hsts.present -%}
<span class="text-bright-green">有効</span>
<span class="font-small text-tx-alt">max-age={{ hsts.max_age }}{% if hsts.include_subdomains %}; includeSubDomains{% endif %}{% if hsts.preload %}; preload{% endif %}</span>
<span class="font-small text-light-grey-alt">max-age={{ hsts.max_age }}{% if hsts.include_subdomains %}; includeSubDomains{% endif %}{% if hsts.preload %}; preload{% endif %}</span>
{%- else -%}
<span class="text-bright-red">無効</span>
{%- endif -%}
@@ -208,19 +208,19 @@
<tr><th>HSTS preload</th><td>
{%- if preload -%}
{%- for p in preload -%}
<span class="font-small">{{ p.browser }}: {% if p.error %}<span class="text-tx-alt">取得エラー</span>{% else %}{{ yn(p.listed, 'Listed', 'Not listed') }}{% endif %}</span>{% if not loop.last %} · {% endif %}
<span class="font-small">{{ p.browser }}: {% if p.error %}<span class="text-light-grey-alt">取得エラー</span>{% else %}{{ yn(p.listed, 'Listed', 'Not listed') }}{% endif %}</span>{% if not loop.last %} · {% endif %}
{%- endfor -%}
{%- else -%}
<span class="text-tx-alt"></span>
<span class="text-light-grey-alt"></span>
{%- endif -%}
</td></tr>
<tr><th>CAA</th><td>
{%- if not caa -%}
<span class="text-tx-alt"></span>
<span class="text-light-grey-alt"></span>
{%- elif caa.records -%}
<span class="text-bright-green">{{ caa.records|length }} 件</span>
<span class="font-small text-tx-alt">({{ caa.effective_host }})</span>
<div class="font-small text-tx-alt">{{ caa.records|join('; ') }}</div>
<span class="font-small text-light-grey-alt">({{ caa.effective_host }})</span>
<div class="font-small text-light-grey-alt">{{ caa.records|join('; ') }}</div>
{%- else -%}
<span class="text-bright-yellow">未設定</span>
{%- endif -%}
@@ -234,7 +234,7 @@
<div class="tls-log">
{% set findings = groups['reliability'] %}
{% if findings %}{% for f in findings %}{{ finding_row(f) }}{% endfor %}
{% else %}<div class="tls-log-row"><span class="tls-log-cat text-tx-alt">[info]</span><span class="tls-log-msg text-tx-alt">項目なし</span></div>{% endif %}
{% else %}<div class="tls-log-row"><span class="tls-log-cat text-light-grey-alt">[info]</span><span class="tls-log-msg text-light-grey-alt">項目なし</span></div>{% endif %}
</div>
</section>
</div>
@@ -265,7 +265,7 @@
{% for name, cs in ciphers.items() %}
{% if cs %}
<div class="tls-cipher-block">
<h3 class="tls-cipher-version">{{ name }} <span class="font-small text-tx-alt">({{ cs|length }})</span></h3>
<h3 class="tls-cipher-version">{{ name }} <span class="font-small text-light-grey-alt">({{ cs|length }})</span></h3>
<ul class="tls-cipher-list">
{% for c in cs %}
<li><code>{{ c }}</code></li>
@@ -291,7 +291,7 @@
<div class="tls-log">
{% set findings = groups['safety'] %}
{% if findings %}{% for f in findings %}{{ finding_row(f) }}{% endfor %}
{% else %}<div class="tls-log-row"><span class="tls-log-cat text-tx-alt">[info]</span><span class="tls-log-msg text-tx-alt">項目なし</span></div>{% endif %}
{% else %}<div class="tls-log-row"><span class="tls-log-cat text-light-grey-alt">[info]</span><span class="tls-log-msg text-light-grey-alt">項目なし</span></div>{% endif %}
</div>
</section>
</div>
@@ -307,10 +307,10 @@
<table class="tls-table">
<thead><tr><th>脆弱性</th><th>判定</th><th>詳細</th></tr></thead>
<tbody>
<tr><td>Heartbleed</td><td>{% if hb %}{{ yn(not hb.vulnerable, '影響なし', '影響あり') }}{% else %}<span class="text-tx-alt"></span>{% endif %}</td><td class="text-tx-alt">{% if hb %}{% if hb.heartbeat_extension %}Heartbeat advertised{% endif %}{% if hb.error %} {{ hb.error }}{% endif %}{% endif %}</td></tr>
<tr><td>CCS Injection</td><td>{% if ccs %}{{ yn(not ccs.vulnerable, '影響なし', '影響あり') }}{% else %}<span class="text-tx-alt"></span>{% endif %}</td><td class="text-tx-alt">{{ (ccs or {}).get('detail','') }}</td></tr>
<tr><td>Secure Renegotiation</td><td>{% if renego %}{{ yn(renego.supported, '対応', '未対応') }}{% else %}<span class="text-tx-alt"></span>{% endif %}</td><td class="text-tx-alt">{{ (renego or {}).get('detail','') }}</td></tr>
<tr><td>TLS_FALLBACK_SCSV</td><td>{% if scsv %}{{ yn(scsv.supported, '対応', '未対応') }}{% else %}<span class="text-tx-alt"></span>{% endif %}</td><td class="text-tx-alt">{{ (scsv or {}).get('detail','') }}</td></tr>
<tr><td>Heartbleed</td><td>{% if hb %}{{ yn(not hb.vulnerable, '影響なし', '影響あり') }}{% else %}<span class="text-light-grey-alt"></span>{% endif %}</td><td class="text-light-grey-alt">{% if hb %}{% if hb.heartbeat_extension %}Heartbeat advertised{% endif %}{% if hb.error %} {{ hb.error }}{% endif %}{% endif %}</td></tr>
<tr><td>CCS Injection</td><td>{% if ccs %}{{ yn(not ccs.vulnerable, '影響なし', '影響あり') }}{% else %}<span class="text-light-grey-alt"></span>{% endif %}</td><td class="text-light-grey-alt">{{ (ccs or {}).get('detail','') }}</td></tr>
<tr><td>Secure Renegotiation</td><td>{% if renego %}{{ yn(renego.supported, '対応', '未対応') }}{% else %}<span class="text-light-grey-alt"></span>{% endif %}</td><td class="text-light-grey-alt">{{ (renego or {}).get('detail','') }}</td></tr>
<tr><td>TLS_FALLBACK_SCSV</td><td>{% if scsv %}{{ yn(scsv.supported, '対応', '未対応') }}{% else %}<span class="text-light-grey-alt"></span>{% endif %}</td><td class="text-light-grey-alt">{{ (scsv or {}).get('detail','') }}</td></tr>
</tbody>
</table>
</section>
@@ -320,7 +320,7 @@
<div class="tls-log">
{% set findings = groups['vulnerabilities'] %}
{% if findings %}{% for f in findings %}{{ finding_row(f) }}{% endfor %}
{% else %}<div class="tls-log-row"><span class="tls-log-cat text-tx-alt">[info]</span><span class="tls-log-msg text-tx-alt">項目なし</span></div>{% endif %}
{% else %}<div class="tls-log-row"><span class="tls-log-cat text-light-grey-alt">[info]</span><span class="tls-log-msg text-light-grey-alt">項目なし</span></div>{% endif %}
</div>
</section>
</div>
@@ -334,10 +334,10 @@
<h2 class="tls-section-title">HTTP プロトコル対応</h2>
<table class="tls-table">
<tbody>
<tr><th>HTTP/1.1</th><td>{% if http %}{{ yn(http.http1, '対応', '未対応') }}{% else %}<span class="text-tx-alt"></span>{% endif %}</td></tr>
<tr><th>HTTP/2</th><td>{% if http %}{{ yn(http.http2, '対応', '未対応') }}{% else %}<span class="text-tx-alt"></span>{% endif %}</td></tr>
<tr><th>HTTP/3 (QUIC)</th><td>{% if http3 %}{{ yn(http3.supported, '対応', '未対応') }}{% if http3.error %} <span class="font-small text-tx-alt">{{ http3.error }}</span>{% endif %}{% else %}<span class="text-tx-alt"></span>{% endif %}</td></tr>
<tr><th>ALPN</th><td>{% if alpn %}<code>{{ alpn }}</code>{% else %}<span class="text-tx-alt"></span>{% endif %}</td></tr>
<tr><th>HTTP/1.1</th><td>{% if http %}{{ yn(http.http1, '対応', '未対応') }}{% else %}<span class="text-light-grey-alt"></span>{% endif %}</td></tr>
<tr><th>HTTP/2</th><td>{% if http %}{{ yn(http.http2, '対応', '未対応') }}{% else %}<span class="text-light-grey-alt"></span>{% endif %}</td></tr>
<tr><th>HTTP/3 (QUIC)</th><td>{% if http3 %}{{ yn(http3.supported, '対応', '未対応') }}{% if http3.error %} <span class="font-small text-light-grey-alt">{{ http3.error }}</span>{% endif %}{% else %}<span class="text-light-grey-alt"></span>{% endif %}</td></tr>
<tr><th>ALPN</th><td>{% if alpn %}<code>{{ alpn }}</code>{% else %}<span class="text-light-grey-alt"></span>{% endif %}</td></tr>
{% if http and http.server %}<tr><th>Server</th><td><code>{{ http.server }}</code></td></tr>{% endif %}
{% if http and http.alt_svc %}<tr><th>Alt-Svc</th><td><code>{{ http.alt_svc }}</code></td></tr>{% endif %}
</tbody>
@@ -357,7 +357,7 @@
<td>{{ yn(s.connected, 'OK', 'Fail') }}</td>
<td>{{ s.negotiated_version or '—' }}</td>
<td><code class="font-small">{{ s.negotiated_cipher or '—' }}</code></td>
<td class="font-small text-tx-alt">{{ s.error or '' }}</td>
<td class="font-small text-light-grey-alt">{{ s.error or '' }}</td>
</tr>
{% endfor %}
</tbody>
@@ -370,7 +370,7 @@
<div class="tls-log">
{% set findings = groups['compatibility'] %}
{% if findings %}{% for f in findings %}{{ finding_row(f) }}{% endfor %}
{% else %}<div class="tls-log-row"><span class="tls-log-cat text-tx-alt">[info]</span><span class="tls-log-msg text-tx-alt">項目なし</span></div>{% endif %}
{% else %}<div class="tls-log-row"><span class="tls-log-cat text-light-grey-alt">[info]</span><span class="tls-log-msg text-light-grey-alt">項目なし</span></div>{% endif %}
</div>
</section>
</div>
@@ -385,16 +385,16 @@
{% for e in log_entries %}
{% if e.kind == 'phase' %}
<div class="tls-log-row">
<span class="tls-log-cat text-tx-alt">[{{ (e.phase or 'info')|replace('_','-')|lower }}]</span>
<span class="tls-log-msg text-tx">{{ e.detail or '' }}</span>
<span class="tls-log-detail text-tx-alt"></span>
<span class="tls-log-cat text-light-grey-alt">[{{ (e.phase or 'info')|replace('_','-')|lower }}]</span>
<span class="tls-log-msg textlight-grey">{{ e.detail or '' }}</span>
<span class="tls-log-detail text-light-grey-alt"></span>
</div>
{% else %}
{{ finding_row(e.finding) }}
{% endif %}
{% endfor %}
{% else %}
<div class="tls-log-row"><span class="tls-log-cat text-tx-alt">[info]</span><span class="tls-log-msg text-tx-alt">ログが記録されていません</span></div>
<div class="tls-log-row"><span class="tls-log-cat text-light-grey-alt">[info]</span><span class="tls-log-msg text-light-grey-alt">ログが記録されていません</span></div>
{% endif %}
</div>
</section>
@@ -413,13 +413,13 @@
<td>{{ h.finished_at_display or '—' }}</td>
<td>{{ h.rank or '—' }}</td>
<td>{{ "%.0f"|format(h.score or 0) }}</td>
<td><a href="/tools/tls-test/results/{{ h.id }}/" class="text-tx-alt">{{ h.id }}</a></td>
<td><a href="/tools/tls-test/results/{{ h.id }}/" class="text-light-grey-alt">{{ h.id }}</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% else %}
<div class="tls-log-row"><span class="tls-log-cat text-tx-alt">[info]</span><span class="tls-log-msg text-tx-alt">過去のテスト結果はありません</span></div>
<div class="tls-log-row"><span class="tls-log-cat text-light-grey-alt">[info]</span><span class="tls-log-msg text-light-grey-alt">過去のテスト結果はありません</span></div>
{% endif %}
</section>
</div>
@@ -428,7 +428,7 @@
<div class="tls-tab-panel" data-panel="json">
<section class="tls-section">
<div class="tls-json-meta">
<code class="text-tx-alt">GET /api/tools/tls-test/results/{{ test_id }}</code>
<code class="text-light-grey-alt">GET /api/tools/tls-test/results/{{ test_id }}</code>
<button type="button" class="tls-btn tls-btn-secondary" id="tls-copy-json">JSONをコピー</button>
</div>
<pre class="tls-raw" id="tls-raw-json"><code>{{ result | tojson(indent=2) }}</code></pre>
+4 -4
View File
@@ -9,21 +9,21 @@
{% block content %}
<section class="tls-status">
<h1 class="tls-landing-title"><span class="font-bold">Nercone</span> <span class="font-weight-300">TLS Test</span></h1>
<p class="tls-status-subtitle"><span class="font-bold">{{ target }}</span><span class="text-tx-alt"> のテストは<span id="tls-status-verb">実行中</span>です。</span></p>
<p class="tls-status-subtitle"><span class="font-bold">{{ target }}</span><span class="text-light-grey-alt"> のテストは<span id="tls-status-verb">実行中</span>です。</span></p>
<div class="tls-status-progress">
<p id="tls-phase" class="tls-status-phase text-tx-alt font-small">待機中…</p>
<p id="tls-phase" class="tls-status-phase text-light-grey-alt font-small">待機中…</p>
<div class="tls-progress-track">
<div id="tls-progress-bar" class="tls-progress-bar" style="width: 0%"></div>
</div>
<p class="tls-status-testid text-tx-alt font-small">テストID: <code>{{ test_id }}</code></p>
<p class="tls-status-testid text-light-grey-alt font-small">テストID: <code>{{ test_id }}</code></p>
</div>
<div class="tls-log-wrap">
<div id="tls-log" class="tls-log">
{% for entry in progress_entries %}
<div class="tls-log-row">
<span class="tls-log-cat text-tx-alt">[{{ entry.phase }}]</span>
<span class="tls-log-cat text-light-grey-alt">[{{ entry.phase }}]</span>
<span class="tls-log-msg">{{ entry.detail }}</span>
</div>
{% endfor %}