<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Safety on madtea</title><link>https://madtea.lol/docs/safety/</link><description>Recent content in Safety on madtea</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://madtea.lol/docs/safety/index.xml" rel="self" type="application/rss+xml"/><item><title>Credential Safety</title><link>https://madtea.lol/docs/safety/credential-safety/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://madtea.lol/docs/safety/credential-safety/</guid><description>&lt;p&gt;How madtea stores your Forgejo/Gitea token locally and what the &amp;ldquo;credential-safe git wrappers&amp;rdquo; claim actually guarantees. For what scopes to enable on the token itself, see &lt;a href="https://madtea.lol/docs/appendices/permissions/"&gt;&lt;code&gt;PERMISSIONS.md&lt;/code&gt;&lt;/a&gt;. For how to report a credential-related vulnerability, see &lt;a href="https://madtea.lol/docs/appendices/security/"&gt;&lt;code&gt;SECURITY.md&lt;/code&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="storage-backends"&gt;Storage backends&lt;/h2&gt;
&lt;p&gt;By default &lt;code&gt;madtea auth login&lt;/code&gt; stores your token in a secure backend — the OS keychain when one is available, otherwise &lt;code&gt;pass&lt;/code&gt;, otherwise &lt;code&gt;systemd-creds&lt;/code&gt; on a headless server with systemd. The URL and username always go to git config (they are not secret). When no secure backend is available, madtea &lt;strong&gt;refuses to store the token&lt;/strong&gt; with an error naming the fix — plaintext git config is never an automatic fallback; it happens only with the explicit &lt;code&gt;--insecure-storage&lt;/code&gt; flag, which also forces the plaintext path when a keychain is present. The backend is not user-selectable beyond that: auto-detection always tries the OS keychain first, then &lt;code&gt;pass&lt;/code&gt;, then &lt;code&gt;systemd-creds&lt;/code&gt;.&lt;/p&gt;</description></item><item><title>Safe body edits</title><link>https://madtea.lol/docs/safety/safe-body-edits/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://madtea.lol/docs/safety/safe-body-edits/</guid><description>&lt;p&gt;madtea has no command that overwrites an issue body or pull-request body wholesale. Every edit is &lt;strong&gt;surgical and anchored&lt;/strong&gt;: you change a specific span, line, or named region, and the write is &lt;strong&gt;rejected&lt;/strong&gt; if the text you anchored to has drifted or the body changed underneath you. That makes silent clobbering — by an AI agent working from a stale read, or by two writers racing — structurally impossible rather than merely discouraged. (Comments are the one surface Gitea gives no version token: there &lt;code&gt;comment-edit&lt;/code&gt; does a full-body replace guarded by an &lt;code&gt;--expected-body&lt;/code&gt; check — &lt;strong&gt;required&lt;/strong&gt; on the MCP/agent surface, optional on the CLI. See &lt;a href="#comments"&gt;Comments&lt;/a&gt;.)&lt;/p&gt;</description></item><item><title>Safety hooks</title><link>https://madtea.lol/docs/safety/safety-hooks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://madtea.lol/docs/safety/safety-hooks/</guid><description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Claude Code only.&lt;/strong&gt; These bash hooks are Claude-Code-specific. They ship with the &lt;a href="https://madtea.lol/docs/guides/clients/#claude-code"&gt;Claude Code plugin&lt;/a&gt; — installing the plugin is the way to get them. Agents on other MCP clients (Codex, Antigravity, Cursor, Zed, …) get the same credential-safe MCP tools but &lt;strong&gt;not&lt;/strong&gt; these hooks — and don&amp;rsquo;t need them, because the MCP tools never put a token in argv, history, or errors in the first place.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The Claude Code plugin installs seven &lt;code&gt;PreToolUse&lt;/code&gt; hooks that intercept tool calls before they run — they don&amp;rsquo;t change git itself, only what the agent is permitted to run. The plugin is the single delivery channel: a binary-only madtea (Homebrew, Scoop, release tarball) does not materialize these hooks — install the plugin to add them. An MCP-only user who installs neither still keeps the credential-safe MCP tools, which never leak credentials in the first place.&lt;/p&gt;</description></item><item><title>Wrong-repo fail-closed guard</title><link>https://madtea.lol/docs/safety/wrong-repo-protection/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://madtea.lol/docs/safety/wrong-repo-protection/</guid><description>&lt;p&gt;A repo-scoped MCP tool called &lt;strong&gt;without&lt;/strong&gt; an explicit &lt;code&gt;owner_repo&lt;/code&gt; resolves its target repo from the MCP server process&amp;rsquo;s working directory — not from any &lt;code&gt;cd&lt;/code&gt; the agent did. The server is a single long-lived process whose OS working directory is fixed at launch, and concurrent tool calls share it, so the server cannot follow an agent into a sibling repo. In a multi-repo workspace that fixed cwd may be the &lt;em&gt;wrong&lt;/em&gt; repo, which has caused real wrong-repo writes — a &lt;code&gt;finish&lt;/code&gt; merged the wrong branch to the wrong repo, and an &lt;code&gt;issue create&lt;/code&gt; filed on the wrong repo (the wrong-repo hazard). To keep that from happening silently, madtea applies a fail-closed guard before any repo-scoped handler runs.&lt;/p&gt;</description></item></channel></rss>