Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
ad82f63
feat(reporting): reconcile stable finding IDs across report formats
rng1995 Oct 30, 2026
7131ab7
Merge main into naren/port-stable-finding-ids
rng1995 Nov 2, 2026
6bd6dcc
fix(ci): refresh finding IDs even when no credential token was collected
rng1995 Nov 2, 2026
380bef2
fix(models): keep finding_id stable when a message repeats its location
rng1995 Nov 2, 2026
c3db20f
fix(reporting): count each location a folded PII finding lists
rng1995 Nov 2, 2026
39b3c78
fix(reporting): do not count workflow scope notes as warnings without…
rng1995 Nov 2, 2026
390980f
fix(reporting): merge HTML skill entries only within one finding_id
rng1995 Nov 2, 2026
0de9945
test(reporting): pin path separators, missing lines and severity esca…
rng1995 Nov 2, 2026
04454d1
docs: note that HTML summary.total_issues now counts unique findings
rng1995 Nov 2, 2026
139fd23
Merge main into naren/port-stable-finding-ids
rng1995 Nov 3, 2026
b8ef88e
fix(reporting): keep folder and plugin locations consistent in findin…
rng1995 Nov 3, 2026
9260978
refactor(reporting): drop the unused advisory_results list
rng1995 Nov 3, 2026
d7bd2b1
fix(reporting): prefix folded PII locations in merged results; trim o…
rng1995 Nov 3, 2026
b025f7e
Merge origin/naren/port-stable-finding-ids into naren/port-stable-fin…
rng1995 Nov 3, 2026
6c495f1
Merge main into naren/port-stable-finding-ids
rng1995 Nov 3, 2026
5c4d0c6
fix(ci): render the redacted HTML report from the refreshed JSON
rng1995 Nov 3, 2026
adad33d
fix(models): match a Windows message location against a posix file path
rng1995 Nov 3, 2026
ddc8b92
Merge main into naren/port-stable-finding-ids
rng1995 Nov 3, 2026
407455b
Merge origin/main into naren/port-stable-finding-ids
rng1995 Nov 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,33 @@ All notable changes to SkillEvaluator are documented in this file.
`tier1` leaves a check out and reports it as skipped. A `scanners` row and the
JSON report record which scanner versions ran.

- Every finding now has stable IDs for tracking across runs and validators.
`finding_id` (`SEF-…`) is derived from the finding's category, check,
message, and suggestion, so it survives line moves, whitespace or case
changes, and severity overrides. Location text a check copies into its
message is left out of it: the `in <file>:<line>` in a secret detection
message, also in a folder or plugin run that prefixes the file path, and
the `— N occurrences (…)` list a PII scan message ends with. A file name in
a message or suggestion, as script lint and secret detection write, stays
part of the ID. `occurrence_id` (`SEO-…`) adds the file, line, and line
content. Otherwise identical findings in different files or skills
share one `finding_id`, so they count as one unique finding with one
occurrence per location. When CI redacts a detected credential from a
report, it recomputes the IDs from the redacted text and renders the HTML,
Markdown, and SARIF copies from that JSON, so no ID is derived from a
removed value. The JSON report and the HTML report's embedded data
add `finding_counts` (raw records, distinct occurrences, unique findings,
and duplicates removed), `finding_groups` (each unique finding with its
validators and every location, including each location a PII finding
lists for a repeated value, also in a folder run), and `message_counts`
(error and warning strings with no finding behind them, such as failed
gates and scanner or execution errors, but not the workflow scope note for
a stage that configuration skips, plus informational messages other than
the `[OK]` line recorded for each passed check); each JSON result also
carries its own `finding_counts`. Markdown adds a Finding Reconciliation
table, most severe first, and per-finding IDs. `total_errors`,
`total_warnings`, and `severity_counts` are unchanged.

### Changed

- Shared LLM calls and the Harbor verifier retry HTTP 408, 429, and every 5xx
Expand Down Expand Up @@ -261,6 +288,25 @@ All notable changes to SkillEvaluator are documented in this file.
environment, so each template compiles once per process instead of once per
report.

- The Markdown summary and the HTML report's summary now count findings the
same way: each unique finding once, at its highest severity, however many
lines, files, skills or validators report it. Markdown's Total Issues adds
distinct occurrences, raw records, and errors and warnings with no finding
behind them, such as failed gates and incomplete scans; its severity
breakdown counts unique findings. In HTML, the tier cards, the Tier 1
Findings and Blocking critical + high numbers, the verdict sentence, the
skill finding badges and the gate policy line count unique findings, and
the Findings number shows the same occurrence, raw-record and no-finding
counts beneath it when they differ from the unique count. Both formats used
to add up raw records, so a finding reported on several lines or by two
validators counted more than once. The HTML report's embedded and exported
data changes `summary.total_issues` the same way: it now counts unique
findings plus errors and warnings with no finding behind them, instead of
raw errors plus warnings; the raw finding count is in
`summary.raw_finding_occurrences` and `finding_counts.raw_occurrences`. The
JSON `skills[].issue_count`, contributor totals, `total_errors`,
`total_warnings` and `severity_counts` still count raw records.

