Skip to content

CS-413 [BUG] SoA shows "unavailable" to auditor account#2925

Open
github-actions[bot] wants to merge 7 commits into
mainfrom
chas/soa-as-auditor
Open

CS-413 [BUG] SoA shows "unavailable" to auditor account#2925
github-actions[bot] wants to merge 7 commits into
mainfrom
chas/soa-as-auditor

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 25, 2026

This is an automated pull request to merge chas/soa-as-auditor into dev.
It was created by the [Auto Pull Request] action.


Summary by cubic

Add read-only get-setup API (audit:read), pass trusted org ID to the service, and show an empty state when setup is missing so auditors can view SOA without creating records (CS-413).

Written for commit eace526. Summary will update on new commits. Review in cubic

@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app Ready Ready Preview, Comment May 25, 2026 8:32pm
comp-framework-editor Ready Ready Preview, Comment May 25, 2026 8:32pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
portal Skipped Skipped May 25, 2026 8:32pm

Request Review

@chasprowebdev chasprowebdev changed the title [dev] [chasprowebdev] chas/soa-as-auditor CS-413 [BUG] SoA shows "unavailable" to auditor account May 25, 2026
@linear
Copy link
Copy Markdown

linear Bot commented May 25, 2026

CS-413

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file

Confidence score: 2/5

  • There is a concrete security/authorization risk: ensure-setup in apps/api/src/soa/soa.controller.ts can create SOA records while only requiring audit:read, which permits mutation under a read-level scope.
  • Given the high severity (7/10) and high confidence (9/10), this is likely user-impacting and raises regression risk if merged without tightening permissions for the endpoint.
  • Pay close attention to apps/api/src/soa/soa.controller.ts - align endpoint authorization with write/create behavior to avoid privilege escalation.

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/api/src/soa/soa.controller.ts Outdated
@chasprowebdev
Copy link
Copy Markdown
Contributor

@cubic-dev-ai please review it

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai Bot commented May 25, 2026

@cubic-dev-ai please review it

@chasprowebdev I have started the AI code review. It will take a few minutes to complete.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 8 files

Confidence score: 2/5

  • There is a high-risk tenant isolation issue in apps/api/src/soa/soa.controller.ts: trusting organizationId from the request body instead of enforcing @OrganizationId() can allow cross-tenant access/update behavior.
  • apps/app/src/app/(app)/[orgId]/documents/statement-of-applicability/components/SOAFrameworkTabs.tsx also has a user-facing regression risk where getSOASetup can leave tabs stuck in a perpetual loading spinner when setup is missing or fetch fails.
  • Given the high severity (8/10) and high confidence (9/10) on the API scoping issue, this is not quite safe to merge without fixes.
  • Pay close attention to apps/api/src/soa/soa.controller.ts, apps/app/src/app/(app)/[orgId]/documents/statement-of-applicability/components/SOAFrameworkTabs.tsx - enforce tenant scoping in the controller and ensure loading/error fallback exits spinner state.

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread apps/api/src/soa/soa.controller.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant