Commit Graph

1527 Commits

Author SHA1 Message Date
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
Aurélien Sibiril
b571b074db Add access review MCP tools
Add MCP tool definitions and resolvers for access review
campaigns, sources, entries, decisions, and flags. Wire
accessreview.Service into the MCP Resolver.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-02 14:37:29 +02:00
Aurélien Sibiril
ebfc0b7e31 Add access review console GraphQL API
Add queries, mutations, and types for access review
campaigns, access sources, access entries with decisions
and flags, connector provider info, and provider org
listing. Wire accessreview.Service into the Resolver.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-02 14:37:29 +02:00
Aurélien Sibiril
46dee27bcf Add connector infrastructure for access review
Add API key connector protocol, OAuth2 client credentials
grant, token refresh config, provider info endpoint,
ConnectorProviders helper, and bootstrap configs for all
OAuth providers. Move OAuth2 state decode near type.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-02 14:37:29 +02:00
Aurélien Sibiril
314984aa98 Add RFC 5988 link header parser
Extract link header parsing into a reusable pkg/rfc5988
package with Parse and FindByRel functions, used by
Sentry and GitHub drivers for pagination.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-02 14:37:29 +02:00
Aurélien Sibiril
2320e1e0be Add access source drivers
Add Driver interface and implementations for Google
Workspace, Linear, Slack, 1Password, HubSpot, DocuSign,
Notion, Brex, Tally, Cloudflare, CSV, Probo memberships,
Sentry, OpenAI, Supabase, GitHub, Intercom, and Resend.
Include name resolvers, VCR test infrastructure with
cassettes, and RFC 5988 link header parser.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-02 14:37:29 +02:00
Aurélien Sibiril
761840929f Add access review background workers
Add SourceFetchWorker for campaign source fetching
with bounded concurrency and SourceNameWorker for
resolving provider instance names via OAuth connectors.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-02 14:37:29 +02:00
Aurélien Sibiril
5efd5136e2 Add access review domain services
Add AccessSourceService, AccessEntryService,
CampaignService, and ReviewEngine in the accessreview
package. Service exposes tenant-scoped sub-service
accessors and an unscoped ResolveEntryOrganizationID.
Register access review actions and policies.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-02 14:37:29 +02:00
Aurélien Sibiril
e4e08f22b7 Add access review data layer and migrations
Add coredata entities for access review campaigns,
access sources, access entries with decision history,
campaign source fetches, and scope systems. Include
migrations, entity type registrations, enum types for
flags, decisions, MFA status, and auth methods.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
2026-04-02 14:37:29 +02:00
Sacha Al Himdani
324f4ce793 Add task priority enum and rename priority to rank
The existing integer priority field represents positional ordering
within a state, not semantic importance. Rename it to rank and
introduce a new priority field with enum values URGENT, HIGH,
MEDIUM and LOW across the entire stack.

Rank is now scoped to (state, priority) so tasks are ordered
within each priority group. A generated priority_rank column
combines both fields into a single sortable integer for cursor
pagination.

Dragging a task across priority groups updates its priority
automatically based on the drop position neighbors. The backend
first moves the task to the new group then repositions it at the
target rank.

