Logo : Auditing Third Party Script And Sri Trust

Auditing Third Party Script And Sri Trust

Organisation
UnboundCompute
auditing-third-party-script-and-sri-trust

Auditez la confiance accordée par une application web aux scripts tiers qu’elle charge sur ses propres pages : une balise de script externe sans hash Subresource Integrity, permettant à un CDN ou à un fournisseur compromis de diffuser du code modifié qui s’exécute avec tous les privilèges de la page ; un gestionnaire de balises ou un outil d’analyse qui injecte d’autres scripts que le site n’a jamais vérifiés ; un script servi depuis une URL modifiable ou une source générique susceptible d’être remplacée ; et une stratégie Content-Security-Policy absente ou trop permissive, qui autorise n’importe quel script externe. Cela couvre les interfaces web, les balises marketing et d’analyse, les intégrations de paiement et de widgets, ainsi que toute page qui charge depuis une autre origine du JavaScript qu’elle n’a pas écrit. À utiliser lorsqu’une page exécute un script tiers dans son propre contexte de sécurité et que l’intégrité de ce code constitue la frontière de sécurité. Le script tiers compromis ou remplacé constitue la source ; son exécution avec tous les privilèges de la page (vol de données, détournement de paiements, défiguration) constitue la destination ; l’absence de verrouillage d’intégrité ou une stratégie de scripts trop permissive est le problème.

Présentation

ÉditeurUnboundCompute
Dépôtsecurity-agent-skills
Nom de la compétenceauditing-third-party-script-and-sri-trust
Étoiles
27
Forks
8
Fichiers inclus
Instructions uniquement
LicenceMIT
Liens
  • Instructions en Markdown

    Un fichier SKILL.md que le modèle charge à la demande : il ne consomme donc des tokens que lorsqu’une demande correspond réellement à la compétence.

  • Compatible avec tous les LLM

    Les compétences IA sont rédigées en Markdown et non sous forme de code propre à un fournisseur. Elles fonctionnent donc avec GPT, Claude, Gemini, Grok ou un modèle local.

  • Tout dans les instructions

    Tout ce dont le modèle a besoin se trouve dans les instructions : aucun fichier supplémentaire à synchroniser.

  • Open source

    Publiée par UnboundCompute sur GitHub. Consultez les sources avant de l’installer.

Installation

Installez la compétence IA Auditing Third Party Script And Sri Trust dans TypingMind pour l’utiliser avec n’importe quel LLM, ou ajoutez-la à un autre agent capable de lire SKILL.md.

1

Installer dans TypingMind

TypingMind installe une compétence directement depuis son dossier GitHub : l’application lit SKILL.md, regroupe les fichiers de ressources et enregistre le tout localement.

  1. Ouvrez l’application et accédez à Plugins → Compétences.
  2. Choisissez « Installer depuis GitHub ».
  3. Copiez l’URL ci-dessous, qui pointe vers le dossier de la compétence, puis collez-la et confirmez.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-third-party-script-and-sri-trust
  4. Activez la compétence dans chaque discussion où vous souhaitez pouvoir l’utiliser.
Plugins → Compétences → Ajouter une compétence → Via une URL GitHub, puis collez l’URL du dossier et appuyez sur Continuer.
2

Installer dans un autre agent

Tout agent capable de lire le format Agent Skills peut utiliser cette compétence : copiez le dossier dans le répertoire des compétences de cet 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-third-party-script-and-sri-trust .claude/skills/auditing-third-party-script-and-sri-trust
Redémarrez Claude Code après la copie pour que la nouvelle compétence soit prise en compte.

Utilisez cette compétence dans TypingMind

Activez Auditing Third Party Script And Sri Trust dans n’importe quelle discussion TypingMind et le modèle s’occupe du reste. Le nom et la description de la compétence figurent dans le prompt système. Dès qu’une demande correspond, le modèle charge lui-même l’intégralité des instructions : vous n’avez jamais à l’invoquer manuellement, et elle ne consomme aucun token tant qu’elle n’est pas utilisée.

Le modèle charge automatiquement Auditing Third Party Script And Sri Trust dès qu’une demande correspond à cette compétence.

