Logo Auditing Third Party Script And Sri Trust

Auditing Third Party Script And Sri Trust

Tổ chức
UnboundCompute
auditing-third-party-script-and-sri-trust

Kiểm tra ứng dụng web để tìm sự tin cậy đặt vào tập lệnh bên thứ ba được tải vào trang của ứng dụng: thẻ tập lệnh bên ngoài không có mã băm Subresource Integrity, khiến CDN hoặc nhà cung cấp bị xâm nhập có thể phân phối mã đã bị sửa đổi và chạy với toàn quyền trên trang; trình quản lý thẻ hoặc trình tải phân tích lượt truy cập chèn thêm tập lệnh mà trang web chưa từng kiểm tra; tập lệnh được phân phối qua URL có thể thay đổi hoặc nguồn ký tự đại diện nên có thể bị tráo; và Content-Security- Policy bị thiếu hoặc cho phép quá rộng, dẫn đến chấp nhận mọi tập lệnh bên ngoài. Bao gồm giao diện web phía trình duyệt, thẻ tiếp thị và phân tích lượt truy cập, phần nhúng thanh toán và widget, cũng như mọi trang tải JavaScript từ nguồn gốc khác mà không do chính trang viết. Dùng khi trang chạy tập lệnh bên thứ ba trong ngữ cảnh bảo mật của chính trang và tính toàn vẹn của mã đó là ranh giới cần bảo vệ. Tập lệnh bên thứ ba bị xâm nhập hoặc tráo đổi là nguồn; việc thực thi với toàn quyền trên trang (đánh cắp dữ liệu, đánh cắp thông tin thanh toán, phá hoại giao diện) là đích đến; lỗi là thiếu cơ chế ghim tính toàn vẹn hoặc chính sách tập lệnh quá dễ dãi.

Tổng quan

Nhà phát hànhUnboundCompute
Kho mãsecurity-agent-skills
Tên kỹ năngauditing-third-party-script-and-sri-trust
Sao
27
Bản fork
8
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được UnboundCompute công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Auditing Third Party Script And Sri Trust trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-third-party-script-and-sri-trust
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

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
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Auditing Third Party Script And Sri Trust trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Auditing Third Party Script And Sri Trust ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Auditing Third Party Script And Sri Trust với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

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.

Câu hỏi thường gặp

Kỹ năng AI Auditing Third Party Script And Sri Trust làm được gì?

Kiểm tra ứng dụng web để tìm sự tin cậy đặt vào tập lệnh bên thứ ba được tải vào trang của ứng dụng: thẻ tập lệnh bên ngoài không có mã băm Subresource Integrity, khiến CDN hoặc nhà cung cấp bị xâm nhập có thể phân phối mã đã bị sửa đổi và chạy với toàn quyền trên trang; trình quản lý thẻ hoặc trình tải phân tích lượt truy cập chèn thêm tập lệnh mà trang web chưa từng kiểm tra; tập lệnh được phân phối qua URL có thể thay đổi hoặc nguồn ký tự đại diện nên có thể bị tráo; và Content-Security- Policy bị thiếu hoặc cho phép quá rộng, dẫn đến chấp nhận mọi tập lệnh bên ngoài. Bao gồm giao diện w...

Vì sao nên dùng Auditing Third Party Script And Sri Trust trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Auditing Third Party Script And Sri Trust là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Auditing Third Party Script And Sri Trust trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/UnboundCompute/security-agent-skills/tree/main/skills/auditing-third-party-script-and-sri-trust. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Auditing Third Party Script And Sri Trust?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Auditing Third Party Script And Sri Trust với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Auditing Third Party Script And Sri Trust với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Auditing Third Party Script And Sri Trust có miễn phí không?

Có. Kỹ năng này được UnboundCompute phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