Commit Graph

33 Commits

Author SHA1 Message Date
Sacha Al Himdani
c635492f75 SOA as document: replace export with publish workflow
Statements of Applicability are no longer exported as one-off PDFs.
Instead, each SOA owns a persistent document that accumulates versions
over time, following the same publish/approve lifecycle as authored
documents.

Publishing without approvers publishes immediately; publishing with
approvers creates a draft pending approval via the existing quorum
system. SOAs can also store default approvers that are pre-populated in
the publish dialog.

The SOA is removed from the snapshot system — applicability statements
are now queried directly (snapshot_id IS NULL) rather than through
snapshot copies.

A standalone migration script (cmd/migrate-soa-snapshots-to-documents)
converts existing SOA snapshots into documents with proper ProseMirror
content, preserving version history and approval decisions.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-16 00:01:13 +02:00
Sacha Al Himdani
03708d45c3 Consolidate document draft management into updateDocument
Replace the three separate draft mutations (createDraftDocumentVersion,
updateDocumentVersion, deleteDraftDocumentVersion) with automatic draft
lifecycle management inside updateDocument. The backend now auto-creates
a draft when a published document is edited, updates the existing draft
on subsequent edits, and auto-deletes the draft when content reverts to
match the published version.

A new deleteDocumentDraft mutation provides explicit draft deletion.

Backend:
- Merge version-level fields (content, title, classification,
  documentType) into UpdateDocumentRequest
- Convert CreateDraft, UpdateVersion, DeleteDraft into private
  transaction helpers called from Update
- Update returns (*Document, *DocumentVersion, error) with the version
  present only when a draft exists

Frontend:
- Remove all create/update/delete draft mutations from components
- Auto-save via updateDocument with layout refetch on draft status
  transitions while preserving editor cursor (data-generation key)
- Title, type, and classification editable on published versions
  (backend auto-creates draft)
- Forms use react-hook-form values option to stay synced with Relay
  fragment data across draft/publish transitions

API surface (GraphQL, MCP, CLI, n8n) updated consistently:
- Removed: createDraftDocumentVersion, updateDocumentVersion,
  deleteDraftDocumentVersion
- Added: deleteDocumentDraft (document-level)
- Updated: updateDocument accepts content, classification, documentType

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-14 15:01:20 +02:00
Sacha Al Himdani
fbb4c29d38 Add document CLI commands
Add list, create, view, update, delete, archive, and unarchive
subcommands under `prb document`.

Add document version subcommands: list-versions, view-version,
create-draft, delete-draft, update-version, publish-major, and
publish-minor.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-13 14:22:50 +02:00
Sacha Al Himdani
5fd580e995 Rename State of Applicability to Statement of Applicability
Rename the entity across the full stack: database table
(states_of_applicability → statements_of_applicability), Go model,
GraphQL types, MCP specification, CLI commands, frontend components,
routes, and display labels. Includes a migration to rename the table
and its foreign key column.

Widen sidebar from 260px to 280px to fit the longer label.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-09 13:06:06 +02:00
Aurélien Sibiril
61b0559a07 Add access review CLI commands
Add prb access-review subcommands for campaigns (create,
update, delete, list, view, start, close, cancel, add/
remove source) entries (list, decide, decide-all, flag)
and sources (create, update, delete, list, view).

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-02 14:37:29 +02:00
Émile Ré
f3982f23f9 Sanitize upon saving
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:27 +04:00
Émile Ré
745c52537d Add promisemirror markdown capabilities
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:25 +04:00
Sacha Al Himdani
851e585b9b Add ISC license headers to Go, TypeScript, and SQL files
Add ISC license headers to all .go, .ts, .tsx, and .sql files
using each file's git history to determine the correct copyright
year or year range. Trademarked icons (brand logos, vendor logos,
compliance framework logos) are excluded.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-31 13:31:30 +02:00
Bryan Frimin
619ec7b882 Add AI-powered evidence description generation
Introduce a background worker that automatically generates
compliance-focused descriptions for uploaded evidence files
using configurable LLM providers. Descriptions are surfaced
across all interfaces: GraphQL API, MCP API, CLI, and the
console UI.

Key changes:
- Multi-provider LLM config with per-agent settings (pointer
  types for Temperature/MaxTokens to preserve zero values)
