npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

buggy-scanner

v1.2.1

Published

Bug & Vulnerability Scanner CLI — PHP, HTML, CSS, JS, SQL, Python, Flutter/Dart

Readme

🐛 buggy-scanner

Buggy, PHP, HTML, CSS, JavaScript, SQL, Python ve Flutter/Dart projelerini otomatik olarak tarayarak güvenlik açıklarını, bug'ları ve eksiklikleri bulan bir CLI aracıdır.

npm install -g buggy-scanner
buggy .

Özellikler

  • 🔴 Kritik güvenlik açıkları (SQL Injection, XSS, Command Injection, vb.)
  • 🟡 Orta seviye kalite sorunları (deprecated fonksiyonlar, hata yönetimi eksikliği)
  • 🟢 Zayıf iyileştirme önerileri
  • Tahmini düzeltme süresi (bulgu sayısına ve önem derecesine göre)
  • 📄 Otomatik raporbuggy-report.md ve buggy-report.txt
  • 🔔 Otomatik güncelleme bildirimi — yeni sürüm çıktığında haberdar eder

Kurulum

Node.js 16+ gereklidir. nodejs.org adresinden LTS sürümü indirin.

npm install -g buggy-scanner

Güncelleme:

npm install -g buggy-scanner@latest

Kullanım

Projenin bulunduğu klasörde terminali açın:

buggy .

Farklı bir klasörü taramak için:

buggy ./projem
buggy /Users/ali/Desktop/website

Raporu farklı bir dizine kaydetmek için:

buggy . --output ./raporlar

Stil ve kozmetik kuralları da görmek için:

buggy . --style

Desteklenen Diller

| Dil | Uzantı | Ne Analiz Eder | |-----|--------|----------------| | PHP | .php | SQL Injection, XSS, Command Injection, File Inclusion, CSRF, Session Fixation, Email Injection, Upload güvenliği, deprecated fonksiyonlar | | HTML | .html | CSRF token, form güvenliği, SRI, erişilebilirlik, deprecated etiketler | | CSS | .css | !important kullanımı, performans, vendor prefix | | JavaScript | .js .ts .tsx | AST tabanlı: eval, innerHTML, hardcoded secret, fetch hata yönetimi | | SQL | .sql | GRANT ALL, DROP, SELECT *, WHERE'siz DELETE/UPDATE | | Python | .py | pickle, yaml.load, subprocess, SQL Injection, DEBUG=True, verify=False | | Flutter/Dart | .dart | SharedPreferences hassas veri, rawQuery injection, HTTP, deprecated widget |

PHP ve HTML dosyalarındaki gömülü <script> ve <style> blokları da ayrıca analiz edilir.


Analiz Yöntemi

Buggy yalnızca regex ile çalışmaz:

  • JavaScript: Acorn ile AST (Abstract Syntax Tree) tabanlı analiz yapar. Yorum satırları ve string içindeki kalıplar yanlışlıkla flaglenmez.
  • PHP: Taint flow analizi ile kullanıcı girdisini ($_GET, $_POST, vb.) değişken atamaları üzerinden takip eder ve tehlikeli fonksiyonlara ulaşıp ulaşmadığını kontrol eder. PDO prepared statement ve (int) cast gibi güvenli kalıpları tanır.
  • Python: Flask/Django request nesnelerini taint kaynağı olarak işaretler ve cursor.execute(), os.system() gibi sink'lere ulaşımı izler.
  • HTML: node-html-parser ile DOM ağacı üzerinden analiz yapar.
  • Minified ve third-party dosyalar (jquery.min.js, bootstrap.js, vb.) otomatik olarak tarama dışı bırakılır.

Örnek Çıktı

═══════════════════════════════════════════════════
  🐛 BUGGY - Bug & Vulnerability Scanner
═══════════════════════════════════════════════════
  Proje : /Users/ali/myproject
  Tarih : 08.03.2026 21:30:00
  Dosya : 24 dosya  |  3.420 satır kod
  Not   : 12 stil kuralı gizlendi (görmek için --style ekleyin)

  📊 ÖZET
  🔴 Kritik : 5     🟡 Orta : 12    🟢 Zayıf : 8
  📋 Toplam bulgu: 25

  ⏱  TAHMİNİ DÜZELTME SÜRESİ
  ~6.2 saat
  Önce 5 kritik bulguyu kapatın

  ── 🔴 KRİTİK (5 bulgu) ──

  1. [PHP-TAINT-SQL] login.php:42
     SQL Injection [Taint]: '$username' (satır 38) SQL sorgusuna giriyor
  2. [PHP-TAINT-XSS] profile.php:17
     XSS [Taint]: Superglobal değer escape edilmeden çıktılanıyor
  ...

  📄 Raporlar oluşturuldu:
     → /Users/ali/myproject/buggy-report.md
     → /Users/ali/myproject/buggy-report.txt

