0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【JavaScript】LLMプロンプト投入前にAPIキーやSSH鍵の漏洩を防ぐ「シークレット情報スキャナー」を単一HTMLで作った

0
Posted at

概要
ChatGPTやClaudeなどのAIツールにコードや設定ファイルを投入する前に、APIキー・認証トークン・秘密鍵をローカルで検知・マスキングする単一HTML完結ツールです。

主な検知対象パターン
AIサービス: OpenAI (sk-proj-...), Anthropic (sk-ant-...), Google AI Studio (AIza...)

クラウド/開発: AWS Access Key (AKIA...), GitHub Personal Token (ghp_...), Slack, Stripe

暗号・認証: JWT Token, SSH/RSA Private Key (-----BEGIN ... PRIVATE KEY-----)

汎用代入文: api_key = ..., password = ...

API Key & Secret Scanner - シークレット情報検知・マスキングツール

🛡️ API Key & Secret Scanner

ソースコードや設定内のシークレット情報をブラウザ上で検知・安全にマスキング(通信なし)

スキャン対象テキスト / コード 100% ローカル処理
クリア サンプル入力
<!-- 結果 -->
<div class="card">
  <div id="statusBox" class="status-box status-safe">
    <span>✅ シークレット情報は検出されていません</span>
    <span id="detectedCount">0 件</span>
  </div>

  <label style="font-weight:bold; font-size:0.9rem; display:block; margin-bottom:8px;">サニタイズ(マスキング)済みテキスト</label>
  <textarea id="outputText" readonly placeholder="検知されたシークレット情報が自動でマスキングされます..."></textarea>
  
  <div class="btn-bar">
    <button class="btn-primary" onclick="copyOutput()">マスキング後テキストをコピー</button>
  </div>

  <div style="margin-top:16px;">
    <div style="font-size:0.8rem; color:var(--text-muted); margin-bottom:6px;">検出されたシークレット種別:</div>
    <div class="badge-container" id="badgeList">
      <span style="font-size:0.8rem; color:var(--text-muted);">なし</span>
    </div>
  </div>
</div>
クリップボードにコピーしました
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?