Dayward AIWeChat Mini Program
Agent Security in 5 Days
Week 1 · D4🔒 LockedAbout 5 hours

Runtime controls: capabilities, approval gates, egress allowlists, sandbox layers, secrets and tenancy

Assume the injection already happened and use the runtime to contain the damage: declare each tool's capability and risk tier, gate the dangerous ones on human approval, allowlist filesystem paths and network egress, separate the policy layer from the isolation layer, and handle secrets, per-user credentials and tenant isolation.

Today's goals 0/3

Sign in to tick these off and save your progress.

Today's Goals

  1. Write capability and risk-tier declarations for a set of tools and decide from them which actions need an approval gate
  2. Implement path and network egress allowlists and say which exfiltration path each one closes
  3. Separate the policy layer from the isolation layer, and say how credentials and logs are isolated per tenant

The first three days all fought the same fight: keep the bad words out. Draw the trust boundaries, build input-side defense, then use architecture to keep untrusted content away from the privileged call. Today the assumption changes — the injection already happened, and the model has made up its mind to mail the customer list out. When you have finished, come back to the top of the page and check off the three goals.

Plain-Language Walkthrough

A bank teller's authority limits: what you may do is written into the institution

Something you notice at a bank branch: the teller can check your balance and push through a small transfer, but past a certain amount they have to stand up and fetch a supervisor. The interesting part is that this rule does not live in the teller's head — it lives in the institution and it is welded into the counter system. Whether the teller is in a good mood, has been talked around by a customer, or has simply been conned, a large transfer still needs a second person to nod. The institution does not assume the teller is always clear-headed. It assumes there will be a day when they are not.

An agent's tool executor is that counter system. The first three days of defense were all about keeping the model clear-headed. They are all worth doing, and they share one premise: one day one of them will miss. So today's stance shifts to assume the injection already happened. deskmate has read that ticket, and it now intends to query the customer database, mail the results to collector@attacker.example, and then poke https://169.254.169.254/latest/meta-data/. This layer's job is not to see through it. It is to make it impossible.

That is possible only because the tool executor knows something the model does not: what each tool actually does. The model sees a name and a description; the executor sees the real side effects — does it touch private data, does it produce outbound traffic, can a mistake be undone. All three are structural facts, and not one word of that ticket changes any of them.

So the counter rules land as three gates: write down what each tool can do, then decide which actions need a human to nod, then control where data is allowed to go. Each gate stalls the moment you try to build it, though. Who maintains the capability table, and what happens when somebody adds a tool and forgets it? Which layer should the person doing the nodding stand in? And the nastiest one — you think data can only go to the few places on your allowlist, and the attacker always finds the edge you never registered. One at a time.

Sign in and link WeChat to read

Sign in, then link your WeChat mini program account on the account page. Linked accounts share one free article per day. Unlock additional articles with rewarded videos in the mini program.

Mini program QR code

Scan in WeChat to open Dayward AI. Open the same course and chapter, choose the rewarded video, then refresh this page after completion.

Interview questions

  • Why must a human-in-the-loop confirmation gate live inside the server-side tool executor? What breaks if you put it in the frontend?人在回路的确认门,为什么必须放在服务端的工具执行器里?放在前端会出什么事?
    Common in ChinaCommon overseasIntermediate#human-in-the-loop#tool-execution#trust-boundary

    🔒 Unlock this chapter to see the answer keys.

  • Which data exfiltration paths does a network egress allowlist actually block, and which ones does it miss?网络出口白名单能挡住哪些数据外泄路径?哪些是它挡不住的?
    Common in ChinaCommon overseasDeep dive#egress-control#ssrf#data-exfiltration

    🔒 Unlock this chapter to see the answer keys.

  • In a multi-tenant agent service, how should credentials and logs be isolated?一个多租户的 Agent 服务里,凭据和日志分别该怎么隔离?
    Common in ChinaCommon overseasIntermediate#multi-tenancy#secrets-management#audit-logging

    🔒 Unlock this chapter to see the answer keys.

Comments