The migration defaults existing rows to MEDIUM priority and
backfills ranks per (state, priority) group.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-02 13:35:39 +02:00
Bryan Frimin
a2f0a37b7b Add UNKNOWN and NOT_IMPLEMENTED measure states
Introduce two new measure states across the full stack: database
migration, Go coredata, GraphQL schema, MCP specification, and
frontend UI (labels, badge variants, and colors).

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-02 10:59:25 +02:00
Émile Ré
d069201899 MCP takes markdown input for document version content
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 21:33:12 +04:00
Émile Ré
7afab9487c Convert html blocks inside table cells
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 21:32:39 +04:00
Émile Ré
9baeab4889 Add table conversion
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 20:56:37 +04:00
Émile Ré
821f66cc20 Review fixes
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 19:53:25 +04:00
Émile Ré
e5b155a584 Remove useless CLI
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 19:01:00 +04:00
Émile Ré
9bbcba68c0 Add mermaid tiptap extension
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:04:36 +04:00
Émile Ré
a03a2deae1 Fix lint & test
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:28 +04:00
Émile Ré
dda6e41102 Fix html conversion of soft line breaks + rel attr for _blank link targets
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:27 +04:00
Émile Ré
a461410fed prosemirror html conversion unwrapping + table rows collection
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:27 +04: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é
62e68dfb6f Fix html block to prosemirror default table colspan & rowspan
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:27 +04:00
Émile Ré
9781c7534f Handle mardown html elements parsing with sanitization
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:27 +04:00
Émile Ré
4bb009f25b Handle validation errors
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:26 +04:00
Émile Ré
12a6c21d74 Add missing MCP tool
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:26 +04:00
Émile Ré
be189693ae Use json.RawMessage for document data content
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:26 +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
Émile Ré
7dcfa90672 Remove arbitrary h2 sibiling page breaks
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:25 +04:00
Émile Ré
2c3261354d Add blockquote style
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:25 +04:00
Émile Ré
e71e7f1a45 Use prosemirror pkg to render document PDF
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:25 +04:00
Émile Ré
1e55bccdf8 Rename prosemirror file
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:25 +04:00
Émile Ré
79a4e7c781 Create prosemirror structs and HTML conversion logic
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:24 +04:00
Émile Ré
339cc142b5 Fix document creation req validation
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:24 +04:00
Émile Ré
cada5e010c Fix after rebase
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:24 +04:00
Émile Ré
cc1a53e17c Keep allowing to pass content on document creation for use cases other than frontend app
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:22 +04:00
Émile Ré
3a054c70ba Implement debounced auto save
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-04-01 18:03:17 +04:00
Sacha Al Himdani
1b811011eb Split employee document policy from core document actions
Introduce dedicated employee-scoped IAM actions and update all
resolvers and frontend mutations accordingly.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-04-01 15:00:54 +02:00
Sacha Al Himdani
2d11038232 Add document classification filter
Add classification as a filter-only field on documents, resolved from
the latest document version. Expose in GraphQL, MCP, and document list
UI with a selector alongside the document type filter.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-31 17:36:26 +02:00
Émile Ré
4a6cbdc97b Fix tests
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-31 19:16:56 +04:00
Émile Ré
bd3869e0f0 Remove gif from allowed image types
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-31 19:05:46 +04:00
Émile Ré
687148e2c1 Unify dropzone accept prop with accept helpers
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-03-31 19:05:46 +04:00
Sacha Al Himdani
6baa111fed Fix chi middleware panic in trust API mux
The session-transfer route was registered before the session and member
provisioning middlewares, causing chi to panic with "all middlewares must
be defined before routes on a mux". Scope the middlewares to the graphql
route using r.Group so session-transfer remains unauthenticated.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-31 16:35:47 +02:00
Bryan Frimin
b58a7e8325 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-31 15:04:57 +02:00
Bryan Frimin
bb910b4314 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-31 14:49:21 +02:00
Bryan Frimin
8095ac6233 Validate session transfer redirect with saferedirect
The session transfer handler was blindly redirecting to the continue URL
from the signed token. Use saferedirect with a trust center domain check
to prevent open redirects, and only trigger session transfer for known
trust center custom domains instead of any non-base-URL host.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-31 14:49:21 +02:00
Bryan Frimin
84a35c90e9 Add session transfer for SSO cookies on custom domains
After OIDC login, if the redirect targets a trust center custom
domain, the callback now redirects through a session-transfer
endpoint on that domain. The endpoint verifies an HMAC-signed,
time-limited token and sets the session cookie on the custom
domain before redirecting to the final URL.

The continue URL is bound into the signed token payload to
prevent open-redirect attacks via parameter tampering.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-31 14:49:20 +02:00
Sacha Al Himdani
5d6d0bdd7f Move document classification from document to document version
Classification now lives exclusively on DocumentVersion. The field is
removed from the Document model, all SQL queries, GraphQL Document
type, SignableDocument type, UpdateDocumentInput, and MCP Document
schema.

New documents still accept classification in CreateDocumentInput,
applied to the first version. New drafts inherit classification from
the previous version. PDF generation uses the version classification.

The drawer allows editing classification on draft versions via the
updateDocumentVersion mutation. Classification is read-only on
published versions.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-31 14:11:57 +02: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
419c93fc7d Fix compliance page login redirect to custom domains
SafeRedirect previously matched against a single static host string,
so OIDC callbacks always fell back to the console instead of
redirecting back to compliance pages on custom domains. Refactor
AllowedHost into a dynamic AllowedHostFunc and wire a trust-service
lookup into the connect handler so custom domain hosts are accepted.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-31 10:51:34 +02:00
Sacha Al Himdani
68bc8cf59a Add major.minor document versioning
Introduce a two-part version scheme (major.minor) for documents.
Drafts start at 0.1 and increment minor on each new draft. Publishing
as minor keeps the current version, publishing as major bumps to the
next major.0. Both current_published_major and current_published_minor
are tracked on the document for exact version lookups.

Signatures and approval quorums aggregate across all versions sharing
the same major number using CTE joins. Approval page mutations spread
the decision fragment so Relay updates the version row state without
requiring a page refresh.

GraphQL, MCP, and service layer expose separate publishMajor and
publishMinor mutations instead of a single mutation with a type enum.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-30 18:54:28 +02:00