AI / GitHub Copilot CLI Fundamentals Interview Questions
What security considerations should developers be aware of when using GitHub Copilot CLI?
Copilot CLI is a powerful agentic tool that can read, modify, and execute code. This power introduces security considerations that every developer and organisation should understand before adopting it.
| Risk | Mitigation |
|---|---|
| Malicious files in untrusted directories | Use the directory trust model - never select 'Yes' in untrusted or downloaded directories without inspection |
| Prompt injection via file contents | Be cautious with repos from unknown sources - malicious files can contain instructions that try to hijack Copilot's actions |
| Token security | Use fine-grained PATs with minimum permissions; rotate tokens regularly; store in system credential store |
| Data privacy | Business/Enterprise plans exclude data from training; Free/Pro users should review GitHub's data usage settings |
| Runaway agent actions | Use Plan mode to review before Autopilot executes risky changes; Ctrl+C to stop at any time |
| CI/CD secret exposure | Never log COPILOT_GITHUB_TOKEN; use encrypted secrets in CI systems |
| Scope of file access | Copilot only accesses files in and below the trusted directory - structure your repos accordingly |
Prompt injection warning: if you run Copilot CLI in a directory containing adversarially crafted files (e.g. a malicious repository), those files could contain embedded instructions designed to make Copilot take unintended actions. The directory trust model is the primary defence - only trust directories you control and have inspected.
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...
