Skip to content

Security vulnerability monitoring — automated detection and issue creation for high/critical CVEs #850

Open

Description

@vybe

Summary

Implement a mechanism to automatically detect high and critical security vulnerabilities affecting Trinity's dependencies and codebase, and create tracked GitHub issues for each finding — so nothing falls through the cracks between security advisories and the development backlog.

Context

Trinity is a public OSS repository running Docker containers with a full Python/Node.js/Go stack, Redis, and SQLite. A high-severity CVE in any dependency (FastAPI, Docker SDK, httpx, Claude Code base image, etc.) can go unnoticed without active monitoring. The goal is zero lag between a vulnerability being published and a P0/P1 issue appearing in the backlog.

Approaches to Evaluate

Option A — GitHub-native (lowest friction, start here)

  • Enable Dependabot alerts + auto-PRs for all dependency ecosystems (Python requirements.txt, Node package.json, Go go.mod, Docker base images)
  • Enable CodeQL static analysis (free for public repos) on push and on a weekly schedule
  • Enable GitHub Secret Scanning to catch accidentally committed credentials

Option B — Scheduled scanner + issue creation (more control)

  • GitHub Actions workflow on daily schedule
  • Runs Grype or Trivy against the full dependency graph + Docker images
  • Filters to high/critical severity only
  • Deduplicates against existing open issues (by CVE ID in title)
  • Creates a labeled issue (priority-p0/priority-p1, type-bug, security) for each new finding with CVE details, affected component, and CVSS score

Option C — Trinity CSO agent (most autonomous)

  • A scheduled Trinity agent running the /cso playbook on a weekly cadence
  • Pulls CVE feeds (NVD, OSV, GitHub Advisory Database) and cross-references Trinity's dependency graph
  • Performs deeper contextual analysis (is the vulnerable code path actually reachable?)
  • Creates GitHub issues with richer context: exploitability assessment, suggested fix, affected versions
  • Combines static scanning (Option B) with LLM-powered triage

Acceptance Criteria

  • At minimum, Dependabot enabled for all ecosystems — no manual step required to get dep vulnerability PRs
  • At minimum, CodeQL enabled on push + weekly schedule
  • Automated scanner (Option B or C) runs at least daily and creates deduplicated issues for high/critical findings
  • Issues created by the scanner include: CVE ID, CVSS score, affected package + version, fixed version if available, and a link to the advisory
  • P0 findings (CVSS ≥ 9.0) create issues labeled priority-p0; P1 findings (CVSS 7.0–8.9) create priority-p1
  • No duplicate issues for the same CVE — scanner checks open issues before creating

Technical Notes

  • Grype and Trivy both support Python, Node, Go, and Docker image scanning in a single run
  • OSV database (Google) covers all ecosystems Trinity uses and has a clean API
  • GitHub Actions gh issue list --search "CVE-YYYY-NNNNN in:title" is sufficient for deduplication
  • Option C (CSO agent) can be layered on top of Option B later — start with B, graduate to C
  • The /cso skill in .claude/skills/ already does manual security audits; this is the automated complement

Activity

  1. added
    priority-p2
    type-feature
    on May 15, 2026
  2. self-assigned this
    on May 19, 2026
  3. added
    status-in-progress
    and removed
    status-in-progress
    on May 19, 2026
  4. added
    theme-security
    and removed on Jun 3, 2026
  5. vybe commented on Jun 11, 2026

    @vybe
    ContributorAuthor

    Deltas from the 2026-06-11 repo audit — the detection tooling this issue proposes is partly dead-on-arrival without these fixes:

    1. Dependabot's backend pip entry is silently dead. .github/dependabot.yml points the pip ecosystem at /src/backend, which contains no manifest — backend deps live in an inline RUN pip install in docker/backend/Dockerfile that Dependabot can't parse. Visible consequence in-tree: python-jose==3.3.0 (CVE-2024-33663/33664, fixed upstream Feb 2025) and Pillow==11.1.0 (CVE-2025-48379) still pinned in June 2026. (Both CVEs verified currently unreachable — HS256-only, no JWE; the finding is the silent control failure.) Fix requires extracting a real requirements.txt the Dockerfile installs from.
    2. The agent base image is built from floating sources — curl|bash NodeSource as root, claude-code@latest, unpinned gemini-cli and pip deps, and startup.sh re-runs unpinned pip install --upgrade at container start. This is the highest-blast-radius image (holds customer credentials) and is invisible to FROM-line scanning; a compromised upstream propagates fleet-wide with nothing to roll back to.
    3. /src/cli is absent from dependabot.yml — the only package shipped to end-user machines.
  6. added
    complexity-medium
    status-incubating
    on Jun 12, 2026
  7. added a commit that references this issue on Jun 23, 2026
  8. added
    status-ready
    and removed
    status-incubating
    on Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

complexity-mediumpriority-p2status-readytheme-securitytype-feature

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions