gke-cred-audit
Defensive credential-exposure auditor for GKE that inventories workload identity, service account tokens, and RBAC posture, exposing findings via an MCP server at /mcp.
README
gke-cred-audit
Defensive credential-exposure auditor for GKE. Deployed in-cluster as a single
Pod (Deployment + Service); fronted by Natoma at /mcp.
The server uses its own ServiceAccount to:
- Inventory its own GCE/GKE workload-identity exposure (project, instance, SA scopes/tokens).
- Decode its own projected ServiceAccount token (claims only) and walk its mounted secret files.
- Inventory the pods + ConfigMaps in its namespace (and, opt-in, secret metadata) so Natoma can ask follow-up questions about workloads that share the namespace.
- Compute its own RBAC posture via
SelfSubjectRulesReviewand a curatedSelfSubjectAccessReviewmatrix.
Surfaces
- REST with an OpenAPI 3.1 spec at
/openapi.json(Swagger UI at/docs, ReDoc at/redoc). - MCP server over Streamable HTTP, mounted at
/mcp(per MCP spec rev 2025-03-26).
Both surfaces share the same redacted pydantic models. Raw bearer tokens, JWT signatures, PEM
private keys, and Secret values are never returned. The break-glass RAW_REVEAL flag exists for
debugging individual tokens; it never extends to namespace Secret values.
Deploying via Natoma
Natoma is the auth boundary for /mcp. The server itself has no native auth; this is intentional
and surfaced in /version, audit://server-info, and the OpenAPI spec via x-auth=none (gateway-managed).
Dockerfile path (recommended)
This repo has a root Dockerfile. Point Natoma at this repo and it will build and run the
container. The server reads $PORT (default 8080) and binds 0.0.0.0. uvicorn is configured
with --proxy-headers --forwarded-allow-ips="*" so X-Forwarded-* from the gateway is honored.
Direct cluster deployment
kubectl apply -f manifests/rbac.yaml
kubectl apply -f manifests/deployment.yaml
kubectl apply -f manifests/service.yaml
kubectl apply -f manifests/networkpolicy.yaml
Then point Natoma's gateway at http://gke-cred-audit.<namespace>.svc:8080/mcp.
The bundled NetworkPolicy only permits ingress from namespaces labeled natoma-gateway: "true";
adjust to match your installation. Egress is restricted to the Kubernetes API server and the GCE
metadata IP.
Granting secret enumeration
AUDIT_ENABLE_SECRET_LISTING=true opts in to namespace Secret enumeration. Even when enabled, the
server returns metadata only -- name, type, key names, per-key size, per-key SHA-256 prefix.
Values are never returned. A property-based test (tests/test_redaction_invariant.py)
runs against mocked Secrets containing real-looking base64 data to enforce this.
The trade-off: granting secrets:list to the audit ServiceAccount makes the audit pod a high-trust
target. Default is OFF. When enabling, prefer:
- A dedicated namespace for the audit Deployment, with no other workloads.
- Tightening the bundled Role with
resourceNames: [...]to specific Secret names. - A
NS-SECRETS-LIST-GRANTEDfinding will appear in/findingsto make this visible.
Running locally
pip install -e '.[dev]'
gke-cred-audit --bind 127.0.0.1 --port 8080
Then:
curl http://127.0.0.1:8080/openapi.json-- OpenAPI 3.1 documentcurl http://127.0.0.1:8080/findings?severity=HIGH-- JSON findingscurl http://127.0.0.1:8080/server-info-- capability manifest- MCP clients connect to
http://127.0.0.1:8080/mcp
What's intentionally NOT in scope
- Cross-namespace reads (would require ClusterRole; not used).
- Returning Secret
data/stringDataunder any flag. - Native auth on the server (Natoma owns auth).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。