{% extends "base.html" %} {% from "_ui.html" import icon, when, token, run_status %} {% block title %}Builds & changes{% endblock %} {% block content %}

Builds & changes

What changed between two builds of a profile, the rules waiting for review, and every update run.

{% if t and new %}
{{ icon('export') }}suricata.rules of #{{ new.id }}
{% endif %}
{% if not t %}

No profile yet

Builds belong to profiles (named rulesets). Create one, then build it:

suriharvest profile create default && suriharvest profile build default
{% else %}
{% if profiles|length > 1 %}{% for p in profiles %}{{ p.name }}{% endfor %}{% else %}{{ t.name }}{% endif %} {% if builds %}
{% endif %}
{% if not new %}

No build of {{ t.name }} yet

A build writes suricata.rules with the profile's exclusions applied and failing rules left out.

{{ token() }}
{% else %}

Build #{{ new.id }} {% if old %}vs #{{ old.id }}{% else %}first build: every rule is new{% endif %}

{% if d %}{% if d.added %}+{{ d.added|length|num }} added{% else %}0 added{% endif %} · {% if d.removed %}−{{ d.removed|length|num }} removed{% else %}0 removed{% endif %} · {{ d.changed|length|num }} changed{% endif %}{% if new.summary.remapped_sids %} · {{ new.summary.remapped_sids|num }} sids remapped (stable){% endif %} · {{ new.rules|num }} rules, {{ when(new.created_at) }}
{% for key, label, n in [('review', 'New to review', review_total if review_total is defined else none), ('added', 'Added', d.added|length), ('removed', 'Removed', d.removed|length), ('changed', 'Changed', d.changed|length)] %} {{ label }}{% if n is not none %} ({{ n|num }}){% endif %} {% endfor %}
{% if tab == 'review' %}

Rules {{ t.name }} would get now that are not in build #{{ new.id }}: new rules and newer revisions. Highest score first. Tick the ones that must not go to {{ t.name }}; the next build applies it.

{% if review %}
{{ token() }}
{% for g in review %}{% endfor %}
sidRuleSourceScore
{{ g.sid }} {{ g.msg }}{% if not g.redistributable %} own use only{% endif %}{{ g.canonical_source }}{{ g.score }}
Exclude the ticked rules from {{ t.name }}
{% if review_total > page * 200 or page > 1 %}{% endif %} {% else %}

Nothing new since build #{{ new.id }}.

{% endif %} {% else %} {% set rows = d[tab] %} {% if rows %}
{% if tab == 'changed' %}{% endif %} {% for r in rows[:500] %}{% if tab == 'changed' %}{% endif %}{% endfor %}
sidRuleSourceChange
{{ r.exported_sid or r.sid }}{% if tab != 'removed' %}{{ r.msg }}{% else %}{{ r.msg }}{% endif %}{{ r.source or '' }}{{ r.change }}
{% if rows|length > 500 %}
First 500 shown. All of them: suriharvest profile diff {{ t.name }}{% if old %} {{ old.id }} {{ new.id }}{% endif %} --json
{% endif %} {% else %}

None.

{% endif %} {% endif %}
{% endif %} {% endif %}

Update runs suriharvest update history; a failed run becomes the baseline only when accepted (suriharvest runs accept ID)

{% for r in runs %} {% else %}{% endfor %}
#StartedStatusUnique rulesNewGoneGates failed
#{{ r.id }}{{ when(r.started_at) }}{{ run_status(r) }} {{ r.counts.get('unique_logic', '-')|num }}{{ r.changes.get('new_logic', '-')|num }}{{ r.changes.get('gone_logic', '-')|num }} {% for gt in r.gates if gt.status == 'fail' %}{{ gt.name }}{% if not loop.last %}, {% endif %}{% else %}none{% endfor %}
No update yet.
{% endblock %}