Commit Graph

27 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
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
Bryan Frimin
ef76a8d2e1 Remove deadcode
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 17:18:02 +01:00
Sacha Al Himdani
c17c53e80f Add compliance frameworks
Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
2026-03-04 10:19:39 +01:00
Bryan Frimin
4bdf941d3a Refactor SOA
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-01-22 10:20:50 -08: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
Émile Ré
427565c521 Add light and dark logo files for frameworks
Signed-off-by: Émile Ré <nemile.re@gmail.com>
2025-12-16 19:02:57 +01: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
c7c889e5ca Add frameworks totalCount support
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-06-09 20:14:47 -07:00
Bryan Frimin
bac6f1a4a0 Improve framework data isolation
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2025-05-23 10:56:07 -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
5a7b0c8ec9 Make framework reference id uniq
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-31 15:28:43 +02:00
gearnode
7321862ba9 First step of mitigation migration
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-27 23:34:35 +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
5bdc474aef Move coredata outside probo service
Signed-off-by: gearnode <bryan@frimin.fr>
2025-03-11 09:38:36 +01:00