跳转到正文
报告库
用途分类 / 其他用途

Ask Sonner Skill 安全审计

作者说它能做什么(原文)

Guide to Sonner, the React toast library — install and wire up the Toaster, pick the right toast() call, promise and loading toasts, updating, dismissing and persisting toasts, styling, theming and icons, positioning and multiple toasters. Use when working with Sonner or troubleshooting it — toasts that don't appear, appear twice, lose their styles, ignore Tailwind classes, sit behind a modal, or

第三方安全检查结论

这次检查未发现明显风险

已检查文件
2
发现的风险
0
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。未发现风险
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。未发现风险
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

5 个说明模块

此 Skill 是 Sonner React 通知库的使用指南,指示在应用根部挂载一个 Toaster,并只从客户端代码调用 toast;提供的源码中没有安装脚本、命令执行或凭据处理步骤。

查看原文
SKILL.md:12来自说明文档打开原文件
Two pieces, and only two:1. **One `<Toaster />`, mounted once**, as close to the root as possible (in Next.js: `layout.tsx` — it works inside server components). Never render it per-page or conditionally; a second mounted Toaster duplicates every toast.2. **`toast()` called from client code** — event handlers, effects, callbacks. It's a plain function, no hook or provider needed, but it does nothing on the server: in a server action, return the result and call `toast()` in the client code that receives it.

该指南记录了通知按钮回调、自定义 JSX、持久通知及关闭通知等应用内 UI 行为。这些能力可由采用该指南的应用代码定义,但文中没有指示将数据发送到外部服务或执行未经用户授权的账户操作。

查看原文
SKILL.md:28来自说明文档打开原文件
| Success / error / info / warning icon | `toast.success('…')`, `toast.error('…')`, etc. || Spinner while you manage state yourself | `toast.loading('…')`, then update it by id || Loading → success/error tied to a promise | `toast.promise(promise, { loading, success, error })` — success/error accept functions receiving the resolved value/error || Button that does something | `{ action: { label, onClick } }` — closes the toast unless `onClick` calls `event.preventDefault()`; `cancel` is the secondary variant || Custom JSX, default toast shell | `toast(<jsx />)` || Custom JSX, no styles at all | `toast.custom((t) => <jsx />)` — headless, `t` gives you the id to dismiss |
SKILL.md:43来自说明文档打开原文件
**Persist** — `{ duration: Infinity }`. **Dismiss** — `toast.dismiss(id)`, or `toast.dismiss()` for all. **Read active toasts** — `useSonner()` in React, `toast.getActiveToasts()` outside it.**Links or components in the text** — pass a function for the title or description: `toast(() => <a href="…">View</a>)`.

SKILL.md 引用同包内的 API.md 来查询精确属性;所提供引用存在,内容是 Toaster 与 toast 的参数和函数说明。

查看原文
SKILL.md:8来自说明文档打开原文件
A guide skill for [Sonner](https://sonner.emilkowal.ski), the toast library. When a task involves Sonner — wiring it up, rendering toasts, styling them, or fixing them — answer from this file first. Full prop tables for `<Toaster />` and `toast()` live in [API.md](API.md); read it when you need an exact prop name, type, or default.
API.md:26来自说明文档打开原文件
## `toast()` options`toast(message, options)` — message is a string, JSX, or a function returning JSX. Returns the toast's id.
从这里开始 · 工作说明SKILL.md
ask-sonner
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。

文件引用关系图

1 处引用
哪些文件发起引用引用了什么
连线表示真实的文件引用,不是运行顺序。点击节点可高亮相关连线,并查看具体文件和原文位置。虚线表示还有文件需要定位。
文件与检查记录2 个文件

检查范围与遗漏

逐文件查看涉及的内容

下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。

  • SKILL.md已纳入全文
  • API.md已纳入全文

这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。

  • API.md配套文件
  • SKILL.md工作说明

代码和说明中提到的操作

连接外部网站
SKILL.md:8来自说明文档打开原文件
A guide skill for [Sonner](https://sonner.emilkowal.ski), the toast library. When a task involves Sonner — wiring it up, rendering toasts, styling them, or fixing them — answer from this file first. Full prop tables for `<Toaster />` and `toast()` live in [API.md](API.md); read it when you need an exact prop name, type, or default.
读取了多少行
146
文件校验值(用于核对版本)
159762a73cf36e1f5745db57b7d8495bac20adc0d0a344b4419b855f96159999