Logo di Auditing Declared Vs Used Permissions

Auditing Declared Vs Used Permissions

Organizzazione
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.

Panoramica

Pubblicato daUnboundCompute
Repositorysecurity-agent-skills
Nome della skillauditing-declared-vs-used-permissions
Stelle
27
Fork
8
File inclusi
Solo istruzioni
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • Tutto nelle istruzioni

    Tutto ciò che serve al modello è nelle istruzioni: nessun file aggiuntivo da sincronizzare.

  • Open source

    Pubblicata da UnboundCompute su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Auditing Declared Vs Used Permissions in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-declared-vs-used-permissions
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Aggiungi skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella della skill nella directory delle skill di quell'agente.

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
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Auditing Declared Vs Used Permissions in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Auditing Declared Vs Used Permissions non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Auditing Declared Vs Used Permissions non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

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.

Domande frequenti

Cosa fa la skill IA 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...

Perché usare Auditing Declared Vs Used Permissions su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Auditing Declared Vs Used Permissions è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che la skill smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Auditing Declared Vs Used Permissions in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-declared-vs-used-permissions. TypingMind legge il file SKILL.md e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Auditing Declared Vs Used Permissions?

Qualsiasi modello che colleghi a TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Auditing Declared Vs Used Permissions?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Auditing Declared Vs Used Permissions: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Auditing Declared Vs Used Permissions è gratuita?

Sì. È pubblicata su GitHub da UnboundCompute con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, template o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Elenco completo

Crea subito il tuo spazio di lavoro AI

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