プロトタイプ · プレビュー版:公式レジストリのすべてのサーバーを掲載し、30分ごとに同期しています。Google でログインするとレビューを書けます。プロトタイプ · 30分ごとに更新
PopNx MCPAIを使う人のためのMCPサーバー · やさしい言葉で解説

SUNGLASSES

作者:sunglasses-devバージョン 0.6.23i★ 11iパソコンで動く
レジストリ名io.github.sunglasses-dev/sunglasses

インストール方法

What it does

Input firewall for AI agents: scan text and files before they're read. Local, no network by default.

  • Connects パソコンで動く
  • Account or key No key needed
  • Category サイバーセキュリティ

インストール

使っているAIアプリを選んで、設定をコピーしてください。

チェック 3/3 合格 · あなたのパソコンで動きます · ✓ コマンド確認済み 2026年11月15日

まず:どの AI を使っていますか?

使っているアプリを選ぶと、下に手順が表示されます。

Claude につなげますが、先に準備が必要です

先にパソコンへ Python (uv) を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません

AI にインストールしてもらう

このメッセージを Claude のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude に MCP server SUNGLASSES を入れてください。順番に:1) uv --version で uv があるか確認。なければ https://docs.astral.sh/uv/getting-started/installation/ から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "sunglasses": { "command": "uvx", "args": [ "sunglasses" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、SUNGLASSES のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. uv を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    uv --version
    • バージョン番号(例 uv …)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: uv にはクリック式のインストーラーがありません。uv 公式ページからお使いの OS(macOS か Windows)用の 1 行コマンドをコピーしてターミナルに貼り付けます · Python を別に入れる必要はなく、必要なときに uv が自動で取得します

    uv のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: uv --version

    一度入れれば、uv を使うすべてのツールで使えます

  2. パソコン版 Claude アプリの設定ファイルを開く

    SettingsDeveloperEdit Config

  3. この設定を貼り付けて保存

    {
      "mcpServers": {
        "sunglasses": {
          "command": "uvx",
          "args": [
            "sunglasses"
          ]
        }
      }
    }
  4. Claude を終了してもう一度開く

  5. 試してみる

    SUNGLASSES を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude が SUNGLASSES を使っていると言うか、回答に SUNGLASSES のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

ChatGPT はまだ SUNGLASSES につなげません

SUNGLASSES はパソコンに入れて使うものですが、ChatGPT は Web 上で動くサーバーにしかつなげません

代わりにできること

A · SUNGLASSES につなげるアプリを使う

  • 先にパソコンへ Python (uv) を入れてください(1 回だけ) · パソコン版 Claude アプリ(Windows または Mac)のみ。Web やスマホでは使えません
  • 先にパソコンへ Python (uv) を入れてください(1 回だけ)
  • 先にパソコンへ Python (uv) を入れてください(1 回だけ)
  • 先にパソコンへ Python (uv) を入れてください(1 回だけ)

B · サイバーセキュリティ の中で ChatGPT につなげる別のサーバー

同じカテゴリでよく使われているものから、キーなしでアドレスだけでつなげるものを選びました

Claude Code につなげますが、先に準備が必要です

先にパソコンへ Python (uv) を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Claude Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Claude Code に MCP server SUNGLASSES を入れてください。順番に:1) uv --version で uv があるか確認。なければ https://docs.astral.sh/uv/getting-started/installation/ から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):claude mcp add --scope user sunglasses -- uvx sunglasses 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、SUNGLASSES のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. uv を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    uv --version
    • バージョン番号(例 uv …)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: uv にはクリック式のインストーラーがありません。uv 公式ページからお使いの OS(macOS か Windows)用の 1 行コマンドをコピーしてターミナルに貼り付けます · Python を別に入れる必要はなく、必要なときに uv が自動で取得します

    uv のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: uv --version

    一度入れれば、uv を使うすべてのツールで使えます

  2. ターミナルを開く

    Mac:Command+スペースで Terminal と入力 · Windows:PowerShell を開く

  3. このコマンドを貼り付けて Enter

    claude mcp add --scope user sunglasses -- uvx sunglasses
  4. Claude Code で /mcp と入力

    SUNGLASSES が一覧にあり、接続済みと表示されれば OK です

  5. 試してみる

    SUNGLASSES を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Claude Code が SUNGLASSES を使っていると言うか、回答に SUNGLASSES のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Anthropic のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Cursor につなげますが、先に準備が必要です

