<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: 杨洪付</title>
    <description>The latest articles on DEV Community by 杨洪付 (@_61f3798b38a1851e53737).</description>
    <link>https://dev.to/_61f3798b38a1851e53737</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4206936%2F6780f7ef-be45-4d44-93c6-7062eef5e545.png</url>
      <title>DEV Community: 杨洪付</title>
      <link>https://dev.to/_61f3798b38a1851e53737</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/_61f3798b38a1851e53737"/>
    <language>en</language>
    <item>
      <title>Leases, Not Switches: Rethinking Permission Models for AI Agents</title>
      <dc:creator>杨洪付</dc:creator>
      <pubDate>Mon, 26 Oct 2026 19:37:24 +0000</pubDate>
      <link>https://dev.to/_61f3798b38a1851e53737/leases-not-switches-rethinking-permission-models-for-ai-agents-3bb3</link>
      <guid>https://dev.to/_61f3798b38a1851e53737/leases-not-switches-rethinking-permission-models-for-ai-agents-3bb3</guid>
      <description>&lt;p&gt;Most AI agent frameworks model permissions as switches: can-read-files yes/no, granted once, permanent until someone remembers to revoke. hmharness — an open-source (MIT) agent framework for HarmonyOS/OpenHarmony development — replaces this with a lease model built around a Capability Broker.&lt;/p&gt;

&lt;h2&gt;
  
  
  The eight-field token
&lt;/h2&gt;

&lt;p&gt;Every capability access goes through one broker, and every access presents a token with eight fields: subject (who holds it), class (filesystem / network / process / secret / device), scope, resource, operation, constraints, expiry, and provenance — who granted it and why. That last field is where the audit trail starts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 1: deny by default
&lt;/h2&gt;

&lt;p&gt;Tokens must be explicitly granted. There is no implicit inheritance. This sounds inefficient, but it buys a complete audit chain: every allow is traceable (who granted, why, when it expires), every deny has a reason.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 2: tokens always expire
&lt;/h2&gt;

&lt;p&gt;The expiry field has no "permanent" option. Default TTL is 1 hour, hard cap 24 hours. Permissions stop being one-time assets and become continuous leases — revocation turns into a matter of time, not management.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rule 3: the RLM rule, mechanized
&lt;/h2&gt;

&lt;p&gt;The hardest one: the worker tier (low-risk, read-only, no-network sandbox) rejects network/secret/process/device capabilities at the tier itself, regardless of what tokens it holds. "Low-privilege execution must not inherit host capabilities" stopped being a documentation rule and became an if-statement. Rules written in docs get forgotten; rules written in code get executed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The execution ladder
&lt;/h2&gt;

&lt;p&gt;Low-risk + read-only + no network → worker tier. Medium risk or writes → process isolation. High risk or any network → container (Docker). Critical or long-running → microVM. The broker decides "whether"; the ladder decides "where". Together they form the complete execution policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Every decision is audited
&lt;/h2&gt;

&lt;p&gt;Each broker decision — allow or deny — is recorded, and the ledger mirror is wired through an injectable onDeny hook into the cognitive layer. Permission audit and the cognitive ledger share the same append-only discipline.&lt;/p&gt;

&lt;h2&gt;
  
  
  The general lesson
&lt;/h2&gt;

&lt;p&gt;Agent permissions, once granted, are hard to revoke — you may forget the agent has them, or they may already be in use. A lease model turns revocation into a time problem instead of a management problem.&lt;/p&gt;




