mirror of
https://github.com/rohitg00/skillkit.git
synced 2026-11-18 18:04:26 +00:00
Inline fixes:
- Replace greedy JSON regex in behavioral-security.ts runLLMAnalysis
with balanced bracket extraction that correctly handles ] inside
JSON string values
- Replace non-greedy regex in contradiction.ts parseSemanticFindings
with same balanced bracket extraction (non-greedy also breaks on
inner brackets)
- Fix crossValidatedCount in behavioral-security.ts to accumulate
(+= uniqueEngines.size) instead of replacing (Math.max)
- Fix gradeDeterministic: cleanExit && hasOutput without matching
expectedOutcome now returns passed:false score:50 instead of
passed:true score:75
- Docker unavailable returns score:-1 sentinel instead of 0/F;
engine.ts filters score<0 tiers from overall average so
Docker-less machines aren't penalized
Duplicate fix:
- Add score field to SandboxResult type; store gradeResult.score
in each result; compute tier score from average of numeric scores
instead of boolean pass rate
Nitpick fixes:
- Distinguish "Docker unavailable" from "No tests executed" in
formatSandboxDetails
- Tighten base64 obfuscation regex to require 4-char groups
- Only push 'llm' to engines when LLM actually produced findings
- Bound \s+ to \s{1,10} in dynamically constructed regexes in
contradiction.ts to prevent catastrophic backtracking
- Validate cache timestamp with Number.isFinite() in loadCache to
reject corrupted cache files with NaN timestamps