<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: The Weekly Stack</title>
    <description>The latest articles on DEV Community by The Weekly Stack (@weeklystack).</description>
    <link>https://dev.to/weeklystack</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4273466%2Fe1fc58d5-8d2f-4b3d-90f2-d27a068d27b6.png</url>
      <title>DEV Community: The Weekly Stack</title>
      <link>https://dev.to/weeklystack</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/weeklystack"/>
    <language>en</language>
    <item>
      <title>How to Check a Cloned Repo for Hidden AI Agent Hooks and MCP Servers</title>
      <dc:creator>The Weekly Stack</dc:creator>
      <pubDate>Mon, 30 Nov 2026 10:59:33 +0000</pubDate>
      <link>https://dev.to/weeklystack/how-to-check-a-cloned-repo-for-hidden-ai-agent-hooks-and-mcp-servers-427g</link>
      <guid>https://dev.to/weeklystack/how-to-check-a-cloned-repo-for-hidden-ai-agent-hooks-and-mcp-servers-427g</guid>
      <description>&lt;p&gt;A repo can ship its own agent hooks, MCP servers and auto-run tasks. Open any repo you didn't write in VS Code's Restricted Mode first. Then read four places: &lt;code&gt;.kiro/settings/mcp.json&lt;/code&gt; (programs that start as MCP servers), &lt;code&gt;.kiro/hooks/&lt;/code&gt; (shell commands that run on agent events), &lt;code&gt;.kiro/steering/&lt;/code&gt; plus any &lt;code&gt;AGENTS.md&lt;/code&gt; (instructions your agent will follow) and &lt;code&gt;.vscode/tasks.json&lt;/code&gt; (tasks that can run when the folder opens). Only trust the folder once they look clean.&lt;/p&gt;

&lt;p&gt;This is a 5-minute check using Kiro for VS Code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;p&gt;Kiro for VS Code reads the project's &lt;code&gt;.kiro&lt;/code&gt; folder, so a repo's specs, steering, hooks and MCP servers come along when you clone it. Great for teams, risky for a random repo from a tutorial.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Open it untrusted
&lt;/h2&gt;

&lt;p&gt;Clone into a separate folder (say &lt;code&gt;ForEvaluation&lt;/code&gt;) and open it in VS Code. If the trust prompt appears, pick &lt;strong&gt;No, I don't trust the authors&lt;/strong&gt;. Restricted Mode disables AI agents, the terminal, tasks, debugging, some workspace settings and many extensions, and Kiro won't start the workspace's MCP servers in an untrusted folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Read &lt;code&gt;.kiro/settings/mcp.json&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Every &lt;code&gt;command&lt;/code&gt; is a program that runs on your machine when that server starts, and every &lt;code&gt;url&lt;/code&gt; is a server your agent will talk to. &lt;code&gt;"autoApprove": ["*"]&lt;/code&gt; means all of that server's tools run without asking.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Read every file in &lt;code&gt;.kiro/hooks/&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;A hook with &lt;code&gt;"type": "command"&lt;/code&gt; runs a shell command in your project root when its trigger fires, such as when the agent saves a file or uses a tool. Hooks activate on their own when a session starts. Know exactly what each one runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Skim &lt;code&gt;.kiro/steering/&lt;/code&gt; and any &lt;code&gt;AGENTS.md&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;These are instructions Kiro follows, and &lt;code&gt;AGENTS.md&lt;/code&gt; files are always included. Watch for lines telling the agent to read &lt;code&gt;.env&lt;/code&gt;, fetch a URL or skip approvals.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Check &lt;code&gt;.vscode/tasks.json&lt;/code&gt; for &lt;code&gt;"runOn": "folderOpen"&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;That task runs when the folder opens. VS Code never runs it in an untrusted workspace and asks first by default, but you should know it's there.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Then trust it, or fix it first
&lt;/h2&gt;

&lt;p&gt;Delete anything you don't want, then trust the folder from the banner or &lt;strong&gt;Workspaces: Manage Workspace Trust&lt;/strong&gt; in the Command Palette.&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick scan from your own terminal
&lt;/h2&gt;

