Challenge - 5 Problems
Sandboxing Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 conceptual
intermediate1:30remaining
Why sandboxing is important in AI agents
Imagine you have an AI agent that can execute code on your computer. Why is sandboxing these operations important?
Attempts:
2 left
💻 code output
intermediate2:00remaining
Output of sandboxed code execution
What will be the output of this sandboxed Python code snippet?
Agentic_ai
sandbox_env = {'__builtins__': {}}
code = 'result = 5 + 3'
exec(code, sandbox_env)
output = sandbox_env.get('result', None)
print(output)Attempts:
2 left
❓ model choice
advanced2:00remaining
Choosing a sandboxing method for AI agents
You want to run untrusted AI-generated code safely. Which sandboxing method provides the strongest isolation?
Attempts:
2 left
❓ hyperparameter
advanced1:30remaining
Configuring sandbox resource limits
When sandboxing AI code execution, which resource limit is most critical to prevent denial-of-service attacks?
Attempts:
2 left
🔧 debug
expert2:30remaining
Debugging sandbox escape vulnerability
Given this sandboxed Python code, which option shows the way an attacker could escape the sandbox?
sandbox_env = {'__builtins__': {}}
code = '''
import os
os.system('echo escaped')
'''
exec(code, sandbox_env)Attempts:
2 left
