initial-commit

This commit is contained in:
Guillaume GRABÉ
2026-05-12 17:06:43 +02:00
commit 051a080dfa
110 changed files with 26377 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
syntax = "proto3";
package charybdis.core;
import "core/common.proto";
// APIMetadata represents identifying information for an API entity
// An API is a contract for data exchange between software components
message APIMetadata {
// Required: The name of the API
string name = 1;
// Optional: Namespace for organizational grouping (default: "default")
string namespace = 2;
// Optional: Human-readable description of the API
string description = 3;
// Optional: Labels for categorization and filtering
// Key-value pairs (e.g., "protocol": "rest", "version": "v1")
map<string, string> labels = 4;
// Optional: Tags for additional classification
repeated string tags = 5;
// Optional: Links to external resources
repeated Link links = 6;
}
// APISpec represents configuration for an API entity
message APISpec {
// Required: Type of API definition
// Standard types: "openapi", "grpc", "graphql", "asyncapi", "rest"
string type = 1;
// Required: Lifecycle stage (e.g., "production", "experimental", "deprecated")
string lifecycle = 2;
// Required: Owner team or individual (references a Group or User entity)
string owner = 3;
// Optional: System this API belongs to (references a System entity)
string system = 4;
// Required: The API definition itself
// For OpenAPI: the full OpenAPI spec in YAML or JSON
// For gRPC: the .proto file content or reference
// For GraphQL: the schema definition
string definition = 5;
}
+19
View File
@@ -0,0 +1,19 @@
syntax = "proto3";
package charybdis.core;
// Link represents an external URL reference
// Used across all entity types for documentation, dashboards, etc.
message Link {
// URL to the external resource
string url = 1;
// Human-readable title for the link
string title = 2;
// Optional: Icon identifier (e.g., "github", "dashboard", "docs")
string icon = 3;
// Optional: Type of link (e.g., "documentation", "monitoring", "repository")
string type = 4;
}
+55
View File
@@ -0,0 +1,55 @@
syntax = "proto3";
package charybdis.core;
import "core/common.proto";
// ComponentMetadata represents identifying information for a component entity
// A component is a software component (service, website, library, etc.)
message ComponentMetadata {
// Required: The name of the component
string name = 1;
// Optional: Namespace for organizational grouping (default: "default")
string namespace = 2;
// Optional: Human-readable description of the component
string description = 3;
// Optional: Labels for categorization and filtering
// Key-value pairs (e.g., "environment": "production", "team": "payments")
map<string, string> labels = 4;
// Optional: Tags for additional classification
repeated string tags = 5;
// Optional: Links to external resources
repeated Link links = 6;
}
// ComponentSpec represents configuration for a component entity
message ComponentSpec {
// Required: Type of component (e.g., "service", "website", "library", "documentation")
string type = 1;
// Required: Lifecycle stage (e.g., "production", "experimental", "deprecated")
string lifecycle = 2;
// Required: Owner team or individual (references a Group or User entity)
string owner = 3;
// Optional: Parent system this component belongs to (references a System entity)
string system = 4;
// Optional: Sub-component of another component (references a Component entity)
string subcomponent_of = 5;
// Optional: Components this component depends on (references Component entities)
repeated string depends_on = 6;
// Optional: APIs this component provides (references API entities)
repeated string provides_apis = 7;
// Optional: APIs this component consumes (references API entities)
repeated string consumes_apis = 8;
}
+34
View File
@@ -0,0 +1,34 @@
syntax = "proto3";
package charybdis.core;
import "core/common.proto";
// DomainMetadata represents identifying information for a domain entity
// A domain is a high-level organizational boundary (e.g., "payments", "identity")
message DomainMetadata {
// Required: The domain name
string name = 1;
// Optional: Namespace for organizational grouping (default: "default")
string namespace = 2;
// Optional: Human-readable description of the domain
string description = 3;
// Optional: Labels for categorization and filtering
// Key-value pairs (e.g., "business-unit": "platform", "priority": "high")
map<string, string> labels = 4;
// Optional: Tags for additional classification
repeated string tags = 5;
// Optional: Links to external resources
repeated Link links = 6;
}
// DomainSpec represents configuration for a domain entity
message DomainSpec {
// Required: Owner team or individual (references a Group or User entity)
string owner = 1;
}
+114
View File
@@ -0,0 +1,114 @@
syntax = "proto3";
package charybdis.core;
import "google/protobuf/timestamp.proto";
// FindingMetadata represents identifying information for a security finding
message FindingMetadata {
// Required: Title of the finding (e.g., "SQL Injection in login handler")
string title = 1;
// Optional: Namespace (default: "default")
string namespace = 2;
// Optional: Detailed description of the vulnerability
string description = 3;
// Optional: Labels for categorization and filtering
map<string, string> labels = 4;
// Optional: Tags (e.g., "owasp-top-10", "cwe-89")
repeated string tags = 5;
}
// FindingSpec contains the security-relevant data for a finding
message FindingSpec {
// Required: Reference to the component this finding belongs to (entity name or UUID)
string component_ref = 1;
// Required: Lifecycle/environment scope (e.g., "production", "integration", "development")
string lifecycle = 2;
// Required: Severity level
Severity severity = 3;
// Required: Current state of the finding
FindingState state = 4;
// Required: Scanner that produced this finding
string scanner = 5;
// Required: Rule/check identifier from the scanner (e.g., "CWE-89", "RUSTSEC-2024-001")
string rule_id = 6;
// Computed: Fingerprint for deduplication (set by reconciliation engine)
string fingerprint = 7;
// Optional: File path where the vulnerability was found
string file_path = 8;
// Optional: Line number in the file
uint32 line_start = 9;
// Optional: End line number (for multi-line findings)
uint32 line_end = 10;
// Optional: CWE identifier (e.g., "CWE-89")
string cwe = 11;
// Optional: CVE identifier (e.g., "CVE-2024-1234")
string cve = 12;
// Optional: CVSS score (0.0 - 10.0)
float cvss_score = 13;
// Optional: Affected package/dependency name
string package_name = 14;
// Optional: Affected package version
string package_version = 15;
// Optional: Fixed version (if known)
string fixed_version = 16;
// Optional: URL to more details (advisory, documentation)
string details_url = 17;
// Timestamp of first detection
google.protobuf.Timestamp first_seen = 18;
// Timestamp of most recent detection
google.protobuf.Timestamp last_seen = 19;
// Optional: Timestamp when the finding was resolved
google.protobuf.Timestamp resolved_at = 20;
// Optional: Scan identifier that produced this finding (for tracing back to CI run)
string scan_id = 21;
}
// Severity levels aligned with CVSS qualitative ratings
enum Severity {
SEVERITY_UNSPECIFIED = 0;
SEVERITY_INFO = 1;
SEVERITY_LOW = 2;
SEVERITY_MEDIUM = 3;
SEVERITY_HIGH = 4;
SEVERITY_CRITICAL = 5;
}
// Finding lifecycle states
enum FindingState {
FINDING_STATE_UNSPECIFIED = 0;
// Active: currently detected by scanner
FINDING_STATE_ACTIVE = 1;
// Resolved: no longer detected by scanner (auto-closed on reimport)
FINDING_STATE_RESOLVED = 2;
// Accepted: risk accepted by human decision
FINDING_STATE_ACCEPTED = 3;
// False positive: marked as not a real issue
FINDING_STATE_FALSE_POSITIVE = 4;
// Reopened: was resolved but detected again
FINDING_STATE_REOPENED = 5;
}
+60
View File
@@ -0,0 +1,60 @@
syntax = "proto3";
package charybdis.core;
import "core/common.proto";
// GroupMetadata represents identifying information for a group entity
// A group represents a team or organizational unit
message GroupMetadata {
// Required: The group name (e.g., "team-a", "engineering")
string name = 1;
// Optional: Namespace for organizational grouping (default: "default")
string namespace = 2;
// Optional: Human-readable description of the group
string description = 3;
// Optional: Labels for categorization and filtering
// Key-value pairs (e.g., "department": "engineering", "cost-center": "1234")
map<string, string> labels = 4;
// Optional: Tags for additional classification
repeated string tags = 5;
// Optional: Links to external resources (e.g., team page, Slack channel)
repeated Link links = 6;
}
// GroupSpec represents configuration for a group entity
message GroupSpec {
// Required: Type of group
// Standard types: "team", "business-unit", "product-area", "root", "department"
string type = 1;
// Optional: Group profile information
GroupProfile profile = 2;
// Optional: Parent group for hierarchy (references a Group entity)
// Leave empty for root-level groups
string parent = 3;
// Optional: Child groups in the hierarchy (references Group entities)
repeated string children = 4;
// Optional: Direct members of this group (references User entities)
repeated string members = 5;
}
// GroupProfile contains detailed profile information
message GroupProfile {
// Display name (e.g., "Engineering Team")
string display_name = 1;
// Group email address
string email = 2;
// Group picture/logo URL
string picture = 3;
}
+44
View File
@@ -0,0 +1,44 @@
syntax = "proto3";
package charybdis.core;
import "core/common.proto";
// ResourceMetadata represents identifying information for a resource entity
// A resource is infrastructure or operational component (database, S3 bucket, cluster, etc.)
message ResourceMetadata {
// Required: The resource name
string name = 1;
// Optional: Namespace for organizational grouping (default: "default")
string namespace = 2;
// Optional: Human-readable description of the resource
string description = 3;
// Optional: Labels for categorization and filtering
// Key-value pairs (e.g., "cloud": "aws", "region": "us-west-2")
map<string, string> labels = 4;
// Optional: Tags for additional classification
repeated string tags = 5;
// Optional: Links to external resources (e.g., AWS console, monitoring dashboard)
repeated Link links = 6;
}
// ResourceSpec represents configuration for a resource entity
message ResourceSpec {
// Required: Type of resource
// Standard types: "database", "s3-bucket", "cluster", "pipeline", "queue", "cache"
string type = 1;
// Required: Owner team or individual (references a Group or User entity)
string owner = 2;
// Optional: System this resource belongs to (references a System entity)
string system = 3;
// Optional: Resources this resource depends on (references other Resource entities)
repeated string depends_on = 4;
}
+55
View File
@@ -0,0 +1,55 @@
syntax = "proto3";
package charybdis.core;
import "core/common.proto";
// ServiceMetadata represents identifying information for a service entity
// Compatible with Backstage Component metadata structure
message ServiceMetadata {
// Required: The name of the service
string name = 1;
// Optional: Namespace for organizational grouping (e.g., "production", "staging")
string namespace = 2;
// Optional: Human-readable description of what this service does
string description = 3;
// Optional: Labels for categorization and filtering
repeated string labels = 4;
// Optional: Tags for additional classification
repeated string tags = 5;
// Optional: Links to external resources
repeated Link links = 6;
}
// ServiceSpec represents configuration and behavior for a service entity
// Compatible with Backstage Component spec structure
message ServiceSpec {
// Type of service (e.g., "backend-service", "frontend", "api", "website")
string type = 1;
// Lifecycle stage (e.g., "production", "experimental", "deprecated")
string lifecycle = 2;
// Owner team or individual (e.g., "team-platform", "john.doe@company.com")
string owner = 3;
// Optional: Parent system this service belongs to
string system = 4;
// Optional: Sub-component of another service
string subcomponent_of = 5;
// Optional: Services this service depends on
repeated string depends_on = 6;
// Optional: Services that provide APIs this service consumes
repeated string consumes_apis = 7;
// Optional: APIs that this service provides
repeated string provides_apis = 8;
}
+37
View File
@@ -0,0 +1,37 @@
syntax = "proto3";
package charybdis.core;
import "core/common.proto";
// SystemMetadata represents identifying information for a system entity
// A system is a collection of services and resources that work together
message SystemMetadata {
// Required: The name of the system
string name = 1;
// Optional: Namespace for organizational grouping (default: "default")
string namespace = 2;
// Optional: Human-readable description of the system
string description = 3;
// Optional: Labels for categorization and filtering
// Key-value pairs (e.g., "environment": "production", "criticality": "high")
map<string, string> labels = 4;
// Optional: Tags for additional classification
repeated string tags = 5;
// Optional: Links to external resources
repeated Link links = 6;
}
// SystemSpec represents configuration for a system entity
message SystemSpec {
// Required: Owner team or individual responsible for this system (references a Group or User entity)
string owner = 1;
// Optional: Domain this system belongs to (references a Domain entity)
string domain = 2;
}
+49
View File
@@ -0,0 +1,49 @@
syntax = "proto3";
package charybdis.core;
import "core/common.proto";
// UserMetadata represents identifying information for a user entity
// A user represents a person in the organization
message UserMetadata {
// Required: The username (e.g., "jdoe", "john.doe")
string name = 1;
// Optional: Namespace for organizational grouping (default: "default")
string namespace = 2;
// Optional: Full name or description
string description = 3;
// Optional: Labels for categorization and filtering
// Key-value pairs (e.g., "department": "engineering", "location": "SF")
map<string, string> labels = 4;
// Optional: Tags for additional classification
repeated string tags = 5;
// Optional: Links to external resources (e.g., GitHub profile, LinkedIn)
repeated Link links = 6;
}
// UserSpec represents configuration for a user entity
message UserSpec {
// Optional: User profile information
UserProfile profile = 1;
// Optional: Groups this user is a member of (references Group entities)
repeated string member_of = 2;
}
// UserProfile contains detailed profile information
message UserProfile {
// Display name (e.g., "John Doe")
string display_name = 1;
// Email address
string email = 2;
// Avatar/picture URL
string picture = 3;
}