Skip to content

docs(security): [#2493] triage GitHub security findings - #2498

Merged
josecelano merged 24 commits into
torrust:developfrom
josecelano:2493-security-code-scanning-triage
Oct 8, 2026
Merged

josecelano merged 24 commits into
torrust:developfrom
josecelano:2493-security-code-scanning-triage

Conversation

@josecelano

@josecelano josecelano commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Summary

  • define the recurring process for triaging GitHub Code Scanning and Code Quality findings without a standing epic
  • add a trust-boundary-based priority model that distinguishes runtime and release supply-chain risk from CI and local-development findings, including a default priority for findings that still need investigation
  • add a focused repository skill for scanner triage and clarify how it splits Trivy alerts with the existing CVE catalog skill (inventory and clustering here, CVE reachability analysis there)
  • reconcile all 68 open findings into a durable catalog and dated review inventory, with scanner severity and paths
  • document 39 non-affecting findings, 27 hardening findings, and two native zlib findings requiring investigation
  • record both Code Scanning alert numbers for every Trivy finding: the scheduled and push-triggered scans report the same findings under different numbers, and only the latest series is open
  • add approved issue specifications for the focused follow-up work in Set explicit permissions for CI workflows #2495, Set explicit permissions for release publishing workflows #2496, and Investigate native zlib runtime linkage and CVE reachability #2497, and for bug Stabilize Trivy Code Scanning alert identity #2499, which fixes the unstable Trivy alert identity found during review

Areas changed

  • .github/skills/dev/maintenance/
  • docs/security/
  • docs/issues/open/2493-security-code-scanning-triage/
  • follow-up specifications under docs/issues/open/2495-*, docs/issues/open/2496-*, docs/issues/open/2497-*, and docs/issues/open/2499-*
  • docs/pr-reviews/pr-2498-review/PR-REVIEW.md
  • docs/index.md and project-words.txt

Review

Round 1 (Copilot review 5460550155 and da2ce7 review 5460660461) raised 11 findings, and round 2 (da2ce7 review 5461276899) raised 3 more: log stamps later than their commits, and evidence provenance in the #2493 and #2499 evidence files. All 14 are fixed, replied to, resolved, and recorded in the audit.

Validation

  • reconciled 66 Code Scanning alerts and two Code Quality findings exactly once against a rerun of the pinned API queries; the recorded output is in the Triage GitHub Security scanner findings and define the recurring process #2493 evidence file
  • paired the 31 scheduled-scan and 31 push-scan Trivy alerts one-to-one by CVE id and package
  • independently reviewed the findings with no confirmed exploitable vulnerability identified
  • passed the repository pre-commit gate for every commit and the pre-push gate, including nightly workspace checks and documentation plus the full stable test suite
  • validate-audit-record.py reports no failures for the audit
  • every commit is GPG signed

Closes #2493

Related to #2495
Related to #2496
Related to #2497
Related to #2499

@josecelano
josecelano requested a review from a team as a code owner October 8, 2026 17:10
Copilot AI balanced review requested due to automatic review settings October 8, 2026 17:10
@josecelano josecelano self-assigned this Oct 8, 2026
@josecelano
josecelano requested a review from da2ce7 October 8, 2026 17:18
Copilot stopped reviewing on behalf of josecelano due to an error October 8, 2026 17:31

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Copilot was unable to run its full agentic suite in this review.

Copilot review overview

2 open findings
What changed in this PR

Adds a structured, repeatable process for triaging GitHub Security tab findings (Code Scanning + Code Quality), with supporting catalogs, review evidence, and issue-spec scaffolding to track root-cause clusters instead of a single long-lived backlog.

Changes:

  • Introduces public documentation for Security tab finding triage, plus a dedicated triage-github-security-findings skill and updated routing in the existing CVE catalog skill.
  • Adds an initial GitHub Security review inventory + durable cluster catalog, and updates/creates related runtime CVE analysis records.
  • Seeds focused follow-up issue specs for native zlib linkage investigation and explicit workflow-permission hardening.
File Description
project-words.txt Extends cspell dictionary for new security/CVE terminology referenced in docs.
docs/​security/​public-scanner-findings.md New canonical process document for Security tab triage and clustering.
docs/​security/​analysis/​production/​CVE-2026-85091.md New CVE analysis record tracking zlib reachability investigation.
docs/​security/​analysis/​production/​CVE-2026-27171.md Reopens/updates prior verdict to “needs-investigation” with new linkage evidence and review history.
docs/​security/​analysis/​production/​2026-10-08_github-code-scanning-runtime-cves.md Adds bulk record for non-affecting runtime CVEs from the 2026-10-08 review.
docs/​security/​analysis/​github-security/​reviews/​2026-10-08.md Adds dated full inventory + clustering reconciliation for the initial review.
docs/​security/​analysis/​github-security/​README.md Adds durable cluster catalog tying alerts to dispositions and follow-ups.
docs/​security/​analysis/​README.md Updates analysis index to include the new GitHub Security catalog/reviews structure and routing.
docs/​security/​README.md Expands overall security model, trust tiers, and priority assignment guidance; links new process docs.
docs/​issues/​open/​2497-investigate-native-zlib-runtime-linkage/​ISSUE.md Adds planned investigation spec for native zlib linkage and CVE reachability.
docs/​issues/​open/​2496-set-explicit-release-workflow-permissions/​ISSUE.md Adds planned hardening spec for explicit token permissions in release workflows.
docs/​issues/​open/​2495-set-explicit-ci-workflow-permissions/​ISSUE.md Adds planned hardening spec for explicit token permissions in CI workflows.
docs/​issues/​open/​2493-security-code-scanning-triage/​manual-verification-evidence.md Adds manual verification evidence for the initial triage/categorization work.
docs/​issues/​open/​2493-security-code-scanning-triage/​ISSUE.md Adds master spec for defining and executing the initial recurring Security tab triage process.
docs/​index.md Links the new/expanded security documentation from the docs index.
.github/​skills/​dev/​maintenance/​triage-github-security-findings/​SKILL.md New skill defining the executable workflow adapter for Security tab triage.
.github/​skills/​dev/​maintenance/​catalog-security-vulnerabilities/​SKILL.md Updates existing skill to route Code Scanning/Code Quality findings to the new triage skill.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at c073c24dc08bd62685090decc51d2208df6fd360 (round 1). Recomputed from the bytes at this head, against develop at 554c47f67, which is also the merge base.

The PR defines a recurring triage process for public Code Scanning and Code Quality findings. It adds a triage-github-security-findings skill, a policy document and a trust-tier priority model in docs/security/README.md. It records a first review of 68 findings in a cluster catalog and a dated inventory, revises the zlib CVE records, adds a bulk runtime-CVE record, and adds specs for the triage task and the three follow-ups.

Reconciliation. A script compared the PR's documents with the open-alert list captured at 17:13Z: 66 alerts. Code Quality is not in that API, so the two Code Quality findings are checked only for consistency across the PR's documents. All 35 CodeQL numbers are covered exactly once, and every workflow alert's path and job line in the release/CI split matches the API. All 25 Trivy CVE ids are covered the right number of times, and the catalog totals recompute to 27 + 2 + 39 = 68. However, none of the 31 Trivy alert numbers in the inventory is an open alert, and none of the 31 open Trivy alerts is listed by number (F1).

Process documents. The skill's frontmatter, semantic-links and Skill Links section follow docs/skills/semantic-skill-link-convention.md, and every linked artifact links back. No skill index or AGENTS.md list needs an entry. All 161 relative links and frontmatter paths in the changed files resolve, and nothing in the tree links to the removed README headings. The routing boundary for Trivy alerts in Code Scanning is stated inconsistently (F2).

Specs. All four specs carry the twelve required v1 fields, with epic: null as create-issue SKILL.md:207 prescribes. In each, github-issue, spec-path and branch match the folder, and last-updated-utc equals the newest log entry. Titles and scope match the GitHub issues. The alert lists in the CI and release specs equal the inventory's split. The last commit replaced a branch commit id with the commit subject, as the evidence template requires. The evidence file itself does not follow its template (F3).

CVE analyses. The repository facts check out: flate2 resolves through zlib-rs with no libz-sys (Cargo.lock), the zlib1g version matches the scanner message, and Containerfile:173 copies the ldd-resolved libz.so.1. Exploitability verdicts are reported, not graded.

Index, words, hygiene. The 13 new words are each used in added files and keep project-words.txt in ASCII order. git diff --check is clean. The four subjects are Conventional, with author = committer, ascending times and one co-authorship trailer each. They carry no issue tag, which commit-changes does not require. Closes for the delivered task and Related to for the spec-only follow-ups follow open-pull-request SKILL.md:124-125. Archiving the spec is a post-merge step (cleanup-completed-issues SKILL.md:33). The Validation claims (gates, independent review) are reported, not re-run.

Findings. F1 Major (blocking). F2 and F3 Minor, non-blocking. F4 and F5 Suggestion. F6 to F9 Nit.

Checked, no finding. Diff scope (17 files, +1664/−56); merge base; the GSF-001 split of 7 + 20 with no overlap; follow-up priorities equal catalog priorities; follow-up specs cite only hardening or needs-investigation alerts; the new analysis README entries resolve; index row form.

Checks

On the loop's compute hub at this head, base develop 554c47f67 (also the merge base; git merge-tree clean; receipt server-gates-krkavec-212): pre-commit profile gate exit 0 (76 s); linter markdown, linter cspell, linter lychee exit 0; frontmatter-validator --all: 19 errors / 4 warnings at this head and 19 / 4 at develop re-measured, so no new frontmatter finding. GitHub checks at this head at posting time: "Docs Lint: completed/success". At posting, develop is 554c47f67. On F1, the alert API at posting time shows the Trivy numbers the documents cite (for example 13, 24, 59, 106 and 145) with state fixed at 2026-10-08T16:55:43Z on path torrust/tracker, while the open Trivy alerts for the same CVE ids (for example 12, 60 and 151) sit on path library/torrust-tracker, the newest created at 15:48:42Z: the scanner re-created the alerts under new numbers before this head was committed, so the documents' numbers were true of an earlier scan.

Comment thread docs/security/README.md Resolved
Comment thread docs/index.md Resolved
@josecelano
josecelano force-pushed the 2493-security-code-scanning-triage branch from c073c24 to dc0a1de Compare October 8, 2026 18:09
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Oct 8, 2026
Also correct the torrust#2499 creation time to 17:52 UTC, when GitHub created the issue.

Co-authored-by: Copilot <[email protected]>
josecelano added a commit to josecelano/torrust-tracker that referenced this pull request Oct 8, 2026
@josecelano
josecelano requested a review from da2ce7 October 8, 2026 18:15

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 181327d0f8ce81ced0ddc2d2c117bfb72b04ec4e (round 2). Recomputed from the bytes at this head, against develop at aa7f1ea95, which is also the merge base.

Pushes. The branch was rebased onto aa7f1ea95. git range-diff shows the four round-1 commits unchanged (9a1651ffa, 0f45c3c63, 701c454b6, 88316df32). Fourteen commits follow: twelve fixes, the review-round log entry and the audit record. They add the alert-identity bug spec and its evidence, and docs/pr-reviews/pr-2498-review/PR-REVIEW.md. The delta 88316df32..181327d0f is 19 files, +995/−156.

Finding Status Decisive fact at this head
F1 FIXED Re-run against a fresh capture (18:22:11Z: 66 open, 85 fixed, 0 dismissed). The CodeQL numbers plus the push-series numbers cover the 66 open alerts exactly once. All 31 scheduled-series numbers are fixed at 16:55:43Z on torrust/tracker, as the Trivy Alert Series table explains (reviews/2026-10-08.md:65-110), and all 31 rows pair CVE id, package and severity with an open library/torrust-tracker alert. Totals recompute to 27 + 2 + 39 = 68. The Code Scanning call pins X-GitHub-Api-Version: 2022-11-28 (:29).
F2 FIXED One split, stated the same way in public-scanner-findings.md:16-24, catalog-security-vulnerabilities/SKILL.md:3 and :27-31, and the triage routing table (:99-101). No routing rows overlap.
F3 FIXED in form The template's frontmatter and sections are present, and the V2 script reproduces its recorded output. Its provenance is F11.
F4 FIXED The severity and path columns match the API for every CodeQL and Trivy row.
F5 FIXED docs/security/README.md:111.
F6 FIXED Catalog :37-47 uses the defined values; need-investigation no longer occurs.
F7 FIXED docs/index.md:48-49.
F8 FIXED All five specs keep the template's H2 order, and the triage spec has related-pr: 2498.
F9 FIXED public-scanner-findings.md:196-198.

Audit record. The record follows PR-REVIEW-TEMPLATE.md, with eleven rows. Its source and reply ids match the eleven threads and replies, and all threads are resolved. The bot reviewer's two severities are marked (inferred) from its overview icons, as process-pr-review SKILL.md:231 asks. This reviewer's F1 and F2 are recorded as F10 and F11 with their original ids (:57-61, :218-219); F3–F9 use N/A, which is correct. Severities match the brackets, and every statement about this review is true of it. The processing log is chronological, but its last stamp postdates its commit (F10).

Alert-identity spec. It has the twelve v1 fields, issue-type: bug, epic: null and the fix-bug sections. Its last-updated-utc (17:52) equals the newest log entry and the issue's created_at (17:52:22Z). Title and scope match the issue, and links resolve both ways. The image names and action versions it cites match security-scan.yaml:47-52, :66 and :90. The commands recorded in its evidence do not produce the recorded output (F12).

Unprompted changes. The manual Docker scan skill link is bidirectional (public-scanner-findings.md:6, run-manual-docker-security-scan/SKILL.md:15). analysis/README.md step 4 matches the split. The bulk record and CVE-2026-85091.md cite both series, with every number equal to the series table.

Carry-over and hygiene. Develop changed two of this PR's files, docs/index.md and project-words.txt, in hunks that do not overlap the PR's changes. The 13 words stay in ASCII order, and 186 links and paths resolve. git diff --check is clean. All eighteen subjects are Conventional, with author = committer, ascending author times and one co-authorship trailer each. Two subjects carry [#2493], which commit-changes neither requires nor forbids. The PR body adds Related to #2499 for the spec-only bug.

Findings. F10 and F11 are Minor and blocking; F12 is a Nit. These ids continue this reviewer's numbering. The audit already uses F10 and F11 for this reviewer's F1 and F2, so they need audit-local ids under process-pr-review step 3.

Checked, no finding. Range-diff = ×4; merge base; the open set is unchanged since round 1; no dismissed alerts; follow-up priorities; the GSF-001 split of 7 + 20; the CVE repository facts are unchanged.

Checks

On the loop's compute hub at this head, base develop aa7f1ea95 (also the merge base; git merge-tree clean; receipt server-gates-krkavec-217): pre-commit profile gate exit 0 (151 s); linter markdown, linter cspell, linter lychee exit 0; frontmatter-validator --all: 19 errors / 4 warnings at this head and 19 / 4 at develop re-measured, so no new frontmatter finding; validate-audit-record.py --pr-number 2498 --base aa7f1ea95 over the live review comments: 11 rows, 5 log entries, 0 failures. GitHub checks at this head at posting time: "Docs Lint: completed/success". At posting, develop is 3e58b9c05. The live Code Scanning alert list was re-captured at launch time (18:22:11Z: 66 open, 0 dismissed, 85 fixed) and given to the lane as evidence for F1.

josecelano and others added 15 commits October 8, 2026 19:50
Each Trivy finding has a scheduled-scan and a push-scan Code Scanning alert number, and only the latest series is open. Cite both so the inventory, CVE records, and zlib spec reconcile in either state.

Co-authored-by: Copilot <[email protected]>
Code Scanning findings from any tool, including Trivy, are inventoried and clustered by the triage process; CVE reachability analysis is recorded through the CVE catalog workflow and linked from the cluster.

Co-authored-by: Copilot <[email protected]>
Add scanner severity to the catalog and the review inventory, and the affected path to every inventory row. The V2 reconciliation script now reads the alert-number column from the end of the row, so it works with the wider table; rerun output is unchanged.

Co-authored-by: Copilot <[email protected]>
Add Risks and Trade-offs and References to the torrust#2493, torrust#2495, torrust#2496, and torrust#2497 specs, nest Acceptance Verification under Verification Plan, move the torrust#2493 Progress Log under Progress Tracking, and set its related PR.

Co-authored-by: Copilot <[email protected]>
josecelano and others added 3 commits October 8, 2026 19:50
@josecelano
josecelano force-pushed the 2493-security-code-scanning-triage branch from 181327d to d9329d2 Compare October 8, 2026 18:51
@josecelano
josecelano requested a review from da2ce7 October 8, 2026 19:06
@josecelano

Copy link
Copy Markdown
Member Author

@da2ce7 Round 2 is addressed at 9f1864319 and ready for re-review. Your F10–F12 are recorded as audit F12–F14:

All threads are resolved. Docs Lint passes.

@da2ce7 da2ce7 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 9f1864319f6377114806457cb86388d1c9eaa69b (round 3). Recomputed from the bytes at this head, against develop at 3e58b9c05, which is also the merge base.

Pushes. First came a pure rebase to d9329d259: all eighteen commits are = against 181327d0f, and the PR's 21 paths are byte-identical. Five fix commits followed (7b78b1297, f7fa68f40, 8e7499b1c, 17a1dd333, abeab605d), then the round-2 audit rows (9f1864319). Together they change 7 files, +146/−33.

Finding Status Decisive fact at this head
F10 FIXED I ran git blame over every PR Markdown file. All 39 log stamps and last-updated-utc values are no later than the author time of the commit that introduced their current text. The audit's creation entry (PR-REVIEW.md:263) is 18:12, the minute of its 18:12:17Z creating commit. The round-2 entry (ISSUE.md:200) is 18:59 in a commit authored at 18:59:59Z.
F11 FIXED The evidence (:18-19, :97-105) records run 1 (17:58–18:00, [4]) and run 2 (18:01:43–18:02:56, [-3]), inside the 18:01:43Z and 18:02:56Z commits. Each script form gives 68/68 on its own table, and the jq summary recomputes on an 18:22Z capture (the open set is unchanged). The Code Quality export is not recomputable here. last-updated-utc 18:54 precedes its 18:56:31Z commit.
F12 FIXED The --jq … join(" ") template yields the recorded rows. The exports are pinned. The recorded pairing script recomputes 31 / 31 / 31 / True. The alert reads match the capture, with sorted keys as gh's jq prints them. The 18:57:14–18:58:10 rerun precedes its 18:58:53Z commit.

Round-2 log entry and restamps. The triage spec's 18:59 entry names review 5461276899, three findings, all fixed, and the three fixes, which is true of this review and of the bytes. last-updated-utc equals that entry. The twelve restamped values each equal the minute of their original commit's author time: 17:07, 18:06 ×7, 18:11 ×2, 17:55 and the audit's 18:12. Stamping a creation entry at the minute of the commit that created it is the right reading of process-pr-review SKILL.md:267-268. The restamps were made in place. The audit appends a correction that names the change (:265), as the PR #2232 and PR #2270 audits did.

Audit rows. F12–F14 carry Reviewer finding ID F10, F11 and F12, and PR-REVIEW.md:50-54 states the collision mapping, so the 18:59 log entry's "F12" can be followed back to this review's F10. Severity and category match the brackets (Minor, Minor, Nit). The source review is 5461276899 at 181327d0f, and the source comments are 4222800274, 4222800283 and 4222800289. Each reply (4223012626, 4223012896, 4223013200) is in_reply_to its source. Resolution references are the fix subjects, and each verification line holds at this head. The log entries at 18:52, 18:59, 19:01 and 19:03 are chronological and none is later than its 19:03:11Z commit. The 18:52 fetch follows this review's 18:38:55Z submission. All 14 threads are resolved. Everything the record says about both of this reviewer's reviews is true.

Carry-over and hygiene. Develop's eight files between aa7f1ea95 and 3e58b9c05 (PR #2484: the 1669 and 2482 issue documents and the pr-2484-review audit) include none of this PR's paths. F1–F9 stay FIXED on unchanged bytes, and all 186 links resolve. The five specs pass, with last-updated-utc equal to the newest entry in each. The six new commits have Conventional subjects; three carry an issue tag ([#2493] ×2, [#2499]). Each has author = committer, ascending times, and one co-authorship trailer. git diff --check is clean. The PR body adds a true round-2 summary.

Findings. None.

Checked, no finding. Merge base and merge-tree; 18 =; the fresh capture's open set is unchanged since round 2; the five specs' frontmatter and section order; no banned token in the diff or messages.

Checks

On the loop's compute hub at this head, base develop 3e58b9c05 (also the merge base; git merge-tree clean; receipt server-gates-krkavec-219): pre-commit profile gate exit 0 (74 s); linter markdown, linter cspell, linter lychee exit 0; frontmatter-validator --all: 19 errors / 4 warnings at this head and 19 / 4 at develop re-measured, so no new frontmatter finding; validate-audit-record.py --pr-number 2498 --base 3e58b9c05 over the live review comments: 14 rows, 9 log entries, 0 failures. GitHub checks at this head at posting time: "Docs Lint: completed/success". At posting, develop is 3e58b9c05. The live Code Scanning alert list was re-captured at launch time (19:11:57Z: 66 open, 0 dismissed, 85 fixed) and given to the lane as evidence.

@da2ce7

da2ce7 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

ACK 9f18643 — F10–F12 fixed: all 39 log stamps are no later than their introducing commits, both V2 runs and the Trivy pairing recompute against the fresh capture, and the round-2 audit rows are true of this review

@josecelano

Copy link
Copy Markdown
Member Author

ACK 9f18643

@josecelano
josecelano merged commit 41add51 into torrust:develop Oct 8, 2026
1 check passed
josecelano added a commit that referenced this pull request Oct 15, 2026
ed56f2e chore(issues): archive closed issue #2493 spec (Jose Celano)

Pull request description:

  Archives the specification for #2493 from `docs/issues/open/` to `docs/issues/closed/`. The issue closed as completed when PR #2498 merged on 2026-10-08.

  Related to #2493.

  - Verified #2493 is `CLOSED` (completed) on GitHub and PR #2498 is merged.
  - Moved `docs/issues/open/2493-security-code-scanning-triage/` (`ISSUE.md` and `manual-verification-evidence.md`) to `docs/issues/closed/`.
  - Updated the spec's frontmatter (`status: done`, `spec-path`, `last-updated-utc`) and the evidence record's `issue-spec` path and stamp.
  - Ticked the two remaining workflow checkpoints:
    - "Reviewer validated acceptance criteria": da2ce7 approved the merged head `9f1864319` with an ACK.
    - "Issue closed and spec moved".
  - Added a progress-log entry recording the archive.
  - The spec has no parent EPIC. Searching the repository for the folder name finds no references outside the moved files, and both relative links inside them still resolve.
  - Pre-commit and pre-push checks passed (both ran through the installed git hooks).

ACKs for top commit:
  da2ce7:
    ACK ed56f2e — both files move by rename with status, spec-path, issue-spec and stamps updated, no live reference to the open path remains, and both ticked checkpoints hold against the PR #2498 merge on develop
  josecelano:
    ACK ed56f2e

Tree-SHA512: c3a883c82deb39e98825af70877b7c4fbc8a1a03e478ae7519875b6283457abd3b4025b09ba060d0c75303730891d4861633e3c73026531bd3273cd93dd8542e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Triage GitHub Security scanner findings and define the recurring process

3 participants