Skip to content

feat: fixes and renewals: assign once, the scans decide when it is fixed - #60

Merged
khalid-offset merged 17 commits into
mainfrom
feat/lifecycle-foundation
Nov 18, 2026
Merged

khalid-offset merged 17 commits into
mainfrom
feat/lifecycle-foundation

Conversation

@khalid-offset

Copy link
Copy Markdown
Contributor

What this adds

Fixes and Renewals: you give a problem an owner and a date, and every scan after that checks it. A fix is marked fixed only when a scan shows the problem gone, and it comes back if a later scan finds the problem again. Nobody can mark a fix as done by hand.

  • Fixes (#/fixes): a progress line out of scanned endpoints, then Came back, Being fixed, To fix next, On hold, Fixed and still holding. One form, Assign: who, by when, an optional link to your own ticket. Also on an endpoint's page, beside a finding and on a certificate.
  • One fix (#/fixes/ID): where it stands, how to fix it, what has happened. Scan now, Change owner or date, Put on hold, Drop it.
  • Renewals (#/renewals): served certificates by the date they run out; a renewal is done when every endpoint serves a certificate issued after the old one. Certificates that changed with nobody assigned are listed until someone says it was expected.
  • Being told: a lifecycle monitor (serve --monitor-every) and a webhook (Settings, Notifications), JSON signed with HMAC-SHA256 or a chat message. The secret is the name of an environment variable.
  • Underneath: internal/workflow (workflows as data, API only: /api/v1/work, /api/v1/workflows), internal/policy (catalog of standards documents and dated milestones), internal/connector (registry: scanner and webhook available, the rest listed as planned).
  • Fix: NIST IR 8547 disallows quantum-vulnerable keys after 2035; the certificate rule started that on 1 January 2035.

Schema 19 → 20 (additive): workflows, work_items, work_deps, certificate_lifecycle, notifications.

Docs: docs/fixes.md, docs/lifecycle-walkthrough.md, ADR-0021, ADR-0022, ADR-0023.

Tested locally

  • go test ./...: all packages pass.
  • golangci-lint run ./... on Windows and with GOOS=linux: 0 issues.
  • Browser journey (testing/e2e/journey.mjs, new phase fixes-phase.mjs, E2E-FX.*): 275 of 275.

Known gaps

  • No dedicated test yet for three rules: a finding missing from an incomplete scan, a deleted endpoint in a certificate renewal, and an uploaded machine inventory never confirming a fix.
  • Monitor passes can overlap; an event first seen before a webhook was set is not sent later.
  • No connector issues or deploys certificates or opens tickets; the ticket is a pasted link.

…y catalog

Milestone 1 of the lifecycle and PQC migration program (PRD-023, internal).

- internal/workflow: data-defined workflow templates (stages, transitions,
  fixed markers), strict validation, and a transition engine that enforces
  what no template can switch off: verified only on the product's own
  verification, approval only by a different signed-in person, exceptions
  with a reason and an end date, nothing marked done while a prerequisite
  is unfinished. Eight built-in templates.
- Verification from evidence after the change: a finding absent from a
  complete scan or host upload, a certificate no longer served as the leaf
  anywhere it was and replaced by one valid for longer, a readiness level
  reached.
- Migration 20: workflows, work_items, work_deps; history in audit_log.
- API: /api/v1/work, /transitions, /verification, /dependencies,
  /api/v1/workflows (custom templates, administrators only),
  /api/v1/policy/catalog. OpenAPI updated.
- internal/policy: embedded, validated catalog of standards documents and
  dated milestones (ADR-0022). The evaluation reads the IR 8547 dates from
  it, which fixes "disallowed after 2035" starting on 1 January 2035.
- ADR-0021, ADR-0022, docs/work.md, RTM rows, CHANGELOG with upgrade note.
…ificate ownership, integrations, exports

- Certificate owner and renewal method (certificate_lifecycle), audited.
- Lifecycle monitor (serve --monitor-every, POST /lifecycle/check): work overdue,
  due soon, awaiting approval, exceptions ended, verified work that no longer
  holds, certificates expiring or expired, certificates changed with no work.
  Each event sent once to a webhook (JSON with HMAC-SHA256, or chat text),
  secret by environment variable reference, through the address guard, five
  attempts then failed.
- Suggested work from the scans, each with its reason and catalog basis.
- Work summary with a definition and denominator for every figure; readiness
  counts unscanned endpoints as unknown.
- Integration registry: available vs planned, capabilities, auth, limits, health.
- CSV export and an audit evidence pack.
…ications and integrations settings

- #/work: status band with denominators, where the work stands, post-quantum key
  exchange out of scanned endpoints, Work / Needs attention / Suggested tabs,
  CSV and evidence-pack downloads.
- #/work/ID: stage track, next steps (approval and verification explained),
  verification with Check now and Scan now, details, prerequisites, history in
  the workflow's own words.
- Track: Plan hybrid key exchange on endpoints below L3, Track beside findings,
  Plan renewal and ownership on certificates.
- Settings: Notifications (windows, webhook, format, secret by env var, events,
  test, check now, recent deliveries) and Integrations (available vs planned).
- Help topic; docs/work.md rewritten; docs/lifecycle-walkthrough.md (the story
  and how each claim is tested); ADR-0023 connectors; RTM rows; README.
- e2e: testing/e2e/work-phase.mjs (E2E-WK.1-16) wired into the journey.
- A machine's uploaded inventory no longer verifies a finding.
- A certificate replacement is one issued after the old certificate and valid
  now, whatever its lifetime; an incomplete scan waits; a deleted endpoint makes
  the result not verifiable.
- A workflow carries its readiness target (L3 hybrid, L4 post-quantum
  certificate); work cannot aim lower or at a level already reached.
- A rollback clears earlier approvals; exceptions end within a year; waiting on a
  vendor or the ecosystem needs an administrator; emergency work can be cancelled.
- direct-change: a built-in workflow without approval, usable with sign-in off.
- The fix workflow: assigned, then only scans move it to fixed, back to came-back,
  and off hold when the date passes. No verify step for people.
- GET/POST /api/v1/fixes, GET /api/v1/fixes/{id}, GET /api/v1/renewals,
  POST /api/v1/renewals/expected; a ticket link on work; daily scans ensured.
- Webhook errors name the host only; a named but unset signing secret refuses to send.
- Only unfinished work hides a suggestion; undetermined endpoints counted apart.
Assign once (who, by when, optional ticket link); scans do the rest. Plain lists:
Came back, Being fixed, To fix next, On hold, Fixed and still holding. One fix's
page: where it stands, how to fix it, what has happened. Renewals: certificates by
date, and changes nobody was assigned. Assign buttons on endpoints, findings and
certificates. The workflow pages and their vocabulary are removed from the UI.
Comment thread testing/e2e/fixes-phase.mjs Fixed
Comment thread testing/e2e/fixes-phase.mjs Fixed
@khalid-offset
khalid-offset merged commit bc6753f into main Nov 18, 2026
15 checks passed
@khalid-offset
khalid-offset deleted the feat/lifecycle-foundation branch November 18, 2026 10:10
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.

2 participants