Security posture

Security trend

<forma-security-trend>

Presents security change over time with state and context independent of color.

Authoring tag
<forma-security-trend>
Behavior owner
Aegis / application
Canonical source
patterns/security-trend.html

Purpose

A security trend lists how security results changed compared with a named baseline, usually the previous assessed artifact. Each entry leads with its direction in words (Regression, Improvement, Unchanged or No measurement) and then states what changed with both values, such as "Unknown security effects increased from 0 to 2". Direction is never implied by an arrow or color alone, and a missing measurement is shown as its own entry rather than as zero change. Tutela supplies the comparison; Forma presents it without computing deltas or judging whether a change is good.

Use when

  • A release review needs to show what got better or worse since the previous artifact.
  • Regressions in unknowns or stale evidence must be as visible as new violations.
  • Some measurements were unavailable for the baseline and readers must know that.

Avoid when

  • You need the current counts rather than the change: use Security state matrix.
  • You need a plotted time series across many artifacts: use a chart with a text alternative; this component lists discrete changes.
  • You need a general before/after metric: use Metric value change.

Behavior to know

  • An introductory sentence names the baseline being compared.
  • Each entry is a list item with a bold direction word followed by a sentence giving both values.
  • data-direction records the machine direction; entries share one visual treatment.
  • No arrows, sparklines or color are required to understand any entry.

Basic example

The smallest correct markup: the canonical pattern from patterns/security-trend.html inside its public tag. Copy this first, then adapt labels, names and state.

Canonical

Minimal security trend

Rendered from the canonical pattern file.

Security trend

Compared with the previous assessed artifact.

  • RegressionUnknown security effects increased from 0 to 2.
  • ImprovementStale evidence decreased from 3 to 1.
  • No measurementException aging was not measured for the previous artifact.
HTML · Minimal security trend Raw HTML for HTML · Minimal security trend
<forma-security-trend class="forma-component-tag">
<section class="forma-security-trend" aria-labelledby="security-trend-title"><h2 id="security-trend-title">Security trend</h2><p>Compared with the previous assessed artifact.</p><ul><li data-direction="regression"><strong>Regression</strong><span>Unknown security effects increased from 0 to 2.</span></li><li data-direction="improvement"><strong>Improvement</strong><span>Stale evidence decreased from 3 to 1.</span></li><li data-direction="unknown"><strong>No measurement</strong><span>Exception aging was not measured for the previous artifact.</span></li></ul></section>
</forma-security-trend>

Click or tap the code once to select all of it, then copy.

Examples

Scenario

Nothing changed since the last release

A comparison where every tracked measure is unchanged. Each measure is still listed with its value, so "no change" is an explicit statement rather than an empty list.

Security trend

Compared with release 4.11.0, assessed .

  • UnchangedViolated invariants stayed at 0.
  • UnchangedUnknown security effects stayed at 1.
  • UnchangedActive exceptions stayed at 2.
HTML · Nothing changed since the last release Raw HTML for HTML · Nothing changed since the last release
<forma-security-trend class="forma-component-tag">
  <section class="forma-security-trend" aria-labelledby="security-trend-unchanged-title">
    <h2 id="security-trend-unchanged-title">Security trend</h2>
    <p>Compared with release 4.11.0, assessed <time datetime="2026-09-12">12 Sep 2026</time>.</p>
    <ul>
      <li data-direction="unchanged"><strong>Unchanged</strong><span>Violated invariants stayed at 0.</span></li>
      <li data-direction="unchanged"><strong>Unchanged</strong><span>Unknown security effects stayed at 1.</span></li>
      <li data-direction="unchanged"><strong>Unchanged</strong><span>Active exceptions stayed at 2.</span></li>
    </ul>
  </section>
</forma-security-trend>

Click or tap the code once to select all of it, then copy.

Scenario

First assessment with no baseline

There is no previous artifact, so every entry is No measurement. The component does not present current values as improvements or regressions.

Security trend

No previous assessed artifact exists for this service.

  • No measurementViolated invariants: 1 now, no baseline.
  • No measurementUnknown security effects: 3 now, no baseline.
HTML · First assessment with no baseline Raw HTML for HTML · First assessment with no baseline
<forma-security-trend class="forma-component-tag">
  <section class="forma-security-trend" aria-labelledby="security-trend-first-assessment-title">
    <h2 id="security-trend-first-assessment-title">Security trend</h2>
    <p>No previous assessed artifact exists for this service.</p>
    <ul>
      <li data-direction="unknown"><strong>No measurement</strong><span>Violated invariants: 1 now, no baseline.</span></li>
      <li data-direction="unknown"><strong>No measurement</strong><span>Unknown security effects: 3 now, no baseline.</span></li>
    </ul>
  </section>
