360 Secure SkillHub
360 安全技能中心

AI Agent OPSEC — Runtime Classified Data Enforcer

这是AI Agent的机密数据防护工具,核心功能是基于本地术语注册表,在运行时自动脱敏机密术语,防止泄露到外部API、子代理或日志;生成不含敏感内容的审计日志且自动轮转。典型场景:web搜索、外部LLM调用、子代理生成前的内容校验。需在工作区创建术语注册表,调用时传入待检文本与操作类型,输出安全内容及合规状态,全程本地无网络依赖。

theshadowrose
theshadowrose
热度 87.10
最近更新 2026-05-11 17:30:48
分类:安全依赖:代码执行 / 读写文件应用场景:数据处理 / 法律文档

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add ai-agent-opsec
Metadata
name
AI Agent OPSEC — Runtime Classified Data Enforcer
description
Prevent your AI agent from leaking classified terms to external APIs, subagents, or logs. Term registry + runtime redaction + pre-publish audit. Zero dependencies, zero network calls.
author
@TheShadowRose
version
1.4.0
tags
["opsec","security","redaction","privacy","classified","agent-safety"]
license
MIT

AI Agent OPSEC — Runtime Classified Data Enforcer

Keep your secrets out of web searches, external LLM calls, and subagent spawns.

Side Effects (Declared)

Type Path Description
READS <workspace>/classified/classified-terms.md Your term registry — add terms here once, protected everywhere
WRITES <workspace>/memory/security/classified-access-audit.jsonl Append-only audit log; auto-rotates at 1MB; never contains original sensitive text
NETWORK None Zero external calls. Fully local.

Important: Add classified/ and memory/security/ to your .gitignore to prevent accidental commits.

Setup

  1. Create classified/classified-terms.md in your workspace root
  2. Add one term per line (blank lines and # comments ignored)
  3. Require and use the enforcer before any external call
const ClassifiedAccessEnforcer = require('./src/ClassifiedAccessEnforcer');
const enforcer = new ClassifiedAccessEnforcer('/path/to/workspace');

// Before any external API call
const { safe, payload } = enforcer.gateExternalPayload(userQuery, 'web_search');

// Before spawning a subagent
const { task } = enforcer.redactTaskBeforeSpawn(taskString, 'ResearchAgent');

See README.md for full documentation.