Why Goldman Sachs Just Walked Away From Claude Code
Last month, Goldman Sachs quietly removed Claude Code from their approved AI tools list. The reason: credential exposure during code execution. Their teams were using Claude to write and run scripts, and the bank realized that API keys, database passwords, and authentication tokens were getting embedded in conversations—and stored indefinitely on Anthropic's servers.
This isn't a theoretical risk. A mid-sized fintech company discovered in September 2026 that their AWS credentials had been logged inside Claude conversations for three months. Someone with access to those conversations could have spun up expensive infrastructure or accessed customer data. They didn't catch it until an audit flagged unusual API patterns.
If Goldman Sachs is concerned enough to ban it, your team should at least understand the risk. You might not need to pull the plug entirely, but you need to know exactly what Claude Code is doing and where your sensitive data could leak.
What Claude Code Actually Does (And Why That's the Problem)
Claude Code isn't just writing code for you to copy-paste. It's executing code directly inside the conversation. That means it's running scripts, connecting to databases, and handling authentication tokens in real time.
Here's the workflow: You tell Claude to "connect to our Postgres database and pull last month's revenue report." Claude writes the connection code, and then it runs it. That database password? It's now visible in the conversation thread and stored on Anthropic's infrastructure. Even if you delete the conversation later, the data has already been logged.
For a solo consultant running personal projects, this might be acceptable risk. For a team handling customer data, financial records, or proprietary information, it's reckless.
The tricky part: Claude doesn't maliciously steal your data. But Anthropic stores conversations for improvement and legal purposes. Your credentials are sitting in their systems, available to their staff, vulnerable to breaches, and potentially used to train future models (though they claim not to do this). You're trusting a third party with your keys.
The Real Scenarios Where Claude Code Creates Liability
Scenario 1: The Marketing Manager's Accidental Leak
A mid-level manager at a B2B SaaS company uses Claude Code to build a quick reporting dashboard. They paste their Stripe API key to help Claude pull transaction data. Three weeks later, the company gets audited. The compliance team asks where that key has been stored. The manager realizes it's still in the Claude conversation. The company now has to rotate all Stripe credentials, audit three weeks of logs, and file an incident report with their insurance carrier. Cost: $40,000 in audit fees, plus the liability exposure.
Scenario 2: The Contractor's Database Access
You hire a freelance data analyst to build a sales forecast model using Claude. They ask Claude to query your PostgreSQL database directly. Your database credentials are now in a conversation owned by a contractor who won't be with your company next month. Even if you revoke their access, the credentials are still visible in Claude's conversation history. A disgruntled ex-contractor could theoretically access that conversation (depending on how they saved it) and still connect to your database.
These aren't edge cases. CISO teams across finance, healthcare, and retail are flagging these exact scenarios.
What You Should Do Right Now
Option 1: Stop Using Claude Code For Anything With Credentials
This is the safest move. If you're just using Claude to brainstorm, write copy, or debug code you'll manually review? Fine. But the moment credentials, API keys, or database passwords enter the conversation, stop.
Example: Instead of asking Claude to "connect to our Stripe account and export this month's recurring revenue," ask Claude to "write me the Python code to connect to Stripe and export MRR." You run the code locally. Your credentials never touch Claude's servers.
Option 2: Use Claude Code With Temporary, Scoped Credentials
If you're going to use Claude Code for automation, create temporary API keys specifically for that task. Most platforms support this: AWS has temporary credentials, Stripe has restricted API keys, GitHub has personal access tokens with limited scope.
Here's how: You need to pull daily sales data. Instead of giving Claude your main database password, create a read-only user account that expires in 24 hours. Claude uses that account. After 24 hours, even if someone finds the credentials, they're useless.
Providers like AWS and Stripe make this easy. AWS Identity and Access Management (IAM) lets you create temporary credentials that auto-expire. Stripe's restricted API keys can be locked to specific resources. Use them.
Option 3: Use Open-Source Code Runners Instead
Run the code locally on your own infrastructure. Ask Claude to write the script, then execute it on your machine or a private server. Your credentials never leave your network.
This requires more setup, but it eliminates the storage problem entirely. Services like GitHub Codespaces or local Docker containers let you run code securely without exposing credentials to third-party AI platforms.
Better Alternatives For Different Use Cases
You don't need to abandon AI-assisted coding entirely. You just need the right tool for the job.
For data analysis and reporting: Use Gemini 2.0 Flash for business reporting. You can upload files, ask it to analyze data, and export results without running code that touches your production systems. It's also significantly cheaper than Claude for high-volume queries.
For writing code you'll review locally: Claude is still excellent. Use it to write the code, then run it on your machine. No credentials needed in the conversation.
For secure automation workflows: Look at Claude Code with GitHub for secure workflows, where you use GitHub Actions to execute code in an isolated environment rather than inside Claude's platform.
The key principle: If credentials are involved, the execution environment should be yours, not Anthropic's.
The Misconception Nobody Talks About
"Our data isn't sensitive, so it doesn't matter if Claude stores it." Wrong. Your API keys are sensitive, whether or not your data is. A leaked Stripe key, AWS credential, or database password can be exploited independently of whether anyone cares about your actual business data. An attacker doesn't need to be interested in your company; they just need access to infrastructure they can use for cryptocurrency mining, DDoS attacks, or ransomware staging.
Also, you might not know what's sensitive until an auditor or compliance officer tells you. Companies routinely underestimate the regulatory implications of storing credentials in third-party systems.
How to Talk to Your Team About This
Don't ban Claude outright. That's overreaction and kills productivity. Instead, set a clear policy:
- Claude is approved for writing, brainstorming, and debugging code that doesn't touch production systems.
- Claude Code is only approved for tasks where credentials are temporary and scoped.
- If you're using credentials with Claude Code, they must be generated specifically for that task and must expire within 24 hours.
- No credentials should ever be typed directly into Claude conversations. Use environment variables or parameter injection instead.
Make it specific and actionable. Your team will respect that more than a vague "don't use this tool" edict.
One More Thing: Check Your Conversation History
If your team has already been using Claude Code, audit past conversations. Search for common credential patterns: "password=", "api_key=", "secret=", AWS access key IDs (they start with AKIA), database connection strings, Stripe keys (sk_ prefix).
If you find credentials, you have to assume they've been compromised. Rotate them immediately. Yes, it's tedious. It's also the only responsible thing to do. Learn to spot AI tool data leaks so you can catch these faster in the future.
The Bottom Line
Goldman Sachs didn't ban Claude because it's a bad tool. They banned Claude Code because it's a bad fit for handling credentials. That's a different thing entirely. If you use Claude responsibly, you'll be fine. If you start treating it like a secure execution environment, you'll eventually regret it.
Your move: Decide what your team actually needs to accomplish, then pick the tool that does that without exposing your infrastructure. Most of the time, Claude still wins. Just not when credentials are involved. Teams at Next Wave Index learn exactly how to make these kinds of decisions—matching AI tools to real business workflows instead of forcing workflows into tools.
Learn AI the Structured Way
This blog post scratches the surface. Our courses go deep with hands-on modules, real templates, and skill assessments.
Get the Free AI Playbook