|
| 1 | +--- |
| 2 | +doc-type: issue |
| 3 | +issue-type: task |
| 4 | +status: draft |
| 5 | +priority: p3 |
| 6 | +github-issue: 1898 |
| 7 | +spec-path: docs/issues/open/1898-document-security-analysis-process.md |
| 8 | +branch: "1898-document-security-analysis-process" |
| 9 | +related-pr: null |
| 10 | +last-updated-utc: 2026-06-10 16:30 |
| 11 | +semantic-links: |
| 12 | + skill-links: |
| 13 | + - create-issue |
| 14 | + related-artifacts: |
| 15 | + - docs/security/analysis/README.md |
| 16 | + - docs/security/analysis/non-affecting/2026-06-10_containerfile-trixie-cves.md |
| 17 | + - docs/issues/README.md |
| 18 | + - Containerfile |
| 19 | + - docs/adrs/20260603000000_keep_unit_tests_inside_container_build.md |
| 20 | + - docs/skills/semantic-skill-link-convention.md |
| 21 | + - https://github.com/torrust/torrust-tracker/issues/1457 |
| 22 | + - https://github.com/torrust/torrust-tracker/issues/1460 |
| 23 | + - https://github.com/torrust/torrust-tracker/issues/1463 |
| 24 | +--- |
| 25 | + |
| 26 | +<!-- skill-link: create-issue --> |
| 27 | + |
| 28 | +# Issue #1898 - Document security analysis process and catalog non-affecting Containerfile CVEs |
| 29 | + |
| 30 | +## Goal |
| 31 | + |
| 32 | +Establish a structured process for evaluating security warnings and create the initial |
| 33 | +catalog entry documenting why the trixie-based Containerfile image CVEs do not affect us. |
| 34 | + |
| 35 | +## Background |
| 36 | + |
| 37 | +The VS Code Docker DX extension flags vulnerabilities in the Containerfile's three |
| 38 | +trixie-based `FROM` images (`rust:trixie`, `rust:slim-trixie`, `gcc:trixie`). These are |
| 39 | +upstream CVEs in Docker Official Images. Before this issue, there was no documented process |
| 40 | +or central catalog to record such analyses, meaning every contributor seeing these warnings |
| 41 | +would need to re-do the same investigation. |
| 42 | + |
| 43 | +### Related prior work |
| 44 | + |
| 45 | +This issue builds on the **Docker Security Overhaul** EPIC |
| 46 | +([#1457](https://github.com/torrust/torrust-tracker/issues/1457)), which established |
| 47 | +a security baseline for the Containerfile and container workflows. Previous sub-issues |
| 48 | +include adding hadolint linting to CI |
| 49 | +([#1460](https://github.com/torrust/torrust-tracker/issues/1460)) and evaluating the |
| 50 | +`rust:slim-trixie` vs `rust:trixie` trade-off |
| 51 | +([#1463](https://github.com/torrust/torrust-tracker/issues/1463)). Issue #1463 already |
| 52 | +includes a Trivy scan of both the trixie build images and the distroless runtime, |
| 53 | +confirming the runtime has 0 critical/high CVEs. |
| 54 | + |
| 55 | +The current VS Code Docker DX warnings are a new signal that needs to be systematically |
| 56 | +analyzed and cataloged, which this issue addresses by creating a permanent analysis |
| 57 | +process and catalog. |
| 58 | + |
| 59 | +We need: |
| 60 | + |
| 61 | +1. A `docs/security/analysis/` folder structure with a process document. |
| 62 | +2. The initial analysis cataloging these CVEs as non-affecting, with rationale. |
| 63 | +3. A subfolder for non-affecting vulnerabilities so they can be looked up quickly. |
| 64 | +4. A `.github/skills/dev/maintenance/catalog-security-vulnerabilities/` skill so AI agents |
| 65 | + auto-discover this process. |
| 66 | + |
| 67 | +## Scope |
| 68 | + |
| 69 | +### In Scope |
| 70 | + |
| 71 | +- Create `docs/security/analysis/README.md` — index and process description. |
| 72 | +- Create `docs/security/analysis/non-affecting/` — subfolder for non-affecting vulnerabilities. |
| 73 | +- Create `docs/security/analysis/non-affecting/2026-06-10_containerfile-trixie-cves.md` — actual analysis. |
| 74 | +- Create `.github/skills/dev/maintenance/catalog-security-vulnerabilities/SKILL.md` — AI agent skill. |
| 75 | +- Update `docs/adrs/20260603000000_keep_unit_tests_inside_container_build.md` — add Security Rationale section. |
| 76 | +- Add semantic links between ADR, security analysis, and skill convention. |
| 77 | +- List notable CVEs, explain why non-affecting, define review cadence. |
| 78 | + |
| 79 | +### Out of Scope |
| 80 | + |
| 81 | +- Changing the Containerfile base images (separate concern if needed). |
| 82 | +- Fixing the upstream CVEs (they are in Docker Official Images, not our code). |
| 83 | +- Creating automation for vulnerability scanning (future enhancement). |
| 84 | +- Documenting affecting vulnerabilities (none found yet). |
| 85 | + |
| 86 | +## Implementation Plan |
| 87 | + |
| 88 | +Status values: `TODO`, `IN_PROGRESS`, `BLOCKED`, `DONE`. |
| 89 | + |
| 90 | +| ID | Status | Task | Notes / Expected Output | |
| 91 | +| --- | ------ | ------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | |
| 92 | +| T1 | DONE | Create `docs/security/analysis/` folder structure | `README.md` + `non-affecting/` subfolder | |
| 93 | +| T2 | DONE | Analyze trixie Containerfile CVEs | Document showing why they don't affect us | |
| 94 | +| T3 | DONE | Write the non-affecting analysis document | `2026-06-10_containerfile-trixie-cves.md` with full rationale | |
| 95 | +| T4 | DONE | Update ADR with security rationale | Added Security Rationale section to `docs/adrs/20260603000000_keep_unit_tests_inside_container_build.md` | |
| 96 | +| T5 | DONE | Add semantic links between all related docs | `semantic-links` updated in ADR, security analysis, and README | |
| 97 | +| T6 | DONE | Create security analysis skill | `.github/skills/dev/maintenance/catalog-security-vulnerabilities/SKILL.md` | |
| 98 | +| T7 | DONE | User reviews the draft issue spec | Approval before creating GitHub issue | |
| 99 | +| T8 | TODO | Create GitHub issue | Using `gh` CLI or MCP tools | |
| 100 | +| T9 | TODO | Rename spec from `drafts/` to `open/` with issue number | `git mv` + update frontmatter | |
| 101 | +| T10 | TODO | Commit and push | `git add`, `git commit -S`, push to fork | |
| 102 | + |
| 103 | +## Progress Tracking |
| 104 | + |
| 105 | +### Workflow Checkpoints |
| 106 | + |
| 107 | +- [x] Spec drafted in `docs/issues/drafts/` |
| 108 | +- [x] Spec reviewed and approved by user/maintainer |
| 109 | +- [x] GitHub issue created and issue number added to this spec |
| 110 | +- [ ] Implementation completed |
| 111 | +- [ ] Automatic verification completed (`linter all`, relevant tests) |
| 112 | +- [ ] Manual verification scenarios executed and recorded |
| 113 | +- [ ] Acceptance criteria reviewed after implementation and updated with evidence |
| 114 | +- [ ] Issue closed and spec moved from `docs/issues/open/` to `docs/issues/closed/` |
| 115 | + |
| 116 | +### Progress Log |
| 117 | + |
| 118 | +- 2026-06-10 16:30 UTC - GitHub Copilot - Created security analysis skill in `.github/skills/dev/maintenance/catalog-security-vulnerabilities/` |
| 119 | +- 2026-06-10 16:00 UTC - GitHub Copilot - Drafted issue spec and created analysis documents in `docs/security/analysis/` |
| 120 | + |
| 121 | +## Acceptance Criteria |
| 122 | + |
| 123 | +- [ ] AC1: `docs/security/analysis/README.md` exists with process description and template |
| 124 | +- [ ] AC2: `docs/security/analysis/non-affecting/2026-06-10_containerfile-trixie-cves.md` exists with full analysis |
| 125 | +- [ ] AC3: The analysis document includes: vulnerability summary, rationale for non-affecting status, future actions, and references |
| 126 | +- [ ] AC4: `docs/adrs/20260603000000_keep_unit_tests_inside_container_build.md` has a Security Rationale section |
| 127 | +- [ ] AC5: Semantic links are consistent between ADR, security analysis documents, and related artifacts |
| 128 | +- [ ] AC6: `linter all` exits with code `0` |
| 129 | +- [ ] AC7: New documents are spell-checked (no false positives) |
| 130 | +- [ ] AC8: Documentation is updated when behavior/workflow changes |
| 131 | +- [ ] AC9: `.github/skills/dev/maintenance/catalog-security-vulnerabilities/SKILL.md` exists with process description and semantic-links |
| 132 | + |
| 133 | +## Verification Plan |
| 134 | + |
| 135 | +### Automatic Checks |
| 136 | + |
| 137 | +- `linter all` |
| 138 | +- Spell check on new documents |
| 139 | + |
| 140 | +### Manual Verification Scenarios |
| 141 | + |
| 142 | +Status values: `TODO`, `IN_PROGRESS`, `DONE`, `FAILED`, `BLOCKED`. |
| 143 | + |
| 144 | +| ID | Scenario | Command/Steps | Expected Result | Status | Evidence | |
| 145 | +| --- | ------------------------------------------ | ------------------------------------------------------------- | --------------------------------- | ------ | -------- | |
| 146 | +| M1 | Verify README renders correctly | Open `docs/security/analysis/README.md` in VS Code preview | All sections readable, links work | TODO | | |
| 147 | +| M2 | Verify analysis document renders correctly | Open analysis doc in VS Code preview | Tables render, rationale clear | TODO | | |
| 148 | +| M3 | Verify no broken internal links | Check all `semantic-links` and references point to real files | All refs resolve | TODO | | |
| 149 | +| M4 | Run linters | `linter all` | Exit code 0 | TODO | | |
0 commit comments