&lt;p&gt;Run this on Mac or Linux, outside the repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~/ForEvaluation
grep -rnE &lt;span class="s1"&gt;'"command"|"url"|autoApprove|"runOn"'&lt;/span&gt; some-repo/.kiro some-repo/.vscode 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null
find some-repo -name AGENTS.md -not -path &lt;span class="s2"&gt;"*/node_modules/*"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Further reading: &lt;a href="https://code.visualstudio.com/docs/editing/workspaces/workspace-trust" rel="noopener noreferrer"&gt;Workspace Trust&lt;/a&gt; Â· &lt;a href="https://kiro.dev/docs/mcp/configuration/" rel="noopener noreferrer"&gt;Kiro MCP config&lt;/a&gt; Â· &lt;a href="https://kiro.dev/docs/hooks/" rel="noopener noreferrer"&gt;Kiro hooks&lt;/a&gt; Â· &lt;a href="https://kiro.dev/docs/steering/" rel="noopener noreferrer"&gt;Kiro steering&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was first published in The Weekly Stack, a free newsletter of AI tool tips for builders. Subscribe: &lt;a href="https://weeklystackhq.beehiiv.com/subscribe" rel="noopener noreferrer"&gt;https://weeklystackhq.beehiiv.com/subscribe&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>vscode</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Delete API Keys Your AI Coding Agent Saved on Your Laptop (Claude Code and Codex)</title>
      <dc:creator>The Weekly Stack</dc:creator>
      <pubDate>Mon, 30 Nov 2026 10:59:04 +0000</pubDate>
      <link>https://dev.to/weeklystack/how-to-delete-api-keys-your-ai-coding-agent-saved-on-your-laptop-claude-code-and-codex-431e</link>
      <guid>https://dev.to/weeklystack/how-to-delete-api-keys-your-ai-coding-agent-saved-on-your-laptop-claude-code-and-codex-431e</guid>
      <description>&lt;p&gt;Claude Code saves every session as a plain-text transcript in your home folder for 30 days, and Codex saves a history file by default. If your agent ever read a &lt;code&gt;.env&lt;/code&gt; file or printed a key, that key is sitting on your disk.&lt;/p&gt;

&lt;p&gt;This cleanup takes about 10 minutes and needs no new tools: search those folders, rotate anything you find, purge, then shorten how long they keep history.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;p&gt;Anthropic's own docs are blunt: Claude Code transcripts "are not encrypted at rest" and "if a tool reads a &lt;code&gt;.env&lt;/code&gt; file or a command prints a credential, that value is written" to the session file. Laptops get backed up, synced and lost. Running several agents? Check every agent's data folder, not just one.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Know where it lives
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code:&lt;/strong&gt; transcripts in &lt;code&gt;~/.claude/projects/&lt;/code&gt; (deleted after 30 days by default) and your typed prompts in &lt;code&gt;~/.claude/history.jsonl&lt;/code&gt; (kept until you delete them).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Codex:&lt;/strong&gt; &lt;code&gt;~/.codex/history.jsonl&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  2. Search for keys
&lt;/h2&gt;

&lt;p&gt;Run this on Mac or Linux. Every file it lists contains something that looks like a secret.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;grep -rlE &lt;span class="s2"&gt;"sk-[A-Za-z0-9_-]{16,}|_KEY=|SECRET|PRIVATE KEY"&lt;/span&gt; \
  ~/.claude/projects ~/.claude/history.jsonl ~/.codex/history.jsonl 2&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/dev/null
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  3. Rotate first, delete second
&lt;/h2&gt;

&lt;p&gt;If a real key shows up, revoke it and make a new one in that provider's dashboard. Deleting the file doesn't help if a backup already copied it.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Purge the project
&lt;/h2&gt;

&lt;p&gt;Update Claude Code, then preview what would be removed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;claude purge ~/path/to/project --dry-run
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it again without &lt;code&gt;--dry-run&lt;/code&gt; to delete that project's transcripts and matching history lines. It asks before removing anything.&lt;/p&gt;

&lt;p&gt;For Codex, delete or trim &lt;code&gt;~/.codex/history.jsonl&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Keep less from now on
&lt;/h2&gt;

&lt;p&gt;Add the settings below, and block your agent from reading &lt;code&gt;.env&lt;/code&gt; files at all. Merge these into your existing files rather than replacing them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Code&lt;/strong&gt;, in &lt;code&gt;~/.claude/settings.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"cleanupPeriodDays"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"permissions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"deny"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"Read(./.env)"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"Read(./.env.*)"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Codex&lt;/strong&gt;, in &lt;code&gt;~/.codex/config.toml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="k"&gt;[history]&lt;/span&gt;
&lt;span class="na"&gt;persistence&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"none"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For throwaway scripted runs, set &lt;code&gt;CLAUDE_CODE_SKIP_PROMPT_HISTORY=1&lt;/code&gt; and nothing gets written.&lt;/p&gt;

&lt;p&gt;Further reading: &lt;a href="https://code.claude.com/docs/en/claude-directory" rel="noopener noreferrer"&gt;Claude Code docs&lt;/a&gt; Â· &lt;a href="https://learn.chatgpt.com/docs/config-file/config-advanced" rel="noopener noreferrer"&gt;Codex docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was first published in The Weekly Stack, a free newsletter of AI tool tips for builders. Subscribe: &lt;a href="https://weeklystackhq.beehiiv.com/subscribe" rel="noopener noreferrer"&gt;https://weeklystackhq.beehiiv.com/subscribe&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>claude</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
