feat(ruby): Implement RubyManifestParser for parsing gem groups and dependencies
Some checks failed
Docs CI / lint-and-preview (push) Has been cancelled

feat(ruby): Add RubyVendorArtifactCollector to collect vendor artifacts

test(deno): Add golden tests for Deno analyzer with various fixtures

test(deno): Create Deno module and package files for testing

test(deno): Implement Deno lock and import map for dependency management

test(deno): Add FFI and worker scripts for Deno testing

feat(ruby): Set up Ruby workspace with Gemfile and dependencies

feat(ruby): Add expected output for Ruby workspace tests

feat(signals): Introduce CallgraphManifest model for signal processing
This commit is contained in:
master
2025-11-10 09:27:03 +02:00
parent 69c59defdc
commit 56c687253f
87 changed files with 2462 additions and 542 deletions

View File

@@ -16,6 +16,15 @@ public sealed class CallgraphArtifactMetadata
[BsonElement("casUri")]
public string CasUri { get; set; } = string.Empty;
[BsonElement("manifestPath")]
public string ManifestPath { get; set; } = string.Empty;
[BsonElement("manifestCasUri")]
public string ManifestCasUri { get; set; } = string.Empty;
[BsonElement("graphHash")]
public string GraphHash { get; set; } = string.Empty;
[BsonElement("contentType")]
public string ContentType { get; set; } = string.Empty;

View File

@@ -35,7 +35,10 @@ public sealed class CallgraphDocument
[BsonElement("edges")]
public List<CallgraphEdge> Edges { get; set; } = new();
[BsonElement("metadata")]
[BsonIgnoreIfNull]
public Dictionary<string, string?>? Metadata { get; set; }
}
[BsonElement("metadata")]
[BsonIgnoreIfNull]
public Dictionary<string, string?>? Metadata { get; set; }
[BsonElement("graphHash")]
public string GraphHash { get; set; } = string.Empty;
}

View File

@@ -7,4 +7,6 @@ public sealed record CallgraphIngestResponse(
string CallgraphId,
string ArtifactPath,
string ArtifactHash,
string CasUri);
string CasUri,
string GraphHash,
string ManifestCasUri);

View File

@@ -0,0 +1,31 @@
using System;
using System.Text.Json.Serialization;
namespace StellaOps.Signals.Models;
public sealed class CallgraphManifest
{
[JsonPropertyName("language")]
public string Language { get; set; } = string.Empty;
[JsonPropertyName("component")]
public string Component { get; set; } = string.Empty;
[JsonPropertyName("version")]
public string Version { get; set; } = string.Empty;
[JsonPropertyName("graphHash")]
public string GraphHash { get; set; } = string.Empty;
[JsonPropertyName("artifactHash")]
public string ArtifactHash { get; set; } = string.Empty;
[JsonPropertyName("nodeCount")]
public int NodeCount { get; set; }
[JsonPropertyName("edgeCount")]
public int EdgeCount { get; set; }
[JsonPropertyName("createdAt")]
public DateTimeOffset CreatedAt { get; set; }
}

View File

@@ -114,6 +114,26 @@ public sealed class RuntimeFactDocument
[BsonIgnoreIfNull]
public string? LoaderBase { get; set; }
[BsonElement("processId")]
[BsonIgnoreIfNull]
public int? ProcessId { get; set; }
[BsonElement("processName")]
[BsonIgnoreIfNull]
public string? ProcessName { get; set; }
[BsonElement("socketAddress")]
[BsonIgnoreIfNull]
public string? SocketAddress { get; set; }
[BsonElement("containerId")]
[BsonIgnoreIfNull]
public string? ContainerId { get; set; }
[BsonElement("evidenceUri")]
[BsonIgnoreIfNull]
public string? EvidenceUri { get; set; }
[BsonElement("hitCount")]
public int HitCount { get; set; }

View File

@@ -26,6 +26,16 @@ public sealed class RuntimeFactEvent
public string? LoaderBase { get; set; }
public int? ProcessId { get; set; }
public string? ProcessName { get; set; }
public string? SocketAddress { get; set; }
public string? ContainerId { get; set; }
public string? EvidenceUri { get; set; }
public int HitCount { get; set; } = 1;
public Dictionary<string, string?>? Metadata { get; set; }

View File

@@ -1,14 +1,29 @@
using Microsoft.AspNetCore.Mvc;
namespace StellaOps.Signals.Models;
public sealed class RuntimeFactsStreamMetadata
{
[FromQuery(Name = "callgraphId")]
public string CallgraphId { get; set; } = string.Empty;
[FromQuery(Name = "scanId")]
public string? ScanId { get; set; }
[FromQuery(Name = "imageDigest")]
public string? ImageDigest { get; set; }
[FromQuery(Name = "component")]
public string? Component { get; set; }
[FromQuery(Name = "version")]
public string? Version { get; set; }
public ReachabilitySubject ToSubject() => new()
{
ScanId = ScanId,
ImageDigest = ImageDigest,
Component = Component,
Version = Version
};
}