Compatible avec tous les modèles IA

Les compétences IA sont de simples instructions Markdown, et non du code propre à un fournisseur. Ainsi, la compétence Auditing Third Party Script And Sri Trust n’est pas liée au modèle pour lequel elle a été conçue. Installez-la une seule fois dans TypingMind et utilisez-la avec GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou un modèle local que vous exécutez vous-même, le tout avec vos propres clés API.

  • Chargée uniquement en cas de besoin

    Le prompt système ne contient que le nom et la description. Les instructions sont récupérées à la première demande correspondante : une compétence inutilisée ne coûte donc rien.

  • Changez de modèle en cours de discussion

    La compétence étant constituée d’instructions et non de code, elle reste fonctionnelle lorsque vous changez de modèle : le nouveau modèle lit le même fichier SKILL.md.

Instructions de la compétence

Voici le contenu de SKILL.md que le modèle charge. Lisez-le avant l’installation : une compétence contient des instructions que votre modèle suivra.

Auditing third-party script and SRI trust: a script tag is code you did not write running as you

Every external script a page loads runs in that page's security context: it can read the DOM, cookies accessible to script, form fields, and tokens, and it can send them anywhere. So a third-party script is not a dependency the way a backend library is; it is code you did not write, delivered by a party you do not control, executing with your page's full privileges on your users. The risk is supply-chain: the vendor's CDN is compromised, the vendor ships a malicious update, or the script URL is swapped, and altered code runs on every visitor. A form-skimming attack that steals payment details is exactly this, a legitimate analytics or widget script replaced with one that also reads the checkout form. The defenses are integrity pinning (a Subresource Integrity hash so the browser refuses altered code) and a Content-Security-Policy that constrains which origins may serve script at all, and a tag manager that injects further scripts undoes both by loading code nobody reviewed. The audit inventories every third-party script, checks whether its integrity is pinned and its origin constrained, and treats any unpinned externally served script as attacker-controllable. You audit this by listing what the page loads and asking, for each, what happens if that code is swapped.

When to use

  • A web page loads JavaScript from another origin: a CDN, an analytics or marketing tag, a payment or chat widget, a tag manager.
  • External script tags may lack Subresource Integrity hashes, or scripts may be served over mutable or wildcard URLs.
  • A tag manager or loader may inject further scripts, and the Content-Security-Policy may be missing or permissive.

Scope check

Audit third-party script trust only on sites and properties you own or are authorized to assess. Reviewing what a page loads is passive, but testing swap or injection scenarios touches real third-party relationships, so stay within your own properties and test deployments and never tamper with a vendor's delivery or another site's scripts. If you can't name the authorization, stop.

The loop

  1. Establish the intended set of third-party code first. Inventory every external script the page loads, who serves it, and why, including scripts injected by tag managers and loaders. Name what each is allowed to do and what would happen if it were swapped. This is the false-positive killer: a page that loads a known, minimal set of scripts, each pinned with Subresource Integrity, from origins a strict CSP allows, with no uncontrolled tag-manager injection, has bounded its third-party trust. Name the intended set, then check the controls.

  2. Check integrity pinning (SRI). For each externally served script, confirm it carries a Subresource Integrity hash and crossorigin so the browser refuses to run code that does not match. An external script with no SRI hash runs whatever the CDN or vendor serves, so a compromised or updated source executes altered code with no barrier.

  3. Assess the Content-Security-Policy for script. Determine which origins the CSP allows to serve script and whether it permits inline script, unsafe-eval, or wildcard sources. A missing CSP, or one permissive enough to allow arbitrary external script, means nothing constrains what code the page will run. Confirm the policy is a real allowlist, not a formality.

  4. Trace tag managers and script injectors. Follow any tag manager, consent manager, or loader that injects further scripts at runtime. These load code the site never directly reviewed and often cannot pin, so they are a hole straight through SRI and CSP. Confirm injected scripts are governed (reviewed, pinned where possible, and CSP-constrained) rather than trusted wholesale.

  5. Check URL mutability and origin control. Determine whether each script URL is versioned and immutable or points at a mutable "latest" path, and whether the serving origin is one the vendor could repoint. A script at a mutable URL or a wildcard origin can be swapped without the page changing at all, defeating a review done once.

  6. Confirm and record. Confirm by demonstrating (on your own test deployment) that an unpinned or permissively allowed script would execute swapped code with full page privileges, reading form fields or tokens and exfiltrating them, without tampering with a real vendor. Kill the lead if every third-party script is integrity-pinned, served from a strict-CSP-allowed immutable origin, and no tag manager injects ungoverned code. Record the compromised or swapped script, the full-privilege execution in the page, and the missing integrity pin or permissive script policy.

