I hid 12 fake private keys in a local dummy project. Gitleaks found only 8 with its default rules, while TruffleHog found none. If you’ve run wallet scripts with an AI coding assistant, off-the-shelf scanners alone won’t catch everything.

After reports spread that DeepSeek Harness (DSH) may have uploaded private keys along with session logs, everyone who has used an AI coding assistant started wondering the same thing: Has the AI read my private keys, and can I still find out? The official DSH README states that the session-log upload plugin is enabled by default, and that a single request can include up to 8 MiB. On November 29, 0xAA (@0xAA_Science) posted a warning. As of December 3 at 19:38, the post had 206,000 views and 773 bookmarks. All tests in this article used newly generated fake private keys that had never been funded, and were conducted locally without touching any real keys. This article covers five things: what DSH session logs send, where private keys can be scattered across your computer, what kinds of secrets two scanners miss, why .gitignore can’t stop them, and a four-part anti-phishing checklist for the fake “S3 voting” scheme on Hyperliquid.

DSH’s session log is enabled by default. The official documentation says each upload can contain up to 8 MiB.

DSH is an open-source AI agent tool from DeepSeek. It can read files, run commands, and help modify code. The issue involved a plugin called dsh-session-log-deepseek. The official README’s settings table has just two rows: enabled, which defaults to true, and maxBytes, which defaults to 8 MiB. The README also says this plugin is included in the default configuration shipped by the developers. That means anyone who hasn’t changed the settings will have a dsh_session_log field added to every request they make to DeepSeek’s official API.

This field contains all complete events from the session since the previous upload was accepted. The event types listed in the README also include tool events. After analyzing the package and observing the traffic in late November, researcher @ScarletKc reported that it included the contents of files read by tools and the output of commands. In other words, if the AI assistant read .env during the conversation or ran a script that printed a private key, that text was in the session. Content exceeding 8 MiB isn’t discarded; the README says it’s sent in batches with subsequent requests.

GitHub commit records show that the default was enabled on September 14. On September 24, a third party posted in the GitHub discussion forum to point out the privacy risk of this default. It wasn’t until September 28 that the web settings page added a switch to turn it off. The path is Settings → General → Data management. Turn off “Upload session log when using the official model API.” If you use a configuration file, set this plugin to enabled: false.

Two details deserve special attention. First, the README explicitly says that if you turn it back on after disabling it, events recorded while it was off will also be uploaded retroactively. So turning it off and then back on is effectively the same as never turning it off. Second, even after log uploads are disabled, request headers for two marker subagents are still sent; telemetry feedback is controlled by a separate switch. As of December 3, the README on the master branch still said enabled defaults to true, and version 0.2.3-alpha.3, released on November 28, didn’t change that default either.

The causal link to the incident has not been confirmed. On November 26, victim @wqw_lee posted that his wallet’s private key was stored in an env file, and that DSH failed to redact .env.local, printing the key in tool output. He “suspected” the session log had been uploaded along with DeepSeek requests, and estimated that 15 to 20 wallets, holding around $500,000, were stolen. Three days later, 0xAA reposted a warning, saying a friend’s investigation had “strongly suggested” a link to the default being enabled. Neither person said it had been confirmed, and as of December 3, no public statement from DeepSeek had been found.

To connect the theft to DSH, three things would all need to be true: first, the private key actually made it into the session; second, uploads were enabled at the time; and third, whoever obtained the log used the key. The official documentation can confirm only the second point—that uploads are enabled by default. The first relies on the victim’s own account, and there is currently no public evidence for the third. So this incident can only be described as suspected. But anyone who has used an AI assistant with a wallet can check whether the first two things happened on their own computer.

In a wallet project, private keys can end up in at least four kinds of places

To figure out where to look, we created a fake dApp project and a fake user directory locally, and put fake private keys in them following common practices. There were 12 instances in all, plus 1 transaction hash that looked like a private key, planted as a decoy.

Six instances were in project files: an EVM private key in .env; a Solana private key in .env.local; a hardcoded backup private key in hardhat.config.js; a 64-byte array of the kind commonly used by the Solana CLI in wallet/id.json; a 24-word seed-phrase backup in the notes folder; and a line in a deployment script that printed a private key into logs/deploy.log.

Two instances were in shell history: one line with export PRIVATE_KEY, and another with a transfer command that put the private key directly after the --private-key argument. Many people think a command disappears once they’ve run it, but it stays in the history file.

One instance was in Git history. The first commit accidentally included .env, and the second deleted it and added .gitignore. The working directory looked clean, but running git log -p to look back still revealed the old private key.

Three instances were in the AI assistant’s session log. The fake log was written in a generic JSONL style and didn’t imitate the real paths or formats of any product. The three instances were: the user pasted a 12-word seed phrase in the conversation; the assistant redacted .env when reading it, but didn’t redact .env.local; and the assistant ran a deployment command whose output included a private key. The latter two match the victim’s account of “redaction failing and the private key being printed in tool output.”

Of the 12 instances, only the 6 in project files are the ones most people would think to check. The other 6 were in shell history, Git history, and session logs—places you can’t see just by opening the project folder.

The two general-purpose scanners missed exactly the seed phrases and private keys without keywords

Next, we ran two open-source scanners, each once, using their default rules without any custom settings. gitleaks 8.30.1 scanned the project folder, the fake user directory, and Git history. Across all three scans, it found 8 instances and took 1.15 seconds. All 8 were detected by the same generic rule, generic-api-key, which catches private keys accompanied by words like KEY—for example, the string after PRIVATE_KEY=.

The 4 instances it missed were the byte array in wallet/id.json; the 24-word seed-phrase backup; the private key after the --private-key argument in shell history; and the 12-word seed phrase in the session log. Seed phrases are just 12 or 24 English words and look like ordinary text; byte arrays are just strings of numbers. Neither looks like an API key.

trufflehog 3.100.1 scanned the same paths and Git history. We added --no-verification so it wouldn’t need to connect to the internet, but it reported none of the 12 instances and took 3.40 seconds. Most of its rules are for keys associated with specific services. None matched the EVM private key, Solana private key, or seed phrases in this test.

These results only reflect the coverage of the default rules. In this test, both tools’ default rules were geared toward service keys with fixed prefixes or keywords. They had no dedicated rules for crypto wallet private keys and seed phrases, so you need to add your own.

The custom scanner had just four rules. The first looked for a string starting with 0x followed by 64 hexadecimal characters, corresponding to an EVM private key. The second looked for a long string of base58 characters and counted it only if decoding produced exactly 64 bytes, corresponding to a Solana private key. The third looked for an array of 64 integers, each within the byte range, corresponding to id.json. The fourth looked for 12 or 24 consecutive English words from the BIP39 word list, corresponding to a seed phrase.

These four rules found all 12 instances, and the entire scan took less than 0.01 seconds. The tradeoff was 1 false positive: the transaction hash planted as a decoy. A transaction hash also starts with 0x and has 64 hexadecimal characters, so you can’t tell them apart by format alone; you have to open the source file and check the context. In real projects, deployment logs and test scripts are often full of transaction hashes, so there would be many more false positives than in this test. But it’s better to review a few extra results than miss a private key. You can also add custom rules to gitleaks by putting these four rules in its configuration file, rather than relying only on the default generic rule.

The first version of the scanner actually missed 1 instance. The JSON line in the session log had a field named text, and text is also in the BIP39 word list. The program started counting 12 words from text, shifting the entire seed phrase out of alignment. It was only detected after we changed the scanner to report the whole run of consecutive words. Custom rules can make mistakes too, so always compare every scan result against the source file.

.gitignore only controls Git, and the official Node template still lets 3 files containing keys through

Many tutorials say, “Put .env in .gitignore and you’re safe.” This time, we used the Node and Python templates from GitHub’s official gitignore repository and ran git check-ignore on 6 files in a project containing fake private keys.

The Node template blocked .env, .env.local, and the logs folder, but hardhat.config.js, wallet/id.json, and notes/seed-backup.txt—3 files in all—would still be added by git add. The Python template blocked only .env and log files; it didn’t even block .env.local, missing 4 files.

More importantly, .gitignore only determines whether Git will include a file. AI assistants reading files, shell history, and session logs written by the assistant itself don’t check .gitignore. The path suspected in this DSH case involved the assistant reading a file and its contents ending up in the session log—nothing to do with Git.