- Evidence description worker with bounded concurrency
- EvidenceDescriptionStatus typed enum with PostgreSQL enum type
- New `prb evidence` CLI commands (list, view, delete)
- Evidence description displayed in console table and preview
- Migration only marks evidences without files as completed

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-26 14:32:41 +01:00
Bryan Frimin
7b320916af Add audit log feature for recording all actions
Adds audit logging that records all authorized actions performed by
users and API keys. The audit log is automatically populated whenever
the authorizer approves an action, and is queryable via GraphQL, MCP,
and CLI interfaces. Permission checks are excluded via a dry-run flag
to avoid phantom entries on page loads.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-21 19:16:19 +01:00
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
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
042fd29e93 Handle case-insensitive URI schemes in host normalization
URI schemes are case-insensitive per RFC 3986, so HTTP:// and HTTPS://
must also be recognized when checking for existing schemes.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-18 17:28:05 +01:00
Bryan Frimin
0f1fc2f069 Fix CLI URL scheme handling when using http:// addresses
The browse command and config loading were incorrectly prepending https:// to hosts that already had a scheme, resulting in malformed URLs like https://http://localhost:8080. Added normalizeHost() function to strip URL schemes when loading config, and added scheme detection in the browse command before prepending https://.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-18 17:19:44 +01:00
Bryan Frimin
ad0cf38e76 Add finding CLI commands
Add prb finding subcommands: create, list, view, update, and delete.
Register the finding command group in the root command and update
the factory to expose FindingService.

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
364c193d33 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 17:19:02 +01:00
Bryan Frimin
842bbfbe97 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 16:54:48 +01:00
Bryan Frimin
7e86d2c89f Rename proboctl CLI binary to prb
Shorter CLI name for faster typing. Renames the binary, build targets,
goreleaser config, command examples, and documentation.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:51 +01:00
Bryan Frimin
1f1df63676 Add proboctl CLI AGENTS.md
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:51 +01:00
Bryan Frimin
779f549530 Fix missing __typename checks and standalone var declarations
Add __typename to GraphQL queries and type guards in risk view,
risk list, user view, and user list commands to prevent silent
garbage output when a wrong node type ID is passed. Wrap
standalone var declarations in var () blocks per style guide.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:50 +01:00
Bryan Frimin
0438b8457d Clear active host on logout
When logging out of the active host while other hosts exist,
the stale ActiveHost reference caused DefaultHost() to silently
fall through to the first alphabetical host instead of treating
the user as logged out.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:50 +01:00
Bryan Frimin
a8ac1fa2a1 Add proboctl webhook commands
Add CRUD commands for webhook subscriptions and a command
to list webhook events.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:50 +01:00
Bryan Frimin
f1a028c4f1 Add proboctl statement of applicability commands
Add CRUD commands for statements of applicability and their
applicability statements (add, list, remove, update).

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:50 +01:00
Bryan Frimin
04cb9e08fb Add proboctl framework and control commands
Add create, list, view, update, and delete commands
for managing frameworks and controls.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:49 +01:00
Bryan Frimin
5a230278b2 Add proboctl risk commands
Add create, list, view, update, and delete commands
for managing risks.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:49 +01:00
Bryan Frimin
b313fbb951 Add proboctl org and user commands
Add organization list and user list/view commands.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:49 +01:00
Bryan Frimin
72c15b2a17 Add proboctl browse command
Add a command to open Probo resources in the web browser.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:49 +01:00
Bryan Frimin
94673d4ee2 Add proboctl config commands
Add get, set, and list commands for managing CLI
configuration values.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:48 +01:00
Bryan Frimin
907ba623e8 Add proboctl api command
Add a raw API command for executing GraphQL queries
directly against the Probo API.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:48 +01:00
Bryan Frimin
95d83872bc Add proboctl auth commands
Add login, logout, and status commands for managing
authentication with the Probo API.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:48 +01:00
Bryan Frimin
6919b9372a Add proboctl core skeleton and build system
Introduce the proboctl CLI entry point, root command, version,
completion, iostreams, shared cmdutil helpers (flags, table, JSON,
time formatting), API client with pagination, config management,
goreleaser configuration, and build system integration.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 15:41:47 +01:00