<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Security on AI + 量化工程</title><link>https://miasyster.github.io/tags/security/</link><description>Recent content in Security on AI + 量化工程</description><generator>Hugo</generator><language>zh</language><lastBuildDate>Fri, 01 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://miasyster.github.io/tags/security/index.xml" rel="self" type="application/rss+xml"/><item><title>Harness 即治理：用代码约束 Agent，不用 Prompt</title><link>https://miasyster.github.io/posts/harness-is-governance/</link><pubDate>Fri, 01 May 2026 00:00:00 +0000</pubDate><guid>https://miasyster.github.io/posts/harness-is-governance/</guid><description>Agent 治理的主流方案是在 prompt 里写规则。但 LLM 可以无视 prompt。真正有效的治理不在 Agent 内部，在 Agent 外部的 Harness 层——工具定义了能做什么，错误定义了不能做什么，代码定义了边界在哪。</description></item><item><title>表达式解析器是编译器，不是 eval()</title><link>https://miasyster.github.io/posts/expression-parser-is-a-compiler/</link><pubDate>Wed, 29 Apr 2026 00:00:00 +0000</pubDate><guid>https://miasyster.github.io/posts/expression-parser-is-a-compiler/</guid><description>QuantGPT 的核心是一个 870+ 行的手写递归下降解析器，支持 80+ 算子、截面/时序自动分组、双模式编译。不是因为不知道 eval() 更简单，而是因为 eval() 做不到的事情恰好是最重要的。</description></item><item><title>API Guard Pattern：为什么直接调用函数是被禁止的</title><link>https://miasyster.github.io/posts/api-guard-pattern/</link><pubDate>Tue, 28 Apr 2026 00:00:00 +0000</pubDate><guid>https://miasyster.github.io/posts/api-guard-pattern/</guid><description>QuantGPT 用 threading.local 实现了一个运行时守卫：所有回测调用必须经过 API 边界，直接调用函数会抛异常。不是因为函数有什么危险，而是因为没有边界的系统无法被审计。</description></item><item><title>让 AI 写的代码跑起来，但别让它跑出去</title><link>https://miasyster.github.io/posts/sandbox-defense-in-depth/</link><pubDate>Fri, 03 Apr 2026 00:00:00 +0000</pubDate><guid>https://miasyster.github.io/posts/sandbox-defense-in-depth/</guid><description>AI 生成的代码必须被执行，否则它就只是文本。但执行意味着风险。我没有选择容器隔离，也没有用 RestrictedPython，而是设计了一个三层防御：先在编译期用 AST 拒绝危险结构，再在运行时替换整个 builtins，最后用操作系统级资源限制兜底。三层各解决不同类别的风险，重叠但不冗余。</description></item></channel></rss>