Commit Graph

1408 Commits

Author SHA1 Message Date
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
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
d92632933b Fix bootstrap YAML round-trip tests
Replace gopkg.in/yaml.v3 with sigs.k8s.io/yaml in write_test.go to match
the marshaling library used by WriteConfig. The sigs.k8s.io/yaml library
uses JSON struct tags, enabling proper round-trip serialization of configs
with custom unmarshaling logic like ConnectorConfig.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-18 15:35:01 +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
Bryan Frimin
312e30d9e4 Add sandbox-specific probod config generation
Add a make target for probod-bootstrap and integrate it into the sandbox provisioning workflow. During VM provisioning, generate /etc/probod/config.yml with the Lima VM IP as the cookie domain, secure=false for HTTP access, and correct CORS origins. Also generate .env files for console and trust apps pointing to the VM IP. Update sandbox documentation to explain the auto-generated configuration.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-18 15:06:37 +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
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
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
Bryan Frimin
123e5c36b7 Add finding service layer
Introduce FindingService with create, update, delete, get, and list
operations including audit association management. Update the probo
service orchestration, actions, and policies to use findings.

Remove the old NonconformityService and ContinualImprovementService.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-17 15:05:31 +01:00
Bryan Frimin
bf276cd3db Add finding coredata types and queries
Introduce the Finding, FindingAudit, FindingKind, FindingStatus,
FindingPriority, FindingFilter, and FindingOrderField types in the
coredata layer. Add CRUD operations, list with filtering/pagination,
and audit association queries.

Remove the now-replaced nonconformity and continual_improvement
coredata types. Update entity type registry and snapshot types
to reference the new findings type.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-17 15:05:31 +01:00
Bryan Frimin
736436e997 Add database migration to merge findings
Merge nonconformities and continual_improvements tables into a
unified findings table with kind (NONCONFORMITY, OBSERVATION,
EXCEPTION), status, and priority enums. Create findings_audits
junction table for the many-to-many audit relationship.

The migration generates new FND-XXX reference IDs per organization,
migrates both live and snapshot records preserving source_id links,
and carries over audit associations to the junction table.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-17 15:05:30 +01:00
Bryan Frimin
72d2f85ed2 Hide meetings menu from auditors
Auditors should not see the meetings menu in the navigation bar since they lack the necessary permissions to access meetings.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-17 14:32:18 +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
8819b69d2d Support http:// hosts in CLI client for local development
The CLI client was hardcoding https:// scheme, which prevents local dev with http://localhost. Add support for bare hostnames (auto-prepend https) while preserving http:// and https:// prefixes when explicitly provided.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-17 08:50:48 +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
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
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
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
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
6a77d42dd6 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-16 00:28:47 +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
76f781ead1 Clear conflicting external_id when enrolling manual profile into SCIM
When a SCIM provider sends CreateUser for a user whose email matches an
existing manual profile, but another profile already holds that
external_id (e.g. created by a prior CreateUser with a different email),
clear the conflicting external_id before enrolling the manual profile.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-14 12:40:26 +01:00
Bryan Frimin
2f76eaf4ae Clear external_id and user_name when resetting SCIM sources
When a SCIM configuration is deleted, ResetSCIMSources now clears
external_id and user_name so stale values don't cause unique constraint
violations when SCIM is reconfigured.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-14 12:40:26 +01:00
Bryan Frimin
a3af41e6a1 Use errors.AsType in MembershipProfile.Insert
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-14 12:40:25 +01:00
Bryan Frimin
5d2b394bac Include error in tool_end event for interrupted tools
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-14 12:28:26 +01:00
Bryan Frimin
d01ee914c1 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 20:00:22 +01:00
Bryan Frimin
deac1538e5 Style
Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:58:02 +01:00
Bryan Frimin
d80a0fa7e4 Reject null input in agent tool parameter validation
JSON null unmarshals into an empty string, so the presence-only
key check let {"input":null} through, running the nested agent
with a blank user message.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:57:18 +01:00
Bryan Frimin
9d999559f1 Emit OnToolEnd hooks for interrupted and failed tools
executeSingleTool had three exit paths but only the success path
emitted all end signals. The interrupted path (nested agent
approval) skipped OnToolEnd and StreamEventToolEnd entirely,
leaving hook consumers with an unpaired OnToolStart. The error
path also missed StreamEventToolEnd and AgentHooks.OnToolEnd.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:53:08 +01:00
Bryan Frimin
5c889a1d47 Fall back to StructuredContent in MCP tool results
When an MCP server sets StructuredContent without populating
Content with TextContent entries, extractMCPContent returned
an empty string, making successful tool calls look empty to
the agent. Now the function serializes StructuredContent as
JSON when no text parts are found.

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
2026-03-13 19:43:19 +01:00