Skip to content

[roadmap] Add contextual regulatory review packs#40

Merged
ewilhelm1979-netizen merged 1 commit into
mainfrom
feature/contextual-regulatory-review-packs
Jul 9, 2026
Merged

[roadmap] Add contextual regulatory review packs#40
ewilhelm1979-netizen merged 1 commit into
mainfrom
feature/contextual-regulatory-review-packs

Conversation

@ewilhelm1979-netizen

Copy link
Copy Markdown
Owner

Problem and Goal

ISCY already has Management Review snapshots and regulatory templates, but NIS2, DORA and DSGVO/GDPR review preparation was still spread across general management-review flows. This PR adds contextual Regulatory Review Packs that reuse the existing snapshot/export layer instead of creating another compliance silo.

Goal: provide tenant-scoped pack catalog, preview, snapshot and export flows for NIS2, DORA, DSGVO/GDPR and generic security governance, using current ISCY data where available.

Changed Functions

  • Added Regulatory Review Pack catalog/detail/preview/snapshot/export APIs.
  • Added DSGVO/GDPR data-protection review template.
  • Extended management-review preview/snapshot payloads with existing Evidence Integrity, Evidence Storage/Restore Drill, legal-hold and metadata-only disposition aggregate signals.
  • Added web UI at /regulatory-review-packs/ with pack selection, period input, preview, snapshot creation for write roles and snapshot listing.
  • Updated GUI screenshot catalog and regenerated the handbook PDF.