So your self-check should have two layers. First, check whether the AI can read the files: move private keys, seed phrases, and id.json out of the project folder and somewhere the assistant won’t be asked to open. Second, check for traces that may already be there: scan four places—the project files, shell history, the output of git log -p --all, and the AI assistant’s log directory. Shell history is usually in .bash_history or .zsh_history in the user’s home directory. git log -p --all prints every change across all branches, including deleted files. AI assistants store logs in different locations, so check the documentation for your specific tool. If a commit containing a private key has already been pushed to a remote, rewriting history afterward can’t retrieve copies that have already been cloned; treat it as a leak too. If you confirm that an AI assistant read a private key while uploads were enabled, assume it has leaked: create a new wallet, transfer your assets, and don’t use the old one again.

Only 36 Hyperliquid lookalike domains appear on both anti-phishing lists

There was another threat to watch for that same week. A fake “HYPE Season 3 Vote” page used Hyperliquid branding and dangled “rewards” of 38.8 million HYPE as bait, asking people to connect their wallets and vote. The anti-phishing database PhishDestroy records that domains of this kind have been listed by MetaMask, ScamSniffer, and SEAL.

We fetched both public lists again on December 3 at 19:37. MetaMask’s eth-phishing-detect blocklist had 120,755 domains, and ScamSniffer’s scam-database had 364,218. Using the same regex as on November 30 to look for wording matching the “S3 vote,” MetaMask listed 85 domains and ScamSniffer listed 27. Only 4 appeared on both lists. All three numbers were unchanged from three days earlier; there were no additions.

Expanding the search to include domains containing hyperliq or hyperecos yielded 351 on MetaMask and 535 on ScamSniffer. Together, the lists had 850 unique domains, but only 36 were listed by both. We’re giving only the counts here, not listing or linking to any domains.

The takeaway is that if a wallet or browser extension relies on just one list, a large number of lookalike domains won’t be on its blocklist. So here are four steps to protect yourself from phishing: open the official Hyperliquid site only from a bookmark you saved yourself; check suspicious domains against both lists; if you connected your wallet or signed an approval, revoke it with a revoke tool; and if you’ve already signed, switch to a new wallet, because a submitted signature can’t be taken back.

Connecting a wallet by itself doesn’t move your assets. The danger is the signature request that appears afterward. An approval signature lets the other party’s contract spend up to a certain amount of a token; revoking the approval resets that amount to zero. But if you signed a direct transfer, or the approval has already been used, revoking it afterward won’t recover assets that have been transferred away. So if you’ve already signed with a wallet, move any remaining assets to a new wallet as soon as possible, even after revoking the approval.

A summary table: 7 private-key self-checks and 4 anti-phishing steps

You can screenshot and save the table at the end of this article on its own. It matches the information above, and all figures come from local tests and list refreshes conducted on December 3.

Here’s a self-checklist for private keys when using AI coding assistants.

1. Turn off session-log uploads by setting enabled: false. Note that if you turn it back on, logs from the period when it was off will be uploaded retroactively.

2. Move keys out of folders the AI can read. Don’t keep .env, id.json, or seed-phrase files in your project.

3. Use a scanner that recognizes wallet formats. Of the 12 fake private keys, a custom regex caught all 12, gitleaks caught 8, and trufflehog caught none.

4. Scan Git history. Use git log -p to go back through it; it recovered 1 private key from a deleted .env file.

5. Scan the AI assistant’s session logs. The fake log contained 3 instances; gitleaks missed the one seed phrase.

6. Don’t treat .gitignore as a safety measure. Of the 6 files containing keys, the official Node template missed 3 and the Python template missed 4.

7. If a private key has been read, treat it as leaked. Create a new wallet, transfer your assets, and don’t use the old one again.

Here are four anti-phishing steps for the Hyperliquid “S3 vote.”

1. Bookmark the official site. Open Hyperliquid’s official site only from a bookmark you saved yourself.

2. Check domains against both lists. MetaMask has 85 domains with wording matching the S3 vote, and ScamSniffer has 27. Only 4 appear on both.

3. Revoke approvals. If you connected your wallet or signed an approval, revoke it first.

4. If you’ve signed, switch to a new wallet. Signatures can’t be taken back, so transfer any remaining assets to the new wallet.

If you check only one list, ScamSniffer alone covers 535 of the 850 lookalike domains, about 63%. MetaMask alone covers only 351, about 41%.

$HYPE