m365-oversharing

m365-oversharing is a skill for Claude Code, Codex from vinayaklatthe/microsoft-security-skills. It costs 203 tokens per session (1,573 once invoked), scanned A, original, MIT.

Guidance for reducing excessive access to files and messages across Microsoft 365 services such as SharePoint, OneDrive, Teams, and Exchange. Oversharing means content is available to more people than intended.

In plain words
What is it for?
It is for remediating access to Microsoft 365 content, setting safer sharing defaults, applying labels, and preparing data for AI or regulatory programs.
Why use it?
It helps limit data exposure by finding overly broad access and applying ongoing controls and governance.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit It is for remediating access to Microsoft 365 content, setting safer sharing defaults, applying labels, and preparing data for AI or regulatory programs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vinayaklatthe/microsoft-security-skills/m365-oversharing
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add vinayaklatthe/microsoft-security-skills --skill m365-oversharing
Clone the repo
git clone --depth 1 https://github.com/vinayaklatthe/microsoft-security-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for m365-oversharing

README.md
[![agentmods](https://agentmods.dev/badge/skills/vinayaklatthe/microsoft-security-skills/m365-oversharing/github.svg)](https://agentmods.dev/skills/vinayaklatthe/microsoft-security-skills/m365-oversharing)
Your own site
<a href="https://agentmods.dev/skills/vinayaklatthe/microsoft-security-skills/m365-oversharing"><img src="https://agentmods.dev/badge/skills/vinayaklatthe/microsoft-security-skills/m365-oversharing/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for m365-oversharing

Your own site · 80×15
<a href="https://agentmods.dev/skills/vinayaklatthe/microsoft-security-skills/m365-oversharing"><img src="https://agentmods.dev/badge/skills/vinayaklatthe/microsoft-security-skills/m365-oversharing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 203 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,573 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00203 $0.01573
Opus 5 $0.00102 $0.00787
Sonnet 5 $0.00041 $0.00315
Haiku 4.5 $0.00020 $0.00157

Measured 12d ago against content hash a469393ce827, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

m365-oversharing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/m365-oversharing/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Microsoft 365 Oversharing Remediation

Oversharing - content shared more broadly than it should be - is the root cause of most data exposure in Microsoft 365 and the biggest risk amplified by AI. Microsoft's Secure & Governed Data Foundation blueprint structures remediation into three pillars: remediate oversharing, set up guardrails, and meet regulations. The work is powered by SharePoint Advanced Management (SAM, included with a Microsoft 365 Copilot license), sensitivity and container labels, and Microsoft Purview.

When to use

Building a secure, well-governed Microsoft 365 data estate - reducing who can reach what across SharePoint, OneDrive, Teams, and Exchange, then keeping it that way with enforceable defaults. Applies whether or not Copilot is in scope; it is the data-foundation work every AI or data program depends on.

Do not use this skill when the question is purely Copilot rollout readiness framing (use purview-copilot-oversharing), monitoring sensitive data in AI prompts (use purview-dspm-ai), or designing a tenant-wide DLP program (use purview-dlp-policy).

The three pillars

Pillar Goal Primary levers
Remediate oversharing Find and reduce existing over-broad access fast SAM data access governance (DAG) reports, EEEU cleanup, sharing-link cleanup, Restricted Access Control / Restricted Content Discovery
Set up guardrails Prevent regression with enforceable defaults Sensitivity + container labels, secure-by-default labelling, default sharing settings, site lifecycle policies
Meet regulations Close audit/legal and AI-regulatory gaps Purview Audit, Compliance Manager assessments, data hygiene

Rule of thumb: assess -> classify -> restrict -> default-secure -> govern. Skipping the assess (DAG report) step is the most common failure; encrypting everything "to be safe" is the second.

Approach

  1. Assess (DAG reports) - Run SharePoint Advanced Management data access governance reports to find the riskiest sites: "Everyone Except External Users" (EEEU) on too many sites, broadly shared sites, sharing-link sprawl, and permissioned-but-sensitive content. Verify: DAG report ranks top-N risky sites with named owners.
  2. Apply interim restrictions - For the highest-risk sites, apply Restricted Access Control / Restricted Content Discovery as a fast interim guardrail while owners remediate. Verify: a restricted site no longer surfaces in a test user's search/Copilot results.
  3. Engage site owners - Notify owners with the expected fix; don't strip permissions centrally without owner context - that breaks legitimate collaboration and erodes trust. Verify: owner remediation tickets opened with deadlines.
  4. Classify & label - Apply sensitivity labels to sensitive content and container labels to sites; reserve encryption for genuinely sensitive content. Verify: a top-tier label encrypts and blocks unauthorised access.
  5. Secure by default - Use secure-by-default labelling (derive labels from SharePoint sites) and tighten default sharing settings so new content is protected without relying on users to remember to label. Verify: newly created content inherits a default label/sharing scope.
  6. Govern lifecycle - Apply site lifecycle and inactive-site policies plus access reviews so oversharing doesn't creep back; this is ongoing governance, not a one-time cleanup. Verify: inactive sites archived or owners re-attested on cadence.
  7. Meet regulations & monitor - Use Purview Audit and Compliance Manager to close audit/legal and AI-regulatory gaps, and monitor for new oversharing continuously. Verify: audit/regulatory assessment shows reducing exposure over time.

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 98 lines · 203 tokens per session scan A a469393ce827

Subscribe to this mod's changes

m365-oversharing is a skill published in the GitHub repository vinayaklatthe/microsoft-security-skills (173 stars, last pushed 2mo ago), licensed MIT. It adds 203 tokens to every session and 1,573 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

power-automate

Use when operating Microsoft Power Automate cloud flows from code — create, enable, update, list or delete via the Dataverse Web API (workflow table, category 5) with Entra ID OAuth2, plus run-history debugging. NOT designing the flow definition (that is automation-flows), NOT picking a platform by billing model (that…

ericrisco/rsc-harness · 82 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

generate-run-commands

Generate or modify run commands for the current session. Use when the user wants to set up or update run commands that appear in the session's Run button.

microsoft/vscode · 36 tokens

html-ppt-hermes-cyber-terminal

OpenDesign + BYOK: choosing and wiring your own model, hands-on — cost, quality, and the routing decision. Built as a decision-grade AI literacy deck for engineers, IT, applied-AI teams.

nexu-io/open-design · 53 tokens

skill-writing-plans

Create zero-context implementation plans with bite-sized tasks — use for multi-step feature planning.

nyldn/claude-octopus · 21 tokens

bf-to-agents-sdk-dotnet-migration

Use when migrating a Bot Framework .NET SDK bot to Microsoft 365 Agents SDK. Triggered by projects that depend on packages: Microsoft.Bot.Builder or Microsoft.Bot.Builder.Integration.AspNet.Core that want to migrate to Agents SDK.

microsoft/Agents · 56 tokens