### Documentation

- Give the performance dashboard its own sidebar guide, retain the previous
Expand Down
7 changes: 7 additions & 0 deletions ci/publish_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,13 @@ def read_artifact(payload: bytes) -> tuple[dict, dict[str, dict]]:
redactor = Redactor(tokens)
summary = redactor.object(summary)
reports = redactor.object(reports)
from skillevaluator.reporting.finding_summary import refresh_finding_identities

# IDs hashed from the unredacted text could confirm a guessed value.
# Refresh even without collected tokens: the redactor also masks
# database userinfo that no token names.
for report in reports.values():
refresh_finding_identities(report)
validate_summary(summary)
for row in summary["skills"]:
if row["overall_status"] != "error":
Expand Down
21 changes: 17 additions & 4 deletions ci/secret_redaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import re
from pathlib import Path

from skillevaluator.reporting import MarkdownReporter, SARIFReporter
from skillevaluator.reporting import HTMLReporter, MarkdownReporter, SARIFReporter
from skillevaluator.reporting.finding_summary import refresh_finding_identities
from skillevaluator.reporting.retained import retained_results
from skillevaluator.utils.secret_redaction import SENSITIVE_PII_CATEGORIES, Redactor, sensitive_values
from skillevaluator.utils.secure_fs import SecureRoot
Expand Down Expand Up @@ -132,22 +133,34 @@ def sanitized_outputs(raw: Path, tokens: set[str]) -> dict[str, bytes]:
b"Raw scanner log withheld while credential redaction is active. See the structured reports.\n"
)
continue
if name in {"skillevaluator-tier1.md", "skillevaluator-tier1.sarif.json"}:
if name in {"skillevaluator-tier1.html", "skillevaluator-tier1.md", "skillevaluator-tier1.sarif.json"}:
# These files cut and escape text, so a value can survive a
# literal search. Render them from the redacted JSON instead.
# literal search, and the HTML embeds finding IDs hashed from
# the unredacted text. Render them from the redacted JSON.
if document is None:
raise ValueError("The evaluator did not produce JSON evidence.")
try:
results = retained_results(document)
except ValueError:
# The runner rejects this JSON next; keep the other evidence.
continue
reporter = MarkdownReporter() if name.endswith(".md") else SARIFReporter()
reporter = (
HTMLReporter()
if name.endswith(".html")
else MarkdownReporter()
if name.endswith(".md")
else SARIFReporter()
)
sanitized[name] = reporter.render_all(results).encode("utf-8")
continue
text = content.decode("utf-8")
if name.endswith(".json"):
document = redactor.object(json.loads(text))
if isinstance(document, dict):
# IDs hashed from the unredacted text could confirm a guessed
# value. Refresh even without collected tokens: the redactor
# also masks database userinfo that no token names.
refresh_finding_identities(document)
text = json.dumps(document, ensure_ascii=True, allow_nan=False, indent=2)
else:
text = redactor.text(text)
Expand Down
48 changes: 46 additions & 2 deletions docs/ci-integration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,54 @@ When the exit code is not enough — dashboards, custom thresholds, badge genera
| `results[].publication_evidence` | object | Validated built-in Tier 1 or Tier 2 producer contract: schema version, producer, tier, and canonical check ID |
| `tier3.run_id` | string | Run-owned Tier 3 identity; duplicated in the Tier 3 summary for consistency checks |
| `severity_counts` | object | Totals for `critical`, `high`, `medium`, `low` |
| `total_errors`, `total_warnings` | number | Aggregate counts across all validators |
| `skills` | array | Per-skill `{ name, passed, issue_count }` |
| `total_errors`, `total_warnings` | number | Raw error and warning records across all validators; a finding that two validators report counts twice |
| `finding_counts` | object | Reconciled counts: `raw_occurrences`, `distinct_occurrences`, `unique_findings`, `duplicates_removed`, `occurrences_grouped`, `raw_by_severity`, `unique_by_severity` |
| `finding_groups` | array | One entry per unique finding: `finding_id`, highest `severity`, `message`, `validators`, and every location in `occurrences[]` with its `occurrence_id`, including each location a finding lists in `metadata.occurrences` when its check folds repeats of one value into it (the PII scan does) |
| `message_counts` | object | `independent_errors` and `independent_warnings`: error and warning strings with no finding behind them, such as `gate_failures` and scanner or execution errors (strings that mirror a finding, and the `Workflow scope:` note for a stage that configuration skips, are not counted); `informational`: informational messages, not counting the `[OK]` line recorded for each passed check |
| `results[].findings[].finding_id`, `results[].findings[].occurrence_id` | string | Stable finding and location identities (see below) |
| `skills` | array | Per-skill `{ name, passed, issue_count }`; `issue_count` counts raw finding records |
| `quality_summary` | array | Quality details with `overall_score` (0–100) and `grade` (A–F); a folder target reports the collection average plus a `skill_count` |

