STC Converter adalah modul untuk mengubah hasil audit keamanan Smart Contract (via Mythril atau Slither) menjadi format standar STC Analytics, sehingga mudah dieksplorasi, divisualisasikan, dan dikaitkan dengan modul STC lainnya.
-
π Support Tools β Hasil audit dari Mythril & Slither
-
π Auto Converter β Output JSON dikonversi ke:
swc_findings.csvswc_findings.ndjson -
π Integrasi Analytics β Siap diunggah ke STC Analytics untuk eksplorasi lebih lanjut
-
π» UI & CLI Mode:
Mode UI β via Streamlit AppMode CLI β via python -m stc_swc.cli
pip install -r requirements.txt
# jalankan Mythril/Slither sendiri dulu, simpan output JSON ke outputs/
# contoh:
# myth analyze examples/contracts/SimpleBank.sol -o json > outputs/mythril.json
# slither examples/contracts/SimpleBank.sol --json outputs/slither.json
# UI (Streamlit)
streamlit run app_swc_converter.py
# CLI
python -m stc_swc.cli --tool mythril --input outputs/mythril.json --out-dir outputsswc_findings.csv β tabel hasil audit dalam format tabular
swc_findings.ndjson β format JSON baris-per-baris untuk pipeline data
flowchart TD
Mythril["π§ Mythril Output (.json)"]
Slither["π‘ Slither Output (.json)"]
Converter["π STC Converter<br/>(CSV / NDJSON)"]
Analytics["π STC Analytics"]
Mythril --> Converter
Slither --> Converter
Converter --> Analytics
graph TD
%% ==== Sources ====
subgraph Sources
TX["On-chain Tx / RPC"]
AUD1["Mythril Output (.json)"]
AUD2["Slither Output (.json)"]
APP["Operational CSV/XLSX\n(booking, payment, dll)"]
end
%% ==== Processing / ETL ====
subgraph Processing
CONV["STC Converter\n(CSV / NDJSON)"]
ETL["ETL / Cleaning\n(pandas)"]
CACHE["Light Cache\n(app / viz)"]
end
%% ==== Storage ====
subgraph Storage
DL["Data Lake\n(NDJSON / CSV)"]
LOG["Logs / Metrics"]
end
%% ==== Apps ====
subgraph Apps
INS["STC Insight\n(EDA Streamlit)"]
ANL["STC Analytics\n(Dashboard)"]
GAS["STC GasVision\n(Gas Tracker)"]
end
%% ==== Monitoring ====
subgraph Ops
CI["CI/CD\n(GitHub Actions)"]
MON["Uptime / Monitoring"]
end
%% Flows
AUD1 --> CONV
AUD2 --> CONV
APP --> ETL
TX --> GAS
CONV --> DL
ETL --> DL
DL --> INS
DL --> ANL
GAS --> LOG
INS --> CACHE
ANL --> CACHE
CI --- INS
CI --- ANL
CI --- GAS
MON --- INS
MON --- ANL
MON --- GAS
flowchart LR
A["Mythril Output (.json)"] --> C["STC Converter\n(CSV / NDJSON)"]
B["Slither Output (.json)"] --> C
C --> D["STC Analytics\n(Dashboard)"]
C --> E["STC Insight\n(EDA)"]
D --> F["Export Laporan / CSV"]
E --> G["Explorasi / Chart"]
flowchart LR
OP["Operational CSV/XLSX"] --> CLEAN["Cleaning & Normalize"]
CLEAN --> MAP["Mapping Kolom\n(x, y, category, date)"]
MAP --> DL["Data Lake\n(NDJSON/CSV)"]
DL --> INS["STC Insight\n(EDA Streamlit)"]
DL --> ANL["STC Analytics\n(Dashboard)"]
INS --> OUT1["Export PNG/CSV"]
ANL --> OUT2["Export CSV / Report"]
STC Converter bukan modul yang berdiri sendiri β hasil konversinya didesain untuk langsung βplug & playβ dengan ekosistem STC lain:
-
β‘ STC Analytics β eksplorasi hasil audit, filter severity, heatmap, dashboard interaktif.
-
πΈ STC GasVision β gabungkan dengan data biaya gas untuk evaluasi performa kontrak.
-
π STC Insight β dashboard insight lintas modul untuk laporan komprehensif.
-
π§ͺ STC Bench (Dev) β (coming soon) benchmark performa kontrak + integrasi hasil audit.
Dengan integrasi ini, STC Converter jadi jembatan penting antara static analyzer tools dan ekosistem STC.
Hasil konversi siap dipakai langsung di STC Analytics dengan format standar:
finding_id,timestamp,network,contract,file,line_start,line_end,swc_id,title,severity,confidence,status,remediation,commit_hash
Mythril::SWC-101::12,2025-08-14T10:22:01.120Z,Sepolia,SimpleBank,SimpleBank.sol,12,20,SWC-101,Arithmetic Overflow,High,0.9,Open,Use SafeMath,0x123abc...
-
π Support tambahan untuk tool lain (Oyente, Securify, Manticore).
-
π¦ Opsi ekspor ke format lain (Parquet / Feather) untuk big data pipeline.
-
π Integrasi ke STC Insight API untuk otomatisasi laporan audit.
-
π Visualisasi dasar (severity pie chart) langsung di UI converter.
MIT License Β© ELPEEF Dev Team