Privacy assesment by AI.
Build LinkLog Development Image / development-image (push) Successful in 28s
Build LinkLog Development Image / development-image (push) Successful in 28s
This commit is contained in:
+45
-109
@@ -1,148 +1,84 @@
|
|||||||
# LinkLog Firefox Extension Privacy Validation
|
# LinkLog Privacy and Fingerprinting
|
||||||
|
|
||||||
Date: 2026-09-15
|
|
||||||
|
|
||||||
## Scope
|
## Scope
|
||||||
|
|
||||||
This report validates the privacy-relevant properties of the Firefox extension in `webextension/` only. It does not treat the LinkLog backend as part of the extension, except where the extension explicitly sends data to the user-configured backend.
|
This document describes the privacy and fingerprinting characteristics of the LinkLog web service and Firefox extension as implemented in this repository. It is a source-code assessment, not a legal privacy policy, penetration test, or guarantee about a particular deployment.
|
||||||
|
|
||||||
## Validation Method
|
|
||||||
|
|
||||||
- Reviewed the extension manifest, popup and options scripts, localized privacy text, and packaged-page HTML.
|
|
||||||
- Searched the extension source for storage, permission, tab-capture, cookie, history, clipboard, and network APIs.
|
|
||||||
- Ran `python3 scripts/release/validate_release.py` to confirm the checked-in signed XPI and Firefox disclosure metadata are consistent.
|
|
||||||
|
|
||||||
## Summary
|
## Summary
|
||||||
|
|
||||||
The extension's implemented privacy behavior is mostly consistent with its declared purpose:
|
LinkLog does not contain explicit canvas, WebGL, audio, font, hardware, timezone, analytics, or third-party advertising fingerprinting code. Its main privacy risk is different: LinkLog is designed to publish link activity, and that activity can form a highly distinctive identity profile.
|
||||||
|
|
||||||
- It does not include telemetry, analytics, adtech, crash reporting, or third-party beaconing.
|
A deployment operator, public visitor, upstream website, Mastodon instance, or network observer may be able to correlate a user through the data and request patterns described below.
|
||||||
- It captures website activity only from the active tab when the user opens the popup.
|
|
||||||
- It stores long-lived account metadata locally, but keeps bearer session credentials in Firefox session storage rather than persistent extension storage.
|
|
||||||
- It sends captured link data only to the user-selected backend, plus standard extension-update traffic to the configured self-update URL.
|
|
||||||
- Firefox privacy disclosure metadata is present and validated for the signed XPI.
|
|
||||||
|
|
||||||
The main residual privacy risk is that the extension accepts both `http` and `https` backend URLs. That is useful for local development, but a non-local HTTP backend would expose credentials and saved-link data in transit.
|
## Fingerprinting and Correlation Risks
|
||||||
|
|
||||||
## Verified Properties
|
### Public activity and identity profile
|
||||||
|
|
||||||
### 1. Declared Firefox permissions are narrow
|
The public feed exposes usernames, profile avatars, bios, exact creation timestamps, titles, original URLs, comments, tags, and whether an entry was posted to Mastodon. Public user enumeration and per-user feed URLs make it easy to collect this information for a particular account.
|
||||||
|
|
||||||
- Required permissions are limited to `activeTab` and `storage`.
|
A sequence of saved links, topics, tags, timestamps, writing style, and referenced websites can be distinctive enough to associate a LinkLog account with activity on other services. This is a high privacy risk for users who expect saved links to be private.
|
||||||
- Host access is not pre-granted broadly at install time. Instead, the extension declares optional HTTP and HTTPS host permissions and requests access only for the specific backend origin entered by the user.
|
|
||||||
- The signed-release validator enforces the Firefox `data_collection_permissions` declaration of required `websiteActivity` and no optional data-collection categories.
|
|
||||||
|
|
||||||
Assessment: consistent with a least-privilege model for a link-saving extension.
|
Relevant implementation: `backend/app/api/public.py` and `backend/app/services/link_service.py`.
|
||||||
|
|
||||||
### 2. Website activity access is limited to the active tab
|
### URL and query-parameter leakage
|
||||||
|
|
||||||
- The popup reads the current page title and URL via `browser.tabs.query({ active: true, currentWindow: true })`.
|
LinkLog removes a configurable list of common advertising and analytics parameters, including `utm_*`, `gclid`, `fbclid`, and several vendor-specific parameters. This reduces routine campaign tracking but does not make URLs anonymous.
|
||||||
- No content scripts are injected into visited pages.
|
|
||||||
- No background/service-worker logic observes browsing continuously.
|
|
||||||
|
|
||||||
Assessment: the extension collects the minimum page context needed for its stated function when the user explicitly opens the popup.
|
Other query parameters, path segments, fragments that are retained by the URL cleaner, document identifiers, search terms, access codes, repository names, and user-specific URLs may still identify a person or expose sensitive information. Operators should treat saved URLs, comments, titles, and tags as potentially personal data.
|
||||||
|
|
||||||
### 3. Local storage use is bounded and understandable
|
The tracking-parameter list is configured through `LINKLOG_TRACKING_PARAMS`; changing it can also change the URL-normalization behavior of a deployment.
|
||||||
|
|
||||||
Persistent local storage:
|
### Firefox extension website activity
|
||||||
|
|
||||||
- `backendUrl`
|
The extension uses `activeTab` and requests optional HTTP/HTTPS host permissions for the configured LinkLog backend. When a user saves a page, the extension reads the active page's URL and title and sends the selected data to that backend.
|
||||||
- `email`
|
|
||||||
- `username`
|
|
||||||
|
|
||||||
Session-scoped storage:
|
The extension therefore handles website activity by design. A malicious or compromised configured backend could receive the URLs that users submit, and a user can disclose sensitive page URLs by saving them. The extension stores the backend URL and username in local extension storage and keeps session credentials in Firefox session storage.
|
||||||
|
|
||||||
- `accessToken`
|
Relevant implementation: `webextension/manifest.json`, `webextension/popup.js`, and `webextension/options.js`.
|
||||||
- `refreshToken`
|
|
||||||
- `tokenExpiresAt`
|
|
||||||
- `deviceId`
|
|
||||||
|
|
||||||
Observed behavior:
|
### Mastodon and external-service correlation
|
||||||
|
|
||||||
- Access and refresh credentials are stored in `browser.storage.session`.
|
When enabled, the Mastodon plugin publishes the link title, comment, tags, source URL, and a UTC timestamp to the configured Mastodon instance. Posts include a recognizable `User-Agent: LinkLog/1.0` in server-to-server requests. The resulting public Mastodon post can link the user's LinkLog identity, interests, and activity times to a Mastodon account.
|
||||||
- Sign-out and token invalidation clear those session values and also remove older legacy token keys from `browser.storage.local`.
|
|
||||||
- Account-identifying metadata remains in persistent storage to preserve configuration across browser restarts.
|
|
||||||
|
|
||||||
Assessment: token persistence is minimized appropriately, but the extension still retains backend/account metadata locally until changed or removed.
|
The plugin also makes LinkLog activity observable to the configured Mastodon server, including the instance connection and publication time.
|
||||||
|
|
||||||
### 4. Outbound network traffic is limited and attributable
|
Relevant implementation: `backend/app/services/plugin_manager.py`.
|
||||||
|
|
||||||
User-configured backend traffic:
|
### Server-side URL fetching
|
||||||
|
|
||||||
- `POST /api/auth/login`
|
The authenticated scrape endpoint fetches a user-provided URL from the LinkLog server to obtain a page title. The target website may see the LinkLog server's network address and request characteristics rather than the user's browser address. This creates server-side attribution and may reveal that a URL was submitted to LinkLog.
|
||||||
- `POST /api/auth/refresh`
|
|
||||||
- `POST /api/auth/logout`
|
|
||||||
- `GET /api/auth/me`
|
|
||||||
- `GET /api/tags`
|
|
||||||
- `GET /api/public/config`
|
|
||||||
- `GET /api/user/plugins/mastodon`
|
|
||||||
- `GET /api/links/check`
|
|
||||||
- `GET /api/scrape`
|
|
||||||
- `POST /api/links`
|
|
||||||
|
|
||||||
What the extension sends to the backend:
|
### Deployment fingerprinting
|
||||||
|
|
||||||
- Sign-in credentials: email, password, optional OTP.
|
A deployment may be distinguishable through its public version, FastAPI/OpenAPI metadata, static asset version parameters, enabled themes, feed page sizes, maximum post length, response headers, health endpoint, public hostname, and extension update metadata. These signals generally identify an installation or software version rather than a person, but they can assist cross-site correlation and targeted attack reconnaissance.
|
||||||
- Session tokens in `Authorization` headers after login.
|
|
||||||
- Link payloads: title, cleaned URL, comment, timestamp, and tags.
|
|
||||||
- Lookup values for duplicate detection and title scraping.
|
|
||||||
|
|
||||||
Other network destinations:
|
The public configuration endpoint intentionally returns feed page sizes and the maximum post-character limit. The application also exposes `/health`, and the README documents `/docs` and OpenAPI access. Production operators should decide which of these should remain public.
|
||||||
|
|
||||||
- Firefox self-update metadata and signed XPI download are configured via `webextension/updates.json` and the manifest `update_url` at `git.kolkman.org`.
|
### Authentication and account-state observation
|
||||||
- Repository links in the popup and options page go to `git.kolkman.org` only when the user clicks them.
|
|
||||||
|
|
||||||
Assessment: no hidden third-party data sinks were found in the extension code.
|
Login throttling, response status differences, verification state, reset-mail behavior, response timing, and refresh-token behavior can reveal limited information about account state to a party able to make repeated requests. Current login errors are mostly generic, but verified and unverified account paths still differ, and failed login handling may trigger password-reset mail for known verified accounts when SMTP is configured.
|
||||||
|
|
||||||
### 5. The extension avoids higher-risk browser APIs
|
Client IP handling and throttling are also deployment-sensitive. In a multi-instance deployment, the current SQLite-based limiter does not provide a shared, atomic privacy or abuse-control boundary.
|
||||||
|
|
||||||
No use was found of:
|
## Recommended Mitigations
|
||||||
|
|
||||||
- cookies APIs
|
Prioritize these changes for privacy-sensitive or public deployments:
|
||||||
- browsing history APIs
|
|
||||||
- bookmarks APIs
|
|
||||||
- clipboard APIs
|
|
||||||
- native messaging
|
|
||||||
- remote script loading
|
|
||||||
- `XMLHttpRequest` or `sendBeacon`
|
|
||||||
|
|
||||||
Assessment: this reduces both privacy scope and accidental data leakage paths.
|
1. Make feeds and links private by default, with explicit per-link or per-profile publication controls.
|
||||||
|
2. Make public user enumeration and profile indexing opt-in, and consider requiring authentication for user lists and private feeds.
|
||||||
|
3. Strip or allow-list URL query parameters and warn users before saving URLs that contain credentials, access codes, search terms, or other sensitive identifiers.
|
||||||
|
4. Offer privacy controls for avatars, bios, tags, comments, exact timestamps, and original URLs; consider timestamp coarsening for public entries.
|
||||||
|
5. Minimize extension permissions and clearly disclose that saving a page sends its URL and title to the configured backend. Keep backend origin permissions restricted to the configured origin.
|
||||||
|
6. Make Mastodon publication an explicit opt-in, show the complete data that will be published, and allow users to disable URL and timestamp inclusion.
|
||||||
|
7. Protect or disable `/docs`, `/openapi.json`, detailed health/configuration endpoints, version disclosures, and unnecessary response metadata in production.
|
||||||
|
8. Use uniform authentication responses and timing where practical, independently throttle password-reset mail, and use a shared atomic rate limiter such as Redis for multi-instance deployments.
|
||||||
|
9. Configure strict security headers, trusted hosts, HTTPS, log retention, and access controls. Do not log authorization headers, tokens, passwords, OTP values, or secret-bearing URLs.
|
||||||
|
10. Document retention, deletion, backup, and export behavior for links, profiles, audit records, avatars, tokens, and server logs.
|
||||||
|
|
||||||
### 6. Packaged extension pages use a restrictive CSP
|
## User Guidance
|
||||||
|
|
||||||
- Extension pages declare `script-src 'self'; object-src 'none'`.
|
Do not save private document links, password-reset URLs, invitation URLs, access tokens, or URLs containing sensitive query parameters to a public feed. Review titles, comments, tags, timestamps, and the Mastodon preview before publishing. Use a private deployment and disable Mastodon integration when the link history itself is sensitive.
|
||||||
- Popup and options pages load only bundled local scripts and assets.
|
|
||||||
|
|
||||||
Assessment: this materially lowers the risk of third-party script injection into extension pages.
|
## Assessment Limits
|
||||||
|
|
||||||
### 7. The privacy notice is broadly accurate, with one caveat
|
This document reflects the repository implementation reviewed on 2026-09-16. Reverse-proxy settings, browser privacy settings, database access, server logs, deployment networking, dependencies, and third-party Mastodon behavior can materially change the effective risk. A production deployment should supplement this review with configuration review, dependency and container scanning, authenticated dynamic tests, and a retention/access-control review.
|
||||||
|
|
||||||
The options page says the extension does not collect personal data beyond what is necessary to log links to the LinkLog server. That statement is broadly supported by the code, because the extension only stores and transmits data needed for authentication and link submission.
|
|
||||||
|
|
||||||
Caveat: the notice would be more precise if it explicitly mentioned that the extension stores the configured backend URL, email address, and username locally, and stores session credentials for the current browser session.
|
|
||||||
|
|
||||||
## Residual Privacy Risks
|
|
||||||
|
|
||||||
### R1. Non-TLS backends are allowed
|
|
||||||
|
|
||||||
The extension accepts `http` and `https` backend URLs. For local development this is reasonable, but for non-local use it means login credentials, tokens, titles, URLs, comments, timestamps, and tags can be transmitted without transport encryption.
|
|
||||||
|
|
||||||
Recommendation: enforce `https` for non-localhost backends, or at minimum warn before allowing a non-TLS backend.
|
|
||||||
|
|
||||||
### R2. Backend publication and retention are outside extension control
|
|
||||||
|
|
||||||
The extension's privacy behavior ends once data is sent to the configured LinkLog server. The backend may publish links publicly, combine them with user profile data, retain them, or forward them through enabled plugins such as Mastodon.
|
|
||||||
|
|
||||||
Recommendation: keep extension-facing privacy text explicit that saved link data becomes subject to the chosen backend's policies and configuration.
|
|
||||||
|
|
||||||
### R3. Persistent local account metadata is not cleared on sign-out
|
|
||||||
|
|
||||||
Sign-out clears session credentials, but leaves `backendUrl`, `email`, and `username` in persistent extension storage for convenience.
|
|
||||||
|
|
||||||
Recommendation: this is a reasonable default, but the UI could offer a separate "forget this account on this browser" action.
|
|
||||||
|
|
||||||
## Overall Conclusion
|
|
||||||
|
|
||||||
The Firefox extension has a relatively narrow privacy footprint and largely follows least-privilege principles. Its privacy disclosure about website activity is implemented and release-validated, session tokens are kept in session storage, and no unexpected telemetry or third-party exfiltration paths were found in the extension code.
|
|
||||||
|
|
||||||
The most important remaining privacy improvement is to prevent or strongly discourage non-HTTPS backends outside local development.
|
|
||||||
|
|||||||
+9
-9
@@ -151,12 +151,6 @@ Run full backend and frontend test suites.
|
|||||||
### Assistant outcome
|
### Assistant outcome
|
||||||
The normal backend suite passed with 46 tests. Frontend and extension validation passed for all JavaScript syntax checks, JSON files, XPI rebuild, and unsigned XPI validation. The warnings-as-errors backend variant failed on unclosed SQLite connection `ResourceWarning` instances under Python 3.13; no functional tests failed.
|
The normal backend suite passed with 46 tests. Frontend and extension validation passed for all JavaScript syntax checks, JSON files, XPI rebuild, and unsigned XPI validation. The warnings-as-errors backend variant failed on unclosed SQLite connection `ResourceWarning` instances under Python 3.13; no functional tests failed.
|
||||||
|
|
||||||
### User
|
|
||||||
Validate the Privacy properties of the firefox plugin specifically and report them in Privacy.md
|
|
||||||
|
|
||||||
### Assistant outcome
|
|
||||||
Added `Privacy.md` with a plugin-specific privacy validation covering manifest permissions, active-tab capture scope, local and session storage, outbound network destinations, Firefox `data_collection_permissions`, release validation, and residual privacy risks. Confirmed the signed XPI release metadata validates successfully and identified non-HTTPS backend support as the main remaining privacy caveat.
|
|
||||||
|
|
||||||
### User
|
### User
|
||||||
Address SA-007 and use linklog.example.com as default LINKLOG_PUBLIC_URL.
|
Address SA-007 and use linklog.example.com as default LINKLOG_PUBLIC_URL.
|
||||||
|
|
||||||
@@ -285,6 +279,12 @@ Add authenticated admin/user configuration
|
|||||||
### Assistant outcome
|
### Assistant outcome
|
||||||
Added shared bearer-token dependencies, protected user configuration endpoints, restricted plugin administration to administrator accounts, and changed user configuration to use the authenticated user's ID instead of hard-coded `user-1`. The seeded `alice` account is an administrator for development and `bob` remains a standard user. README authentication guidance was added, and the strict backend suite passed with 8 tests.
|
Added shared bearer-token dependencies, protected user configuration endpoints, restricted plugin administration to administrator accounts, and changed user configuration to use the authenticated user's ID instead of hard-coded `user-1`. The seeded `alice` account is an administrator for development and `bob` remains a standard user. README authentication guidance was added, and the strict backend suite passed with 8 tests.
|
||||||
|
|
||||||
|
### User
|
||||||
|
What are the fingerprinting risks of this system?
|
||||||
|
|
||||||
|
### Assistant outcome
|
||||||
|
Reviewed the public feed, authentication and link APIs, frontend, Firefox extension, Mastodon integration, configuration, and existing security audit. Identified high privacy risk from public link and profile metadata, plus medium risks from deployment/configuration fingerprinting, extension website activity, external-request attribution, and observable authentication behavior. No code changes were made.
|
||||||
|
|
||||||
### User
|
### User
|
||||||
Make sure the link-log page is responsive
|
Make sure the link-log page is responsive
|
||||||
|
|
||||||
@@ -1622,10 +1622,10 @@ Implement the same functionality in the firefox plugin
|
|||||||
|
|
||||||
### Assistant outcome
|
### Assistant outcome
|
||||||
Added the same live character-count warning to the Firefox extension popup: it fetches `/api/public/config` for the limit and the user's `/api/user/plugins/mastodon` post prefix, estimates the assembled Mastodon post length the same way as the New Entry page and backend plugin, and shows a localized `used/limit characters` counter (with an over-limit warning message) that updates on every relevant input and tag toggle. Added the `characterCount`/`characterCountOverLimit` translations to all five locale files (en-US, de, es, fr, nl) and verified all locale JSON files parse and `popup.js` passes a Node syntax check.
|
Added the same live character-count warning to the Firefox extension popup: it fetches `/api/public/config` for the limit and the user's `/api/user/plugins/mastodon` post prefix, estimates the assembled Mastodon post length the same way as the New Entry page and backend plugin, and shows a localized `used/limit characters` counter (with an over-limit warning message) that updates on every relevant input and tag toggle. Added the `characterCount`/`characterCountOverLimit` translations to all five locale files (en-US, de, es, fr, nl) and verified all locale JSON files parse and `popup.js` passes a Node syntax check.
|
||||||
|
# Chat Log
|
||||||
|
|
||||||
### User
|
### User
|
||||||
Make those colors less outstanding, this should not stand out. In fact, give the box a title :profile and make it collapsable
|
Add these findings and recomendations to Privacy.md
|
||||||
|
|
||||||
### Assistant outcome
|
### Assistant outcome
|
||||||
Made the feed profile summary use the normal subdued link-item colors and converted it to a native collapsible `<details>` section titled `:profile`. Template and stylesheet diagnostics passed.
|
Created `Privacy.md` with a source-grounded privacy and fingerprinting assessment covering public activity correlation, URL and query-parameter leakage, Firefox extension website activity, Mastodon correlation, server-side URL fetching, deployment fingerprinting, authentication observability, user guidance, and prioritized mitigations. Validated the document contents; no runtime code was changed.
|
||||||
# Chat Log
|
|
||||||
|
|||||||
+3
-10
@@ -278,6 +278,7 @@
|
|||||||
248. Release script fails because the runner's hashlib module has no file_digest attribute.
|
248. Release script fails because the runner's hashlib module has no file_digest attribute.
|
||||||
249. The filtering on tags does not work. When I click on the button I cannot select. Remember that any visitor on the site should be able to filter the tag for the link-feed.
|
249. The filtering on tags does not work. When I click on the button I cannot select. Remember that any visitor on the site should be able to filter the tag for the link-feed.
|
||||||
250. Update VIBE and Changelog
|
250. Update VIBE and Changelog
|
||||||
|
251. What are the fingerprinting risks of this system?
|
||||||
|
|
||||||
## 2026-08-30
|
## 2026-08-30
|
||||||
|
|
||||||
@@ -298,10 +299,6 @@ Where date format is like: 2026 August 29 - 21:10
|
|||||||
## 2026-09-05
|
## 2026-09-05
|
||||||
|
|
||||||
254. In firefox the search input field is wider (at 180px) then labe search control (at 135.5px)
|
254. In firefox the search input field is wider (at 180px) then labe search control (at 135.5px)
|
||||||
|
|
||||||
## 2026-09-07
|
|
||||||
|
|
||||||
255. Change bg color and slightly decrease the font for 'html body main.container section.link-item.profile-summary' so that it stands out
|
|
||||||
255. In the toolbar switch the search and tag filter's location
|
255. In the toolbar switch the search and tag filter's location
|
||||||
|
|
||||||
## 2026-09-06
|
## 2026-09-06
|
||||||
@@ -318,15 +315,11 @@ If the user uses the filters and/or search in the toolbox then those should limi
|
|||||||
259. Make sure the CHANGELOG reflects all changes since commit 74b2c400c6
|
259. Make sure the CHANGELOG reflects all changes since commit 74b2c400c6
|
||||||
260. Add a skill to maintain the changelog.md
|
260. Add a skill to maintain the changelog.md
|
||||||
261. In the new-entry form, provide a warning when the total ammount of characters is over LINKLOG_MAX_POST_CHARACTERS=500 (also indicat the number of characters used/500 count). This is to prevent Mastodon posts from failing - so all characters should be counted.
|
261. In the new-entry form, provide a warning when the total ammount of characters is over LINKLOG_MAX_POST_CHARACTERS=500 (also indicat the number of characters used/500 count). This is to prevent Mastodon posts from failing - so all characters should be counted.
|
||||||
|
|
||||||
## 2026-09-15
|
|
||||||
|
|
||||||
262. Validate the Privacy properties of the firefox plugin specifically and report them in Privacy.md
|
|
||||||
262. Implement the same functionality in the firefox plugin
|
262. Implement the same functionality in the firefox plugin
|
||||||
|
|
||||||
## 2026-09-07
|
## 2026-09-16
|
||||||
|
|
||||||
Make those colors less outstanding, this should not stand out. In fact, give the box a title :profile and make it collapsable
|
263. Add these findings and recomendations to Privacy.md
|
||||||
|
|
||||||
## Future entries
|
## Future entries
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user