Logo: Auditing Declared Vs Used Permissions

Auditing Declared Vs Used Permissions

Organisatioun
UnboundCompute
auditing-declared-vs-used-permissions

Find the consent gap in an agent skill or MCP server: the distance between the permissions and capabilities it declares and what its bundled code and instructions actually exercise. Covers over-broad grants a skill requests but never uses, capabilities it exercises without declaring, and grants that are used but still wider than the task needs. Read the declared surface in frontmatter or manifest, inventory the real behavior, and diff the two in both directions. Use when reviewing a skill or server before install, or auditing least privilege across an agent's installed set. An over-broad or undeclared grant is the finding.

Iwwersiicht

EditeurUnboundCompute
Repositorysecurity-agent-skills
Skill-Nummauditing-declared-vs-used-permissions
Stären
27
Forks
8
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    UnboundCompute huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Auditing Declared Vs Used Permissions an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-declared-vs-used-permissions
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/UnboundCompute/security-agent-skills.git /tmp/security-agent-skills
mkdir -p .claude/skills
cp -r /tmp/security-agent-skills/skills/auditing-declared-vs-used-permissions .claude/skills/auditing-declared-vs-used-permissions
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Auditing Declared Vs Used Permissions an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Auditing Declared Vs Used Permissions automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Auditing Declared Vs Used Permissions net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Auditing declared versus used permissions: the consent gap is the bug

A user grants a skill the permissions it asks for. The question no one checks is whether it needs them. A skill that requests shell access and never shells out, or network access and never makes a call, has widened the user's blast radius for nothing, and a compromise or a later update inherits that headroom. Worse is the other direction: a skill that acts beyond what it declared. This skill measures the gap between the grant and the use, in both directions.

When to use

  • You are reviewing a skill, an MCP server, or a marketplace entry before install.
  • You are auditing least privilege across an agent's installed skills and tools.
  • You want to right-size a grant, not just confirm the artifact runs.

Scope check

Audit skills and servers you own or are authorized to review. Inspect the bundled code statically; run it only in a contained environment. If you can't name the authorization, stop.

The loop

  1. Read the declared permission surface. Collect exactly what the artifact asks for: the allowed-tools or capability list in frontmatter or manifest, the scopes it requests, the network, filesystem, and process access it declares. This is the consent the user is asked to give. Record it as the grant set.

  2. Inventory what the code and instructions actually exercise. Walk the bundled scripts and the instruction text and record the real capabilities used: which tools are invoked, whether it spawns a process, opens a socket, reads outside its own directory, or reaches the network. Prefer tracing the flow over a string grep, so an aliased or indirect call is not missed. This is the use set.

  3. Diff for over-grants: declared but never used. Subtract use from grant. Every capability requested and never exercised is an over-grant: pure headroom the user consented to for no delivered function. This is the common consent gap and the easiest least-privilege win.

  4. Diff the other direction: used but not declared. Subtract grant from use. A capability the code exercises without declaring is worse than an over-grant: the artifact acts beyond the consent it requested. Treat undeclared reach, especially network or process, as a high-signal finding.

  5. Weigh the used grants that remain. A capability that is both declared and used can still be excessive. Ask whether the task needs the full scope or a narrower one: write to one directory rather than the filesystem, one host rather than the open network. Name the least-privilege version.

  6. Confirm and record. Confirm each over-grant by showing the capability is never exercised, and each undeclared use by tracing the call. Kill the lead when a grant is genuinely exercised at the scope requested. Record the declared set, the used set, the direction of the gap, and the least-privilege grant.

Where the consent gap opens

  • Requested is not needed. The grant list is a request, not a requirement. Measure it against real use before you accept it.
  • Undeclared reach is the worse half. A skill acting past its declaration broke consent, not just tidiness. Trace network and process capabilities specifically.
  • Copy-paste inflates grants. Manifests cloned from a template carry capabilities the author never used. The unused ones are the tell.
  • Headroom is what a compromise inherits. An over-grant is dormant until the skill is subverted or updated, then it is the attacker's budget. Right-size now.

Worked example (a confirm and a kill)

Confirm. A skill's manifest requests process execution and open network access. Tracing the bundled code, it only reads a local file and formats it: it never spawns a process and never opens a socket. Both grants are pure headroom. Separately, the code reads an environment secret it never declared needing. Confirmed over-broad grant plus undeclared read, high, remediation = drop the process and network grants, declare and justify the secret read or remove it, and scope every remaining grant to the task.

Kill. A skill declares read access to one directory and network access to one named host. Tracing the code, it reads only that directory and calls only that host, both needed for its stated function, nothing wider. Declared, used, and already scoped. Killed, kill_reason = "each grant is exercised at the declared scope and no narrower scope covers the task."

Rationalizations to reject

  • "It might need those permissions later." → Then it declares them later. Grant what the shipped code uses, not what a future version might.
  • "The extra scope is harmless." → It is dormant blast radius a compromise inherits. Harmless until it is not.
  • "It only reads one secret it did not declare." → Undeclared reach is a broken consent boundary regardless of size. Declare it or remove it.
  • "The manifest came from a template." → Then it was never sized to this skill. That is the reason to audit it, not to trust it.

Executing this in practice

You need the declared grant surface from the frontmatter or manifest, a trace of what the bundled code and instructions actually exercise (calls, processes, sockets, file reads), and a way to diff the two sets in both directions. A view that follows calls through aliases and indirection beats a string grep, because an undeclared capability is easiest to hide behind one. The two-way diff and the least-privilege rewrite are the method.

Related

  • vetting-skills-before-install - the flagship that runs this permission audit as one step before an install verdict.
  • auditing-ai-agent-permissions - the runtime least-privilege view of an agent's own tools; this skill is the install-time view of a packaged skill.
  • auditing-skill-and-mcp-instructions - the instruction-text lint that pairs with this permission diff to vet an artifact.
  • FINDING-SCHEMA.md - source = the declared grant, sink = the capability the code exercises or fails to declare.

Heefeg gestallte Froen

Wat mécht de KI-Skill Auditing Declared Vs Used Permissions?

Find the consent gap in an agent skill or MCP server: the distance between the permissions and capabilities it declares and what its bundled code and instructions actually exercise. Covers over-broad grants a skill requests but never uses, capabilities it exercises without declaring, and grants that are used but still wider than the task needs. Read the declared surface in frontmatter or manifest, inventory the real behavior, and diff the two in both directions. Use when reviewing a skill or server before install, or auditing least privilege across an agent's installed set. An over-broad or...

Firwat Auditing Declared Vs Used Permissions op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Auditing Declared Vs Used Permissions besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Auditing Declared Vs Used Permissions an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-declared-vs-used-permissions an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Auditing Declared Vs Used Permissions benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Auditing Declared Vs Used Permissions benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Auditing Declared Vs Used Permissions domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Auditing Declared Vs Used Permissions gratis?

Jo. UnboundCompute huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