Исправлено: - engine: _calculate_score() при ошибке загрузки (score не 100 для мёртвых сайтов) - privacy_link: замена page.goto() на aiohttp (гонка данных) - form_checkbox: 3-уровневый поиск label + dark-pattern detection - server_location: синхронный urllib → aiohttp - api/server: перепутанные request/response модели в batch - main.py: csv --checks флаг - engine: фазовая модель (cookie_audit отдельно, остальные параллельно) - engine: retry-логика (3 попытки, exponential backoff) - PDF: emoji заменены на текст (WeasyPrint) Добавлено: - consent_doc: проверка отдельного согласия на обработку ПД - operator_info: проверка ИНН/ОГРН/DPO (читает главную + политику) - cookie_audit: 4-фазный аудит (load→detect→reject→compare) - llm_policy: опциональный LLM-анализ 16 разделов (--deep) - external_scripts: YAML-словари trackers.yaml (critical/warning/russian) - logging (output.py), .gitignore, pyproject.toml - smoke-тесты (16/16)
229 lines
7.1 KiB
Django/Jinja
229 lines
7.1 KiB
Django/Jinja
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Аудит по 152-ФЗ — {{ site_scan.url }}</title>
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
color: #1a1a2e;
|
|
line-height: 1.6;
|
|
padding: 40px;
|
|
}
|
|
.header {
|
|
text-align: center;
|
|
margin-bottom: 40px;
|
|
padding-bottom: 20px;
|
|
border-bottom: 3px solid #0f3463;
|
|
}
|
|
.header h1 {
|
|
font-size: 28px;
|
|
color: #0f3463;
|
|
margin-bottom: 8px;
|
|
}
|
|
.header p {
|
|
color: #666;
|
|
font-size: 14px;
|
|
}
|
|
.score-card {
|
|
text-align: center;
|
|
padding: 30px;
|
|
border-radius: 12px;
|
|
margin: 30px 0;
|
|
background: {{ '#e8f5e9' if is_compliant else '#ffebee' }};
|
|
}
|
|
.score-number {
|
|
font-size: 64px;
|
|
font-weight: 700;
|
|
color: {{ '#2e7d32' if is_compliant else '#c62828' }};
|
|
}
|
|
.score-label {
|
|
font-size: 18px;
|
|
color: #555;
|
|
margin-top: 8px;
|
|
}
|
|
.summary-box {
|
|
background: #f8f9fa;
|
|
padding: 20px;
|
|
border-radius: 8px;
|
|
margin: 20px 0;
|
|
border-left: 4px solid #0f3463;
|
|
}
|
|
.summary-box h3 {
|
|
margin-bottom: 10px;
|
|
color: #0f3463;
|
|
}
|
|
.table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin: 20px 0;
|
|
}
|
|
.table th, .table td {
|
|
padding: 12px 16px;
|
|
text-align: left;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
.table th {
|
|
background: #f8f9fa;
|
|
font-weight: 600;
|
|
color: #0f3463;
|
|
}
|
|
.status-pass {
|
|
color: #2e7d32;
|
|
font-weight: 600;
|
|
}
|
|
.status-fail {
|
|
color: #c62828;
|
|
font-weight: 600;
|
|
}
|
|
.status-skip {
|
|
color: #f57c00;
|
|
font-weight: 600;
|
|
}
|
|
.status-error {
|
|
color: #d32f2f;
|
|
font-weight: 600;
|
|
}
|
|
.risk-critical {
|
|
background: #ffebee;
|
|
color: #c62828;
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-weight: 600;
|
|
}
|
|
.risk-high {
|
|
background: #fff3e0;
|
|
color: #e65100;
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
font-weight: 600;
|
|
}
|
|
.risk-medium {
|
|
background: #fff8e1;
|
|
color: #f57c00;
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
}
|
|
.risk-low {
|
|
background: #e8f5e9;
|
|
color: #2e7d32;
|
|
padding: 2px 8px;
|
|
border-radius: 4px;
|
|
}
|
|
.cta-section {
|
|
background: #0f3463;
|
|
color: white;
|
|
padding: 30px;
|
|
border-radius: 12px;
|
|
margin-top: 40px;
|
|
text-align: center;
|
|
}
|
|
.cta-section h2 {
|
|
font-size: 22px;
|
|
margin-bottom: 10px;
|
|
}
|
|
.cta-section p {
|
|
font-size: 14px;
|
|
opacity: 0.9;
|
|
margin-bottom: 20px;
|
|
}
|
|
.cta-button {
|
|
display: inline-block;
|
|
background: white;
|
|
color: #0f3463;
|
|
padding: 12px 24px;
|
|
border-radius: 6px;
|
|
text-decoration: none;
|
|
font-weight: 600;
|
|
margin: 5px;
|
|
}
|
|
.footer {
|
|
margin-top: 40px;
|
|
padding-top: 20px;
|
|
border-top: 1px solid #ddd;
|
|
text-align: center;
|
|
color: #999;
|
|
font-size: 12px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<h1>Аудит соответствия 152-ФЗ</h1>
|
|
<p>Автоматизированный сканер | {{ site_scan.url }}</p>
|
|
<p>Дата проверки: {{ scanned_at }}</p>
|
|
<p>Версия сканера: {{ scanner_version }}</p>
|
|
</div>
|
|
|
|
<div class="score-card">
|
|
<div class="score-number">{{ score }}</div>
|
|
<div class="score-label">
|
|
{{ 'Сайт соответствует 152-ФЗ' if is_compliant else 'Сайт НЕ соответствует 152-ФЗ' }}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="summary-box">
|
|
<h3>Резюме проверки</h3>
|
|
<p>{{ summary }}</p>
|
|
</div>
|
|
|
|
<h2>Результаты проверок</h2>
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Проверка</th>
|
|
<th>Статус</th>
|
|
<th>Риск</th>
|
|
<th>Детали</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for check in checks %}
|
|
<tr>
|
|
<td><strong>{{ check.title }}</strong></td>
|
|
<td>
|
|
{% if check.status == 'pass' %}
|
|
<span class="status-pass">ПРОЙДЕНО</span>
|
|
{% elif check.status == 'fail' %}
|
|
<span class="status-fail">НАРУШЕНИЕ</span>
|
|
{% elif check.status == 'skip' %}
|
|
<span class="status-skip">ПРОПУЩЕНО</span>
|
|
{% elif check.status == 'error' %}
|
|
<span class="status-error">ОШИБКА</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>
|
|
{% if check.risk_level == 'critical' %}
|
|
<span class="risk-critical">КРИТИЧЕСКИЙ</span>
|
|
{% elif check.risk_level == 'high' %}
|
|
<span class="risk-high">ВЫСОКИЙ</span>
|
|
{% elif check.risk_level == 'medium' %}
|
|
<span class="risk-medium">СРЕДНИЙ</span>
|
|
{% else %}
|
|
<span class="risk-low">НИЗКИЙ</span>
|
|
{% endif %}
|
|
</td>
|
|
<td>{{ check.message }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="cta-section">
|
|
<h2>Нужна помощь с приведением сайта в соответствие 152-ФЗ?</h2>
|
|
<p>Мы исправим все найденные нарушения, подготовим документы и настроим cookie-баннеры.</p>
|
|
<p style="margin-top: 20px; font-size: 18px;">Стоимость: от 7 000 руб. (зависит от объёма нарушений)</p>
|
|
<div style="margin-top: 20px;">
|
|
<span class="cta-button">Написать на email</span>
|
|
<span class="cta-button">Telegram</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="footer">
|
|
<p>Документ сгенерирован автоматически. Не является юридической консультацией.</p>
|
|
<p>© 2026 152-ФЗ Scanner | Powered by AI Compliance</p>
|
|
</div>
|
|
</body>
|
|
</html>
|