Where third-party script trust leaks

  • No Subresource Integrity. An external script with no SRI hash runs whatever its CDN or vendor serves, so a compromise or update executes altered code unchallenged.
  • Missing or permissive CSP. No script allowlist, or one that permits wildcard origins, inline script, or unsafe-eval, leaves nothing constraining what code the page runs.
  • Tag-manager injection. A tag or consent manager that injects further scripts at runtime loads unreviewed, often unpinnable code straight past SRI and CSP.
  • Mutable script URLs. A script at a "latest" or unversioned URL can be swapped without any change to the page, defeating a one-time review.
  • Wildcard or repointable origins. A CSP or tag that allows a broad origin lets a vendor (or an attacker who compromises it) serve different code from an allowed source.

Worked example (a confirm and a kill)

Confirm. A checkout page loads an analytics script from a vendor CDN with a plain <script src> tag, no SRI hash, and a CSP that allows the vendor's wildcard origin. On a test deployment, replacing the served script with one that also reads the card-number field and posts it to an external URL runs unchallenged, because nothing pins the code and the origin is broadly allowed, the shape of a form-skimming compromise. Confirmed third-party script skimming exposure via missing SRI and permissive CSP, high, remediation = add a Subresource Integrity hash and crossorigin to the script, pin it to an immutable versioned URL, and tighten the CSP to the exact origins and paths needed with no wildcard or inline script.

Kill. Every third-party script carries an SRI hash and crossorigin, is loaded from an immutable versioned URL on an origin a strict CSP allows by exact host, the CSP forbids inline script and unsafe-eval, and no tag manager injects ungoverned code. A swapped script fails the integrity check and never runs; an unlisted origin is blocked by the CSP. Killed, kill_reason = "all third-party script is integrity-pinned from strict-CSP-allowed immutable origins with no ungoverned injection; swapped or altered code does not execute."

Rationalizations to reject

  • "It is a reputable vendor." → Reputable CDNs and vendors are exactly the supply-chain targets; pin the code with SRI so a compromise of the reputable party still cannot run altered script.
  • "We reviewed the script." → A review is a point in time; an unpinned or mutable-URL script can be swapped after review with no change you would notice, so pin and version it.
  • "We have a CSP." → Confirm it is a real allowlist without wildcards, inline script, or unsafe-eval; a permissive CSP allows the attacker's script as readily as the vendor's.
  • "The tag manager handles that." → A tag manager injects code you did not review and often cannot pin; it is a hole through your controls, not a control.
  • "It is just analytics." → Analytics runs with full page privileges and can read the same forms and tokens as any script; there is no low-privilege third-party script.

Executing this in practice

You need the full inventory of external scripts (including tag-manager-injected ones), each script's SRI hash and crossorigin state, the CSP's script-source directives, and whether each URL is immutable and versioned. List what the page loads, check each for an integrity pin and a strict allowed origin, and follow every injector. Reading the page source and CSP shows the intended trust; a swapped script that runs on a test deployment shows what the controls fail to stop.

Related

  • auditing-clickjacking-and-ui-redressing - the other front-end trust boundary enforced by response headers; CSP and framing controls are audited from the same page configuration.
  • hunting-supply-chain-risks - the build-time supply chain; third-party script is the runtime, in-browser supply chain of the same kind of trust.
  • mapping-attack-surface - use it to enumerate every origin and script a page loads before checking each one's integrity and policy.
  • hunting-wallet-drainer-and-dapp-approval-abuse - a compromised dApp script is how a drainer swaps a spender or prompt; front-end integrity and approval abuse meet in the page.
  • FINDING-SCHEMA.md - source = the compromised or swapped third-party script, sink = the full-privilege execution in the page, evidence = the missing integrity pin or permissive script policy.