&lt;p&gt;hmharness wires project creation, checks, builds, signing, install, launch, log reading, and result verification into a local toolchain so AI does not just generate code — it proves results against the local machine. Independent community project, no affiliation with Huawei or OpenAtom.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/swsgbl/hmharness" rel="noopener noreferrer"&gt;https://github.com/swsgbl/hmharness&lt;/a&gt; · Evidence: &lt;a href="https://swsgbl.github.io/hmharness/evidence/aisecurityarchitectureopensource" rel="noopener noreferrer"&gt;https://swsgbl.github.io/hmharness/evidence/aisecurityarchitectureopensource&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>architecture</category>
      <category>security</category>
    </item>
    <item>
      <title>An Append-Only Ledger for AI Thoughts: Every Conclusion Has a Birth Certificate</title>
      <dc:creator>杨洪付</dc:creator>
      <pubDate>Sun, 25 Oct 2026 17:02:24 +0000</pubDate>
      <link>https://dev.to/_61f3798b38a1851e53737/an-append-only-ledger-for-ai-thoughts-every-conclusion-has-a-birth-certificate-3b85</link>
      <guid>https://dev.to/_61f3798b38a1851e53737/an-append-only-ledger-for-ai-thoughts-every-conclusion-has-a-birth-certificate-3b85</guid>
      <description>&lt;p&gt;Most AI tools keep a chat history for you to read. The cognitive ledger in &lt;a href="https://github.com/swsgbl/hmharness" rel="noopener noreferrer"&gt;hmharness&lt;/a&gt; — an open-source (MIT) agent framework for HarmonyOS/OpenHarmony development — exists for a different reader: the auditor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;15 categories of cognitive events&lt;/strong&gt; (predictions, verifications, revisions, decisions, learning signals...) are append-only, never deleted, and each carries a lineage chain: which belief this prediction came from, which verification revised it, what descended from that revision. The whole cognitive process forms a replayable DAG.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why append-only
&lt;/h2&gt;

&lt;p&gt;History that can be edited after the fact is not history. If an AI can silently rewrite its records, what you see is a cosmetically improved decision chain — errors never admitted, revisions never traced. Immutability buys something expensive: &lt;strong&gt;accountability&lt;/strong&gt;. Any wrong prediction can be traced along its lineage to the belief that produced it; every revision has a paper trail.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ledger 2.0
&lt;/h2&gt;

&lt;p&gt;Five new event categories, plus &lt;strong&gt;beliefVersion&lt;/strong&gt; (versioned beliefs) and &lt;strong&gt;descendants&lt;/strong&gt; (derivation chains) — the cognitive DAG becomes fully replayable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Unified provenance prevents silent cheating
&lt;/h2&gt;

&lt;p&gt;Canonical &lt;strong&gt;lineageId&lt;/strong&gt;: conclusions from different experiments on different axes are not comparable unless their lineage matches. "Using data from experiment A to argue for conclusion B" is blocked by rule, not by goodwill.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this means for developers
&lt;/h2&gt;

&lt;p&gt;Every conclusion the agent gives you carries a birth certificate. When it says "this signing configuration is correct", you can ask the ledger: which verification produced this? What environment was used? Was it ever overturned — when, and on what grounds?&lt;/p&gt;

&lt;p&gt;The AI stops being a black box that speaks from memory, and becomes an executor with a complete medical record.&lt;/p&gt;

&lt;h2&gt;
  
  
  The philosophy in one line
&lt;/h2&gt;

&lt;p&gt;The web workbench guarantees "the numbers you see are traceable"; the ledger guarantees "what the AI knows is replayable". Two sides of the same principle: nothing inside the agent is unverifiable.&lt;/p&gt;




&lt;p&gt;hmharness wires project creation, checks, builds, signing, install, launch, log reading, and result verification into a local toolchain so AI does not just generate code — it proves results against the local machine. Independent community project, no affiliation with Huawei or OpenAtom.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/swsgbl/hmharness" rel="noopener noreferrer"&gt;https://github.com/swsgbl/hmharness&lt;/a&gt; · Evidence: &lt;a href="https://swsgbl.github.io/hmharness/evidence/aiobservabilityopensourceaudit" rel="noopener noreferrer"&gt;https://swsgbl.github.io/hmharness/evidence/aiobservabilityopensourceaudit&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>architecture</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Red-Teaming Our Own Agent Sandbox: 9 Attack Payloads, All Blocked</title>
      <dc:creator>杨洪付</dc:creator>
      <pubDate>Sun, 25 Oct 2026 16:35:56 +0000</pubDate>
      <link>https://dev.to/_61f3798b38a1851e53737/red-teaming-our-own-agent-sandbox-9-attack-payloads-all-blocked-5g7p</link>
      <guid>https://dev.to/_61f3798b38a1851e53737/red-teaming-our-own-agent-sandbox-9-attack-payloads-all-blocked-5g7p</guid>
      <description>&lt;p&gt;AI agents execute "commands generated by a model" — and prompt injection can steer that model into doing what an attacker wants. An agent without a sandbox hands your shell, filesystem, and network credentials to an executor that can be talked into misbehaving. A sandbox is not optional; it is the foundation.&lt;/p&gt;

