Claude Code’s ‘don’t ask again’ button has a secrets-spilling problem
A security firm found thousands of valid secrets in public GitHub files for a coding tool, exposing API keys and database credentials.
Overview
A security firm named GitGuardian found more than 30,000 distinct secretsPrivate credentials used by software, such as API keys, database passwords, and encryption keys in local settings files for a tool called Claude Code. These files were stored in 23,276 public repositories on GitHub, and 5343 of the exposed credentialsThe login details, such as a username and password or key, that prove who an account belongs to were still valid when detected. The exposed data included databaseAn organized digital store of structured records, such as customer accounts, orders, or messages, queried by software connection strings, cloud provider tokensA short-lived digital pass that a server gives a logged-in user or app, SSHAn encrypted network protocol that administrators and developers use to log in to remote servers and run commands passwords, and Google API keysA secret string a program sends with an API request to identify itself and get access. The issue occurs because the tool saves the full command string, including any embedded credentials, when a user selects the option to not ask for permission again. Although the tool adds the file to local ignore settings, developers can still accidentally commit the file to public repositories. As a result, 67% of the valid secrets found in these files were working credentials that could be used to access sensitive systems.
Terms in this story
- secrets
- Private credentials used by software, such as API keys, database passwords, and encryption keys. Software teams use vault tools to keep secrets out of source code because anyone who finds a leaked secret in a public repository can log right in to the company's cloud services.
- credentials
- The login details, such as a username and password or key, that prove who an account belongs to. Many breaches begin when attackers steal an employee's login credentials through a fake website and sign in to the company network as if they belonged there. Security+ objective 4.6 lists the term
- database
- An organized digital store of structured records, such as customer accounts, orders, or messages, queried by software. Behind almost every website and mobile app sits a database, and attackers target misconfigured or unpatched databases to copy millions of user records at once.
- tokens
- A short-lived digital pass that a server gives a logged-in user or app. After you sign in once, your browser or app presents a token on each request, and if malware steals that token the attacker can act as you without knowing your password. Security+ objective 4.6 lists the term
- SSH
- An encrypted network protocol that administrators and developers use to log in to remote servers and run commands. Attackers constantly scan the internet for servers with open SSH ports and weak passwords, while defenders protect SSH access with cryptographic keys instead of passwords.
- API keys
- A secret string a program sends with an API request to identify itself and get access. Software teams sometimes accidentally upload an API key to a public code repository, allowing attackers who scan for leaked keys to rack up cloud bills or read private databases. Security+ objective 4.6 lists the term
- API
- A structured interface that lets one software program request data or actions from another program. Mobile apps, websites, and cloud services talk to backend servers through an API, and a poorly protected API can let attackers pull customer records in bulk. Security+ objective 4.7 lists the term
- keys
- The secret value that locks or opens a message. Many breach and ransomware stories come down to who holds the cryptographic key, since strong encryption protects data only as long as the key stays secret. From the CYBR 101 room CYBR 101: Ciphers and encryption (part 1)
- configuration file
- A text file that stores settings, network addresses, and options for how a program or server runs. Attackers who gain read access to a server look for its configuration file first because it often contains database passwords, API keys, and internal server paths.
- permissions
- The specific rights granted to an account or app to read, write, or run files and services. When a mobile app or browser extension asks for broad permissions, such as reading every web page you visit, a malicious update can abuse those rights to steal passwords.
- source code
- The human-readable programming instructions written by developers before they are compiled into a runnable program. When attackers steal a company's private source code from a repository, they can study it to find hidden vulnerabilities or leaked API keys.
- shell commands
- The command-line interpreter program that accepts text commands and runs them on an operating system. When an attacker exploits a web server and pops a shell, they can type operating system commands directly as if they were sitting at the server's keyboard.
This page is a short description made for this site. The article itself, with its author's name and its own link, is on the CSO Online website. Cite the article, not this page.
Read the full article on CSO Online (opens in a new tab)
Course connections
Each line below connects this story to a Security+ objective (a skill on CompTIA's Security+ exam, a common first cybersecurity certification), a CYBR 101 week, or a cybersecurity job, and quotes the words that made the connection.
- Kind of story: Breach or attack
"...exposing thousands of API keys..." Found by reading the article; these exact words are in it - Who is affected: "...developers..." Organizations using the product
Copied word for word from the article - Security+ 4.6 Given a scenario, implement and maintain identity and access management.
"......Anthropic's Claude Code is exposing thousands of API keys, database credentials and other secrets, according..." Found in the opening sentences - CYBR 101 week 6: AI, how it is attacked, and what it does for attackers and defenders
"Claude Code’s ‘don’t ask again’ button has a..." Found in the headline - CYBR 101 week 7: Linux, Windows, permissions and firewalls
"......configuration file meant to store local command permissions on Anthropic's Claude Code is exposing thousands..." Found in the opening sentences
How a story is connected to the course, and every objective, week and job role