Commit Graph

37 Commits

Author SHA1 Message Date
Sacha Al Himdani
4c57d201a4 Make license declarations consistently MIT
The source headers, LICENSE files, and license metadata had drifted
apart. Align the entire project to MIT:

- Convert every source-file header to the MIT text across all comment
  styles (Go, TS, TSX, JS, MJS, SQL, CSS, GraphQL, shell), including
  SPDX-License-Identifier tags
- Set the root and cookie-banner LICENSE files to the MIT text with a
  "MIT License" title line
- Switch the package.json license fields, Docker image label, and
  cookie-banner README to MIT
- Update docs and the genmodels header generator accordingly
- Normalize copyright lines to a single format
  (Copyright (c) <year(s)> Probo Inc <hello@probo.com>.): unify the
  hello@getprobo.com and hello@probo.inc emails to hello@probo.com and
  the comma-separated years to a hyphenated range

Genuine third-party references are intentionally left untouched: the
Lucide icon attributions (Lucide is ISC) and the trivy dependency
license allowlist.

Signed-off-by: Sacha Al Himdani <sacha@probo.com>
2026-07-13 16:21:14 +02:00
Bryan Frimin
771edcc4fd Harden LoadByIDs func
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-07-03 10:11:50 +02:00
Sacha Al Himdani
9ac71f948f Update contact email to hello@probo.com
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-06-09 16:45:23 +02:00
Bryan Frimin
bd04f1812a Style
Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-23 14:07:37 -07:00
Bryan Frimin
b39d880c0f Switch AuthorizationAttributes to batch and add AuthorizeBatch
Change AuthorizationAttributer.AuthorizationAttributes to take a slice
of resource ids and return policy.AttributesByID, so a single SQL
round-trip can load condition attributes for a whole batch. All
coredata implementations are migrated to a single
`WHERE id = ANY(@resource_ids::text[])` query that returns only the
rows it finds.

Authorizer gains:
  - AuthorizeBatch — all-or-nothing across a homogeneous (same entity
    type, same organization) resource set; rejects mixed entity types,
    mixed organizations, and empty batches with structured errors.
  - AuthorizeMulti — heterogeneous evaluation that returns one error
    per item and writes audit log entries in a single bulk insert.

The single-resource Authorize is rewired to delegate to AuthorizeBatch
so all paths share the same condition evaluation and audit logging.
recordAuditLog is split into buildAuditLogEntry plus a batch insert.

Tests cover the new batch and multi paths, mixed/empty/unsupported
resource cases, audit log batching, and dry-run behaviour.

Signed-off-by: Bryan Frimin <bryan@probo.com>
2026-05-23 13:31:36 -07:00
Émile Ré
f5703d390b Enforce Go style rules across codebase
Apply five style rules: convert iota string enums to typed
string constants, replace errors.As with errors.AsType,
merge three-group imports into two groups, fix multiline
parameter/argument formatting, and replace fmt.Sprintf URL
construction with net/url.

Signed-off-by: Émile Ré <emile@probo.com>
2026-05-20 11:46:39 +04:00
Émile Ré
9156d6a16a Add wsl linter and fix
Signed-off-by: Émile Ré <emile@probo.com>
2026-05-20 09:27:28 +04:00
Bryan Frimin
f17fb7bf49 Upgrade to kit v0.3.0
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-04-03 11:56:06 +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
Sacha Al Himdani
257cbcf826 Add task priority field
Introduce a rank-style priority on tasks, scoped by
(organization_id, state). New tasks auto-assign the next
priority. Reordering uses the same CTE-based algorithm as
trust center references and compliance external URLs.
Exposed through GraphQL, MCP, and the PRIORITY order field.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-27 15:47:12 +01:00
Bryan Frimin
e74c0a11c6 Update copyright headers to 2025-2026 for modified files
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-25 15:19:47 +01:00
Bryan Frimin
d24712344e Add GraphQL dataloaders for batched record lookups
Introduce dataloadgen-based dataloaders to batch individual
record-by-ID fetches in GraphQL resolvers into single SQL
queries. Each entity type (organization, framework, control,
vendor, document, risk, measure, task, file, report, profile)
gets a LoadByIDs method in coredata and a GetByIDs service
method with variadic arguments and dedicated collection return
types. Resolvers now use dataloader.FromContext instead of
direct service calls for single-record lookups.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-25 15:19:46 +01:00
Émile Ré
d7e1703ff3 Fix coredata SQL queries using new FKs columms
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-02-12 16:21:10 +04:00
Émile Ré
e156a428d4 Stop using coredata.People except for people service and people page resolvers
Signed-off-by: Émile Ré <emile@getprobo.com>
2026-02-12 16:21:09 +04:00
Bryan Frimin
4013b00841 Refactor policies document
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-01-17 11:37:39 -08:00
Bryan Frimin
74fc3b8cd1 Rewrite identity and access management
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-01-17 10:07:34 -08:00
Sacha Al Himdani
288c59a5f2 Make descriptions nullable
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-11-05 17:58:50 +01:00
Bryan Frimin
59aa332ab5 Move to vanity import url
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-10-31 17:01:52 +01:00
Sacha Al Himdani
9a33f7b771 Manage errors
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-10-31 15:14:56 +01:00
Bryan Frimin
b1fe040e43 Add tasks totalCount support
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-06-09 21:32:03 -07:00
Sacha Al Himdani
7a3c782e1a Format tasks code
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2025-06-05 11:41:10 -07:00
Andreas Reußner
fc008c27f4 Add deadline on task
Signed-off-by: Andreas Reußner <andreas.reussner@outlook.de>
2025-06-05 11:32:46 -07:00
Bryan Frimin
046c42eb48 Add tasks page
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-05-05 22:34:04 -07:00
Bryan Frimin
1cac29f8ef Fix typo on measure
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-04-30 14:07:14 -07:00
gearnode
3711bb4bbb Rename mitigation into mesure
Signed-off-by: gearnode <bryan@frimin.fr>
2025-04-12 21:09:49 -07:00
gearnode
e8dc868edf Add mitigation with task and mapping import
Signed-off-by: gearnode <bryan@frimin.fr>
2025-04-01 18:02:43 +02:00
gearnode
1867c79aad Add mitigation views
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-28 14:19:36 +01:00
gearnode
483a620fe7 Rename control to mitigation
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-27 13:07:27 +01:00
gearnode
5887144054 Allow to edit time estimate
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-24 11:09:50 +01:00
gearnode
7efae81113 Make task time estimate optional
close #38

Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-19 13:08:27 +01:00
gearnode
5a1f873d58 Use dedicated type for each order field
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-19 00:20:05 +01:00
gearnode
c73e417e5c Refactor model cursor to use orderBy
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-18 18:16:14 +01:00
gearnode
a2d372ea0e Fix change task state not visible on UI
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-17 13:24:24 +01:00
gearnode
0120fb8414 Fix cannot delete task
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-16 18:44:17 +01:00
gearnode
8cbe08d136 Add assigned people to a task
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-13 10:08:31 +01:00
gearnode
376edd927d Add task time estimate
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-13 09:14:08 +01:00
gearnode
5bdc474aef Move coredata outside probo service
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-11 09:38:36 +01:00