feat: add security sink detection patterns for JavaScript/TypeScript

- Introduced `sink-detect.js` with various security sink detection patterns categorized by type (e.g., command injection, SQL injection, file operations).
- Implemented functions to build a lookup map for fast sink detection and to match sink calls against known patterns.
- Added `package-lock.json` for dependency management.
This commit is contained in:
StellaOps Bot
2025-12-22 23:21:21 +02:00
parent 3ba7157b00
commit 5146204f1b
529 changed files with 73579 additions and 5985 deletions

View File

@@ -13,6 +13,7 @@ using StellaOps.VexLens.Observability;
using StellaOps.VexLens.Options;
using StellaOps.VexLens.Storage;
using StellaOps.VexLens.Trust;
using StellaOps.VexLens.Trust.SourceTrust;
using StellaOps.VexLens.Verification;
namespace StellaOps.VexLens.Extensions;
@@ -87,9 +88,22 @@ public static class VexLensServiceCollectionExtensions
// Issuer directory - use in-memory by default, can be replaced
services.TryAddSingleton<IIssuerDirectory, InMemoryIssuerDirectory>();
// Trust engine
// Trust engine (statement-level)
services.TryAddSingleton<ITrustWeightEngine, TrustWeightEngine>();
// Source trust scoring (source-level)
services.TryAddSingleton(Microsoft.Extensions.Options.Options.Create(
SourceTrustScoreConfiguration.CreateDefault()));
services.TryAddSingleton<IAuthorityScoreCalculator, AuthorityScoreCalculator>();
services.TryAddSingleton<IAccuracyScoreCalculator, AccuracyScoreCalculator>();
services.TryAddSingleton<ITimelinessScoreCalculator, TimelinessScoreCalculator>();
services.TryAddSingleton<ICoverageScoreCalculator, CoverageScoreCalculator>();
services.TryAddSingleton<IVerificationScoreCalculator, VerificationScoreCalculator>();
services.TryAddSingleton<ISourceTrustScoreCache, InMemorySourceTrustScoreCache>();
services.TryAddSingleton<ISourceTrustScoreCalculator, SourceTrustScoreCalculator>();
services.TryAddSingleton<IProvenanceChainValidator, ProvenanceChainValidator>();
services.TryAddSingleton<ITrustDecayService, TrustDecayService>();
// Consensus engine
services.TryAddSingleton<IVexConsensusEngine, VexConsensusEngine>();