先にパソコンへ Python (uv) を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを Cursor のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの Cursor に MCP server SUNGLASSES を入れてください。順番に:1) uv --version で uv があるか確認。なければ https://docs.astral.sh/uv/getting-started/installation/ から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "mcpServers": { "sunglasses": { "command": "uvx", "args": [ "sunglasses" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、SUNGLASSES のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. uv を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    uv --version
    • バージョン番号(例 uv …)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: uv にはクリック式のインストーラーがありません。uv 公式ページからお使いの OS(macOS か Windows)用の 1 行コマンドをコピーしてターミナルに貼り付けます · Python を別に入れる必要はなく、必要なときに uv が自動で取得します

    uv のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: uv --version

    一度入れれば、uv を使うすべてのツールで使えます

  2. このボタンで Cursor を開く

    Cursor で開く

    Cursor がインストールの確認をするので Install を押します

  3. Cursor の AI チャットを Agent モードで開く

  4. 試してみる

    SUNGLASSES を使って、私に何ができるか教えて、1 つやってみせて

    ✓ Cursor が SUNGLASSES を使っていると言うか、回答に SUNGLASSES のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に Cursor のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

VS Code につなげますが、先に準備が必要です

先にパソコンへ Python (uv) を入れてください(1 回だけ)

AI にインストールしてもらう

このメッセージを VS Code のチャットに貼り付けます。AI がパソコンを確認し、変更するファイルを伝え、毎回あなたの了承を待ちます。

このパソコンの VS Code に MCP server SUNGLASSES を入れてください。順番に:1) uv --version で uv があるか確認。なければ https://docs.astral.sh/uv/getting-started/installation/ から入れるよう私に伝え、自分では入れない。2) この設定だけを使う(PopNx MCP の確認済み):{ "servers": { "sunglasses": { "type": "stdio", "command": "uvx", "args": [ "sunglasses" ] } } } 3) 変更するファイルのフルパスか実行するコマンドを伝えて、私の了承を待つ。4) キーは不要。5) 了承した内容を実行し、SUNGLASSES のツールが本当に表示されるか確認する。

このメッセージにあなたのキーは含まれません。キーが必要な場合は、AI がファイルやアプリの入力欄にご自身で貼るよう案内します。

  1. uv を入れる(まだなければ)

    もう入っていますか?先に確認 · ターミナルを開き、このコマンドを入力して Enter

    uv --version
    • バージョン番号(例 uv …)が出る = 入っています。この手順は飛ばせます
    • "command not found"(Windows では "is not recognized")が出る = まだ入っていないか、入れた直後でターミナルを開き直す必要があります
    ターミナルの開き方

    Mac:⌘ + Space を押し、Terminal と入力して Enter

    Windows:スタートメニューを開き、Windows PowerShell と入力して「開く」

    まだ入っていない場合: uv にはクリック式のインストーラーがありません。uv 公式ページからお使いの OS(macOS か Windows)用の 1 行コマンドをコピーしてターミナルに貼り付けます · Python を別に入れる必要はなく、必要なときに uv が自動で取得します

    uv のダウンロードページを開く ↗

    入れ終わったらターミナルを閉じて開き直し、同じコマンドをもう一度実行します。バージョン番号が出れば完了です: uv --version

    一度入れれば、uv を使うすべてのツールで使えます

  2. このボタンで VS Code を開く

    VS Code で開く

    VS Code がインストールの確認をするので Install を押します

  3. VS Code の AI チャットを Agent モードで開く

  4. 試してみる

    SUNGLASSES を使って、私に何ができるか教えて、1 つやってみせて

    ✓ VS Code が SUNGLASSES を使っていると言うか、回答に SUNGLASSES のツール名が出れば接続成功です

メニュー名は 2026年11月11日 に VS Code のヘルプページで確認 · アプリのバージョンにより画面が少し違うことがあります

Windsurf、Zed、Gemini CLI など MCP を使える他のアプリは追加方法がそれぞれ違います。アプリ一覧で確認してください

MCP を使えるアプリをすべて見る →

JSON 設定は下の「開発者向け」にあります

つまずいたら?SUNGLASSES を使っている人に聞いてみましょう💬 ディスカッション →
開発者向け:ターミナルのコマンドと JSON 設定

パソコンにインストール

Claude Code

claude mcp add --scope user sunglasses -- uvx sunglasses

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "sunglasses": {
      "command": "uvx",
      "args": [
        "sunglasses"
      ]
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "sunglasses": {
      "command": "uvx",
      "args": [
        "sunglasses"
      ]
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "sunglasses": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "sunglasses"
      ]
    }
  }
}

この設定は、作者のレジストリ登録情報から作成しています。READMEと違う場合は、READMEに従ってください。

ひと目でわかる

週あたりのダウンロードi
465/週
接続方法
パソコンで動く
最新バージョンi
0.6.23
レジストリ公開日i
2026年11月15日
コードの最終更新i
2026年11月14日
作者
sunglasses-dev
パッケージ
pypi: sunglasses
ウェブサイト
sunglasses.dev
レジストリでの状態
有効

使えるアプリ

このサーバーのつなぎ方と、各アプリの公式ドキュメントに基づきます。2026年11月10日に確認。

パソコン上で動かせるアプリ

ClaudeGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatRaycast

すべてのアプリと長所・短所 →

できること

パソコンで動くサーバーです。インストールすると、ツール一覧がAIアプリに表示されます。

基本チェックi

誰でも見られる情報をチェックしており、コードは読んでいません。当てはまらない項目は数に入れていません。 · 2026年11月15日にチェック

  • ✓ 合格

    作者とリポジトリが一致

    レジストリ名は、リポジトリを所有するGitHubアカウント sunglasses-dev で確認済みです

  • ✓ 合格

    今もメンテナンスされている

    コードの最終更新:昨日

  • ✓ 合格

    ライセンスがある

    MITを使用

  • – 対象外

    エンドポイントが応答する

    これはパソコンで動くため、インターネット上のエンドポイントはありません

  • – 対象外

    OAuthでサインイン

    パソコンで動き、代わりにローカルの設定を使います

  • … 未チェック

    ツールの説明に隠れた指示がない

    パソコンで動くサーバーです。ツール一覧を読み取れるのは、インターネット上のエンドポイントがある場合だけです

公開済みの脆弱性(OSV.dev)

まだ確認していません

確認していること → · JSON

作者の方へ:再確認の依頼・情報の誤りの報告

話し合い

質問、コツの共有、使えないことの報告ができます。「役に立った」の多い順です。

まだ投稿はありません。最初の質問や共有をどうぞ。

ここの投稿は利用者によるもので、PopNx チームのものではありません。

ログインして投稿

ユーザーレビュー

まだレビューはありません

ログインしてレビューを書く

サイバーセキュリティのほかのサーバーとの比較i

  • このカテゴリのほかの1061件のうち93%よりスターが多い
  • このカテゴリのほかの1061件のうち99%より最近レジストリに公開
  • 基本チェックの結果が、このカテゴリのほかの1061件のうち100%と同じかそれ以上

レジストリでこのカテゴリにある有効なすべてのサーバーと比較しています。スターは、公開者がリポジトリの所有者である場合だけ数えます。

よくある質問

SUNGLASSESは安全ですか?

当てはまる基本チェック3項目のうち3項目に合格しました。コードは読んでいません。キーやトークンを追加する前に、サーバーがどんなアクセスを求めているかを確認し、必要な権限だけを持つキーを使ってください。