</forma-security-trend>

Click or tap the code once to select all of it, then copy.

Mobile

Each mobile example renders in its own document inside a real narrow viewport, so Forma's media and container queries run exactly as they would on a phone. Choose a width to compare.

Mobile example

Security trend on a phone

Mixed directions with long explanations at phone width.

Viewport width

Frames narrower than the selected width show the component at the width available.

What changes at narrow widths

  • Entries stack in a single-column grid at every width, with the direction word on its own line above the explanation.
  • Explanations use overflow-wrap: anywhere, so long measure names and values wrap without horizontal scrolling.
  • Entries are not interactive, so no touch targets need sizing.
  • Portrait and landscape show the same order; only line breaks change.
HTML · Security trend on a phone Raw HTML for HTML · Security trend on a phone
<forma-security-trend class="forma-component-tag">
  <section class="forma-security-trend" aria-labelledby="security-trend-mobile-title">
    <h2 id="security-trend-mobile-title">Security trend</h2>
    <p>Compared with the previous assessed artifact.</p>
    <ul>
      <li data-direction="regression"><strong>Regression</strong><span>Unknown security effects increased from 0 to 2, both at the network egress boundary.</span></li>
      <li data-direction="improvement"><strong>Improvement</strong><span>Stale evidence decreased from 3 to 1.</span></li>
      <li data-direction="unknown"><strong>No measurement</strong><span>Exception aging was not measured for the previous artifact.</span></li>
    </ul>
  </section>
</forma-security-trend>

Click or tap the code once to select all of it, then copy.

Baseline

Mobile · 320px

The canonical pattern in a true 320px viewport, the minimum width every Forma component must support without page-level horizontal scrolling.

Viewport width

Frames narrower than the selected width show the component at the width available.

API and configuration

Forma components have no JavaScript API. Their public contract is the markup: native elements and attributes you write, and the CSS hooks below. The CSS hook table is generated from the built stylesheet, so it always matches the shipped implementation.

Native and ARIA attributes
AttributeOnValuesDefaultDescription
aria-labelledbysection.forma-security-trendid of the heading—Names the region by its heading.
data-directionliregression | improvement | unchanged | unknown—Machine direction supplied by Tutela. Not styled by Forma CSS; the bold direction word is the visible cue.
datetimetimeISO 8601 date—Machine-readable baseline date.
CSS hooks (derived from dist/all.css)
HookKindValues or defaultDescription
.forma-security-trendBlock class—Root section: bordered, padded primary surface. Its list is an unstyled single-column grid; each entry is a grid with a 0.3rem start border in the current text color and a secondary surface, and its span wraps anywhere.
Keyboard interaction
KeysResult
—Not interactive unless the application adds links in entry text.
Events
EventDescription
—No events.

Form behavior

Not a form control.

States

Security trend states
StateHow it is expressedPresentation
Regressiondata-direction="regression" + text RegressionA security measure got worse.
Improvementdata-direction="improvement" + text ImprovementA security measure got better.
Unchangeddata-direction="unchanged" + text UnchangedThe measure is the same; the value is still stated.
No measurementdata-direction="unknown" + text No measurementThe baseline or current value is missing; not treated as unchanged.

Accessibility

Forma provides

  • Leads each entry with a direction word; all entries share one visual treatment, so color is never the cue.
  • Uses a semantic list so the number of changes is announced.

Your application supplies

  • Name the baseline in the introductory sentence.
  • State both the previous and current value in each entry.
  • Report missing measurements as No measurement, never as zero change.
  • Do not reorder entries to put improvements first.

Responsive behavior

  • The section has zero minimum inline size; the list is a single-column grid at every width.
  • Explanations wrap anywhere. No breakpoints are needed.

Motion

  • No animation: the trend is static text; there are no animated arrows or counters.

Usage guidance

Do

  • Treat increases in unknowns and stale evidence as regressions when Tutela reports them so.
  • Keep the vocabulary consistent: Regression, Improvement, Unchanged, No measurement.

Avoid

  • Showing only up and down arrows.
  • Computing a net trend score across measures.

Verification specimens

Generated fault-injection specimens expose content, spacing, color-cue, and reduced-effective-contrast risks. They screen presentation robustness as engineering screens without claiming human-subject validation.