&lt;p&gt;This post walks through the red-team test we built for the sandbox of &lt;a href="https://github.com/swsgbl/hmharness" rel="noopener noreferrer"&gt;hmharness&lt;/a&gt; — an open-source (MIT) agent framework for HarmonyOS/OpenHarmony development — and its results: nine real attack payloads, all blocked, with the suite living in CI as a permanent regression gate.&lt;/p&gt;

&lt;h2&gt;
  
  
  The foundation: three primitives (Sandbox 2.0)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Egress allowlist&lt;/strong&gt; — outbound network is deny-by-default with an explicit allow table&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mount policy&lt;/strong&gt; — filesystem boundaries the sandbox cannot cross&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SecretBroker&lt;/strong&gt; — secrets exist as reference handles; values are only resolvable under an active grant, and transcripts are automatically redacted. The model sees a handle, never the secret itself.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The nine payloads (Sandbox 2.1)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DNS-rebinding lookalike hosts&lt;/strong&gt; — trick the egress allowlist with visually similar hostnames&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Subdomain wildcard boundary&lt;/strong&gt; — abuse of "*.example.com allowed" rules&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;URL userinfo/fragment spoofing&lt;/strong&gt; — hiding things in the username and fragment segments&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Path traversal&lt;/strong&gt; — ../ escapes out of the workspace&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-drive escapes&lt;/strong&gt; — Windows multi-drive-letter boundary differences&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-subject secrets&lt;/strong&gt; — one session secret read by another session sandbox&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Forged handle references&lt;/strong&gt; — fake SecretBroker handles to resolve real values&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Revoked token replay&lt;/strong&gt; — reusing an already-revoked grant token&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Grant confusion&lt;/strong&gt; — grafting a high-privilege grant onto a low-privilege execution&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;All nine blocked.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part that matters: it lives in CI
&lt;/h2&gt;

&lt;p&gt;An "all green" result is nice, but the real value is that the suite runs on every change to the sandbox code — a regression-proof red team. Anyone who touches the sandbox meets the nine payloads first.&lt;/p&gt;

&lt;p&gt;This completes a security trilogy: &lt;strong&gt;LSP pinning&lt;/strong&gt; (supply chain: sha256-pinned language servers, tamper = refuse to execute) and the &lt;strong&gt;browser extension bridge&lt;/strong&gt; (pairing code to local token, per-action approval for page_act) cover the other two capability surfaces. Every surface an agent has — execution, dependencies, browser — gets a defense, and every defense is itself testable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The general lesson
&lt;/h2&gt;

&lt;p&gt;Treat "the model will make mistakes" as a premise, not an exception. How much fault tolerance your system has for model errors determines whether it can run long tasks at all.&lt;/p&gt;




&lt;p&gt;hmharness is an open-source (MIT) agent framework for HarmonyOS/OpenHarmony development: it wires project creation, checks, builds, signing, install, launch, log reading, and result verification into a local toolchain so AI does not just generate code — it proves results against the local machine. Independent community project, no affiliation with Huawei or OpenAtom.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/swsgbl/hmharness" rel="noopener noreferrer"&gt;https://github.com/swsgbl/hmharness&lt;/a&gt; · Evidence: &lt;a href="https://swsgbl.github.io/hmharness/evidence/aisecurityopensourceharmonyos" rel="noopener noreferrer"&gt;https://swsgbl.github.io/hmharness/evidence/aisecurityopensourceharmonyos&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>cybersecurity</category>
      <category>opensource</category>
      <category>security</category>
    </item>
  </channel>
</rss>
