引導式測驗 · 中等 等級

代理測驗的程式碼執行沙箱

測試代理沙箱如何隔離模型編寫的程式碼:容器與 microVM 和 gVisor、網路出口限制以及逾時等資源上限。

問題 1 的 8

Why is code written by an AI agent treated as untrusted by default?

預覽每個問題8 問題

當您參加測驗時,就會出現答案和解釋。

  1. Why is code written by an AI agent treated as untrusted by default?
    • Because models cannot write working code
    • Because it can be buggy, wasteful or shaped by prompt injection
    • Because interpreted languages are always insecure
    • Because operating systems block AI-generated code
  2. What is the main security weakness of standard containers compared with microVMs?
    • They cannot limit memory
    • They take minutes to start
    • They share the host's kernel
    • They cannot run Python
  3. What does gVisor add to reduce risk from untrusted code?
    • A user-space kernel that intercepts system calls
    • A hardware security chip
    • A faster file system
    • An antivirus scanner for Python packages
  4. Firecracker microVMs were originally built by AWS to power which kind of services?
    • Video streaming
    • Email delivery
    • Search indexing
    • Lambda and Fargate
  5. Why is restricting outbound network access often considered the most important sandbox control when prompt injection is possible?
    • It makes code run faster
    • It prevents code from sending data or secrets to outside servers
    • It stops the model from generating code
    • It lowers memory usage
  6. Which control specifically defends against a fork bomb?
    • A read-only file system
    • A network allowlist
    • A cap on the number of processes via cgroups
    • Removing environment variables
  7. What is the recommended way to give sandboxed code access to a credential it genuinely needs?
    • Put the API key in an environment variable
    • Hard-code it into the prompt
    • Store it in the scratch directory
    • Route access through a narrow proxy or tool call instead of exposing the secret
  8. Which statement reflects the guide's warning about a common misconception?
    • A sandbox limits damage from code but does not make the agent's answers correct or its granted tools harmless
    • Sandboxes make agents completely safe
    • Sandboxes are only needed for compiled languages
    • WebAssembly sandboxes cannot run Python