Urgent.News

What's breaking now, across thousands of outlets.

Tech

Read-only OAuth is one boundary. Your agent still needs others.

By Xplormity Collective A coding agent asks for Search Console data. You approve a read-only Google scope. Can it change your website? The answer depends on which tool it uses next. Read-only OAuth limits the Google operations authorized by that grant. It does not turn the entire agent session into a read-only environment. An agent that can also edit files, run a shell or send messages still has…

Read-only OAuth permits an agent to access specific data without modifying it. However, the agent's capabilities extend beyond read-only access based on its additional functionalities.

The SearchDock client, an open-source Google Search Console interface, demonstrates this concept. This walkthrough focuses on its implementation rather than any live experiment. The examples provided are hypothetical and do not involve real data or credentials.

When connecting an agent, consider four key questions: what the OAuth grant authorizes, which operations the adapter implements, what other tools the host agent can invoke, and where the returned data and credentials end up. These questions address different boundaries and cannot be answered by only examining one.

Inspecting the scope, SearchDock requests read-only access to Webmasters data: https://www.googleapis.com/auth/webmasters.readonly. The consent flow uses secure methods, such as a loopback callback and PKCE challenge. The granted scope determines the operations the agent can perform. However, a read-only scope does not limit the agent to read-only actions.

The adapter's implemented operations list includes reading analytics, sitemaps, and inspecting Google's indexed version of a URL. Importantly, it does not include operations for indexing URLs, which contradicts the notion that read-only access automatically limits the agent's actions.

The host agent may also invoke additional tools beyond the ones implemented by the adapter. These tools have their own set of capabilities that should be considered when assessing the agent's overall permissions.

The data returned by the adapter and stored locally should be handled carefully. Although the OAuth grant prohibits modifications, data stored on the host system could potentially be accessed or misused by unauthorized parties. It is crucial to ensure proper data protection measures are in place.

In summary, while read-only OAuth provides a basic level of security, it does not encompass the full range of an agent's potential capabilities. Assessing the agent's overall access and behavior requires considering its scope, implemented operations, associated tools, and the handling of returned data.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Loading a 72 MB JSON list on a TV box without running out of memory

I make a media player for Android TV boxes, phones and Windows. People sign in with the playlist their provider gives them, and the app downloads three lists from the provider's server: live channels…

  • JSON list of 72 MB downloaded and parsed on Android TV box causes memory issues
  • Stream JSON list instead of downloading as whole to prevent memory crashes
  • Save rows in fixed blocks with single prepared INSERT statement for better memory management

More from Saturday 14 November →