どんなキーやコードが必要ですか?

レジストリには必須のキーは載っていません。ただし、最初に使うときにサインインを求めるサーバーもあります。

パソコンで動きますか、それともクラウドですか?

あなたのパソコンで動きます。必要なときにAIアプリが起動し、データは作者のサーバーを通りません(サーバー自体がオンラインサービスを呼び出す場合を除きます)。

今もメンテナンスされていますか?

GitHubリポジトリの最終更新は昨日、最新バージョン(0.6.23)がレジストリに届いたのは今日です。

どのアプリで使えますか?

Claude Desktop、Claude Code、Cursor、VS CodeなどのMCP対応アプリで使えます。パソコンにPython (uv)も必要です。

代わりに使えるものは?

同じカテゴリには:GitHits, Dependency Management MCP Server, Snyk MCP, Draugr, Spotdb

似た働きのほかの候補

同じカテゴリでほかの作者のもの。コマンドは確認済み。公式を先に、次にスター順。

カードの見方:↓ 週あたりのダウンロードi★ GitHubスターi3つの柱:レビュー · チェック · 利用状況i更新=最新バージョンをレジストリに公開した日i

GitHits

Search public open-source code, documentation, metadata, vulnerabilities, changelogs, and examples.

作者:githits-com成長中↓ 3807/週★ 1366 日前更新

パソコンでもクラウドでも✓ 提供元 · githits.com

Dependency Management MCP Server

Sonatype component intelligence: versions, security analysis, and Trust Score recommendations

作者:sonatype初期★ 7212 か月前更新

クラウドで動く✓ sonatype.com

Snyk MCP

Easily find and fix security issues in your applications leveraging Snyk platform capabilities.

作者:snyk広く使われている↓ 76.2万/週★ 626 か月前更新

パソコンで動く✓ 提供元 · snyk.io

Draugr

Security scanning for AI agents: SAST, SCA, secrets, IaC, DAST, ranked by real risk.

作者:draugr-dev初期★ 29昨日更新

パソコンで動く✓ 提供元 · draugr.dev

Spotdb

Ephemeral data sandbox for AI workflows with guardrails and security

作者:aliengiraffe初期★ 2113 か月前更新

パソコンで動く✓ aliengiraffe.ai
  • GitHits — クラウドでもパソコンにインストールでも使える · キー不要
  • Dependency Management MCP Server — クラウドで動き、インストール不要 · キー不要
  • Snyk MCP — パソコンにインストールが必要 · キー不要
  • Draugr — パソコンにインストールが必要 · キー不要
  • Spotdb — パソコンにインストールが必要 · キー不要

作者のREADME

READMEを開く

作者のリポジトリから書かれたとおりにコピーしたものです。PopNx MCPは内容を確認・推奨していません。HTML、画像、スクリプトは取り除いています。リンクはこのサイトの外へ移動します。

SUNGLASSES

Open source input firewall for AI agents, beta. A local scanner checks text, code, PDFs, images, QR codes, audio and video with 1,492 patterns that carry a matcher (1,563 are listed) across 117 listed categories and reports findings and incomplete scans. When the scanner cannot read part of an input, it says so and exits 3; an incomplete scan is never reported as clean. A Claude Code hook blocks secret material in tool calls and the paths and hosts your policy lists, before a tool runs, best effort under its 10 second timeout.

What works today

  • Scan text, files, PDFs, images and QR codes from the CLI or from Python
  • An MCP server your agent calls, and a GitHub Action that scans every pull request
  • A Claude Code hook that blocks the credential paths and policy violations your policy lists, before a tool runs
  • A local MCP proxy that refuses every tools/list and tools/call until a person approves the server at an interactive terminal. Once approved, it withholds a credential in a tool call or in a tool result, which is the credential lane and not general inspection of everything a tool returns. Installing it is not protection on its own. See What the proxy enforces.
  • Outside that lane this reads input, so a clean result is a confidence floor and not a guarantee

