Commit Graph

655 Commits

Author SHA1 Message Date
Bryan Frimin
a9ebeef0fa Transform meetings page into context page with tabs
Add structured organization context with 5 markdown sections (Product, Architecture, Team, Processes, Customers) editable inline. Meetings are now a tab within the context page. Moved all GraphQL queries from hooks/graph/MeetingGraph.ts into colocated components following new best practices. Updated database schema, backend services, GraphQL resolvers, and MCP API to support the new context fields and structure.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 19:02:50 +01:00
Sacha Al Himdani
8b66a61990 Run go fix and go fmt
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-19 16:37:51 +01:00
Bryan Frimin
40df76d8b4 Fix SAML ACS endpoint CORS rejection
The SAML Assertion Consumer Service endpoint receives cross-origin POSTs from external identity providers by design. Bypass CSRF protection for this specific endpoint since the endpoint validates SAML response signatures itself.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 16:07:53 +01:00
Sacha Al Himdani
1db8e7133e Add document archiving
Documents can be archived and unarchived. Archived documents are
read-only, excluded from the trust center, and moved to a dedicated
Archived tab in the document list.

- Add archived_at timestamp and status (ACTIVE/ARCHIVED) PG enum column
- Rename DocumentStatus → DocumentVersionStatus, introduce DocumentStatus
- Archive/unarchive mutations in GraphQL, MCP, and CLI
- Bulk archive/unarchive mutations with Active/Archived tabs in the list
- ABAC policies: write actions denied on archived docs, unarchive denied
  on active docs
- Remove control/risk mappings and reset trust center visibility on archive
- Exclude archived documents from mapping dialogs and trust center tab

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-19 14:15:54 +01:00
Bryan Frimin
4f54241382 Add document types filtering and rename ISMS to GOVERNANCE
Adds 5 new document types (PLAN, REGISTER, RECORD, REPORT, TEMPLATE), renames ISMS to GOVERNANCE, and implements type-based filtering across GraphQL, MCP, and frontend. Includes migration, enum updates, filter implementation with SQL array support, and frontend dropdown UI with Relay refetch pattern.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 12:31:39 +01:00
Bryan Frimin
d7c120c144 Rename NONCONFORMITY to MINOR_NONCONFORMITY and add MAJOR_NONCONFORMITY
Support distinguishing between minor and major non-conformities in findings. Rename the existing NONCONFORMITY enum value to MINOR_NONCONFORMITY and add a new MAJOR_NONCONFORMITY value across all API layers (GraphQL, MCP, CLI) and the database.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 10:02:28 +01:00
Bryan Frimin
82f241628c Refactor MeasuresPage to use Relay fragments
Replace the client-side grouped-by-category view (fetching 500 items)
with a flat table using server-side filtering and cursor-based
pagination. Colocate GraphQL queries, fragments, and mutations in the
component file per console CLAUDE.md conventions.

Backend changes add a category filter to the measure list endpoints
(GraphQL, MCP) and a new measureCategories field on Organization.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:54:33 +01:00
Bryan Frimin
32cc4a4f9c WIP
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:39:39 +01:00
Bryan Frimin
ea21f85887 Add http.CrossOriginProtection for CSRF defense using Sec-Fetch-Site headers
Implements native Go 1.26 cross-origin protection to block state-changing cross-origin browser requests. Registers configured AllowedOrigins as trusted origins and wraps the API router to check all incoming requests. Non-browser clients (MCP, Slack webhooks) are unaffected as they lack the browser-only Sec-Fetch-Site header.

Signed-off-by: gearnode <gearnode@probo.inc>
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:31:52 +01:00
Bryan Frimin
888838cfb0 Fix race condition in magic link token verification and typo in auth error message
- Hold SELECT FOR UPDATE lock within transaction by using tx directly instead of separate WithConn, ensuring mutual exclusion when multiple requests race to verify the same token
- Fix "resouce" → "resource" typo in authentication error messages

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-19 09:31:15 +01:00
Bryan Frimin
a5743729f7 Add file visibility (PRIVATE/PUBLIC) + public files API
Adds a visibility enum to files with PRIVATE (default) and PUBLIC states.
PUBLIC files are accessible via an unauthenticated /api/files/v1/{fileID}
endpoint that redirects to a presigned S3 URL. Introduces pkg/file service
to manage file operations. Logo uploads (trust centers, organizations,
frameworks, references) are marked PUBLIC; other files are PRIVATE.
Includes database migration and backfill for existing logos.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-18 19:19:04 +01:00
Bryan Frimin
7895dd32b0 Fix logging format string bugs and add missing contributor guides
Replace three instances of leftover %T format verbs in logger.ErrorCtx() calls with proper structured logging fields. Add alphabetically-sorted reference documentation for six new contrib/claude/ guides and reorder the existing list.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-18 15:09:31 +01:00
Sacha Al Himdani
73d5dbb5db Replace panic calls with proper error handling in resolvers
All panic(fmt.Errorf(...)) calls in the console and trust center
GraphQL resolvers are replaced with structured error logging via
r.logger.ErrorCtx and gqlutils.Internal(ctx) returns.

