Skip to content

📖 Fix data-at-rest claim in security self-assessment#4350

Closed
clubanderson wants to merge 2 commits into
mainfrom
fix-self-assessment-data-at-rest
Closed

📖 Fix data-at-rest claim in security self-assessment#4350
clubanderson wants to merge 2 commits into
mainfrom
fix-self-assessment-data-at-rest

Conversation

@clubanderson
Copy link
Copy Markdown
Collaborator

@clubanderson clubanderson commented Apr 2, 2026

📌 Fixes


📝 Summary of Changes

  • Fixes misleading Non-Goals bullet that claimed Console does "not store cluster data at rest (except user preferences in local SQLite)"
  • Replaces with accurate statement that raw K8s resource data is not stored server-side, with link to new Data Storage Summary
  • Adds Data Storage Summary table to the Appendix documenting all 6 persistence layers (backend SQLite, metrics history JSON, OPFS SQLite, IndexedDB, localStorage, in-memory SSE cache)
  • Corrects Backend SQLite location from /data/console.db to ./data/console.db (or DATABASE_PATH); Helm default /app/data/console.db
  • Corrects Backend SQLite retention from Indefinite to mixed policy (user/config data: until deleted; GPU snapshots: 90 days; revoked JWT tokens: deleted after expires_at)
  • Rewords table intro from "details all data persisted" to "provides a high-level summary" to avoid implying exhaustiveness
  • Updates "Key points" bullet to explicitly name server-side objects (user accounts, dashboards/cards/configuration, feature requests, GPU utilization snapshots) instead of the misleading "user preferences"

This matters because the self-assessment is referenced in the CNCF TOC sandbox application — accuracy is critical for TAG-Security review.


Changes Made

  • Corrected misleading Non-Goals bullet about data at rest in docs/security/SELF-ASSESSMENT.md
  • Added Data Storage Summary table to the Appendix
  • Fixed Backend SQLite location and retention fields to reflect actual defaults and mixed retention policy
  • Reworded table intro to clarify it is a high-level summary, not exhaustive
  • Updated "Key points" bullet to name server-side stored objects explicitly

Checklist

Please ensure the following before submitting your PR:

  • I used a coding agent (Claude Code, Copilot, Gemini, or Codex) to generate/review this code
  • I have reviewed the project's contribution guidelines
  • New cards target console-marketplace, not this repo
  • isDemoData is wired correctly (cards show Demo badge when using demo data)
  • I have written unit tests for the changes (if applicable)
  • I have tested the changes locally and ensured they work as expected
  • All commits are signed with DCO (git commit -s)

Screenshots or Logs (if applicable)

Documentation-only change — no screenshots applicable.


👀 Reviewer Notes

Cross-reference the Data Storage Summary table against:

  • pkg/store/sqlite.go — backend SQLite schema and cleanup jobs
  • pkg/agent/metrics_history.go — 7-day rolling metrics history
  • web/src/lib/cache/ — OPFS/IndexedDB browser cache layer
  • deploy/helm/kubestellar-console/values.yaml — Helm DATABASE_PATH default (/app/data/console.db)

The Non-Goals section previously stated Console does not store cluster
data at rest except user preferences in SQLite. This understates what
is actually persisted: GPU utilization snapshots in backend SQLite,
7-day metrics history in ~/.kc/metrics_history.json, and browser-side
caches (OPFS SQLite, IndexedDB). Add a Data Storage Summary table to
the Appendix with full transparency on all persistence layers.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Copilot AI review requested due to automatic review settings April 2, 2026 22:48
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Apr 2, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mikespreitzer for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 2, 2026

Deploy Preview for kubestellarconsole canceled.

Name Link
🔨 Latest commit 6ebab63
🔍 Latest deploy log https://app.netlify.com/projects/kubestellarconsole/deploys/69cef446c38ddc00085a3bcc

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 2, 2026

👋 Hey @clubanderson — thanks for opening this PR!

🤖 This project is developed exclusively using AI coding assistants.

Please do not attempt to code anything for this project manually.
All contributions should be authored using an AI coding tool such as:

This ensures consistency in code style, architecture patterns, test coverage,
and commit quality across the entire codebase.


This is an automated message.

@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Apr 2, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the security self-assessment to correct an inaccurate “data at rest” non-goal and to document the console’s actual persistence surfaces more explicitly for TAG-Security review.

Changes:

  • Replaces the misleading “does not store cluster data at rest” claim with a more precise statement about not persisting raw K8s resource data server-side.
  • Adds a new Data Storage Summary section to the Appendix describing server-side and client-side persistence layers.
  • Updates the Table of Contents to include the new Appendix subsection.

Comment thread docs/security/SELF-ASSESSMENT.md Outdated

| Storage | Type | What is Stored | Location | Retention |
|---------|------|----------------|----------|-----------|
| **Backend SQLite** | Relational DB | User accounts, dashboard layouts, card configurations, GPU utilization snapshots, revoked JWT tokens, user analytics events, feature requests | Server: `/data/console.db` | Indefinite |
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Backend SQLite location and retention look inaccurate/misleading. The backend default is ./data/console.db (or DATABASE_PATH), and the Helm chart defaults to /app/data/console.db—not /data/console.db. Also, not all data in this DB is indefinite: GPU utilization snapshots are cleaned up after 90 days and revoked tokens are deleted after expires_at passes. Please update the Location/Retention cells to reflect these defaults and mixed retention.

Suggested change
| **Backend SQLite** | Relational DB | User accounts, dashboard layouts, card configurations, GPU utilization snapshots, revoked JWT tokens, user analytics events, feature requests | Server: `/data/console.db` | Indefinite |
| **Backend SQLite** | Relational DB | User accounts, dashboard layouts, card configurations, GPU utilization snapshots, revoked JWT tokens, user analytics events, feature requests | Server default: `./data/console.db` (or `DATABASE_PATH`); Helm default: `/app/data/console.db` | Mixed: user/configuration data retained until deleted; GPU utilization snapshots cleaned up after 90 days; revoked JWT tokens deleted after `expires_at` |

Copilot uses AI. Check for mistakes.
Comment thread docs/security/SELF-ASSESSMENT.md Outdated
Comment on lines +153 to +157
The following table details all data persisted by KubeStellar Console, both server-side and client-side:

| Storage | Type | What is Stored | Location | Retention |
|---------|------|----------------|----------|-----------|
| **Backend SQLite** | Relational DB | User accounts, dashboard layouts, card configurations, GPU utilization snapshots, revoked JWT tokens, user analytics events, feature requests | Server: `/data/console.db` | Indefinite |
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section says the table “details all data persisted”, but the Backend SQLite row doesn’t currently cover several server-side tables that are persisted (e.g., onboarding responses, notifications, GPU reservations, PR feedback, pending swaps/card history). Either expand the row to include these categories or reword the intro to clarify the table is a high-level summary rather than exhaustive.

Copilot uses AI. Check for mistakes.
Comment thread docs/security/SELF-ASSESSMENT.md Outdated

- Raw Kubernetes resource data (pods, deployments, services) is **not** stored server-side — it is fetched on-demand and cached only in browser storage and a 15-second in-memory server cache.
- Kubernetes **credentials** never leave the user's machine — the kc-agent proxies requests locally.
- The backend SQLite database stores user preferences and dashboard configuration, plus GPU utilization snapshots for historical trend analysis.
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The “Key points” bullet says the backend SQLite DB stores “user preferences”, but the backend schema is primarily user accounts + dashboards/cards/config, onboarding responses, notifications, etc. To avoid confusion with browser-stored preferences (theme/UI state in localStorage), consider rephrasing this bullet to name the server-side objects explicitly (e.g., users/dashboards/cards/feature requests + GPU snapshot history).

Suggested change
- The backend SQLite database stores user preferences and dashboard configuration, plus GPU utilization snapshots for historical trend analysis.
- The backend SQLite database stores server-side application data such as user accounts, dashboards/cards/configuration, feature requests, and GPU utilization snapshots for historical trend analysis.

Copilot uses AI. Check for mistakes.
@clubanderson
Copy link
Copy Markdown
Collaborator Author

🔄 Auto-Applying Copilot Code Review

Copilot code review found 2 code suggestion(s) and 1 general comment(s).

@copilot Please apply all of the following code review suggestions:

  • docs/security/SELF-ASSESSMENT.md (line 157): | **Backend SQLite** | Relational DB | User accounts, dashboard layouts, card co...
  • docs/security/SELF-ASSESSMENT.md (line 168): - The backend SQLite database stores server-side application data such as user a...

Also address these general comments:

  • docs/security/SELF-ASSESSMENT.md (line 157): This section says the table “details all data persisted”, but the Backend SQLite row doesn’t currently cover several ser

Push all fixes in a single commit. Run cd web && npm run build && npm run lint before committing.


Auto-generated by copilot-review-apply workflow.

…eview feedback

Agent-Logs-Url: https://github.com/kubestellar/console/sessions/c3bcac78-3113-4d8a-957e-a4b8e59898fa

Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added dco-signoff: no Indicates the PR's author has not signed the DCO. and removed dco-signoff: yes Indicates the PR's author has signed the DCO. labels Apr 2, 2026
@kubestellar-prow
Copy link
Copy Markdown
Contributor

Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits.

📝 Please follow instructions in the contributing guide to update your commits with the DCO

Full details of the Developer Certificate of Origin can be found at developercertificate.org.

The list of commits missing DCO signoff:

  • 6ebab63 📖 Fix Backend SQLite location, retention, and key-points bullet per review feedback
Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

🔄 Auto-Applying Copilot Code Review

Copilot code review found 2 code suggestion(s) and 1 general comment(s)....

Applied all three changes in commit 6ebab63:

  1. Line 157 (Backend SQLite row) — Updated Location to ./data/console.db (or DATABASE_PATH); Helm default /app/data/console.db, and Retention to reflect the mixed policy (user/config data: until deleted; GPU snapshots: 90 days; revoked JWT tokens: deleted after expires_at).
  2. Line 153 (table intro) — Rewrded from "details all data persisted" to "provides a high-level summary" to avoid implying the table is exhaustive.
  3. Line 168 (Key points bullet) — Replaced "user preferences and dashboard configuration" with explicit server-side object names (user accounts, dashboards/cards/configuration, feature requests, GPU utilization snapshots).

@clubanderson
Copy link
Copy Markdown
Collaborator Author

Superseded — self-assessment updated directly via cncf/toc#2106 with TAG-Security reviewer feedback addressed. Will sync console copy separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: no Indicates the PR's author has not signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants