Communitygithub.com

Agentic 零信任安全

为自主AI代理系统提供密码学安全架构——涵盖零信任代理网络、签名消息信封(JWS/JWE)、基于能力的安全模型(ocaps)、Merkle树审计追踪、WASM沙箱及形式化验证。

Agentic 零信任安全 是什么?

该技能为AI代理系统提供全面的密码学安全架构,核心原则是“永不信任,始终验证”——应用于每一份代理间消息、每一次技能加载、每一次工具调用和每一个返回结果。它基于威胁等级决策(公共/内部/开发环境),实施完整的mTLS证书链验证、JWS消息信封签名验证和基于能力的安全检查。支持能力令牌的衰减式委派(确保子代理权限不超过父代理),并包含WASM沙箱执行约束和Merkle树审计追踪。该技能可与multi-agent-coordination、agent-conversation-protocols和security-auditor等技能协同使用,但不适用于应用层SAST扫描、网络防火墙规则或提示注入防御。

兼容平台~Claude Code~Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/curiositech/windags-skills/tree/HEAD/skills/agentic-zero-trust-security

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

license: Apache-2.0 name: agentic-zero-trust-security description: | 为自主AI代理系统提供密码学安全架构——零信任代理网络、签名消息信封(JWS/JWE)、基于能力的安全模型(ocaps)、Merkle树审计追踪、WASM沙箱及形式化验证。涵盖CLI开发工具安全、代理间mTLS、权限边界(AI代理最小权限原则)以及技能/插件的供应链安全。激活关键词:“代理安全”、“零信任代理”、“安全代理通信”、“基于能力的安全”、“ocap”、“代理间签名消息”、“代理审计追踪”、“沙箱代理执行”、“代理权限”、“mTLS代理”、“密码学验证”、“代理供应链”、“OWASP agentic”、“证明代理执行了X”、“防篡改代理日志”。不适用于:应用层SAST扫描(使用security-auditor)、网络防火墙规则(使用infrastructure)、SOC2/HIPAA合规性(组织层面)或提示注入防御(使用prompt-engineer)。 allowed-tools: Read,Write,Edit,Bash,Glob,Grep,WebSearch,WebFetch metadata: category: 安全与信任 tags: - 零信任 - 密码学 - 代理安全 - 能力安全 - mTLS - 审计追踪 - 沙箱 - WASM - ocap - 形式化验证 pairs-with: - skill: multi-agent-coordination reason: 保护多代理系统所依赖的通信通道 - skill: agent-conversation-protocols reason: 为代理协议提供消息信封签名与验证 - skill: security-auditor reason: 用架构安全模式补充代码级SAST category: 安全 tags:

  • 零信任
  • 安全
  • 代理
  • 身份验证
  • 授权

Agentic 零信任安全 是做什么的?

为自主AI代理系统提供密码学安全架构。该技能涵盖了传统安全工程与在信任边界上进行规划、持久化、委派和执行代理所带来的独特挑战的交集。

核心原则:永不信任,始终验证——应用于每一份代理间消息、每一次技能加载、每一次工具调用和每一个返回结果。

决策点

1. 威胁等级 → 验证策略

威胁等级评估:
├── 公共(互联网代理,未知技能)
│   ├── 操作:完整 mTLS + JWS + 能力令牌 + WASM 沙箱
│   ├── 审计:每个操作均以 Merkle 证明记录
│   └── TTL:能力生命周期最长5分钟
├── 内部(受信任的代理集群)
│   ├── 操作:mTLS + JWS + 能力(更长 TTL)
│   ├── 审计:聚合日志,每日发布根摘要
│   └── TTL:能力生命周期最长1小时
└── 开发/测试(本地主机,开发环境)
    ├── 操作:可选 mTLS + 基本能力
    ├── 审计:本地文件日志(无 Merkle 树)
    └── TTL:能力生命周期最长24小时

2. 代理请求 → 能力检查 → 授予/拒绝逻辑

入站代理请求处理:
├── 1. 验证 mTLS 证书链
│   ├── 有效 CA 签名?→ 继续
│   └── 无效/已过期?→ 立即拒绝
├── 2. 解析 JWS 消息信封
│   ├── 签名有效且未过期?→ 继续
│   ├── 检测到重放(jti 缓存)?→ 拒绝
│   └── 签名无效?→ 拒绝 + 记录安全事件
├── 3. 检查所需能力
│   ├── 代理持有精确能力?→ 授予
│   ├── 代理持有更广泛能力?→ 衰减后授予
│   ├── 能力已过期?→ 拒绝 + 强制刷新
│   └── 无匹配能力?→ 拒绝 + 建议最小授权
└── 4. 在沙箱约束下执行
    ├── WASM 技能:强制执行 CPU/内存限制
    ├── 文件操作:针对能力进行路径验证
    └── 网络调用:针对能力进行目标验证

3. 委派链 → 信任深度决策

能力委派请求:
├── 父能力可委派=true?
│   ├── 是 → 检查剩余深度
│   │   ├── 深度 > 0 → 允许,深度减1
│   │   └── 深度 = 0 → 拒绝(已达最大委派深度)
│   └── 否 → 拒绝(不可委派)
├── 请求的操作 ⊆ 父操作?
│   ├── 是 → 允许子集
│   └── 否 → 拒绝(不能提升权限)
└── 是否跨越信任边界?
    ├── 同一编排器域 → 允许
    └── 不同域 → 需要显式跨域能力

故障模式

1. 环境权限泄漏

检测:grep -r "process.env" agent_code/ 显示未经能力检查的环境变量访问 症状:代理访问其不应有权限的资源 修复:替换为明确限定的能力令牌,限定到确切需要的资源

2. 消息重放攻击

检测:审计日志中多条具有相同 jti(消息ID)或时间戳在重放窗口内的条目 症状:代理多次接收并处理同一条命令 修复:实现 jti 去重缓存,TTL 与消息过期时间匹配

3. 通过委派进行能力提升

检测:子能力拥有的操作多于父能力,或委派深度超过配置的最大值 症状:子代理获得比其父委派者意图更多的权限 修复:强制衰减不变量:在委派时子能力 ⊆ 父能力

4. 通过资源耗尽进行沙箱逃逸

检测:代理 CPU 使用率 >95% 持续 >30 秒,或内存使用接近沙箱限制 症状:代理尝试无限循环或过量内存分配以突破约束 修复:在资源限制处硬杀死代理进程,实施基于燃料的执行计量

5. 首次使用信任 (TOFU) 证书接受

检测:代理在首次连接时接受无 CA 验证的证书 症状:通过出示任意证书即可成功实施中间人攻击 修复:预配置所有代理证书,维护显式信任存储,拒绝未知 CA

工作示例

示例 1:多代理消息签名流水线

场景:研究代理需要将分析结果传递给代码生成代理,再传递给审查代理。

设置阶段:

// 编排器铸造能力
const researchCap = mint.mint('fs:/tmp/research/**', ['read','write'], 'agent-research-001');
const codegenCap = mint.mint('fs:/workspace/src/**', ['read','write'], 'agent-codegen-001'); 
const reviewCap = mint.mint('fs:/workspace/**', ['read'], 'agent-review-001');

消息流:

  1. 研究 → 代码生成:研究代理创建 JWS 签名消息:

    头部:{alg: 'EdDSA', kid: 'agent-research-001/v1'}
    负载:{
      iss: 'agent-research-001',
      sub: 'agent-codegen-001', 
      dag_id: 'proj-alpha-v1',
      action: 'task',
      body: {analysis: "API needs OAuth2 flow", output_path: "/tmp/research/api_analysis.json"}
    }
    
  2. 代码生成验证:代码生成代理接收消息:

    • 根据研究代理的公钥验证 JWS 签名
    • 检查消息 TTL(未过期)
    • 验证 jti 不在重放缓存中
    • 确认 dag_id 与当前执行上下文匹配
    • 专家发现:验证研究代理是否具有 output_path 的能力
  3. 代码生成 → 审查:代码生成创建签名结果:

    {
      "iss": "agent-codegen-001",
      "sub": "agent-review-001",
      "action": "result", 
      "body": {"generated_files": ["/workspace/src/auth.ts"], "confidence": 0.87}
    }
    

新手遗漏:会跳过 jti 重放保护,导致重复处理。 专家洞察:审计追踪显示完整的消息链,并带有密码学保管证明。

示例 2:带衰减的能力令牌颁发

场景:主代理需要将文件分析委派给专门的子代理,但限制对敏感目录的访问。

初始授权:

