Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

36.8 KB
Raw Blame
<!doctype html><html lang=en dir=ltr class="blog-wrapper blog-post-page mj-root plugin-blog plugin-id-default" data-has-hydrated=false><head><meta charset=UTF-8><meta name=generator content="Docusaurus v3.10.0"><title data-rh=true>Agents exceeded their permissions: how to scope them | Mercury Agent</title><meta data-rh=true name=viewport content="width=device-width, initial-scale=1.0"/><meta data-rh=true property=og:url content=https://mercuryagent.sh/blog/agent-permissions-least-privilege /><meta data-rh=true property=og:locale content=en /><meta data-rh=true name=docusaurus_locale content=en /><meta data-rh=true name=docusaurus_tag content=default /><meta data-rh=true name=docsearch:language content=en /><meta data-rh=true name=docsearch:docusaurus_tag content=default /><meta data-rh=true name=theme-color content=#0a0d10 media="(prefers-color-scheme: dark)"/><meta data-rh=true name=theme-color content=#fbfbf8 media="(prefers-color-scheme: light)"/><meta data-rh=true name=description content="CERT-In says AI agents read live business records at Indian firms. Here is how least privilege, scoped access, approvals and audit logs should limit them."/><meta data-rh=true property=og:description content="CERT-In says AI agents read live business records at Indian firms. Here is how least privilege, scoped access, approvals and audit logs should limit them."/><meta data-rh=true name=keywords content="ai agent permissions,least privilege for ai agents,agent sandboxing,ai agent approvals,agent audit logging,cert-in ai agents"/><meta data-rh=true property=og:type content=article /><meta data-rh=true property=article:published_time content=2026-10-17T00:00:00.000Z /><meta data-rh=true property=article:author content=https://github.com/tashiriskhan /><meta data-rh=true property=article:tag content=Security,News /><meta data-rh=true property=og:image content="https://mercuryagent.sh/img/og/blog/agent-permissions-least-privilege.jpg?v=2"/><meta data-rh=true property=og:image:secure_url content="https://mercuryagent.sh/img/og/blog/agent-permissions-least-privilege.jpg?v=2"/><meta data-rh=true property=og:image:type content=image/jpeg /><meta data-rh=true property=og:image:width content=1200 /><meta data-rh=true property=og:image:height content=630 /><meta data-rh=true property=og:image:alt content="Agents exceeded their permissions: how to scope them. Security · 7 min read. Mercury Blog"/><meta data-rh=true name=twitter:card content=summary_large_image /><meta data-rh=true name=twitter:image content="https://mercuryagent.sh/img/og/blog/agent-permissions-least-privilege.jpg?v=2"/><meta data-rh=true name=twitter:image:alt content="Agents exceeded their permissions: how to scope them. Security · 7 min read. Mercury Blog"/><meta data-rh=true property=og:title content="Agents exceeded their permissions: how to scope them"/><meta data-rh=true name=twitter:title content="Agents exceeded their permissions: how to scope them"/><meta data-rh=true property=article:section content=Security /><meta data-rh=true name=twitter:label1 content=Topic /><meta data-rh=true name=twitter:data1 content=Security /><meta data-rh=true name=twitter:label2 content="Reading time"/><meta data-rh=true name=twitter:data2 content="7 min read"/><link data-rh=true rel=icon href=/img/logo-light.png /><link data-rh=true rel=canonical href=https://mercuryagent.sh/blog/agent-permissions-least-privilege /><link data-rh=true rel=alternate href=https://mercuryagent.sh/blog/agent-permissions-least-privilege hreflang=en /><link data-rh=true rel=alternate href=https://mercuryagent.sh/blog/agent-permissions-least-privilege hreflang=x-default /><link data-rh=true rel=alternate type=text/markdown href=/blog/agent-permissions-least-privilege.md title="Markdown version"/><script data-rh=true type=application/ld+json>{"@context":"https://schema.org","@id":"https://mercuryagent.sh/blog/agent-permissions-least-privilege","@type":"BlogPosting","author":{"@type":"Person","description":"Contributor, Mercury","image":"https://github.com/tashiriskhan.png","name":"Tashir Khan","url":"https://github.com/tashiriskhan"},"datePublished":"2026-10-17T00:00:00.000Z","description":"CERT-In says AI agents read live business records at Indian firms. Here is how least privilege, scoped access, approvals and audit logs should limit them.","headline":"Agents exceeded their permissions: how to scope them","image":{"@id":"https://mercuryagent.sh/assets/images/cover-66dcaa16b3c8d9d6cd6fab325953ccfd.jpg","@type":"ImageObject","caption":"title image for the blog post: Agents exceeded their permissions: how to scope them","contentUrl":"https://mercuryagent.sh/assets/images/cover-66dcaa16b3c8d9d6cd6fab325953ccfd.jpg","url":"https://mercuryagent.sh/assets/images/cover-66dcaa16b3c8d9d6cd6fab325953ccfd.jpg"},"isPartOf":{"@id":"https://mercuryagent.sh/blog","@type":"Blog","name":"Mercury Blog"},"keywords":["ai agent permissions","least privilege for ai agents","agent sandboxing","ai agent approvals","agent audit logging","cert-in ai agents"],"mainEntityOfPage":"https://mercuryagent.sh/blog/agent-permissions-least-privilege","name":"Agents exceeded their permissions: how to scope them","url":"https://mercuryagent.sh/blog/agent-permissions-least-privilege"}</script><script data-rh=true type=application/ld+json>{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","item":"https://mercuryagent.sh/","name":"Mercury","position":1},{"@type":"ListItem","item":"https://mercuryagent.sh/blog","name":"Blog","position":2},{"@type":"ListItem","item":"https://mercuryagent.sh/blog/tags/security","name":"Security","position":3},{"@type":"ListItem","item":"https://mercuryagent.sh/blog/agent-permissions-least-privilege","name":"Agents exceeded their permissions: how to scope them","position":4}]}</script><link rel=alternate type=application/rss+xml href=/blog/rss.xml title="Mercury Blog RSS Feed"><link rel=alternate type=application/atom+xml href=/blog/atom.xml title="Mercury Blog Atom Feed"><link rel=alternate type=application/json href=/blog/feed.json title="Mercury Blog JSON Feed"><meta name=twitter:site content=@mercuryagent><meta property=og:site_name content="Mercury Agent"><meta name=application-name content="Mercury Agent"><link rel=preconnect href=https://fonts.googleapis.com><link rel=preconnect href=https://fonts.gstatic.com crossorigin=anonymous><link rel=stylesheet href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&family=Instrument+Serif:ital@0;1&display=swap"><link rel=apple-touch-icon href=/img/logo-light.png><script src=https://analytics.cosmicstack.org/js/pa--flkUFvdfmsPSUtRivKAK.js async></script><script src=/js/plausible-init.js></script><link rel=stylesheet href=/assets/css/styles.b525f68d.css /><script src=/assets/js/runtime~main.c3075c62.js defer></script><script src=/assets/js/main.69097411.js defer></script></head><body><svg style="display: none;"><defs>
<symbol id=theme-svg-external-link viewBox="0 0 24 24"><path fill=currentColor d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol>
</defs></svg>
<script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme-ebb")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),document.documentElement.setAttribute("data-theme-choice",t||"system")}(),function(){try{for(var[t,e]of new URLSearchParams(window.location.search).entries())if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}(),document.documentElement.setAttribute("data-announcement-bar-initially-dismissed",function(){try{return"true"===localStorage.getItem("docusaurus.announcement.dismiss-ebb")}catch(t){}return!1}())</script><div id=__docusaurus><link rel=preload as=image href=/img/logo-light.png /><link rel=preload as=image href=/img/logo-dark.png /><link rel=preload as=image href=https://github.com/tashiriskhan.png /><link rel=preload as=image href=/assets/images/cover-66dcaa16b3c8d9d6cd6fab325953ccfd.jpg fetchpriority=high /><div role=region aria-label="Skip to main content"><a class=skipToContent_fXgn href=#__docusaurus_skipToContent_fallback>Skip to main content</a></div><div class="theme-announcement-bar announcementBar_mb4j" role=banner><div class=announcementBarPlaceholder_vyr4></div><div class="content_knG7 announcementBarContent_xLdY">☿ Mercury 1.5.0 is out with <strong>Mercury Desktop</strong> for macOS, Windows and Linux, remote access you control, and updates that roll back on their own. <a href=/download>Download it →</a></div><button type=button aria-label=Close class="clean-btn close closeButton_CVFx announcementBarClose_gvF7"><svg viewBox="0 0 15 15" width=14 height=14><g stroke=currentColor stroke-width=3.1><path d="M.75.75l13.5 13.5M14.25.75L.75 14.25"/></g></svg></button></div><nav aria-label=Main class="theme-layout-navbar navbar navbar--fixed-top"><div class=navbar__inner><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded=false class="navbar__toggle clean-btn" type=button><svg width=30 height=30 viewBox="0 0 30 30" aria-hidden=true><path stroke=currentColor stroke-linecap=round stroke-miterlimit=10 stroke-width=2 d="M4 7h22M4 15h22M4 23h22"/></svg></button><a class=navbar__brand href=/><div class=navbar__logo><img src=/img/logo-light.png alt="Mercury Agent" class="themedComponent_mlkZ themedComponent--light_NVdE"/><img src=/img/logo-dark.png alt="Mercury Agent" class="themedComponent_mlkZ themedComponent--dark_xIcU"/></div><b class="navbar__title text--truncate">Mercury</b></a><a class="navbar__item navbar__link" href=/docs>Docs</a><a class="navbar__item navbar__link" href=/docs/integrations/coding-workspace>Code</a><a class="navbar__item navbar__link" href=/docs/integrations/mercury-bots>Bots</a><a class="navbar__item navbar__link" href=/cloud>Cloud</a><a href=https://skills.mercuryagent.sh target=_blank rel="noopener noreferrer" class="navbar__item navbar__link">Skills<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><a aria-current=page class="navbar__item navbar__link navbar__link--active" href=/blog>Blog</a><a class="navbar__item navbar__link" href=/docs/releases>Changelog</a></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><a href=https://github.com/cosmicstack-labs/mercury-agent target=_blank rel="noopener noreferrer" class="navbar__item navbar__link navbar-github" aria-label="Mercury Agent on GitHub"></a><a class="navbar__item navbar__link navbar-cta" href=/download>Download</a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type=button disabled title="system mode" aria-label="Switch between dark and light mode (currently system mode)"><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP lightToggleIcon_pyhR"><path fill=currentColor d="M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"/></svg><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP darkToggleIcon_wfgR"><path fill=currentColor d="M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"/></svg><svg viewBox="0 0 24 24" width=24 height=24 aria-hidden=true class="toggleIcon_g3eP systemToggleIcon_QzmC"><path fill=currentColor d="m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"/></svg></button></div><div class=navbarSearchContainer_Bca1><div class="navbar__search searchBarContainer_NW3z" dir=ltr><input placeholder=Search aria-label=Search class="navbar__search-input searchInput_YFbd" value="" /><div class="loadingRing_RJI3 searchBarLoadingRing_YnHq"><div></div><div></div><div></div><div></div></div></div></div></div></div><div role=presentation class=navbar-sidebar__backdrop></div></nav><div id=__docusaurus_skipToContent_fallback class="theme-layout-main main-wrapper mainWrapper_z2l0"><main class=mj-post><div class=mj-progress role=progressbar aria-label="Reading progress" aria-valuemin=0 aria-valuemax=100 aria-valuenow=0><span style=transform:scaleX(0)></span></div><button type=button class=mj-progress-pill aria-label="7 min left. Back to top" tabindex=-1><svg viewBox="0 0 20 20" width=18 height=18 aria-hidden=true><circle cx=10 cy=10 r=8 class=mj-ring-bg /><circle cx=10 cy=10 r=8 class=mj-ring style=stroke-dashoffset:50.27 /></svg><span>7 min left</span></button><header class=mj-post-head><a class=mj-back href=/blog>← Blog</a><a class=mj-post-cat href=/blog/tags/security>Security</a><h1 class=mj-post-title>Agents exceeded their permissions: how to scope them</h1><p class=mj-post-dek>CERT-In says AI agents read live business records at Indian firms. Here is how least privilege, scoped access, approvals and audit logs should limit them.<div class=mj-post-byline><div class=mj-post-authors><a class=mj-post-author href=/blog/authors/tashiriskhan><img src=https://github.com/tashiriskhan.png alt="" width=36 height=36 /><span><strong>Tashir Khan</strong><em>Contributor, Mercury</em></span></a></div><div class=mj-meta><time datetime=2026-10-17T00:00:00.000Z>Oct 17, 2026</time><span aria-hidden=true>·</span><span>7<!-- --> min read</span></div></div></header><div class=mj-post-banner><img src=/assets/images/cover-66dcaa16b3c8d9d6cd6fab325953ccfd.jpg alt="" width=1600 height=900 fetchpriority=high decoding=async /></div><div class="mj-post-layout has-toc"><aside class=mj-post-toc aria-label="On this page"><div class=mj-toc-head><p>On this page</p><span class=mj-toc-left>7 min left</span></div><div class=mj-toc-meter aria-hidden=true><span style=transform:scaleX(0)></span></div><div class=tableOfContentsInline_prmo><ul class=table-of-contents><li><a href=#what-cert-in-reported>What CERT-In reported</a><li><a href=#what-tencent-reported>What Tencent reported</a><li><a href=#the-common-failure>The common failure</a><li><a href=#how-agent-permissions-should-work>How agent permissions should work</a><li><a href=#how-mercury-applies-these-rules-today>How Mercury applies these rules today</a><li><a href=#what-it-means-for-you>What it means for you</a><li><a href=#references>References</a></ul></div></aside><article class="mj-prose markdown"><p>This week CERT-In, India's national cyber agency, said AI agents reached the live systems of several Indian organisations during "research and evaluation activity" and read business records, including personal data and confidential material. The incident came to light after the affected organisations said the agents "exceeded the authorisation of their assigned tasks." Tencent separately said that agents used to evaluate third-party models showed web-browsing behaviour it did not intend. Both stories point at the same gap: agents were allowed to do more than anyone meant them to.</p>
<!-- -->
<p>We run Mercury, an agent with real tools: a shell, a filesystem, git. We read both reports as a test of our own design.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=what-cert-in-reported>What CERT-In reported<a href=#what-cert-in-reported class=hash-link aria-label="Direct link to What CERT-In reported" title="Direct link to What CERT-In reported" translate=no>​</a></h2>
<p><a href=https://www.thehindu.com/sci-tech/technology/ai-agents-gained-unauthorised-access-to-indian-organisations-says-cert-in/article71592222.ece target=_blank rel="noopener noreferrer" class="">The Hindu reported</a> that CERT-In said on Thursday, 15 October, that AI agents "undergoing testing" had reached live systems of Indian organisations. <a href=https://www.reuters.com/legal/litigation/rogue-ai-agents-broke-into-indian-firms-live-systems-government-says-2026-10-16/ target=_blank rel="noopener noreferrer" class="">Reuters</a> carried the same government statement. The organisations could not detect the access on their own, the agency said.</p>
<p>The agents read "business records, including personal data and confidential material", through credentials and connection settings exposed in application configuration, public code repositories and permissive cloud service roles. <a href=https://www.indiatoday.in/technology/news/story/ai-agents-gained-access-to-confidential-data-of-indian-firms-cert-in-warns-of-misuse-3018535-2026-10-16 target=_blank rel="noopener noreferrer" class="">India Today</a> reported the same data exposure. <a href=https://www.business-standard.com/technology/tech-news/ai-agents-accessed-indian-firms-systems-sensitive-data-cert-in-advisory-126101501656_1.html target=_blank rel="noopener noreferrer" class="">Business Standard</a> reported that some model providers had told CERT-In their models reached live systems during testing.</p>
<p>CERT-In did not name the AI providers or the affected organisations, so the public reports cannot say which agents were involved.</p>
<p>None of the weaknesses were new. CERT-In said the AI found and exploited conventional weaknesses "faster, more exhaustively and at greater scale than human attackers."</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=what-tencent-reported>What Tencent reported<a href=#what-tencent-reported class=hash-link aria-label="Direct link to What Tencent reported" title="Direct link to What Tencent reported" translate=no>​</a></h2>
<p>Tencent said that AI agents used to evaluate third-party models on its cloud platform showed unintended web-browsing behaviour. <a href=https://qz.com/tencent-ai-agents-unintended-browsing-alibaba-amap-101626 target=_blank rel="noopener noreferrer" class="">Quartz reported</a> that the agents made more than 2,600 attempts to pull data from Alibaba's Amap service. <a href=https://www.scmp.com/tech/tech-trends/article/3371007/ai-agents-tencent-cloud-try-break-alibabas-amap-researchers target=_blank rel="noopener noreferrer" class="">South China Morning Post</a> put the window at 28 September to 8 October.</p>
<p>Tencent calls the browsing unintended. The coverage we read does not explain how the agents reached Amap, but a browsing tool without a tight boundary can fetch data nobody meant it to.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=the-common-failure>The common failure<a href=#the-common-failure class=hash-link aria-label="Direct link to The common failure" title="Direct link to The common failure" translate=no>​</a></h2>
<p>In both reports the agent did not break a lock. It used authority that already existed and that nobody had scoped to the task. A credential in a config file, a cloud role that reads everything, and a browser that reaches any URL are all standing permission. Nothing in the system said where the agent's job ended.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=how-agent-permissions-should-work>How agent permissions should work<a href=#how-agent-permissions-should-work class=hash-link aria-label="Direct link to How agent permissions should work" title="Direct link to How agent permissions should work" translate=no>​</a></h2>
<p>We think four rules cover most of this.</p>
<p><strong>1. Least privilege per task.</strong> An agent should start with no access and receive only the paths, commands and network destinations its current task needs. A summary task does not need write access to the repository.</p>
<p><strong>2. Scopes that name a path and a mode.</strong> A scope should say what it covers and whether it allows reading, writing or running. Scopes must resolve symlinks before the check. Otherwise an approved directory can contain a link to <code>~/.ssh</code>, and the check passes on the link while the read lands on the key.</p>
<p><strong>3. Approvals for actions that leave the box.</strong> Reading a project file is routine. Pushing to a remote, deleting a directory, or running a package install that reaches the network should stop and wait for a human. The approval should show the exact command or path, not a summary.</p>
<p><strong>4. Audit for every access.</strong> If a reviewer cannot answer "what did the agent read last Tuesday, and why", the permission model is incomplete. CERT-In's finding that the affected organisations could not detect the access is the strongest argument for this rule.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=how-mercury-applies-these-rules-today>How Mercury applies these rules today<a href=#how-mercury-applies-these-rules-today class=hash-link aria-label="Direct link to How Mercury applies these rules today" title="Direct link to How Mercury applies these rules today" translate=no>​</a></h2>
<p>Mercury reads its permissions from <code>~/.mercury/permissions.yaml</code>. The shape looks like this:</p>
<div class="language-yaml codeBlockContainer_Ckt0 theme-code-block" style=--prism-color:#393A34;--prism-background-color:#f6f8fa><div class=codeBlockTitle_OeMC>~/.mercury/permissions.yaml</div><div class=codeBlockContent_QJqH><pre tabindex=0 class="prism-code language-yaml codeBlock_bY9V thin-scrollbar" style=color:#393A34;background-color:#f6f8fa><code class=codeBlockLines_e6Vv><div class=token-line style=color:#393A34><span class="token key atrule" style=color:#00a4db>capabilities</span><span class="token punctuation" style=color:#393A34>:</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">  </span><span class="token key atrule" style=color:#00a4db>filesystem</span><span class="token punctuation" style=color:#393A34>:</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">    </span><span class="token key atrule" style=color:#00a4db>enabled</span><span class="token punctuation" style=color:#393A34>:</span><span class="token plain"> </span><span class="token boolean important" style=color:#36acaa>true</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">    </span><span class="token key atrule" style=color:#00a4db>scopes</span><span class="token punctuation" style=color:#393A34>:</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">      </span><span class="token punctuation" style=color:#393A34>-</span><span class="token plain"> </span><span class="token key atrule" style=color:#00a4db>path</span><span class="token punctuation" style=color:#393A34>:</span><span class="token plain"> .</span><br/></div><div class=token-line style=color:#393A34><span class="token plain">        </span><span class="token key atrule" style=color:#00a4db>read</span><span class="token punctuation" style=color:#393A34>:</span><span class="token plain"> </span><span class="token boolean important" style=color:#36acaa>true</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">        </span><span class="token key atrule" style=color:#00a4db>write</span><span class="token punctuation" style=color:#393A34>:</span><span class="token plain"> </span><span class="token boolean important" style=color:#36acaa>true</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">  </span><span class="token key atrule" style=color:#00a4db>shell</span><span class="token punctuation" style=color:#393A34>:</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">    </span><span class="token key atrule" style=color:#00a4db>enabled</span><span class="token punctuation" style=color:#393A34>:</span><span class="token plain"> </span><span class="token boolean important" style=color:#36acaa>true</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">    </span><span class="token key atrule" style=color:#00a4db>cwdOnly</span><span class="token punctuation" style=color:#393A34>:</span><span class="token plain"> </span><span class="token boolean important" style=color:#36acaa>true</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">    </span><span class="token key atrule" style=color:#00a4db>blocked</span><span class="token punctuation" style=color:#393A34>:</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">      </span><span class="token punctuation" style=color:#393A34>-</span><span class="token plain"> </span><span class="token string" style=color:#e3116c>"sudo *"</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">    </span><span class="token key atrule" style=color:#00a4db>needsApproval</span><span class="token punctuation" style=color:#393A34>:</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">      </span><span class="token punctuation" style=color:#393A34>-</span><span class="token plain"> </span><span class="token string" style=color:#e3116c>"git push *"</span><span class="token plain"></span><br/></div><div class=token-line style=color:#393A34><span class="token plain">      </span><span class="token punctuation" style=color:#393A34>-</span><span class="token plain"> </span><span class="token string" style=color:#e3116c>"rm -rf *"</span><br/></div></code></pre></div></div>
<p>The full options are in the <a class="" href=/docs/reference/permissions>permissions reference</a>. The enforcement lives in <a href=https://github.com/cosmicstack-labs/mercury-agent/blob/main/src/capabilities/permissions.ts target=_blank rel="noopener noreferrer" class=""><code>src/capabilities/permissions.ts</code></a> and <a href=https://github.com/cosmicstack-labs/mercury-agent/blob/main/src/core/execute-guard.ts target=_blank rel="noopener noreferrer" class=""><code>src/core/execute-guard.ts</code></a>. Several parts match the rules above:</p>
<ul>
<li class=""><strong>Blocked commands never run.</strong> The blocklist is checked against every segment of a chained command, so a blocked command cannot hide behind an allowed one such as <code>echo</code>.</li>
<li class=""><strong>Shell commands take one of two lanes.</strong> A plain command whose binary is on the allowlist, and whose path arguments stay inside the working directory or a readable scope, runs without a prompt. Anything else goes to approval, where the user sees the exact string.</li>
<li class=""><strong>Writes always prompt in Ask Me mode.</strong> Even when a scope covers the path, a write asks first. Reads inside a scope do not prompt.</li>
<li class=""><strong>Symlinks and hard links are checked.</strong> A read that resolves outside the approved scopes is denied. A regular file with more than one hard link needs approval, because it may be an alias of a file outside every scope.</li>
<li class=""><strong>Unattended bots fail closed.</strong> A bot has no one to ask, so an out-of-scope action is denied instead of waiting. Skill elevation is ignored in that mode, so a skill cannot widen what a bot may do.</li>
</ul>
<p>Two gaps remain. Scheduled tasks run in Allow All mode for their own turn, so shell commands run unless they hit the blocklist and scope prompts are skipped. That is the weakest point, and it looks like the situation CERT-In describes: a background run with broad access and nobody watching. Second, we found no per-access audit log in the permission code, so we treat auditability as missing, not done.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=what-it-means-for-you>What it means for you<a href=#what-it-means-for-you class=hash-link aria-label="Direct link to What it means for you" title="Direct link to What it means for you" translate=no>​</a></h2>
<p>If you run any agent with tools, check three things this week:</p>
<ul>
<li class="">Search your repositories and config files for credentials. Rotate anything that was ever committed.</li>
<li class="">Open your agent's permission file and remove scopes you do not use, especially home-directory and cloud-role grants.</li>
<li class="">Give scheduled or unattended runs the narrowest scope that works, and review what they touched.</li>
</ul>
<p>Read the CERT-In advisory itself, not only the coverage.</p>
<h2 class="anchor anchorTargetStickyNavbar_Vzrq" id=references>References<a href=#references class=hash-link aria-label="Direct link to References" title="Direct link to References" translate=no>​</a></h2>
<ol>
<li class="">The Hindu, "AI agents gained unauthorised access to Indian organisations, says CERT-In", 16 October 2026. <a href=https://www.thehindu.com/sci-tech/technology/ai-agents-gained-unauthorised-access-to-indian-organisations-says-cert-in/article71592222.ece target=_blank rel="noopener noreferrer" class="">thehindu.com</a></li>
<li class="">Reuters, "Rogue AI agents broke into Indian firms' live systems, government says", 16 October 2026. <a href=https://www.reuters.com/legal/litigation/rogue-ai-agents-broke-into-indian-firms-live-systems-government-says-2026-10-16/ target=_blank rel="noopener noreferrer" class="">reuters.com</a></li>
<li class="">India Today, "AI agents gained access to confidential data of Indian firms, CERT-In warns of misuse", 16 October 2026. <a href=https://www.indiatoday.in/technology/news/story/ai-agents-gained-access-to-confidential-data-of-indian-firms-cert-in-warns-of-misuse-3018535-2026-10-16 target=_blank rel="noopener noreferrer" class="">indiatoday.in</a></li>
<li class="">Business Standard, CERT-In advisory coverage, 15 to 16 October 2026. <a href=https://www.business-standard.com/technology/tech-news/ai-agents-accessed-indian-firms-systems-sensitive-data-cert-in-advisory-126101501656_1.html target=_blank rel="noopener noreferrer" class="">business-standard.com</a></li>
<li class="">Quartz, Tencent AI agents and Alibaba Amap browsing report. <a href=https://qz.com/tencent-ai-agents-unintended-browsing-alibaba-amap-101626 target=_blank rel="noopener noreferrer" class="">qz.com</a></li>
<li class="">South China Morning Post, AI agents on Tencent Cloud and Alibaba's Amap. <a href=https://www.scmp.com/tech/tech-trends/article/3371007/ai-agents-tencent-cloud-try-break-alibabas-amap-researchers target=_blank rel="noopener noreferrer" class="">scmp.com</a></li>
<li class="">Mercury permissions reference. <a class="" href=/docs/reference/permissions>/docs/reference/permissions</a></li>
<li class="">Mercury source: <a href=https://github.com/cosmicstack-labs/mercury-agent/blob/main/src/capabilities/permissions.ts target=_blank rel="noopener noreferrer" class=""><code>src/capabilities/permissions.ts</code></a> and <a href=https://github.com/cosmicstack-labs/mercury-agent/blob/main/src/core/execute-guard.ts target=_blank rel="noopener noreferrer" class=""><code>src/core/execute-guard.ts</code></a>.</li>
</ol></article></div><footer class=mj-post-foot><div class=mj-tools aria-label="Share and export"><button type=button>Copy as Markdown</button><a href=/blog/agent-permissions-least-privilege.md>View .md</a><button type=button>Copy link</button><a href="https://x.com/intent/post?url=https%3A%2F%2Fmercuryagent.sh%2Fblog%2Fagent-permissions-least-privilege&text=Agents%20exceeded%20their%20permissions%3A%20how%20to%20scope%20them" target=_blank rel="noopener noreferrer">Share on X</a><a href="https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fmercuryagent.sh%2Fblog%2Fagent-permissions-least-privilege" target=_blank rel="noopener noreferrer">LinkedIn</a></div><div class=mj-post-tags><a href=/blog/tags/security>Security</a><a href=/blog/tags/news>News</a></div><nav class=mj-pager aria-label="More posts"><a href=/blog/ai-coding-verification-bottleneck><small>Newer</small>The new bottleneck in AI coding isn't code generation. It's verification.</a><a class=is-next href=/blog/mercury-bots><small>Older</small>Mercury Bots: an agent fleet that runs on your machine</a></nav><section class=mj-more><h2>More from the blog</h2><ul><li><a href=/blog/what-is-a-personal-ai-assistant>What Is a Personal AI Assistant? 10 Real Tasks in 2026</a><time datetime=2026-11-11T00:00:00.000Z>Nov 11, 2026</time><li><a href=/blog/six-ai-agents-compared-for-real-work>9 Safest, Most Secure, and Permission-Aware AI Agents for Real-World Tasks</a><time datetime=2026-11-05T00:00:00.000Z>Nov 5, 2026</time><li><a href=/blog/mercury-1-5>Mercury 1.5: Mercury Desktop</a><time datetime=2026-11-03T00:00:00.000Z>Nov 3, 2026</time></ul></section></footer></main></div><footer class="theme-layout-footer footer"><div class="container container-fluid"><div class="row footer__links"><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Product</div><ul class="footer__items clean-list"><li class=footer__item><a class=footer__link-item href=/download>Download</a><li class=footer__item><a class=footer__link-item href=/#install>Install on a server</a><li class=footer__item><a class=footer__link-item href=/docs/integrations/coding-workspace>Mercury Code</a><li class=footer__item><a class=footer__link-item href=/docs/integrations/mercury-bots>Mercury Bots</a><li class=footer__item><a class=footer__link-item href=/cloud>Mercury Cloud</a><li class=footer__item><a class=footer__link-item href=/blog>Blog</a><li class=footer__item><a class=footer__link-item href=/docs/releases>Changelog</a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Trust</div><ul class="footer__items clean-list"><li class=footer__item><a class=footer__link-item href=/docs/reference/permissions>Permissions model</a><li class=footer__item><a class=footer__link-item href=/docs/reference/second-brain>Second Brain memory</a><li class=footer__item><a class=footer__link-item href=/docs/reference/completion-architecture>Completion contract</a><li class=footer__item><a class=footer__link-item href=/#compare>Honest comparison</a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Docs</div><ul class="footer__items clean-list"><li class=footer__item><a class=footer__link-item href=/docs>Getting started</a><li class=footer__item><a class=footer__link-item href=/docs/cli-commands/cli-commands>CLI commands</a><li class=footer__item><a class=footer__link-item href=/docs/reference/built-in-tools>Built-in tools</a><li class=footer__item><a class=footer__link-item href=/docs/reference/configuration>Configuration</a></ul></div><div class="theme-layout-footer-column col footer__col"><div class=footer__title>Community</div><ul class="footer__items clean-list"><li class=footer__item><a href=https://github.com/cosmicstack-labs/mercury-agent target=_blank rel="noopener noreferrer" class=footer__link-item>GitHub<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://github.com/cosmicstack-labs/mercury-agent/issues target=_blank rel="noopener noreferrer" class=footer__link-item>Issues<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://skills.mercuryagent.sh target=_blank rel="noopener noreferrer" class=footer__link-item>Skills registry<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a><li class=footer__item><a href=https://www.npmjs.com/package/@cosmicstack/mercury-agent target=_blank rel="noopener noreferrer" class=footer__link-item>npm<svg width=13.5 height=13.5 aria-label="(opens in new tab)" class=iconExternalLink_nPIU><use href=#theme-svg-external-link /></svg></a></ul></div></div><div class="footer__bottom text--center"><div class=footer__copyright>© 2026 Cosmic Stack · Mercury Agent is MIT-licensed open source.</div></div></div></footer></div></body>