AI agents should not have hard-coded credentials in topics
Part of Maester · Copilot Studio · Agents · All checks
Invoke-Maester -TestId MT.1119Overview
Section titled “Overview”AI agents should not have hard-coded credentials in topic definitions.
Hard-coded credentials such as API keys, bearer tokens, connection strings, or passwords embedded in agent topics can be extracted through prompt injection attacks. These credentials often persist in agent definitions long after they have been rotated elsewhere, creating a window of exposure.
How to fix
Section titled “How to fix”Replace all hard-coded credentials with secure alternatives. Use Power Platform environment variables for configuration values and Azure Key Vault for secrets. Configure custom connectors with proper OAuth or API key authentication that stores credentials outside the agent topic definition.
Learn more: Use environment variables in Power Platform
Details
Section titled “Details”Every attribute of this check
| Field | Value |
|---|---|
| Test ID | MT.1119 |
| Severity | High |
| Suite | Maester |
| Product | Copilot Studio |
| Feature | Agents |
| Area | AI and agents |
| Resource type | Agent |
| User impact | Low |
| Implementation cost | Medium |
| MITRE ATT&CK | T1552 Unsecured Credentials |
| Supports controls | nist-800-53-r5:IA-5(7) |
| PowerShell test | Test-MtAIAgentHardCodedCredentials |
| Services | Graph |
Source
Section titled “Source”About this check
- Severity
- High
- Effort to fix
- Medium
- Impact on users
- Low
- Product
- Copilot Studio
- Feature
- Agents
- Area
- AI and agents
- Suite
- Maester