feat: show basic dmarc info

This commit is contained in:
Guido García 2021-07-21 21:54:37 +02:00
parent 252200998d
commit 3590a0cf9e
4 changed files with 20 additions and 2 deletions

View File

@ -204,6 +204,14 @@ module.exports = function (eleventyConfig) {
})
);
const dmarcSummary = JSON.parse(
fs.readFileSync(`_data/results/dmarc/summary.json`, "utf8")
);
eleventyConfig.addFilter("dmarc_secure", (url) => {
const dmarc_info = dmarcSummary[url];
return dmarc_info.spf.valid === true && dmarc_info.dmarc.valid === true;
});
// % de webs seguras
eleventyConfig.addFilter("safeScore", getSafeScore);

View File

@ -24,6 +24,14 @@
<li><strong>Ubicación:</strong> <a href="/{{ type }}/{{ parent }}">{{ location.name }}</a></li>
{% endif %}
<li><strong>Puntuación:</strong> {{ results.score }}/100</li>
<li>
<strong>Email:</strong>
{% if web.url | dmarc_secure %}
Seguro
{% else %}
<a href="https://dmarcguide.globalcyberalliance.org/#/tool-select?d={{ web.url }}&r=s&s=none&lang=es">Vulnerable a suplantación de identidad de emails</a>
{% endif %}
</li>
{% if web.tags %}
<li class="icon-list">🏷️
{% for tag in web.tags %}

View File

@ -14,7 +14,9 @@
<tr class="{{ web | color }}">
<td>
<a href="/w/{{ web.url | replace('.', '!') }}" title="{{ web | abbr }}">
{% if web.tests_passed < 5 %}☠️{% else %}{{ web.grade }}
{% if web.tests_passed < 5 %}☠️{% else %}{{ web.grade }}{% endif %}
{% if not web.url | dmarc_secure %}
<span title="Vulnerable a suplantación de identidad de emails">✉️</span>
{% endif %}
</a>
</td>

View File

@ -216,7 +216,7 @@ p.featured .cta-twitter {
}
#resultados table th#nota {
width: 65px;
width: 75px;
}
#resultados table th#share {