github txlog/server v1.40.0

11 minutes ago

Txlog Server 1.40.0 closes a stored XSS hole in the dashboard and tightens how OIDC sign-ins take over existing accounts. It also fixes many inaccuracies in asset, package, vulnerability and report data. Internally the server was reorganized so that each concern has a single definition.

Breaking Changes

  • /v1/machines no longer accepts the Undefined OS and with undefined version placeholder values. Pass an empty os or agent_version parameter to list assets that never reported one.
  • An OIDC sign-in now takes over an existing account with the same email (for example, one created through LDAP) only when the provider marks the email as verified (email_verified). Otherwise the sign-in fails with email_not_verified. Providers that never send this claim can no longer link to existing LDAP accounts by email.
  • Two migrations drop database objects that nothing read:
    • the dashboard materialized views;
    • the unused topology_patterns columns;
    • the per-severity scoreboard columns of transactions, plus is_security_patch, max_severity_fixed and vulnerable_packages_updated;
    • the details, modified_at and published_at columns of vulnerabilities.
  • The lowercase action names installed, upgrade and removed are no longer counted. Neither dnf nor the agent sends them.
  • Remove the unused POST /admin/topology/environments/update route.
  • Remove fields from the Swagger spec that were never filled: the vulnerability fields of models.Transaction and the arch/repo fields of models.Package.
  • When neither OIDC nor LDAP is configured, the session, admin and API key middlewares are no longer installed. OIDC sign-in no longer requests offline access.

Features

  • Return begin_time (when the asset was first seen) from /v1/machines, /v1/machines/ids and /v1/assets/requiring-restart, documented as models.AssetInfo.
  • Return needs_restarting and restarting_reason for each execution in GET /v1/executions.

Fixes

  • Escape hostnames, package names, advisories and error messages loaded from the API, so a value reported by an agent can no longer inject HTML or scripts into dashboard pages.
  • Keep the operating system, agent version and restart state of an asset when a transaction arrives after an execution.
  • Stop old transactions from moving an asset's last seen time back, which made active machines look inactive and eligible for cleanup.
  • Re-run a migration that failed instead of marking it applied, and stop migrations from closing the server's database pool.
  • List the correct assets in GET /v1/packages/{name}/{version}/{release}/assets:
    • include machines that downgraded to a build or keep it beside a newer one (as with the kernel);
    • include machines whose last item for the package was a reason change.
  • Open package pages for transactions that have no end time.
  • Asset page:
    • answer 404 for unknown machine IDs;
    • open assets whose executions were removed by retention;
    • fix the delete button;
    • show the number of vulnerabilities each transaction introduced.
  • Topology:
    • match every |-separated value of an environment or service mapping in /assets filters;
    • list unmatched assets as out of topology;
    • reject an invalid template display order with 400.
  • Report the rapid-change anomalies that were silently dropped, and fill from_version for downgrade anomalies.
  • List the builds that were installed or upgraded in the monthly report (it listed the builds that upgrades replaced), and take each build's OS from its asset.
  • Count each machine's statistics only once when machines share a transaction ID.
  • Count upgrades by the same action in the weekly progression chart, the statistics and the most updated packages.
  • Count active machines by machine ID in the most updated packages, so renamed machines still count.
  • Vulnerabilities:
    • rate an advisory that has no score by whole words in its text ("overflow" no longer means LOW);
    • fail the update when the OSV API returns an error;
    • keep stored advisories when OSV returns them without details;
    • use the OS of the asset that recorded a transaction when listing its advisories.
  • Store transactions with more than 6,500 items in batches instead of exceeding the PostgreSQL parameter limit.
  • Keep the search and filters in the page links of /assets and /packages.
  • Make the dashboard OS and agent version lists open versions that contain + or &.
  • Answer 404 for non-numeric execution IDs, and 500 instead of signing out when reading the session fails.
  • Fail database list reads that are interrupted instead of returning partial results.
  • Give up the latest-version check after 10 seconds and ignore error answers from it.

Improvements

  • Reorganize the server so each concern has one home:
    • OSV integration in vulnerabilities;
    • migrations and job locks in database;
    • users, sessions and API keys in auth;
    • shared SQL definitions in models.
  • Remove dead code, unused fallbacks and tests that only repeated the implementation.
  • Make the PostgreSQL test runner wait until the database accepts TCP connections.

Documentation

  • Document how OIDC and LDAP accounts are linked by verified email.
  • Update the API reference for /v1/machines filters, the OSV severity rules, the vulnerability reset and the test database setup.
  • Remove the OIDC_SKIP_TLS_VERIFY and LDAP_SKIP_TLS_VERIFY settings from the README; the server never read them.

Full Changelog: v1.39.3...v1.40.0

Don't miss a new server release

NewReleases is sending notifications on new releases.