Skip to content

chore(privacy): keep less personal data - #241

Merged
harlan-zw merged 8 commits into
mainfrom
chore/privacy-data-retention
Sep 21, 2026
Merged

harlan-zw merged 8 commits into
mainfrom
chore/privacy-data-retention

Conversation

@harlan-zw

@harlan-zw harlan-zw commented Sep 16, 2026 •

Copy link
Copy Markdown
Collaborator

❓ Type of change

  • 🐞 Bug fix
  • 🧹 Chore

📚 Description

Privacy audit follow-ups. Each one kept or leaked personal data for no product reason.

  • Sign-out left GitHub tokens behind. Logout only cleared the cookie, so the encrypted GitHub access and refresh tokens stayed in users. Sign-out now deletes them. Star import and repository scan in another open session return a 401 that says to sign in with GitHub again. The next GitHub sign-in stores new tokens, so nothing is lost.
  • Nothing was ever purged. A daily purge-personal-data task (shares the 04:30 trigger, so no new Cloudflare cron) deletes:
    • CLI tokens revoked or expired more than 7 days ago.
    • CLI auth codes and device sessions older than 1 day. Both expire after 10 minutes.
    • weekly_runs and email_preference_events older than 90 days. Opt-in state lives on users, so no reader needs old events. The admin weekly view reads only the last 8 weeks.
    • digest_runs older than 90 days, except each account's newest sent or skipped run, because that row holds the next digest cursor. Unresolved runs (failed, uncertain, claimed, sending) also stay, since deleting them could cause a duplicate send.
  • SKILL.md images could be tracking pixels. Images now load only over https from GitHub content hosts (raw.githubusercontent.com, user-images, private-user-images, avatars, github.com/<owner>/<repo>/raw/..., github.com/user-attachments/assets/...), with referrerpolicy="no-referrer" and loading="lazy". Any other image becomes a link, or plain alt text when it already sits in a link.

machine_hint stays: the authorize page shows it so a person can confirm which machine signs in.

Open questions:

  • shields.io style badges now show as text. That seemed the right call for a privacy default, but proxying them is an option if it looks bad.
  • I added user-attachments/assets beyond the audit list, since new GitHub uploads live there.
  • The 7 day grace window for ended CLI tokens is a guess. After it, a revoked token no longer shows on /me/devices.

📝 Migration

  • No D1 migration.
  • purge-personal-data sets activeFromSeconds to 17 Sep 2026 00:00 UTC. If this deploys after about 18 Sep 12:00 UTC, the daily health check can report one missing run until the first 04:30 run.
  • The first purge run deletes the whole backlog in one batch.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

A closed session left a usable GitHub access and refresh token in D1. Star import and repository scan now ask for a new GitHub sign-in when the token is gone.
Ended CLI tokens, sign-in codes, device sessions, and email history were kept forever.
The skilld CLI never sends it, so the column could only hold device details.
An image from any host let a Skill author log visitor IP addresses with a tracking pixel.
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. labels Sep 16, 2026
@harlan-github-agent

harlan-github-agent Bot commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

🤖 MERGED

Harlan Agent Kit posted this automated review. It is not Harlan's personal review or approval. AI open source policy. Last updated: 2026-09-21 06:54 UTC.

GitHub merged this pull request.

No material findings were recorded.

32387c99-eb1f-44bc-bb93-b76713b75975

The authorize page shows it so a person can confirm which machine signs in. This reverts commit 6948d83.
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. harlan-agent-blocked The automated Review found a material defect in this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-review-required Pull request triage requires an adversarial Review for this head commit. harlan-agent-blocked The automated Review found a material defect in this head commit. labels Sep 16, 2026
@harlan-github-agent harlan-github-agent Bot added the harlan-agent-running An Agent holds a Task on this issue or pull request right now. label Sep 16, 2026
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-running An Agent holds a Task on this issue or pull request right now. label Sep 16, 2026
@harlan-zw
harlan-zw added this pull request to stack #247 September 16, 2026 15:17
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Sep 16, 2026
harlan-zw added a commit that referenced this pull request Sep 16, 2026
The page described the site after #240 and #241 only. #242, #243, #244,
and #246 change CLI token labels, email click counts, like visibility,
repository indexing, and image loading, and D1 recovery keeps deleted rows
for up to 30 days.
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. labels Sep 16, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-blocked The automated Review found a material defect in this head commit. harlan-agent-running An Agent holds a Task on this issue or pull request right now. and removed harlan-agent-blocked The automated Review found a material defect in this head commit. labels Sep 16, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-blocked The automated Review found a material defect in this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-blocked The automated Review found a material defect in this head commit. labels Sep 16, 2026
@harlan-github-agent harlan-github-agent Bot added harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-ready The automated Review passed every gate on this head commit. harlan-agent-pending The automated Review is waiting on a gate for this head commit. and removed harlan-agent-running An Agent holds a Task on this issue or pull request right now. harlan-agent-ready The automated Review passed every gate on this head commit. harlan-agent-pending The automated Review is waiting on a gate for this head commit. labels Sep 16, 2026
@harlan-zw
harlan-zw merged commit 451304f into main Sep 21, 2026
5 checks passed
@harlan-github-agent harlan-github-agent Bot removed the harlan-agent-ready The automated Review passed every gate on this head commit. label Sep 21, 2026
harlan-zw added a commit that referenced this pull request Sep 22, 2026
skilld.dev had no page that says what it stores, why, and for how long.
The page describes the site after #240 and #241 and explains how to
delete an account.
harlan-zw added a commit that referenced this pull request Sep 22, 2026
The page described the site after #240 and #241 only. #242, #243, #244,
and #246 change CLI token labels, email click counts, like visibility,
repository indexing, and image loading, and D1 recovery keeps deleted rows
for up to 30 days.
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.

1 participant