Every analytics tool wants a subscription. And your data. I built Twiligent instead. YouTube stats. Instagram stats. One dashboard. Runs locally on your machine.
release: v2.0.1 - security fixes from the first audit
spacesdrive34d96ce66e9e
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 8d4fcdf..05ba0e4 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -7,6 +7,19 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).## [Unreleased]+## [2.0.1] - 2026-11-05++Security fixes from the first full audit (`docs/platform-v2/SECURITY_AUDIT.md`). What an instance owner must do: deploy as usual. Connecting Instagram now returns to the Accounts page, which finishes the connection, so keep the app and the Worker on the same version.++### Security++- Connecting Instagram now finishes only for the person who started the sign-in: a consent link made by one Twiligent user and opened by someone else no longer connects that person's account (#148)+- The manual "publish due posts" trigger runs only your own posts, and no longer shows other users' failed posts (#148)+- HEAD requests count against the same rate limit as GET (#148)+- The GitHub Actions publisher removes addresses and tokens from Instagram's error messages before they reach the run log (#148)+- The app and the public site can no longer be framed by other sites, and send nosniff, referrer and permissions policies (#148)+- Every workflow's GitHub token can only read the repository (#148)+## [2.0.0] - 2026-11-05Twiligent now supports YouTube and Instagram only. What an instance owner must do: nothing for the code; deploy as usual. Reddit accounts and tracked Reddit posts stay in the database, unused and hidden, until the database cleanup in #145, so export them first if you want to keep them. The Reddit pages are gone.@@ -26,13 +39,6 @@ Twiligent now supports YouTube and Instagram only. What an instance owner must d### Security-- Connecting Instagram now finishes only for the person who started the sign-in: a consent link made by one Twiligent user and opened by someone else no longer connects that person's account (#148)-- The manual "publish due posts" trigger runs only your own posts, and no longer shows other users' failed posts (#148)-- HEAD requests count against the same rate limit as GET (#148)-- The GitHub Actions publisher removes addresses and tokens from Instagram's error messages before they reach the run log (#148)-- The app and the public site can no longer be framed by other sites, and send nosniff, referrer and permissions policies (#148)-- Every workflow's GitHub token can only read the repository (#148)-- Every GitHub Actions step is pinned to a full commit instead of a movable tag, so a compromised action release cannot reach the deploy secrets (#148)### Documentationdiff --git a/DECISIONS.md b/DECISIONS.mdindex f64c3a6..e8939b9 100644--- a/DECISIONS.md+++ b/DECISIONS.md@@ -1079,3 +1079,22 @@ New row ids come from `crypto.randomUUID()` (`newRowId()` in `backend/lib/ids.ts- Removing public routes is a breaking change, so this ships as 2.0.0. Old links to the Reddit pages show Not found in the app; the public site redirects its old Reddit paths to the Overview.- Until #145 runs, Reddit rows and their secrets remain in the database, unread. Reddit cache keys in Redis expire on their own within 6 hours.- Instances that used Reddit lose its history in the app; the rows can be exported before the cleanup.++---++## ADR-050: Security review is part of every change, and OAuth sign-ins finish as the signed-in person++**Date:** 2026-11-05+**Status:** Accepted++**Decision:** Every change states its security effect, and substantial changes get a security pass while they are built (`CLAUDE.md`, `docs/workflows/SECURITY_REVIEW.md`). The tools are Cloudflare's `security-audit` skill and Trail of Bits' skills, declared as Claude Code plugins in `.claude/settings.json` and referenced from their own repositories, plus Semgrep and `npm audit`. Separately, the first full audit (#148) found that the Instagram OAuth callback connected whichever user the signed state named; OAuth connections now finish through an authenticated `complete` route that checks the state was started by the caller, and the public callback only forwards the code to the app in the URL fragment.++**Context:** The owner asked for security auditing inside the development workflow rather than before releases, with the two skill repositories integrated. The audit then confirmed the account-linking problem (medium) and a cross-user publish trigger (low), both fixed in 2.0.1.++**Alternatives considered:**+- Copying the skills into the repository. The Trail of Bits skills are CC-BY-SA-4.0, so changed copies would have to stay under that licence, and both would drift from their sources.+- Binding the OAuth state to a cookie. Self-hosted apps and Workers often run on different sites, where browsers drop such cookies; an authenticated completion step works on any deployment.++**Trade-offs:**+- Contributors install the plugins once and accept the workspace trust prompt; the Trail of Bits marketplace follows `main`, the Cloudflare skill is pinned to a commit.+- Connecting Instagram needs the app and the Worker on the same version, since the app now finishes the sign-in. The YouTube connection (#147) uses the same pattern.diff --git a/package-lock.json b/package-lock.jsonindex 764f5e5..90c9882 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "twiligent",- "version": "2.0.0",+ "version": "2.0.1","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "twiligent",- "version": "2.0.0",+ "version": "2.0.1","workspaces": ["backend","frontend",diff --git a/package.json b/package.jsonindex 99eadfa..e8909d7 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "twiligent",- "version": "2.0.0",+ "version": "2.0.1","private": true,"description": "Self-hosted social media analytics and publishing dashboard","workspaces": [