Sunglasses is a local, open source scanner for text and supported files. It reports what it matched and what it could not read, so you can decide what to pass onward. It produces findings and an exit status; a CI job, a Claude Code hook or your own code acts on that result.

Sixty seconds

python3 -m venv .venv && source .venv/bin/activate

python -m pip install --upgrade sunglasses curl -fsSL -o sixty-seconds.sh https://raw.githubusercontent.com/sunglasses-dev/sunglasses/main/demo/sixty-seconds.sh && bash sixty-seconds.sh

An activated virtualenv keeps the install and the sunglasses your shell resolves in the same environment, and --upgrade matters if you already have an older version. curl -fsSL fails on an HTTP error instead of saving the error page, so the script only runs if the download actually succeeded.

The script writes three fixture files into a temp directory, and deliberately scans a fourth path that does not exist, five scanner invocations in total, because the archive is scanned twice (human output and JSON). The script's own commands execute; scanned content stays data (it is never executed, and the ZIP is not extracted).

Abbreviated output, recorded on 0.5.6. Finding rows 2-5 are omitted below; timings and presentation are not shown because they vary.

$ sunglasses scan --file notes.md            # ordinary sprint notes

PASS — No threats detected. scanner exit code: 0

$ sunglasses scan --file vendor-brief.md # a vendor brief with an instruction buried in it BLOCK [HIGH] — 6 threat(s) found:

  1. [HIGH] Ignore previous instructions GLS-PI-001 … findings 2-5 omitted …
  2. [HIGH] Data exfiltration to sink (mechanism) GLS-MECH-003

scanner exit code: 1

$ sunglasses scan --file attachments.zip # an archive we do not extract INCOMPLETE No findings in the inspected scope. Part of this input was not read, so this is not a clean result. scanner exit code: 3

$ sunglasses scan --file missing.md File not found: missing.md — Nothing was scanned. Check the path. scanner exit code: 2

And the same archive as JSON. Selected fields from the scan document, not the whole of it.

{

"decision": "not_inspected", "threat_found": false, "inspection_complete": false, "is_clean": false, "extraction_warnings": [ "ZIP archive not inspected — SUNGLASSES does not extract this format, so no content from attachments.zip was scanned. This is not a clean result. It lists 2 members, 33 bytes declared by the archive (brief.txt, notes/summary.txt); the member names were scanned." ] }

decision: not_inspected with `is_clean: false`. The archive's table of contents was read and its member names were scanned; the members themselves were not, and when no member name matches a pattern the decision says so itself (before 0.6.17 it said allow beside is_clean: false). A caller that tests `decision == "allow"` stops here; one that tests `decision != "allow"` should read `threat_found` before treating this as a threat. The document exposes the distinction; acting on it is the caller's job.

*Timings and presentation vary. The demo checks the exit statuses and the ZIP coverage fields; report a mismatch against your installed version.*

⭐ If this is useful, consider starring the repository.

🕶 Or try it in your browser, no install. sunglasses.dev/scan (scan text, GitHub repos, or images). Image OCR runs locally in your browser; the image never leaves your device.

What the proxy enforces

python -m sunglasses.proxy -- runs a real MCP server as a child process and mediates the stdio session between it and your client. What it does depends entirely on whether that server has been approved, and the two states are very different.

Before approval, your client's tool requests are refused

Out of the box, every tools/list and tools/call from your client is refused. The client receives a typed JSON RPC error like this one.

{"jsonrpc":"2.0","id":3,"error":{"code":-32070,"message":"SUNGLASSES_WITHHELD",

"data":{"reason_code":"APPROVAL_REQUIRED","rule":"S4", "status":"not_run","inspection_complete":false, "inspected_utf8_bytes":0, "server_id":"40ed892fc0f0b8819c294778c492dbd0", "snapshot_sha256":"26aeeb2f7c5b61aa33523967171d46c0d248cd13d612cef913b089daccae4c64"}}}

