Stabilize Trivy Code Scanning alert identity

Open
#2,499 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
docker, github-actions, yaml
Domain
ci-cd, security

Research direction

Start with the Security Scan workflow, comparing the image reference used by the scheduled run (torrust/tracker:develop) with the one built for push and pull-request runs (torrust-tracker:local). Read the spec at docs/issues/open/2499-stabilize-trivy-code-scanning-alert-identity/ISSUE.md, delivered through PR #2498. Done means one image reference for every trigger, and alert numbers and states unchanged across a scheduled run and a push run.

Written by the indexing model from the issue text.

Description

Bug Continuous Integration Security

Problem

The Security Scan workflow scans a different image name depending on the trigger: scheduled runs pull torrust/tracker:develop, while push and pull-request runs build torrust-tracker:local. Trivy uses the image name as the alert location (torrust/tracker vs library/torrust-tracker), and both runs upload to the same SARIF category on develop.

Each time the trigger type changes, GitHub marks every Trivy alert of the previous series as fixed and opens or reopens a duplicate alert under another number. No package changed.

Reproduced on 2026-10-08: the push run for 554c47f67 marked 31 torrust/tracker alerts fixed at 16:55:43Z and reopened 31 library/torrust-tracker alerts with the same CVE ids and packages.

Impact

  • The Security tab reports vulnerabilities as fixed while they are still in the image.
  • Alert numbers cited in review inventories, CVE records, and issue closure criteria go stale at the next trigger change (found in PR #2498 review).

This is not an exploitable vulnerability; it is a CI defect in the evidence pipeline for runtime findings.

Expected

One stable alert per CVE and package for every trigger. Do not split triggers into separate SARIF categories, which would keep both duplicate series open.

Plan

  1. Use one image reference for every trigger.
  2. After merge, verify that a scheduled run and a push run leave every Trivy alert number and state unchanged.
  3. Reconcile the duplicate series and update the GitHub Security catalog.

Spec: docs/issues/open/2499-stabilize-trivy-code-scanning-alert-identity/ISSUE.md, delivered through PR #2498.

Related to #2493

Dominant language
Rust
Stars
532
Forks
56
Avg merge
11h 20m
Merged PRs (30d)
282

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from torrust/torrust-tracker

All issues in torrust/torrust-tracker

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.