Mutation resolvers for Create, Update, Upload, Import, and Assess
operations now check for validator.ValidationErrors before returning
an internal error, surfacing field-level INVALID errors to clients
via gqlutils.InvalidValidationErrors.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-17 16:15:51 +01:00
Sacha Al Himdani
16b966b8fb Fix multiline function call style violations
Expand mixed inline/multiline function calls so each argument
is on its own line, matching the one-argument-per-line rule.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-17 15:59:26 +01:00
Bryan Frimin
91a06d1fb5 Use logger + gqlutils.Internal pattern instead of panic for NDA errors
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-17 15:19:23 +01:00
Bryan Frimin
6770fb7e1f Fix NDA file display on page reload
The Organization.TrustCenter and Node resolvers were not loading the NDA file from the database, causing ndaFileName to be null on page reload even though the file was uploaded. Now the resolvers fetch the file when NonDisclosureAgreementFileID is set.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-17 15:19:21 +01:00
Bryan Frimin
69ab9c60cd Add finding MCP API
Replace nonconformity and continual improvement MCP tools with
unified finding tools: list_findings, get_finding, create_finding,
update_finding, delete_finding, link_finding_to_audit, and
unlink_finding_from_audit.

Update specification and resolvers to use the new finding types.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-17 15:05:32 +01:00
Bryan Frimin
0ab88a9bbc Add finding console GraphQL API
Replace nonconformity and continual improvement GraphQL types with a
unified Finding type supporting kind, status, priority, and audit
associations. Update schema, resolver, and type mappings.

Add mutations for createFinding, updateFinding, deleteFinding,
linkFindingToAudit, and unlinkFindingFromAudit.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-17 15:05:32 +01:00
Sacha Al Himdani
cf1dadc0b5 Add implemented state and justification to controls
Introduce `implemented` enum (IMPLEMENTED/NOT_IMPLEMENTED) and
`not_implemented_justification` (nullable text) fields on the Control
entity across all API surfaces (GraphQL, MCP, CLI), database, frontend,
and SOA export.

The database stores implementation state as a PostgreSQL enum
`control_implementation_state`. Controls default to IMPLEMENTED during
migration. The SOA list and PDF export show implementation status
alongside applicability, with "-" for non-applicable controls.
Justification columns are renamed for clarity: "Justification for
non-applicability" and "Justification for non-implementation".

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-17 11:01:04 +01:00
Bryan Frimin
7ffb2d5e94 Add document viewer with proper 404 handling for trust center
Move document download/view to a dedicated viewer page with PDF preview,
access request flow, and a proper 404 error boundary when documents are
not found. The backend now returns NOT_FOUND instead of INTERNAL for
missing documents and reports.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 19:13:21 +01:00
Sacha Al Himdani
dc8e6d0817 Add validation to mailman service
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-16 17:46:32 +01:00
Bryan Frimin
807213d384 Stop tracking generated files
Run make generate in CI lint and test jobs since generated files are
now gitignored. Also include Relay codegen for frontend apps in the
generate target.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 16:19:47 +01:00
Sacha Al Himdani
0b7c0e0806 Add validation to mailman service
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-16 14:37:34 +01:00
Bryan Frimin
7a4101185b Add per-folder CLAUDE.md for key packages
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-15 15:04:27 +01:00
Bryan Frimin
ef76a8d2e1 Remove deadcode
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 17:18:02 +01:00
Sacha Al Himdani
d5c62a9383 Run go fmt/fix
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-13 14:48:13 +01:00
Émile Ré
6055033cb1 Fix date
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-13 16:58:11 +04:00
Émile Ré
6db862b470 Add missing log
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-13 16:58:11 +04:00
Émile Ré
6ad808c966 Move and rename EnsureAccess method in trust.Service
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-13 16:58:10 +04:00
Émile Ré
ea8253ea78 Add membership provisioning middleware to compliance page
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-13 16:58:10 +04:00
Sacha Al Himdani
c493e31745 Fix documents UI
- Fix redirection after document deletion in detail page
- Fix refetch after publication
- Return proper error when trying to update a published document

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-13 12:01:57 +01:00
Émile Ré
85ed5296e7 Fix safe ssoLoginURL params after activation + resolver error
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-12 17:24:27 +04:00
Émile Ré
1d54f22cd9 Add ssoLoginURL in activate account outputs
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-12 17:24:27 +04:00
Sacha Al Himdani
b8ba213fcb Compliance updates should be public
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-12 13:46:19 +01:00
Sacha Al Himdani
85ec106cd6 Send mailing list emails
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-11 15:34:37 +01:00
Sacha Al Himdani
aa01c40184 Remove with tenant from mailman
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-11 15:34:36 +01:00
Sacha Al Himdani
4d2cb793b6 Add compliance page mailing list base
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-11 15:34:36 +01:00
Émile Ré
af17afeffb Catch account already activated error and redirect
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-11 17:08:43 +04:00
Émile Ré
355e6b81b8 Add an account activation step in the signing request flow when needed
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-11 17:08:42 +04:00
Émile Ré
0a532f17c5 Remove legacy document signing endpoints
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-11 17:08:42 +04:00
Bryan Frimin
467973e9b6 Fix mcp tools
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-11 13:09:03 +01:00
Bryan Frimin
0974488fa3 Generate golang code
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-11 13:09:02 +01:00
Bryan Frimin
e393411333 Move kind to string
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-11 13:09:02 +01:00
Bryan Frimin
dd3885ac54 Fix MS365 attributes handling
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-11 13:09:01 +01:00
Sacha Al Himdani
fe241fc136 Add social links
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-11 12:10:57 +01:00
Émile Ré
17c9f2eded Fix profiles default filter
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-10 18:19:16 +04:00
Bryan Frimin
d4b3025463 Use go 1.26 syntax
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-06 15:00:42 +01:00
Émile Ré
97e957f394 Implement guard on empty full name before NDA is signed
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-05 17:07:58 +04:00
Émile Ré
e1fb61979b Remove create trust center access mutation from console api
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-05 15:02:49 +04:00
Émile Ré
0d1bcd21aa Rework people list and trust center access list + edit dialog
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-05 14:32:28 +04:00