// 编排器授予广泛的文件系统访问权限
const mainCap = mint.mint('fs:/project/**', ['read','write','execute'], 'agent-main', {
  delegatable: true,
  maxDepth: 2,
  ttlSeconds: 3600
});

衰减决策树:

主代理评估委派请求:
├── 子代理请求:fs:/project/src/** [read]
│   ├── /project/src/** ⊂ /project/** ? 是
│   ├── [read] ⊂ [read,write,execute] ? 是  
│   ├── 委派深度 2 > 0 ? 是
│   └── 授予:创建衰减能力
├── 子代理请求:fs:/project/secrets/** [read]  
│   ├── 路径包含“secrets”→ 安全策略违规
│   └── 拒绝:敏感路径排除
└── 子代理请求:fs:/etc/passwd [read]
    ├── /etc/passwd ⊂ /project/** ? 否
    └── 拒绝:超出授权范围

生成的衰减能力:

const subCap = mint.attenuate(mainCap, 'agent-analyzer-001', ['read']);
// 结果:fs:/project/src/** [read] delegatable=true maxDepth=1 ttl=3600s

新手遗漏:会不加限制地授予完整的父能力。 专家洞察:衰减在密码学层面强制“绝不提升权限”。

示例 3:带权衡分析的沙箱策略违规检测

场景:代码生成代理在执行期间尝试访问网络,违反了沙箱策略。

沙箱配置:

const codegenSandbox = {
  fileRead: ['/workspace/src/**', '/workspace/package.json'],
  fileWrite: ['/workspace/src/**'], 
  netConnect: false,  // 无网络访问
  maxExecutionMs: 300000,
  maxMemoryMb: 512
};

违规检测流程:

  1. 代理操作:代码生成尝试 fetch('https://api.github.com/repos/...')

  2. 沙箱拦截:WASM 运行时捕获网络套接字的系统调用

  3. 策略检查:netConnect: false → 检测到违规

  4. 权衡分析:

    安全与功能的权衡:
    ├── 严格(当前):阻止网络,终止代理
    │   ├── 优点:零网络攻击面
    │   ├── 缺点:无法获取外部依赖/文档
    │   └── 决策:执行(安全优先环境)
    ├── 中等:允许特定的白名单域名
    │   ├── 优点:对已知良好的 API 功能正常
    │   ├── 缺点:DNS 污染、子域名接管风险
    │   └── 决策:仅为开发环境考虑
    └── 宽松:记录但允许
        ├── 优点:保留全部功能
        ├── 缺点:代理可泄露数据、下载恶意软件
        └── 决策:拒绝(违反零信任模型)
    
  5. 响应:终止代理,记录安全事件:

    {
      "event": "sandbox_violation",
      "agent_id": "agent-codegen-001", 
      "violation_type": "unauthorized_network_access",
      "attempted_url": "api.github.com",
      "policy_matched": "netConnect: false",
      "action_taken": "terminate_agent"
    }
    

新手遗漏:会“仅此一次”允许网络访问或未能检测到违规。 专家洞察:沙箱违规表明潜在的入侵或模型漂移——始终严格执行。

质量门禁

  • 每个代理都有唯一的密码学身份(Ed25519 密钥对 + 证书)
  • 所有代理间通道使用带有证书验证的相互 TLS
  • 所有消息携带 JWS 签名,TTL <5 分钟,并带 jti 重放保护
  • 能力令牌遵循 ocap 模型(任何地方均无环境权限)
  • 能力委派保持衰减不变量(子权限 ⊆ 父权限)
  • 审计追踪使用仅追加的 Merkle 树,并发布根摘要
  • 所有技能执行发生在 WASM 或容器沙箱中
  • 强制执行资源限制(CPU、内存、执行时间、网络)
  • 技能包内容寻址并由作者签名
  • 没有代理接受未签名或未验证的技能/输入
  • 证书轮换自动化,证书生命周期 <24 小时
  • 重放检测缓存正常运行,TTL 与消息过期时间匹配
  • 所有安全违规记录时间戳、代理身份和采取的操作

NOT-FOR 边界

此技能不应用于:

  • 应用层漏洞扫描 → 使用 security-auditor
  • 网络防火墙/WAF 配置 → 使用 infrastructure-engineer
  • SOC2/HIPAA 合规文档 → 使用组织合规流程
  • 提示注入防御 → 使用 prompt-engineer 技能
  • 速率限制或 DDoS 保护 → 使用 API 网关配置
  • 容器编排安全 → 使用 devops-automator 技能

委派边界:

  • 对于代码级安全问题 → security-auditor
  • 对于基础设施加固 → infrastructure-engineer
  • 对于安全编码实践 → software-engineer
  • 对于事件响应 → security-incident-response

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

curiositech/windags-skills

Expert in 2000s-era music visualization (Milkdrop, AVS, Geiss) and modern WebGL implementations. Specializes in Butterchurn integration, Web Audio API AnalyserNode FFT data, GLSL shaders for audio-reactive visuals, and psychedelic generative art. Activate on "Milkdrop", "music visualization", "WebGL visualizer", "Butterchurn", "audio reactive", "FFT visualization", "spectrum analyzer". NOT for simple bar charts/waveforms (use basic canvas), video editing, or non-audio visuals.

curiositech/windags-skills

Expert legal research agent for finding and scraping expungement data state by state. Knows authoritative sources, URL patterns, Firecrawl configuration, and 2026 legal landscape.

curiositech/windags-skills

Expert in 3D computer vision labeling tools, workflows, and AI-assisted annotation for LiDAR, point clouds, and sensor fusion. Covers SAM4D/Point-SAM, human-in-the-loop architectures, and vertical-specific training strategies. Activate on '3D labeling', 'point cloud annotation', 'LiDAR labeling', 'SAM 3D', 'SAM4D', 'sensor fusion annotation', '3D bounding box', 'semantic segmentation point cloud'. NOT for 2D image labeling (use clip-aware-embeddings), general ML training (use ml-engineer), video annotation without 3D (use computer-vision-pipeline), or VLM prompt engineering (use prompt-engineer).

curiositech/windags-skills

Implement WCAG 2.2 AA/AAA compliance with automated testing, keyboard navigation, screen reader support, and focus management. Activate on: accessibility audit, WCAG compliance, keyboard navigation, screen reader, aria attributes, axe-core, focus trap. NOT for: design-level accessibility review (use design-accessibility-auditor), color contrast only (use css-in-js-architect).

curiositech/windags-skills

Time-blind friendly planning, executive function support, and daily structure for ADHD brains. Specializes in realistic time estimation, dopamine-aware task design, and building systems that actually work for neurodivergent minds.

curiositech/windags-skills

Designs digital experiences for ADHD brains using neuroscience research and UX principles. Expert in reducing cognitive load, time blindness solutions, dopamine-driven engagement, and compassionate design patterns. Activate on 'ADHD design', 'cognitive load', 'accessibility', 'neurodivergent UX', 'time blindness', 'dopamine-driven', 'executive function'. NOT for general accessibility (WCAG only), neurotypical UX design, or simple UI styling without ADHD context.

curiositech/windags-skills

>- Apply crisis decision-making research to agent routing, uncertainty triage, and coordination failure analysis in time-pressured systems. Use when diagnosing handoff failures, analytical paralysis, or expert judgment under incomplete information. NOT for routine coding, simple CRUD design, or static single-agent tasks with complete information.

curiositech/windags-skills

Extend and modify the admin dashboard, developer portal, and operations console. Use when adding new admin tabs, metrics, monitoring features, or internal tools. Activates for dashboard development, analytics, user management, and internal tooling.

curiositech/windags-skills

Conversation patterns and interaction protocols for multi-agent systems. Covers request/response, pub/sub, blackboard, delegation chains, debate, critique, consensus, fan-out/fan-in, supervisor-worker, and peer negotiation. Deep analysis of AutoGen conversation patterns, CrewAI delegation, LangGraph state passing, and FIPA-ACL performatives. Teaches how to design what agents say to each other and in what order. Activate on: "agent conversation", "agent protocol", "multi-agent debate", "agent delegation", "supervisor worker pattern", "agent voting", "consensus protocol", "fan-out fan-in", "agent negotiation", "blackboard pattern", "agent dialogue", "conversation topology", "agent handoff". NOT for: wire format or serialization (use agent-interchange-formats), orchestration infrastructure (use agentic-infrastructure-2026), single agent behavior (use agentic-patterns).

curiositech/windags-skills

Meta-agent for creating new custom agents, skills, and MCP integrations. Expert in agent design, MCP development, skill architecture, and rapid prototyping. Activate on 'create agent', 'new skill', 'MCP server', 'custom tool', 'agent design'. NOT for using existing agents (invoke them directly), general coding (use language-specific skills), or infrastructure setup (use deployment-engineer).

curiositech/windags-skills

AI-powered calendar management and agent-based scheduling coordination. Covers calendar APIs (Google Calendar, CalDAV/iCal), AI scheduling assistants (Reclaim, Clockwise, Motion, Cal.com), building custom calendar agents with MCP, multi-calendar merging, timezone management, focus block protection, meeting fatigue detection, and agent-to-agent meeting negotiation protocols. Activate on: "calendar agent", "AI scheduling", "calendar coordination", "meeting scheduling", "calendar API", "focus time protection", "calendar optimization", "Google Calendar MCP", "Reclaim", "Clockwise", "Motion", "Cal.com", "smart scheduling", "calendar-aware agent", "timezone scheduling", "agent negotiation meetings". NOT for: manual calendar UI component design (use form-validation-architect), project management scheduling or Gantt charts (use project-management-guru-adhd), general time-tracking or pomodoro apps (use adhd-daily-planner for time-awareness), building the agent itself from scratch (use agent-creator).

curiositech/windags-skills

Build and adopt production AI agent infrastructure in 2026. Covers framework selection (LangGraph, CrewAI, AutoGen, MCP), orchestration patterns, evaluation, observability, memory systems, and tool use. Also covers the SOCIAL dimension: how to sell agent infrastructure internally, change management, measuring ROI, building trust in autonomous systems, and scaling adoption across teams. Activate on: "agent infrastructure", "agent framework comparison", "which agent framework", "sell AI tools internally", "agent adoption", "agent observability", "agent evaluation", "MCP architecture", "agentic mesh", "enterprise AI agents", "AI change management", "agent ROI". NOT for: building specific agents (use ai-engineer), designing agent behavior patterns (use agentic-patterns), prompt tuning (use prompt-engineer).

curiositech/windags-skills

Fundamental patterns for effective agentic behavior. Teaches decomposition, tool orchestration, error recovery, context management, quality self-assessment, and knowing when to stop. Model-agnostic principles that make any agent more effective regardless of domain. Activate on: "how should I structure this agent", "agentic workflow", "agent patterns", "multi-step task", "tool orchestration", "/agentic-patterns", "decompose this", "agent best practices", "chain of actions", "when should the agent stop", "agent loop design". NOT for: creating agent infrastructure (use agent-creator), building DAGs (use windags-architect), specific tool implementation.

curiositech/windags-skills

Automated discovery and matching of agent skills for dynamic task routing and capability assessment

curiositech/windags-skills

Data structures and serialization formats for agent-to-agent communication. Covers message envelopes, structured output schemas, capability declarations, task handoff payloads, error/retry signaling, and context windows as data structures. Deep comparison of A2A protocol, MCP, OpenAI function calling, and LangChain message types. Teaches when to use rigid schemas vs free-form with validation, typed vs untyped, streaming vs batch. Activate on: "agent message format", "agent communication schema", "agent-to-agent protocol", "A2A protocol", "MCP message format", "structured output for agents", "agent interop", "interchange format", "agent serialization", "task handoff format", "capability declaration". NOT for: what agents say to each other (use agent-conversation-protocols), orchestration topology (use multi-agent-coordination), building agent infrastructure (use agentic-infrastructure-2026).

curiositech/windags-skills

Logic-based agent programming language implementing BDI architecture for practical autonomous agent development

curiositech/windags-skills

>- Design AgentSpeak(L)-style BDI agents with context-guarded plans, selection functions, and intention stacks. Use for interruptible autonomy, agent policy, and multi-agent orchestration in dynamic environments. NOT for simple rule engines, static planners, or centralized workflows.

curiositech/windags-skills

Foundational concurrent computation model where actors communicate exclusively through asynchronous message passing

curiositech/windags-skills

Build production-ready LLM applications, advanced RAG systems, and intelligent agents. Implements vector search, multimodal AI, agent orchestration, and enterprise AI integrations. Use PROACTIVELY for LLM features, chatbots, AI agents, or AI-powered applications.

curiositech/windags-skills

license: Apache-2.0 NOT for unrelated tasks outside this domain.

相关技能