feat(privacy): privacy-policy consistency checker#548
Open
suculent wants to merge 1 commit into
Open
Conversation
Mechanically verify the concrete claims in the THiNX privacy policy (services/console/src/public/privacy.html, static/gdpr.html) against the code that implements them (GDPR purge/transfer/consent endpoints, owner purge orchestrator, OAuth providers, IP logging, cookies). - scripts/privacy-policy-check.js: dependency-free, manifest-driven checker emitting a per-claim PASS/WARN/FAIL report and a non-zero exit on FAIL. - spec/jasmine/PrivacyPolicyConsistencySpec.js: enforces zero FAILs in CI without live services (WARNs are documented and allowed). - docs/PRIVACY_POLICY_CONSISTENCY.md: traceability matrix + findings. - package.json: `npm run privacy-check`. Surfaces real drift as WARN: policy advertises Twitter OAuth that is not implemented (GitHub + Google are), IP-logging promise only partially backed, and static/gdpr.html has diverged from privacy.html. Nightshift-Task: privacy-policy Nightshift-Ref: https://github.com/marcus/nightshift Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Privacy Policy Consistency Checker that mechanically verifies the concrete claims in THiNX's privacy policy (
services/console/src/public/privacy.html,static/gdpr.html) against the code that implements them — GDPR purge/transfer/consent endpoints, the owner-purge orchestrator, OAuth providers, IP logging, and cookies.Self-contained and dependency-free (only
fs/path); needs no Redis, CouchDB, MQTT, or network.What's included
scripts/privacy-policy-check.js— manifest-driven checker. Each claim is a data entry pairing a policy sentence with the implementation signal that must exist (file / Express route / keyword / verified-by-absence) plus a severity. Emits a per-claimPASS/WARN/FAILreport to stdout and exits non-zero on anyFAIL, so it doubles as a CI gate.npm run privacy-check.spec/jasmine/PrivacyPolicyConsistencySpec.js— enforces zero FAIL-severity discrepancies in the existing jasmine suite; documented WARNs are allowed. Runs without live services.docs/PRIVACY_POLICY_CONSISTENCY.md— traceability matrix (claim → implementing file/endpoint → status), findings, and run instructions.Findings surfaced today — 7 PASS, 3 WARN, 0 FAIL
Google, Twitter, but the code implements GitHub (lib/router.github.js,lib/thinx/oauth-github.js) and Google (lib/router.google.js, mounted inthinx-core.js). Twitter is advertised but not implemented. (The original "GitHub only" premise was inaccurate — Google OAuth is a real, mounted flow; the honest gap is Twitter.)static/gdpr.html(a 2018 stub) has diverged fromprivacy.htmlon contact email, the 24-hour retention window, and named providers.The hard GDPR contracts (24h deletion sweep, API-key deletion with devices, retained-queue invalidation, JSON transfer, consent endpoint) all PASS and are now regression-guarded.
Test plan
node scripts/privacy-policy-check.js→ 7 PASS / 3 WARN / 0 FAIL, exit 0npx jasmineprivacy spec → 4 specs, 0 failureseslintclean on both new JS files🤖 Generated with Claude Code
Nightshift-Task: privacy-policy
Nightshift-Ref: https://github.com/marcus/nightshift
Automated by nightshift