feat(widgets): Shodan インスタンス監査ウィジェットを追加 - #36
Conversation
自分の Misskey インスタンスが外からどう見えているかを Shodan で点検する 管理者向けの防御的セルフ監査ツール。露出ポートを危険度別に色分けし、 稼働サービス・TLS 失効判定・CVE (CVSS と実証/推定の別)・Shodan の スキャン日を表示する。 API キーは widget.is に書かず、Secret Vault (クエリ認証 param=key) が サーバーサイドで注入する。既存の wakatime / hackerone と同じ流儀。 /shodan/host は 1 回につきクエリクレジットを 1 消費するため、 既存ウィジェットの Async:interval による自動更新は採用せず、 結果を Mk:save にキャッシュする。カラムを開き直してもキャッシュを描く だけで消費はなく、実取得は初回と手動更新のみ。連打も busy で抑止する。 判定は AiScript 1.2.1 の実インタプリタにモック応答を流して検証した (正常 / クリーン / 未インデックス / 名前解決失敗 / 大文字空白混じり / IP 直指定 / 不正文字 / 401 / 未設定 の 9 系統)。 アイコンは Shodan 公式ロゴが simple-icons (CC0) に無く商標でもあるため 手貼りせず、lucide の radar で代替した。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
misstore | 9a06881 | Aug 08 2026, 10:59 PM |
|
Warning Review limit reached
Next review available in: 59 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (6)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
なぜ
自分の Misskey インスタンスが外からどう見えているかを点検する手段が無かった。
Shodan 本来の用途(公開インターネットに露出したホストのスキャン)と Misskey を
繋いだ、管理者向けの防御的セルフ監査ツール。
何をするか
ホスト名 → IP を解決し、Shodan のホスト情報を取得して表示する。
Redis / node_exporter など公開すべきでないものは 🚨、SSH や 8080 は ⚠ で名前付き表示
14 日以内は赤、30 日以内は橙。証明書は最初に見つかったものでなく最も早く切れるものを選ぶ
推測が多い。未検証を同列の赤で並べると警報疲れで本当に危険なものが埋もれるため、
実証済/推定を明示し、見出しにも実証済み件数を出すセキュリティ
API キーは
widget.isに一切書かず、Secret Vault(クエリ認証param=key)がサーバーサイドで注入する。既存の
wakatime/hackeroneと同じ流儀。capabilities: ["notedeck-api", "secret-vault"]。Nd:call("vault.fetch", ...)を導出するため、S2 / S10 上は高権限アイテム = 人手レビュー必須 Tier になる
(既存の Vault 系ウィジェットと同じ扱い)。
ホスト名は文字種検証のうえ
Uri:encode_componentでエスケープしてからクエリ文字列に入れる。不正な入力は HTTP リクエストを 1 本も出さずに弾く。
クレジット消費への配慮
/shodan/hostは 1 回につきクエリクレジットを 1 消費する。既存ウィジェットのAsync:intervalによる自動更新をそのまま採用すると課金が嵩むため、結果を
Mk:saveにキャッシュする方式にした。busyフラグで連打を抑止し、ボタンには更新 (1 クレジット)とコストを明示検証
AiScript 1.2.1(ウィジェットが宣言するバージョン)の実インタプリタにモック応答を
流して、9 系統を確認した — 正常 / クリーン / 未インデックス / 名前解決失敗 /
大文字空白混じり入力 / IP 直指定 / 不正文字 / 401 / 未設定。全系統で実行時エラー 0 件。
pnpm run registry:build+check-registry-integrity.mjsは警告 0 件。アイコン
Shodan 公式ロゴは simple-icons(CC0)に収録が無く商標でもあるため手貼りせず、
lucide の
radarで代替した。🤖 Generated with Claude Code