{% macro location(f, loc) %}
{% if loc.location %}File: {{ loc.location }}{% endif %} {% if loc.environment %}Environment: {{ loc.environment }}{% endif %} {% if loc.verdict %}LLM verdict: {{ loc.verdict.label }} — {{ loc.verdict.why }}{% endif %} {% if loc.baseline and f.locations | length > 1 %}{{ "Accepted" if loc.baseline == "accepted" else "New" }}{% endif %} {% if loc.suppressed %}Status: {{ loc.suppressed }}{% if loc.suppression_reason %} — {{ loc.suppression_reason }}{% endif %}{% endif %}
{% if loc.estimates %}

Estimate

{% endif %} {% if loc.evidence %}

Evidence

{{ loc.evidence }}
{% endif %} {% if not f.recommendation and loc.recommendation %}

Recommendation

{{ loc.recommendation }}

{% endif %} {% if loc.suggested_code and not f.suggested_code %}

Suggested code

{{ loc.suggested_code }}
{% endif %} {% endmacro %} {% macro fix_item(x) %}
  • {{ x.severity }} {{ x.id }} {{ x.title }}
    {{ x.findings }} resource{{ "s" if x.findings != 1 else "" }} {{ x.effort }} effort {% if x.monthly_savings_usd %}saves ~${{ "{:,.2f}".format(x.monthly_savings_usd) }}/mo (estimate){% endif %} {% if x.first_location %}e.g. {{ x.first_location }}{% endif %}
  • {% endmacro %} {% macro severity_bar(row, scale, line) %} {# One stacked bar: its length is the row's findings against the largest row, split by severity. #}
    {{ row.name }} {{ line }}
    {% endmacro %} AWS Architecture Review

    AWS Architecture Review

    Repo: {{ repo }} Source: {{ source }} Files scanned: {{ files_scanned }} {% if prices %}Prices: {{ prices }}{% endif %} Generated: {{ generated }} {% if baseline %} Baseline: {{ baseline.accepted }} accepted, {{ baseline.new }} new {% endif %}

    {% if baseline %}

    Accepted findings stay in the report and do not fail the build.

    {% endif %} {% if warnings %}

    Analysis warnings

    {% endif %}
    {% for sev in severities %}
    {{ counts[sev] }}
    {{ sev }}
    {% endfor %}
    {{ warnings | length }}
    Warnings
    {% if cost and cost.stacks %} {% set headline = cost.headline_monthly_usd if cost.headline_monthly_usd is defined else cost.total_monthly_usd %}
    {% if cost.prices_unavailable %}n/a{% else %}${{ "{:,.0f}".format(headline) }}{% endif %}
    {% if cost.prices_unavailable %}No prices{% elif cost.illustrated_monthly_usd %}Illustrated monthly cost{% else %}Est. monthly cost{% endif %}{% if cost.budget %} · budget {{ "passed" if cost.budget.passed else "FAILED" }}{% endif %}
    {% endif %}
    {% if summary.findings %} {% set sev_total = summary.findings %} {% set high_pct = summary.by_severity.High / sev_total * 100 %} {% set med_pct = high_pct + summary.by_severity.Medium / sev_total * 100 %} {% set met_count = answers | selectattr("met") | list | length %}

    Summary

    {{ summary.findings }} findings: {{ summary.by_severity.High }} High, {{ summary.by_severity.Medium }} Medium, {{ summary.by_severity.Low }} Low.{% if summary.monthly_savings_usd %} About ${{ "{:,.2f}".format(summary.monthly_savings_usd) }}/month possible savings (estimate).{% endif %}

    Severity mix

      {% for sev in severities %}
    • {{ sev }}: {{ summary.by_severity[sev] }} ({{ (summary.by_severity[sev] / sev_total * 100) | round | int }}%)
    • {% endfor %}

    Well-Architected questions met

    {{ met_count }} of {{ answers | length }} met.

    {% for pillar, group in answers | groupby("pillar") %} {% set met = group | selectattr("met") | list | length %}
    {{ pillar }} {{ met }}/{{ group | length }}
    {% endfor %}

    By pillar

    {% set pillar_scale = summary.pillars | map(attribute="findings") | max %} {% for row in summary.pillars %}{{ severity_bar(row, pillar_scale, pillar_lines[loop.index0]) }}{% endfor %} {% if theme_lines %}

    By theme

    A finding can be in more than one.

    {% set theme_scale = summary.themes | map(attribute="findings") | max %} {% for row in summary.themes %}{{ severity_bar(row, theme_scale, theme_lines[loop.index0]) }}{% endfor %} {% endif %}

    Top fixes

      {% for x in summary.top_fixes %}{{ fix_item(x) }}{% endfor %}
    {% if summary.quick_wins %}

    Quick wins

    Low effort, with suggested code.

      {% for x in summary.quick_wins %}{{ fix_item(x) }}{% endfor %}
    {% endif %}
    {% else %}

    No findings.

    {% endif %}
    {% for f in findings %}
    {{ f.severity }} {{ f.id }}

    {{ f.title }}

    {% if f.baseline %} {{ "Accepted" if f.baseline == "accepted" else "New" }} {% endif %} {% if f.suppressed %} Suppressed {% endif %}
    Pillar: {{ f.pillar }} {% if f.locations | length > 1 %}Resources: {{ f.locations | length }}{% endif %}
    {% if f.recommendation %}

    Recommendation

    {{ f.recommendation }}

    {% endif %} {% if f.suggested_code %}

    Suggested code

    {{ f.suggested_code }}
    {% endif %} {% if f.locations | length > 1 %}
    {{ f.locations | length }} locations {% for loc in f.locations %}
    {{ location(f, loc) }}
    {% endfor %}
    {% else %} {% for loc in f.locations %}{{ location(f, loc) }}{% endfor %} {% endif %} {% if f.docs %}

    Learn more

    {% endif %}
    {% endfor %}

    No findings.

    {% if cost and cost.stacks %} {% elif cost_hint %}

    {{ cost_hint }}

    {% endif %} {% if hypotheses %}

    Unverified hypotheses

    The model named these catalog rules in files with no finding. No check confirmed them. They are not findings and do not affect fail-on, the baseline, or SARIF.

      {% for h in hypotheses %}
    • {{ h.rule_id }} {{ h.title }}: {{ h.file }}:{{ h.line }} — {{ h.why }}
    • {% endfor %}
    {% endif %}

    Well-Architected answers

    {{ answers | selectattr("met") | list | length }} of {{ answers | length }} questions met. Each answer is computed from the findings; a question with a best practice this scan did not check is not met.

    {% for pillar, group in answers | groupby("pillar") %}

    {{ pillar }} {{ group | selectattr("met") | list | length }} of {{ group | length }} met

    {% for a in group %}
    {{ a.id }}

    {% if a.url %}{{ a.title }}{% else %}{{ a.title }}{% endif %}

    {{ a.status }}
    {% if a.reason %}

    {{ a.reason }}

    {% endif %} {% if a.findings %}
      {% for fid, title, n in a.findings %}
    • {{ fid }} {{ title }}{% if n > 1 %} ×{{ n }}{% endif %}
    • {% endfor %}
    {% endif %}
    {% endfor %}
    {% endfor %} {% for lens in lens_groups %}

    {{ lens.title }} {{ lens.met }} of {{ lens.total }} met

    {% for pg in lens.pillars %}

    {{ pg.name }} {{ pg.met }} of {{ pg.rows | length }} met

    {% for a in pg.rows %}
    {{ a.id }}

    {% if a.url %}{{ a.title }}{% else %}{{ a.title }}{% endif %}

    {{ a.status }}
    {% if a.reason %}

    {{ a.reason }}

    {% endif %} {% if a.findings %}
      {% for fid, title, n in a.findings %}
    • {{ fid }} {{ title }}{% if n > 1 %} ×{{ n }}{% endif %}
    • {% endfor %}
    {% endif %}
    {% endfor %}
    {% endfor %}
    {% endfor %}