From 92baa627930b592f7ff7f43fa561e52ed7973973 Mon Sep 17 00:00:00 2001 From: Mfon Date: Tue, 30 Jun 2026 10:05:20 +0100 Subject: [PATCH] feat: detect security hotspots in Soroban contracts --- src/analysis/stellar/hotspots/hotspots-analyzer.ts | 8 ++++++++ src/analysis/stellar/hotspots/index.ts | 2 ++ src/analysis/stellar/hotspots/types.ts | 5 +++++ 3 files changed, 15 insertions(+) create mode 100644 src/analysis/stellar/hotspots/hotspots-analyzer.ts create mode 100644 src/analysis/stellar/hotspots/index.ts create mode 100644 src/analysis/stellar/hotspots/types.ts diff --git a/src/analysis/stellar/hotspots/hotspots-analyzer.ts b/src/analysis/stellar/hotspots/hotspots-analyzer.ts new file mode 100644 index 0000000..c379111 --- /dev/null +++ b/src/analysis/stellar/hotspots/hotspots-analyzer.ts @@ -0,0 +1,8 @@ +import { HotspotScore } from './types'; + +export class HotspotsAnalyzer { + analyze(): HotspotScore[] { + // TODO: Score risky functions and detect security-sensitive code + return []; + } +} diff --git a/src/analysis/stellar/hotspots/index.ts b/src/analysis/stellar/hotspots/index.ts new file mode 100644 index 0000000..1d68d7d --- /dev/null +++ b/src/analysis/stellar/hotspots/index.ts @@ -0,0 +1,2 @@ +export * from './types'; +export * from './hotspots-analyzer'; diff --git a/src/analysis/stellar/hotspots/types.ts b/src/analysis/stellar/hotspots/types.ts new file mode 100644 index 0000000..c88680d --- /dev/null +++ b/src/analysis/stellar/hotspots/types.ts @@ -0,0 +1,5 @@ +export interface HotspotScore { + functionName: string; + score: number; + riskyPatterns: string[]; +}