`server_id` and `snapshot_sha256` are the two values the approve command needs, and the refusal is where you get them. You do not have to look inside the state directory to find out what to approve.

status: not_run and inspected_utf8_bytes: 0 describe your client's request. It is not forwarded to the server and its arguments are not scanned. The proxy does read the server's own tool list first. It fetches every tools/list page from the server and scans the descriptors to build the snapshot you approve. A page with a finding is refused on that finding before any approval is looked up. Installing the proxy does not protect anything by itself.

Approval is a deliberate human step and it requires an interactive terminal.

$ python -m sunglasses.proxy approve <server_id> --snapshot <snapshot_sha256>

approving records that a human viewed this capture, and this is not an interactive terminal, so nobody did # exits 1, nothing is recorded

It prints the tool names and the first 16 characters of each descriptor digest, then asks. It records that someone at an interactive terminal answered yes to that list. From a pipe it refuses. Run it at a real terminal and answer the prompt.

An approval belongs to one server, not to a tool list. The snapshot hash covers the descriptors, and two different servers exposing the same tools have the same snapshot_sha256, but they get different server_ids, and the approval is stored against the server_id. Measured with two servers whose captures both read snapshot_sha256 26aeeb2f7c5b61aa… carry the ids 8740fa6360ce72946fa5a99e86974e01 and 0096972d2543ec556ad9eefe9c144b05, and approving the first left the second refusing with APPROVAL_REQUIRED until it was approved at its own terminal prompt.

So changing the command behind a familiar tool list does not inherit the approval you already gave. A server that presents the same descriptors as one you trust is still a server you have not approved.

After approval (both directions, in the credential lane)

With the snapshot approved, the mediator inspects messages in both directions and withholds one whose content the engine blocks, returning the reason code, the rule, the bytes inspected and the rule ids that fired.

{"jsonrpc":"2.0","id":3,"error":{"code":-32070,"message":"SUNGLASSES_WITHHELD",

"data":{"reason_code":"PROHIBITED_CONTENT","rule":"S2","status":"complete", "inspection_complete":true,"inspected_utf8_bytes":87, "rule_ids":["GLS-SD-001-API","GLS-SD-003-API"]}}}

  • A credential in a tool RESULT is withheld from your client. The -API rules are the tool result channel. A tool result is the api_response channel. from the shell, sunglasses scan --channel api_response runs those rules, and --channel tool_output runs them too. Releases up to 0.6.19 declared none of the credential rules on tool_output. A test pins this wording and the facts behind it (see the CHANGELOG entry).
  • `GLS-SD-010` is line anchored, and that is a limit in every channel. It matches an assignment at the start of a line, so a KEY=value that is indented by any whitespace, or sits inside a JSON string, or sits behind a quote, is not matched on any channel, not in a tool result, and not in a file or a message either, which are channels it does declare. Indentation alone is enough, which makes this wider than it sounds, since a config block, a YAML mapping or an indented snippet all miss. Note the assignment's POSITION is what matters and not the quoting of its value. PASSWORD="hunter2" at a line start is matched, "PASSWORD=hunter2" is not. When the value is in a known credential format the GLS-SD-001 family still catches it everywhere (GLS-SD-001 on file, message and web content, GLS-SD-001-API in a tool result), so what is actually uncovered is an assignment whose value has no recognisable shape (a password, a DSN, an internal token) once it is embedded. Closing it needs a different anchor, which is a new rule with its own fixtures rather than a channel added to this one.
  • A credential in a tool CALL does not reach the server. Verified by reading the receiving server's own input, not by asking the proxy.
  • Ordinary traffic passes. tools/list returns the real list and a benign call returns its real result.

Ctrl+C while the proxy is serving no longer aborts the interpreter. Once shutdown finishes, the process exits with status 130. Shutdown waits on the server, so a server that has stopped reading its input can hold it open.

What this is not

This is the credential lane on tool results and tool calls. It is not general inspection of everything a tool returns, and n

冒頭だけを表示しています。続きはリポジトリで読めます