Foire aux questions

À quoi sert la compétence IA Auditing Third Party Script And Sri Trust ?

Auditez la confiance accordée par une application web aux scripts tiers qu’elle charge sur ses propres pages : une balise de script externe sans hash Subresource Integrity, permettant à un CDN ou à un fournisseur compromis de diffuser du code modifié qui s’exécute avec tous les privilèges de la page ; un gestionnaire de balises ou un outil d’analyse qui injecte d’autres scripts que le site n’a jamais vérifiés ; un script servi depuis une URL modifiable ou une source générique susceptible d’être remplacée ; et une stratégie Content-Security-Policy absente ou trop permissive, qui autorise n’i...

Pourquoi utiliser Auditing Third Party Script And Sri Trust sur TypingMind ?

Parce que vous l’installez une seule fois pour l’utiliser avec n’importe quel modèle. Auditing Third Party Script And Sri Trust se compose de simples instructions en Markdown plutôt que de code propre à un fournisseur. La même compétence fonctionne donc avec GPT-5, Claude, Gemini, Grok ou un modèle local, et vous pouvez changer de modèle en cours de discussion sans perturber son fonctionnement. TypingMind utilise vos propres clés API : vous payez donc directement les fournisseurs plutôt qu’un abonnement par siège, et vos compétences et discussions restent dans votre propre espace de stockage.

Comment installer Auditing Third Party Script And Sri Trust dans TypingMind ?

Dans TypingMind, ouvrez Plugins → Compétences → Installer depuis GitHub et collez https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-third-party-script-and-sri-trust. TypingMind lit le fichier SKILL.md et l’installe sous forme de compétence que vous pouvez activer pour chaque discussion.

Quels modèles d’IA peuvent utiliser Auditing Third Party Script And Sri Trust ?

N’importe quel modèle que vous connectez dans TypingMind. Les compétences IA sont de simples instructions en Markdown, et non du code propre à un fournisseur. GPT, Claude, Gemini, Grok et les modèles locaux peuvent donc tous charger cette compétence lorsqu’une demande lui correspond.

Combien de modèles d’IA puis-je utiliser avec Auditing Third Party Script And Sri Trust ?

Autant que vous le souhaitez. Vous pouvez utiliser Auditing Third Party Script And Sri Trust avec tout modèle qui prend en charge les compétences : GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama et bien d’autres, le tout dans TypingMind avec vos propres clés API.

La compétence IA Auditing Third Party Script And Sri Trust est-elle gratuite ?

Oui. Cette compétence est publiée sur GitHub par UnboundCompute sous licence MIT. Vous ne payez que votre propre fournisseur d’IA pour les tokens utilisés.

Que sont les compétences IA ?

Une compétence IA est un ensemble d’instructions réutilisables qui apprend à un modèle d’IA à accomplir une tâche précise. Elle suit le format ouvert Agent Skills : un fichier SKILL.md contenant un nom et une description, ainsi que les éventuels scripts, gabarits ou fichiers de référence dont le modèle peut avoir besoin. Le modèle ne lit les instructions que lorsque votre demande correspond à la compétence. Une compétence installée ne coûte donc rien tant qu’elle n’est pas utilisée.

En quoi les compétences IA diffèrent-elles des plugins ou des serveurs MCP ?

Un plugin ou un serveur MCP fournit au modèle de nouveaux outils à appeler : du code qui s’exécute quelque part et renvoie un résultat. Une compétence IA lui apporte plutôt des connaissances et une méthode : comment aborder une tâche, quelles étapes suivre et à quoi ressemble un bon résultat. Les compétences sont de simples instructions en Markdown. Elles ne nécessitent donc ni serveur, ni clé API, ni environnement d’exécution, et fonctionnent avec n’importe quel modèle.

Tout voir

Créez votre propre espace de travail IA dès maintenant

Abonnez-vous à notre newsletter pour être informé des nouvelles fonctionnalités et des prochains cadeaux à gagner 👇