Kural Kategorileri

| Kategori | Açıklama | Varsayılan | |----------|----------|-----------| | SECURITY | Güvenlik açıkları | ✅ Açık | | QUALITY | Hata doğurabilecek kalite sorunları | ✅ Açık | | STYLE | Kodlama standartları, kozmetik | ❌ --style ile açılır |


Kural Referansı

PHP

| Kural | Seviye | Açıklama | |-------|--------|----------| | PHP-TAINT-SQL | 🔴 | SQL Injection — taint flow ile tespit | | PHP-TAINT-XSS | 🔴 | XSS — escape edilmemiş kullanıcı girdisi | | PHP-TAINT-CMD | 🔴 | Command Injection | | PHP-TAINT-LFI | 🔴 | File Inclusion (LFI/RFI) | | PHP-TAINT-EVAL | 🔴 | Code Injection via eval() | | PHP-SEC-HASH | 🔴 | md5/sha1 ile parola hash'leme | | PHP-SEC-UPLOAD | 🔴 | Dosya upload MIME doğrulaması eksik | | PHP-SEC-EMAILINJ | 🔴 | Email Injection — mail() header enjeksiyonu | | PHP-SEC-SESSIONFIX | 🔴 | Session Fixation — session_regenerate_id eksik | | PHP-SEC-CSRF | 🔴 | CSRF koruması eksik | | PHP-SEC-OPENFILE | 🔴 | install.php / setup.php herkese açık | | PHP-SEC-DEFCRED | 🔴 | Default credential ile kayıt | | PHP-DEP-MYSQL | 🟡 | Deprecated mysql_* fonksiyonları | | PHP-SEC-CSRFROTATE | 🟡 | CSRF token rotation eksik | | PHP-SEC-BRUTEFORCE | 🟡 | Brute force koruması yok | | PHP-QUA-CATCH | 🟡 | Boş catch bloğu |

JavaScript (AST tabanlı)

| Kural | Seviye | Açıklama | |-------|--------|----------| | JS-SEC-001 | 🔴 | eval() kullanımı | | JS-SEC-002 | 🔴 | innerHTML ile dinamik içerik | | JS-SEC-003 | 🔴 | document.write() | | JS-SEC-004 | 🔴 | Hardcoded API key/secret | | JS-SEC-005 | 🔴 | new Function() | | JS-QUA-001 | 🟡 | var yerine let/const | | JS-QUA-002 | 🟡 | == yerine === | | JS-QUA-005 | 🟡 | fetch() catch eksik |

Python

| Kural | Seviye | Açıklama | |-------|--------|----------| | PY-TAINT-SQL | 🔴 | SQL Injection — taint flow | | PY-TAINT-CMD | 🔴 | Command Injection | | PY-SEC-PICKLE | 🔴 | pickle.load() deserialization | | PY-SEC-YAML | 🔴 | yaml.load() Loader belirtilmemiş | | PY-CFG-DEBUG | 🔴 | DEBUG=True | | PY-SEC-SECRETKEY | 🔴 | Django SECRET_KEY hardcoded | | PY-QUA-BAREEXCEPT | 🟡 | Bare except: | | PY-SEC-RANDOM | 🟡 | Güvensiz random (secrets kullanın) |

Flutter/Dart

| Kural | Seviye | Açıklama | |-------|--------|----------| | DART-TAINT-SQL | 🔴 | SQL Injection — rawQuery | | DART-SEC-CRED | 🔴 | Hardcoded secret | | DART-SEC-SHAREDPREF | 🔴 | SharedPreferences'ta hassas veri | | DART-SEC-HTTP | 🔴 | HTTP (HTTPS değil) | | DART-SEC-SSL | 🔴 | SSL doğrulaması kapalı | | DART-SEC-RANDOM | 🔴 | Random() yerine Random.secure() | | DART-QUA-PRINT | 🟡 | print() — logger kullanın | | DART-DEP-WIDGET | 🟢 | Deprecated widget (RaisedButton vb.) |


Lisans

MIT