Skip to content

[comp] Production Deploy#2938

Merged
tofikwest merged 3 commits into
releasefrom
main
May 27, 2026
Merged

[comp] Production Deploy#2938
tofikwest merged 3 commits into
releasefrom
main

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

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

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.


Summary by cubic

Enable logging findings against all supported frameworks (SOC 2, ISO 27001, PCI DSS, HIPAA, GDPR, ISO 9001, ISO 42001). Fix the Create Finding form so it only allows frameworks the org has enabled and selects a valid default.

  • Bug Fixes

    • DB: extend FindingType with pci_dss, hipaa, gdpr, iso9001, iso42001.
    • API: switch DTO validator to @IsIn([...]); add labels in audit/notifier; update framework→type mapping.
    • Frontend: expand FINDING_TYPE_LABELS; add extractOrgFrameworkTypes to gate and default the Framework field; add tests covering all frameworks and the ISO 42001 case.
  • Migration

    • Run prisma migrate deploy (or prisma migrate dev) and then prisma generate.
    • Additive enum update only; no data changes.

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

github-actions Bot and others added 3 commits May 27, 2026 18:29
The Create Finding form's Framework dropdown greyed out PCI DSS, HIPAA,
GDPR, ISO 9001, and ISO 42001 even when the org subscribed to them
(reported on org_69d943ca3fbbf2c473e97b0a, blocked from logging ISO
42001 findings in-app).

Root cause: the disabled state was gated by a hardcoded frontend
`FINDING_TYPE_LABELS` constant that only listed SOC 2 and ISO 27001,
and the Prisma `FindingType` enum / API DTO only accepted those two
values — so no org could log a finding against any other framework
regardless of subscription.

Changes:
- DB: extend `FindingType` enum with `pci_dss`, `hipaa`, `gdpr`,
  `iso9001`, `iso42001` (additive `ALTER TYPE ... ADD VALUE` migration)
- API: extend DTO validator, audit / notifier label maps, and the
  framework-name → finding-type mapping in `frameworks-timeline.helper`
- DTO uses `@IsIn([...])` instead of `@IsEnum(FindingType)` to match
  the workaround already applied to `area` (decorator-eval enum capture)
- Frontend: extend `FINDING_TYPE_LABELS`; extract a pure
  `extractOrgFrameworkTypes` helper that maps framework names to
  `FindingType` (tolerates versioned variants like `ISO/IEC 27001:2022`)
- `CreateFindingSheet` now gates options on the org's actual enabled
  frameworks instead of the hardcoded label set, and auto-corrects the
  default `type` when the org doesn't subscribe to SOC 2
- Tests: 11 new vitest cases covering loading, empty, all 7 frameworks,
  ISO 27001/9001/42001 ambiguity, versioned variants, custom frameworks,
  and the reported bug; existing jest mocks extended

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
fix(findings): allow logging against all enabled frameworks
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

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

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment May 27, 2026 8:44pm
comp-framework-editor (staging) Ready Ready Preview, Comment May 27, 2026 8:44pm
portal (staging) Ready Ready Preview, Comment May 27, 2026 8:44pm

Request Review

@claudfuen
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 3.64.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

2 participants