Affected Files

  • rust/iscy-backend/src/lib.rs
  • rust/iscy-backend/src/report_store.rs
  • rust/iscy-backend/tests/http_tests.rs
  • CHANGELOG.md
  • docs/ISCY_Handbuch.md
  • docs/ISCY_Handbuch.pdf
  • docs/ISCY_STRATEGIC_ROADMAP.md
  • docs/GUI_SCREENSHOTS.md
  • docs/assets/*.png screenshot updates/additions

Database Migrations

  • None.
  • The feature reuses the existing management-review snapshot tables and existing Evidence Integrity/Storage metadata.

New or Changed API Endpoints

  • GET /api/v1/regulatory/review-packs
  • GET /api/v1/regulatory/review-packs/{pack_type}
  • POST /api/v1/regulatory/review-packs/{pack_type}/preview
  • GET /api/v1/regulatory/review-packs/{pack_type}/snapshots
  • POST /api/v1/regulatory/review-packs/{pack_type}/snapshots
  • GET /api/v1/regulatory/review-pack-snapshots
  • GET /api/v1/regulatory/review-pack-snapshots/{snapshot_id}
  • GET /api/v1/regulatory/review-pack-snapshots/{snapshot_id}/export?format=markdown|html|pdf|json

GUI Changes

  • Added top-navigation entry Regulatory Packs.
  • Added /regulatory-review-packs/ overview with pack cards, preview form, snapshot create form for write roles and snapshot table.
  • Added preview rendering for regulatory context, Evidence Integrity/Storage, gap summary, management hints, incidents, Product Security, Supplier Review and AI Governance summaries.
  • Updated current documentation screenshots for the relevant functional areas.

Tenant and Permission Boundaries

  • All pack previews, snapshots and exports use the authenticated tenant context.
  • Read-only roles can view catalogs/previews/snapshots but cannot create frozen snapshots.
  • Foreign-tenant snapshot access is hidden with 404.
  • Snapshot list queries remain tenant-scoped in SQL.

Security Decisions

  • No new Evidence engine, Risk engine, Control engine or Notification engine was introduced.
  • No raw Evidence bytes, storage paths, SQL details, secrets or foreign tenant identifiers are returned by the new review-pack APIs.
  • Audit events are written for previews, snapshot creation, snapshot reads and exports without logging secrets or raw Evidence paths.
  • Regulatory-pack text is positioned as governance and evidence support, not legal advice, certification, automatic reporting or authority filing.

Tests Executed

  • nix develop --command cargo fmt --manifest-path rust/iscy-backend/Cargo.toml -- --check
  • nix develop --command cargo clippy --locked --manifest-path rust/iscy-backend/Cargo.toml --all-targets -- -D warnings
  • nix develop --command cargo test --locked --manifest-path rust/iscy-backend/Cargo.toml
  • nix develop --command cargo test --locked --manifest-path rust/iscy-backend/Cargo.toml docs_markdown_screenshot_references_resolve -- --nocapture
  • nix develop --command cargo test --locked --manifest-path rust/iscy-backend/Cargo.toml regulatory_review_pack_endpoints_snapshot_exports_and_security -- --nocapture
  • nix shell nixpkgs#cargo-audit --command cargo-audit audit --file rust/iscy-backend/Cargo.lock --ignore RUSTSEC-2023-0071
  • nix shell nixpkgs#cargo-deny nixpkgs#cargo --command cargo-deny --manifest-path rust/iscy-backend/Cargo.toml check advisories licenses sources
  • nix develop --command make docs-pdf
  • nix develop --command make rust-smoke
  • nix develop --command make rust-restore-smoke
  • Nix smoke via nix run .#iscy-backend with local disposable SQLite DB and checks for /health/live, /status/, /regulatory-review-packs/, /api/v1/regulatory/review-packs
  • Compose validation with .env.example: base, LLM, stage, prod and prod+LLM configs
  • git diff --check

Known Limitations

  • Local hardened Docker image build could not be executed on this workstation because no Docker daemon/socket was available at /var/run/docker.sock; GitHub CI must validate the hardened Docker build.
  • The review packs currently summarize available ISCY data and do not perform formal legal classification or regulatory filing.
  • Snapshot exports reuse the existing management-review export renderer.

Deliberately Not Implemented

  • No dependency, Docker, Postgres, nginx, Nixpkgs or bot PR work.
  • No new database migration.
  • No new Evidence/Risk/Control/Notification engine.
  • No cloud storage, S3 credentials, physical Evidence deletion, CA/PKI, signed agent packages, provenance, HA, performance or visual-regression framework.
  • No CI, CodeQL, cargo-audit or cargo-deny weakening.

Notes for PR #39/#38 Context

@ewilhelm1979-netizen ewilhelm1979-netizen marked this pull request as ready for review July 9, 2026 14:22
@ewilhelm1979-netizen ewilhelm1979-netizen merged commit f072ed2 into main Jul 9, 2026
7 checks passed
@ewilhelm1979-netizen ewilhelm1979-netizen deleted the feature/contextual-regulatory-review-packs branch July 9, 2026 14:22

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 83e3d6bb56

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Query(query): Query<WebContextQuery>,
Form(form): Form<WebManagementReviewPreviewForm>,
) -> Html<String> {
let Some(context) = web_context_from_request(&query, &headers, &state).await else {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Require authentication before using web tenant context

This new web surface establishes context through web_context_from_request, which falls back to caller-supplied tenant_id/user_id query parameters or x-iscy-* headers, and then uses that context to list regulatory snapshots; the preview handler below repeats the same pattern before returning evidence, incident, supplier, product-security, and AI-governance aggregates. In a non-session request such as POST /regulatory-review-packs/preview?tenant_id=1&user_id=1, an unauthenticated caller can read tenant-scoped regulatory data, whereas the API handlers require authenticated_tenant_context.

Useful? React with 👍 / 👎.

match store.library(500).await {
Ok(library) => (
match store
.list_regulatory_review_pack_snapshots(context.tenant_id, 50)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Filter snapshots before applying the page limit

This endpoint fetches the newest 50 regulatory snapshots across all pack types and only then filters by the requested pack. When a tenant has more than 50 recent regulatory snapshots and the requested pack's snapshots are older than those, /api/v1/regulatory/review-packs/{pack_type}/snapshots omits valid snapshots or can return an empty list; the pack predicate needs to be applied in the query before the LIMIT.

Useful? React with 👍 / 👎.

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