<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
    <channel>
        <title>安全 - 分类 - lihuu — 系统工程、AI 工具链与 Rust 开发博客</title>
        <link>https://silentstormic.top/categories/%E5%AE%89%E5%85%A8/</link>
        <description>安全 - 分类 - lihuu — 系统工程、AI 工具链与 Rust 开发博客</description>
        <generator>Hugo -- gohugo.io</generator><language>zh-CN</language><lastBuildDate>Thu, 28 May 2026 17:02:16 &#43;0800</lastBuildDate><atom:link href="https://silentstormic.top/categories/%E5%AE%89%E5%85%A8/" rel="self" type="application/rss+xml" /><item>
    <title>《Anthropic Agent Containment - How We Contain Claude》 解读</title>
    <link>https://silentstormic.top/post/1779958936/</link>
    <pubDate>Thu, 28 May 2026 17:02:16 &#43;0800</pubDate>
    <author>lihuu</author>
    <guid>https://silentstormic.top/post/1779958936/</guid>
    <description><![CDATA[Anthropic 工程博客详细分享了如何为 Agent 能力构建三层防御体系与三种隔离架构，揭示审批疲劳、用户即注入向量等真实漏洞案例，核心教训是最薄弱的层往往是自己写的自定义组件。]]></description>
</item>
<item>
    <title>Gitleaks 工具调研报告</title>
    <link>https://silentstormic.top/post/1779718732/</link>
    <pubDate>Tue, 26 May 2026 13:20:44 &#43;0800</pubDate>
    <author>lihuu</author>
    <guid>https://silentstormic.top/post/1779718732/</guid>
    <description><![CDATA[深入调研 Gitleaks 密钥检测工具，覆盖必要性（2025 年 GitHub 泄露 2865 万密钥）、安装使用、GitHub Actions/GitLab CI/pre-commit 集成步骤、与 TruffleHog/detect-secrets 等工具的 13 维度对比，以及项目中的选型建议。]]></description>
</item>
<item>
    <title>Git 提交安全：gitleaks &#43; GitGuardian 实战</title>
    <link>https://silentstormic.top/post/1779465035/</link>
    <pubDate>Fri, 22 May 2026 23:50:00 &#43;0800</pubDate>
    <author>lihuu</author>
    <guid>https://silentstormic.top/post/1779465035/</guid>
    <description><![CDATA[介绍如何在 Git commit 前使用 gitleaks 快速拦截、push 前使用 GitGuardian 深度扫描，通过全局 Git Hooks 组合防止敏感信息泄露到远程仓库。]]></description>
