pages.privacy: data retention does not match the privacy policy #34

Open
opened 2026-10-06 13:50:23 +00:00 by ffrauenberger · 1 comment
Owner

Severity: medium (the privacy policy promises retention that the code does not enforce)

Where

  • app/pages/privacy.py:43-52
  • app/pages/main_app.py:16-22
  • module.nix:149-156, :250-265
  • app/mining_algorithms/genetic_mining.py:424-430 and other logger.debug calls that dump logs

Problem

The privacy page states "Automatic deletion after a maximum of 2 hours" and "No permanent storage". The code does not guarantee this:

  • Uploaded files, the parsed DataFrame, the mining model (with the full event log in several filtered copies), converted CSV/XES bytes and graphs live in st.session_state as long as the session exists. For an open tab that can be many hours, independent of the 60-minute file timer.
  • The cleanup timer deletes only files in the cache directory, not directories (#20). With startAt = "hourly" and -mmin +60, files can survive almost 2 h, which meets the claim only barely and only for files.
  • Several debug logs write complete traces and event data to stdout and therefore to the journal (e.g. [LOG TRACES] in the genetic miner; Succession Matrix, SPM Filtered Log in BaseMining). With logLevel = "DEBUG", uploaded process data ends up in system logs with their own retention.
  • Self-hosted or local installs have no cleanup at all.

Steps to reproduce

  1. Open the application, upload a log and mine a model
  2. Leave the tab open for more than 2 hours
  3. Interact with the app again; the data is still there

Expected behavior

User data is deleted after at most 2 hours, as stated in the privacy policy, and never written to logs.

Actual behavior

Data stays in memory for the lifetime of the session; with debug logging enabled, event data is written to the system journal.

Related: #20, #61.

Fix

Enforce a session time-to-live (clear session_state and temp files after N minutes of inactivity), avoid temp files (render to bytes), never log event data (or redact it), and align the policy text with what the code actually guarantees.


from issues/SEC-004-privacy-policy-retention-claims-not-enforced.md (code analysis of commit 6bcc646, 2026-10-03)

**Severity:** medium (the privacy policy promises retention that the code does not enforce) ## Where - `app/pages/privacy.py:43-52` - `app/pages/main_app.py:16-22` - `module.nix:149-156`, `:250-265` - `app/mining_algorithms/genetic_mining.py:424-430` and other `logger.debug` calls that dump logs ## Problem The privacy page states *"Automatic deletion after a maximum of 2 hours"* and *"No permanent storage"*. The code does not guarantee this: - Uploaded files, the parsed DataFrame, the mining model (with the full event log in several filtered copies), converted CSV/XES bytes and graphs live in `st.session_state` **as long as the session exists**. For an open tab that can be many hours, independent of the 60-minute file timer. - The cleanup timer deletes only files in the cache directory, not directories (#20). With `startAt = "hourly"` and `-mmin +60`, files can survive almost 2 h, which meets the claim only barely and only for files. - Several `debug` logs write complete traces and event data to stdout and therefore to the journal (e.g. `[LOG TRACES]` in the genetic miner; `Succession Matrix`, `SPM Filtered Log` in `BaseMining`). With `logLevel = "DEBUG"`, uploaded process data ends up in system logs with their own retention. - Self-hosted or local installs have no cleanup at all. ### Steps to reproduce 1. Open the application, upload a log and mine a model 2. Leave the tab open for more than 2 hours 3. Interact with the app again; the data is still there ### Expected behavior User data is deleted after at most 2 hours, as stated in the privacy policy, and never written to logs. ### Actual behavior Data stays in memory for the lifetime of the session; with debug logging enabled, event data is written to the system journal. Related: #20, #61. ## Fix Enforce a session time-to-live (clear `session_state` and temp files after N minutes of inactivity), avoid temp files (render to bytes), never log event data (or redact it), and align the policy text with what the code actually guarantees. --- from `issues/SEC-004-privacy-policy-retention-claims-not-enforced.md` (code analysis of commit 6bcc646, 2026-10-03)
Author
Owner

Reviewed by Codex (GPT-6) against origin/main 6bcc646eb464.

Review: partially correct.

The retention mismatch is supported. Two details need correction. An hourly timer with find -mmin +60 does not guarantee deletion before two hours: minute-age comparison rounds down, the strict +60 test needs age at least 61 minutes, and timer scheduling adds delay. A file missed just before that point can survive slightly beyond two hours; modified files have their age reset.

Also, “clear after N minutes of inactivity” is not sufficient to satisfy a maximum lifetime of two hours: an active session could keep extending it. Decide whether the policy promises absolute age since upload or inactivity expiry, implement that specific rule, and account for persisted debug logs separately. This is a code/policy-text review, not a legal compliance determination.

Code references: module.nix:252, module.nix:258, app/pages/privacy.py:48.

Reviewed by **Codex (GPT-6)** against origin/main [`6bcc646eb464`](https://code.swisdata.eu/ffrauenberger/ProcessIntel/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4). **Review: partially correct.** The retention mismatch is supported. Two details need correction. An hourly timer with `find -mmin +60` does not guarantee deletion before two hours: minute-age comparison rounds down, the strict `+60` test needs age at least 61 minutes, and timer scheduling adds delay. A file missed just before that point can survive slightly beyond two hours; modified files have their age reset. Also, “clear after N minutes of inactivity” is not sufficient to satisfy a maximum lifetime of two hours: an active session could keep extending it. Decide whether the policy promises absolute age since upload or inactivity expiry, implement that specific rule, and account for persisted debug logs separately. This is a code/policy-text review, not a legal compliance determination. Code references: [module.nix:252](https://code.swisdata.eu/ffrauenberger/ProcessIntel/src/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4/module.nix#L252), [module.nix:258](https://code.swisdata.eu/ffrauenberger/ProcessIntel/src/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4/module.nix#L258), [app/pages/privacy.py:48](https://code.swisdata.eu/ffrauenberger/ProcessIntel/src/commit/6bcc646eb464e0dd897228b5e49867f65d7255c4/app/pages/privacy.py#L48).
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
ffrauenberger/ProcessIntel#34
No description provided.