Skip to content

ThinkWatch Core 0.85.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 21:27
· 24 commits to main since this release

This release expands outbound redaction from 30 built-in rules to 120: the keys saved in ThinkWatch are recognised by value, about 60 more kinds of API keys and tokens are covered, credentials are found by where they appear (headers, URLs, commands, config files), and personal information gains passports, foreign IDs, IBANs, addresses and more. A two-phase scan keeps the cost of the extra rules small.

Upgrade notes

  • The control-plane protocol version goes from 55 to 56.
  • The request store's schema goes from 27 to 28 (the security log records where a saved key came from). Request records and the security log are cleared on first start; the usage history in usage.db is kept.
  • The configuration is unchanged and every existing rule id is kept, so enable, disable and actions entries stay valid. 91 of the 120 rules are on by default. In the default observe mode they only record; under replace they replace.
  • Redaction kinds are regrouped: api-keys and personal are gone, replaced by 19 groups plus custom (saved, ai-services, dev-platforms, cloud, business, private-keys, jwt, conn-strings, in-context, crypto, id-documents, foreign-ids, financial, contact, location, vehicle, device, labeled-personal, internal). SecretKind follows.
  • No new message codes.

Saved keys are recognised by value. The new rule thinkwatch-saved-secret matches, exactly and regardless of format, the credentials kept in the configuration: upstream keys, OAuth tokens, AWS keys, credential header values, access keys, proxy passwords, the control key, and sync, WebDAV and S3 credentials (${VAR} references by the value they resolve to; values under 12 characters are left out). Keys without a recognisable shape, such as Azure OpenAI, Mistral or Volcengine Ark keys, are now covered. The list is rebuilt with the configuration.

  • SecretItem, SecurityEventView and TrialHit carry source (SavedSource { kind, name }, kind one of upstream-key, upstream-header, access-key, proxy-password, control-key, sync-credential); the masked value of such a hit is empty.
  • The "credential sent to an unknown host" tool rule treats saved keys as credentials: an upstream key may go to its upstream's host, an access key or the control key only to this machine and the gateway's own listen addresses.
  • trial::run_with takes the saved list, so the trial box recognises saved keys too.

More credential rules. All on by default and replaced only where the value is recognised:

  • AI services: OpenAI service and admin keys, OpenRouter, xAI, Groq, Hugging Face, Replicate, Perplexity, Amazon Bedrock API keys, Fireworks, Cerebras, LangSmith, Langfuse, Pinecone, Tavily, MiniMax, Zhipu, Baidu Qianfan, and sk- keys in the OpenAI-compatible format (DeepSeek, Alibaba Model Studio, SiliconFlow).
  • Code and publishing: GitHub refresh tokens, the remaining GitLab tokens, PyPI, RubyGems, Clojars, Docker Hub, Artifactory, Databricks, Sentry, Grafana, Postman.
  • Cloud and infrastructure: the remaining AWS key IDs, Alibaba Cloud, Tencent Cloud and Volcengine AccessKey IDs, Azure AD client secrets, DigitalOcean, Cloudflare Origin CA, Vault, Terraform Cloud, Doppler, Pulumi, Heroku, Fly.io, Supabase, age secret keys, 1Password service accounts.
  • Payments, messaging and collaboration: Stripe webhook secrets, Shopify, Twilio, Brevo, the remaining Slack tokens, Linear, Notion, Atlassian.
  • By position, replacing only the value: credentials in Authorization, Proxy-Authorization and API-key headers, curl -u and similar command-line passwords, token parameters in URLs, bot webhooks (Feishu/Lark, DingTalk, WeCom, Slack, Discord, Teams), Telegram bot tokens, and config assignments such as AWS_SECRET_ACCESS_KEY=... or "db_password": "...". Placeholders like ${VAR}, <your-key> or changeme are left alone.
  • Wallets: BIP39 seed phrases (English and Simplified Chinese, checksum verified), WIF private keys and extended private keys.
  • Attribution: sk-or-v1-, sk-lf-, sk-svcacct-, sk-admin- and sk-api- keys are no longer reported as OpenAI keys, and each new rule lists the hosts its keys may legitimately go to.