</item>
<item>
    <title>sandbox-exec Policy 编写指南：基本结构与规则</title>
    <link>https://silentstormic.top/post/1769914832/</link>
    <pubDate>Sun, 01 Feb 2026 11:00:32 &#43;0800</pubDate>
    <author>lihuu</author>
    <guid>https://silentstormic.top/post/1769914832/</guid>
    <description><![CDATA[<blockquote>
<p>适用场景：sandbox-exec -f xxx.sb</p>
</blockquote>
<h2 id="一policy-基本结构"><strong>一、Policy 基本结构</strong></h2>
<p>SBPL 基于 Scheme 语法（Lisp 变体），采用 S-Expression（S 表达式）。</p>
<h3 id="1-最小结构"><strong>1. 最小结构</strong></h3>
<p>一个最基础的策略文件通常包含版本声明和默认行为：</p>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-scheme">
        <span class="code-title"><i class="arrow fas fa-angle-right fa-fw" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h fa-fw" aria-hidden="true"></i></span>
        <span class="copy" title="复制到剪贴板"><i class="far fa-copy fa-fw" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-scheme" data-lang="scheme"><span class="line"><span class="cl"><span class="p">(</span><span class="nf">version</span> <span class="mi">1</span><span class="p">)</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nf">allow</span> <span class="nv">default</span><span class="p">)</span>                            <span class="c1">; 默认允许所有操作</span>
</span></span><span class="line"><span class="cl"><span class="p">(</span><span class="nf">deny</span> <span class="nv">file-read*</span> <span class="p">(</span><span class="nf">subpath</span> <span class="s">&#34;/Users/lihu/.ssh&#34;</span><span class="p">))</span> <span class="c1">; 显式拒绝读取 .ssh 目录</span></span></span></code></pre></div></div>
<h3 id="2-语法组成"><strong>2. 语法组成</strong></h3>
<p>单条规则的基本格式如下：</p>]]></description>
</item>
<item>
    <title>OpenClaw 本地沙盒化运行（macOS）实施笔记</title>
    <link>https://silentstormic.top/post/1769913310/</link>
    <pubDate>Sun, 01 Feb 2026 10:35:12 &#43;0800</pubDate>
    <author>lihuu</author>
    <guid>https://silentstormic.top/post/1769913310/</guid>
    <description><![CDATA[<blockquote>
<p>本文记录如何在 <strong>不创建新用户</strong> 的前提下，用 <code>sandbox-exec</code>（Seatbelt）对 OpenClaw（AI Agent）进行本地沙盒化运行。</p>
</blockquote>
<h2 id="一背景与目标"><strong>一、背景与目标</strong></h2>
<p>运行 OpenClaw（AI Agent）存在潜在安全风险：</p>
<ul>
<li>可能被 Prompt 注入执行危险命令</li>
<li>可能访问 SSH Key、Keychain 等私密数据</li>
<li>可能误删/篡改系统文件</li>
<li>可能污染 Homebrew 工具链</li>
</ul>
<p>目标是在 <strong>不创建新用户</strong> 的前提下，把 OpenClaw 运行在一个 <strong>受限沙盒环境</strong> 中，实现：</p>]]></description>
</item>
<item>
    <title>macOS Tahoe 26.x SSH 安全加固笔记</title>
    <link>https://silentstormic.top/post/1769768872/</link>
    <pubDate>Fri, 30 Jan 2026 18:27:54 &#43;0800</pubDate>
    <author>lihuu</author>
    <guid>https://silentstormic.top/post/1769768872/</guid>
    <description><![CDATA[<p>最近 Claude Bot 比较火，搞了个 Mac mini 来玩玩。下面是把 Mac mini 当作服务器的一些安全设置，主要是 SSH 方面的配置。</p>
<p><strong>适用版本</strong>：macOS Tahoe / Sonoma / Ventura 及以后<br>
<strong>架构特点</strong>：launchd Socket Activation（不再由 sshd 直接监听端口）</p>
<p><strong>加固目标</strong>：</p>
<ul>
<li>仅允许 SSH 公钥登录</li>
<li>禁用密码/交互认证</li>
<li>使用自定义端口，关闭默认 22</li>
<li>最小化网络暴露面</li>
<li>可验证、可回滚</li>
</ul>
<hr>
<h2 id="一背景说明重要">一、背景说明（重要）</h2>
<p>从 Ventura 开始，macOS 的 SSH 端口由 <code>launchd</code> 监听：</p>]]></description>
</item>
<item>
    <title>iptables 简易使用手册</title>
    <link>https://silentstormic.top/post/iptables/</link>
    <pubDate>Wed, 16 Oct 2024 09:20:21 &#43;0800</pubDate>
    <author>lihuu</author>
    <guid>https://silentstormic.top/post/iptables/</guid>
    <description><![CDATA[<h3 id="iptables-简易使用手册"><code>iptables</code> 简易使用手册</h3>
<p><code>iptables</code> 是一个强大而灵活的 Linux 防火墙工具，用于管理网络包过滤和网络地址转换 (NAT)。它基于 Netfilter 框架工作，允许你定义详细的规则来管理入站和出站流量。</p>
<h4 id="1-查看现有规则">1. <strong>查看现有规则</strong></h4>
<ul>
<li>
<p>查看所有表的规则：</p>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right fa-fw" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h fa-fw" aria-hidden="true"></i></span>
        <span class="copy" title="复制到剪贴板"><i class="far fa-copy fa-fw" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">sudo iptables -L</span></span></code></pre></div></div>
</li>
<li>
<p>查看特定链（例如<code>INPUT</code>链）的规则：</p>
<div class="code-block code-line-numbers open" style="counter-reset: code-block 0">
    <div class="code-header language-bash">
        <span class="code-title"><i class="arrow fas fa-angle-right fa-fw" aria-hidden="true"></i></span>
        <span class="ellipses"><i class="fas fa-ellipsis-h fa-fw" aria-hidden="true"></i></span>
        <span class="copy" title="复制到剪贴板"><i class="far fa-copy fa-fw" aria-hidden="true"></i></span>
    </div><div class="highlight"><pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">sudo iptables -L INPUT</span></span></code></pre></div></div>
</li>
</ul>
<h4 id="2-允许或拒绝端口">2. <strong>允许或拒绝端口</strong></h4>
<ul>
<li>
<p>允许某个端口（例如允许 22 端口的 SSH 流量）：</p>]]></description>
</item>
<item>
    <title>UFW 简易使用手册</title>
    <link>https://silentstormic.top/post/ufw/</link>
    <pubDate>Wed, 16 Oct 2024 09:13:56 &#43;0800</pubDate>
    <author>lihuu</author>
    <guid>https://silentstormic.top/post/ufw/</guid>
    <description><![CDATA[<h3 id="ufw-简易使用手册"><code>UFW</code> 简易使用手册</h3>
<p><code>ufw</code>（Uncomplicated Firewall）是 Ubuntu 的默认防火墙管理工具，旨在简化防火墙配置。<code>ufw</code>是一个对<code>iptables</code>的封装，简化了防火墙规则的配置。它适合那些不需要深入配置复杂防火墙策略的用户，易于使用并提供友好的命令行接口。<code>ufw</code>背后实际使用的也是<code>iptables</code>，因此它本质上是简化了<code>iptables</code>的配置过程。</p>]]></description>
</item>
</channel>
</rss>
