{% extends "base.html" %} {# Supply chain audit indicators. Tri-state flags render green (pass), red (fail) or neutral grey (not audited yet). Colour is never the only signal - every indicator carries a title with the spelled out state, and the security badge also names the worst severity and the issue count. The *_icon macros are the compact form for the build table, the *_detail macros the spelled out form used by supply_chain_audit_box(), the box shown inside Product Information. Icon names must exist in FontAwesome 6.0.0 (the version base.html loads) - later v6 names such as fa-shield-halved are not in it and render as nothing. #} {% macro audit_flag(state, icon, label, ok_text, fail_text, pending_text='not audited yet') -%} {%- if state is none -%} {%- elif state -%} {%- else -%} {%- endif -%} {%- endmacro %} {% macro security_issues_icon(issues) -%} {%- if issues is none -%} {%- else -%} {#- Severities ordered worst first, so the first hit is the one to show -#} {%- set severity_levels = ['critical', 'high', 'medium', 'low'] -%} {%- set ns = namespace(worst=none, worst_count=0, total=0, breakdown=[]) -%} {%- for level in severity_levels -%} {%- set count = issues.get(level, 0) -%} {%- set ns.total = ns.total + count -%} {%- if count > 0 -%} {%- if ns.worst is none -%} {%- set ns.worst = level -%} {%- set ns.worst_count = count -%} {%- endif -%} {%- set ns.breakdown = ns.breakdown + [count ~ ' ' ~ level] -%} {%- endif -%} {%- endfor -%} {%- if ns.worst is none -%} {%- else -%} {#- The badge names the worst severity and its count; the title has the full breakdown -#} {{ ns.worst_count }} {{ ns.worst }} {%- endif -%} {%- endif -%} {%- endmacro %} {% macro audit_flag_detail(state, icon, ok_text, fail_text, pending_text='Not audited yet') -%} {%- if state is none -%} {{ pending_text }} {%- elif state -%} {{ ok_text }} {%- else -%} {{ fail_text }} {%- endif -%} {%- endmacro %} {% macro security_issues_detail(issues) -%} {%- if issues is none -%} None known yet {%- else -%} {%- set ns = namespace(any=false) -%} {%- for level in ['critical', 'high', 'medium', 'low'] -%} {%- if issues.get(level, 0) > 0 -%} {%- set ns.any = true -%} {{ issues.get(level) }} {{ level }} {%- endif -%} {%- endfor -%} {%- if not ns.any -%} None known {%- endif -%} {%- endif -%} {%- endmacro %} {# The three audit indicators get their own box inside Product Information, with a help button opening the shared #supplyChainInfoModal defined at the end of the page (one modal for the whole page - Bootstrap's data-api toggling is delegated, so it also works for the JS injected Debug/Source rows). #} {% macro supply_chain_audit_box(build) -%}
Supply Chain Audit
Registered Product
{{ audit_flag_detail(build.registered_product, 'fa-clipboard-check', 'Registered', 'Not registered', 'Not registered yet') }}
Rebuild Reproducible
{{ audit_flag_detail(build.rebuild_reproducible, 'fa-arrows-rotate', 'Reproducible', 'Not reproducible') }}
Highest Known Security Issue
{{ security_issues_detail(build.security_issues) }}
{%- endmacro %} {% block extra_head %} {% endblock %} {% block content %}

Products

SPDX Product Data

Search All Packages
{% if cache_rebuilding %} {% endif %} {% if grouped_products %}

{{ grouped_products | length }} product-version(s), {{ total_product_count }} total build(s)

Loading...

Initializing search interface...

{% else %}
{% if cache_rebuilding %}

Database Rebuilding

The cache daemon is currently rebuilding the database.

Product data will appear here automatically once the SPDX scan completes.
Please wait a few minutes and refresh this page.

{% else %}

No Products Found

No SPDX product data available in cache.

Configure SPDX scanning in config.ini under [spdx] section.
Then restart the cache daemon to populate SPDX data.

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