Every finding carries two stable IDs. `finding_id` (`SEF-` plus 20 hex
characters) hashes the finding's category, check name, message, and suggestion,
ignoring case and extra whitespace. It does not change when the finding moves
Comment thread
rng1995 marked this conversation as resolved.
Resolved
to another line or file, or when a policy changes its severity, so you can
track a finding across runs. Location text that a check also writes into its
message is left out of the hash: the `in <file>:<line>` in a secret detection
message, also when a folder or plugin run puts the skill or member name in
front of the finding's file path, and the `— N occurrences (…)` list that the
PII scan appends when it folds repeats of one value into one finding. Other
message and suggestion text stays part of the ID: script lint names the script
in its messages and secret detection names the file in its suggestion, so the
same problem in two files has two `finding_id` values. `occurrence_id`
(`SEO-…`) adds the file path, line number, and line content, so it identifies
one location; the source line itself stays on the finding in
`results[].findings[]` and is not repeated in `finding_groups`.
`finding_groups` groups findings by `finding_id` across validators, and each
result in `results[]` carries its own `finding_counts`. Identical findings in
different files or skills share one `finding_id`, so they count as one unique
finding with one occurrence per location. When the CI templates redact a
detected credential from a report, they recompute the IDs and groups from the
redacted text and render the HTML, Markdown, and SARIF copies from that JSON,
so no ID is derived from a removed value; such a finding's IDs differ from a
local run's.

The Markdown summary and the HTML report count findings the same way: each
unique finding once, at its highest severity. Markdown's Total Issues also
shows distinct occurrences, raw records, and the `independent_errors` and
`independent_warnings`, so a run that fails a gate or leaves a scan
incomplete without any finding is not reported as zero issues. In HTML, the
tier cards, the Tier 1 Findings and Blocking critical + high numbers, the
verdict sentence, the skill finding badges and the gate policy line count
unique findings, and the Findings number shows the same breakdown beneath it
when it differs from the unique count. The HTML report's embedded data, which
Export JSON saves, counts `summary.total_issues` the same way: unique findings
plus `independent_errors` and `independent_warnings`, where it used to add up
raw errors and warnings. Its raw finding count is in
`summary.raw_finding_occurrences` and `finding_counts.raw_occurrences`.
`total_errors`, `total_warnings`, `severity_counts`, `skills[].issue_count` and
contributor totals still count raw records.

`overall_status` and `overall_passed` describe the configured command gate. They
can be green when an advisory tier did not run, so do not use them as a
publication signal. Require `publication_status == "pass"` (or
Expand Down
16 changes: 12 additions & 4 deletions docs/reports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,18 @@ the evidence below it:
repeat a finding are folded away.
- **Run details.** Scope, the target path, provenance and the gate policy.

A finding is one problem a check reports at one location, with a severity. A
finding in a failed check blocks the verdict; a finding in a passed check is
advisory. A quality score below the configured minimum fails the Quality score
check, so it also blocks the verdict.
A finding is one problem a check reports, with a severity. The same problem
reported on several lines, or in several files or skills, counts once at its
highest severity; each location is an occurrence, including each line a
PII finding lists when one value repeats. When the unique, occurrence and
raw record counts differ, or when some errors or warnings have no finding
behind them, the findings number shows the occurrences, the raw records and
those errors and warnings beneath it, in the same words as the Markdown
report's Total Issues. The workflow scope note for a stage that configuration
skips, such as LLM checks under `--no-llm`, is not counted as a warning there. A finding in a failed check blocks the
verdict; a finding in a passed check is advisory. A quality score below the
configured minimum fails the Quality score check, so it also blocks the
verdict.

The HTML report, the CI index and the Pages history use the same verdict
words: **Passed**, **Changes required**, **Incomplete**, **Skipped** and
Expand Down
Loading
Loading