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

@@ -1,10 +1,37 @@
namespace StellaOps.Concelier.Merge.Comparers;
using System.Collections.Immutable;
using StellaOps.VersionComparison;
/// <summary>
/// Result of a version comparison with explainability proof lines.
/// </summary>
/// <param name="Comparison">Negative if left &lt; right, zero if equal, positive if left &gt; right.</param>
/// <param name="ProofLines">Human-readable explanation of comparison steps.</param>
/// <param name="Comparator">The comparator type used.</param>
public sealed record VersionComparisonResult(
int Comparison,
ImmutableArray<string> ProofLines);
ImmutableArray<string> ProofLines,
ComparatorType Comparator)
{
/// <summary>
/// True if the left version is less than the right version.
/// </summary>
public bool IsLessThan => Comparison < 0;
/// <summary>
/// True if the left version equals the right version.
/// </summary>
public bool IsEqual => Comparison == 0;
/// <summary>
/// True if the left version is greater than the right version.
/// </summary>
public bool IsGreaterThan => Comparison > 0;
/// <summary>
/// True if the left version is greater than or equal to the right version.
/// Useful for checking if installed >= fixed.
/// </summary>
public bool IsGreaterThanOrEqual => Comparison >= 0;
}