More personal information. On by default only where the structure can be verified: passport machine-readable zones, IBANs, and the resident ID number now also accepting Taiwan residence permits (83) and the 2023 foreign permanent resident ID card (9...). Off by default, for teams that need them: 15-digit resident IDs, passport numbers, Hong Kong, Macau and Taiwan IDs, mainland travel permits, US SSN, UK NINO, Singapore NRIC/FIN, Korean RRN, Japanese My Number, Aadhaar, CPF, mobile numbers with +86 or grouping, landlines, international numbers, mainland street addresses, precise coordinates, licence plates, VINs, IMEI, MAC addresses, public IP addresses, and five field-name rules (name, address, birth date, account number, health). Internal addresses add 100.64.0.0/10 and fc00::/7; internal domains add .corp, .home.arpa and .intranet, and a bare suffix no longer matches on its own.

One catalog, two languages. The redaction catalog moves to crates/tw-guard/data/redact.yaml, compiled in at build time. Rule views carry name_zh for every built-in rule, why_zh where why is set, and about / about_zh for redaction rules; GuardDetail.kinds lists the groups with their names in display order. The dangerous-command and content-filter catalogs gain the same Chinese fields.

Two-phase scan. Each rule declares anchors (prefixes, keywords, field names, structural triggers); one pass finds the candidates and only those reach the validators. Custom contains rules join the same pass and custom regular expressions run as one set per string. Results are identical to the previous scanner, which is kept as a test oracle. On a 4 MB body with the default rules the scan takes about 4% longer than 0.84.0 on source code and 11% longer on English prose, and is faster on Chinese chat; custom rules are about a third faster.

Downloads

Platform Binary Archive for server installation
Linux, x86_64 twcore-x86_64-unknown-linux-gnu twcore-x86_64-unknown-linux-gnu.tar.gz
Linux, aarch64 twcore-aarch64-unknown-linux-gnu twcore-aarch64-unknown-linux-gnu.tar.gz
macOS, Apple silicon twcore-aarch64-apple-darwin —
Windows, x64 twcore-x86_64-pc-windows-msvc.exe —
Windows, ARM64 twcore-aarch64-pc-windows-msvc.exe —

Each file is published with a .sha256 file beside it. A Linux archive contains twcore, the systemd unit twcore.service and LICENSE. ThinkWatch Lite includes its own copy of twcore; the files here are for running core separately, such as on a server.

Server installation

On Linux (x86_64 or aarch64), the install script sets up twcore as a systemd service. This installs 0.85.0:

curl -fsSL https://raw.githubusercontent.com/ThinkWatchProject/ThinkWatch-Core/main/scripts/install.sh | sudo sh -s -- --version 0.85.0

An installation made with the script switches to 0.85.0 with:

sudo twcore upgrade --version 0.85.0 --restart

Configuration, the remote control port and connecting ThinkWatch Lite are described in docs/server.md.

Verifying a download

A .sha256 file holds the SHA-256 of the file followed by its name. With both files in the current directory, on Linux:

sha256sum -c twcore-x86_64-unknown-linux-gnu.tar.gz.sha256

On macOS:

shasum -a 256 -c twcore-aarch64-apple-darwin.sha256

On Windows, in PowerShell, the following prints True when the binary matches:

(Get-FileHash .\twcore-x86_64-pc-windows-msvc.exe).Hash -eq (Get-Content .\twcore-x86_64-pc-windows-msvc.exe.sha256).Split()[0]

The install script and twcore upgrade check the SHA-256 themselves.

What's Changed

  • 0.85.0: expanded redaction rules, saved keys, two-phase scan by @fylorn in #382

Full Changelog: v0.84.0...v0.85.0