Hush Security has found hardcoded secrets in 12 percent of credential slots across roughly 82,000 public Model Context Protocol configuration files, exposing access credentials used by AI coding tools. The company’s research also found that deleting secrets from a current file can leave them readable in earlier Git commits.
Model Context Protocol, or MCP, connects AI applications with external tools and services. Its configuration files tell an agent which tools to use and how to authenticate. Hush examined files associated with Claude Code, Cursor, Visual Studio Code, Windsurf, Gemini, OpenAI Codex, JetBrains and other coding agents.
The 12 percent figure refers to credential slots rather than the proportion of files containing secrets. Among the hardcoded secrets, 55 percent lacked a recognizable vendor token pattern, which Hush says can make them harder for pattern-based secret scanners to identify.
The dataset included GitHub personal access tokens, Anthropic and OpenAI API keys, Slack and Notion workspace tokens, and database connection strings containing passwords. These credentials can grant software access to systems without a person signing in again for each interaction.
Among exposed credentials whose scope could be identified, 53 percent provided organization-, account-, workspace- or database-wide access. Among those with a defined expiration policy, 80 percent did not expire by default. Across all hardcoded secrets, 24 percent combined broad access with non-expiring credentials.
Hush traced the history of 7,681 credential-bearing configurations. It found 1,394 secrets still present in current files and another 243 that had been removed but remained readable in previous commits. Removing a value from a current configuration can therefore leave the same secret available in the repository’s version history.
Public developer utilities have previously exposed production credentials and sensitive configuration data. Separately, NIST’s newly finalized token-security guidance recommends short-lived workload credentials and automated key rotation.
Hush recommends using variable expansion instead of inline secrets, replacing static credentials with short-lived identity-based access, and rotating any secret ever committed to a repository. The company also recommends brokering credentials from a secure location rather than placing them in an agent’s configuration, and assigning each agent identity an explicit owner and expiration.
Sources: PR Newswire
–
By the ID Tech Editorial Team

