AI / GitHub Copilot CLI Fundamentals Interview Questions
What is the directory trust model in GitHub Copilot CLI and why does it exist?
Copilot CLI has the ability to read, modify, and execute files in your working directory - which poses a security risk if you run it in an untrusted location (e.g. a directory containing malicious files). The directory trust model requires you to explicitly confirm trust before Copilot can act on files.
When you run copilot in a directory for the first time, you are presented with a trust prompt with three options:
| Option | Effect |
|---|---|
| 1. No | Copilot CLI exits - no files in this directory are accessed |
| 2. Yes, for this session only | Copilot can work with files in this folder for the current session only - asked again next time |
| 3. Yes, and remember this folder | Copilot trusts this folder permanently for all future sessions - not asked again when starting from this folder |
# Starting Copilot CLI in a directory for the first time: $ copilot During this GitHub Copilot CLI session, Copilot may attempt to read, modify, and execute files in and below this folder. Do you trust the files in this folder? > 1. No 2. Yes, for this session only 3. Yes, and remember this folder for future sessions
Why it matters: if you navigate into a directory containing maliciously crafted files and run Copilot CLI, those files could potentially influence the AI to execute harmful commands. The trust model ensures you consciously acknowledge the risk before granting Copilot file access.
Invest now in Acorns!!! 🚀
Join Acorns and get your $5 bonus!
Acorns is a micro-investing app that automatically invests your "spare change" from daily purchases into diversified, expert-built portfolios of ETFs. It is designed for beginners, allowing you to start investing with as little as $5. The service automates saving and investing. Disclosure: I may receive a referral bonus.
Invest now!!! Get Free equity stock (US, UK only)!
Use Robinhood app to invest in stocks. It is safe and secure. Use the Referral link to claim your free stock when you sign up!.
The Robinhood app makes it easy to trade stocks, crypto and more.
Webull! Receive free stock by signing up using the link: Webull signup.
More Related questions...
