用途分类 / 其他用途
Json Canvas Skill 安全审计
作者说它能做什么(原文)
Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections. Use when working with .canvas files, creating visual canvases, mind maps, flowcharts, or when the user mentions Canvas files in Obsidian.
第三方安全检查结论
这次检查未发现明显风险
- 已检查文件
- 2
- 发现的风险
- 0
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。未发现风险
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。未发现风险
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险
Skill 逻辑拆解
该 Skill 是纯文档型工作流,指导创建、读取、修改并验证 JSON Canvas 文件;所提供源码中没有脚本、安装步骤或命令执行指令。
查看原文
### 1. Create a New Canvas1. Create a `.canvas` file with the base structure `{"nodes": [], "edges": []}`2. Generate unique 16-character hex IDs for each node (e.g., `"6f0ad84f44ce9c17"`)3. Add nodes with required fields: `id`, `type`, `x`, `y`, `width`, `height`4. Add edges referencing valid node IDs via `fromNode` and `toNode`5. **Validate**: Parse the JSON to confirm it is valid. Verify all `fromNode`/`toNode` values exist in the nodes array### 4. Edit an Existing Canvas1. Read and parse the `.canvas` file as JSON2. Locate the target node or edge by `id`3. Modify the desired attributes (text, position, color, etc.)4. Write the updated JSON back to the file5. **Validate**: Re-check all ID uniqueness and edge reference integrity after editing文件节点可在画布中保存文件路径,链接节点可保存外部 URL。源码只描述这些字段和静态示例,没有指示读取文件内容、访问 URL 或向外发送数据。
查看原文
### File Nodes| Attribute | Required | Type | Description ||-----------|----------|------|-------------|| `file` | Yes | string | Path to file within the system || `subpath` | No | string | Link to heading or block (starts with `#`) |### Link Nodes| Attribute | Required | Type | Description ||-----------|----------|------|-------------|| `url` | Yes | string | External URL |修改现有画布时,指令要求避免 ID 冲突,并在完成后检查重复 ID、悬空边引用和 JSON 格式,降低生成无效或结构损坏文件的可能性。
查看原文
### 2. Add a Node to an Existing Canvas1. Read and parse the existing `.canvas` file2. Generate a unique ID that does not collide with existing node or edge IDs3. Choose position (`x`, `y`) that avoids overlapping existing nodes (leave 50-100px spacing)4. Append the new node object to the `nodes` array5. Optionally add edges connecting the new node to existing nodes6. **Validate**: Confirm all IDs are unique and all edge references resolve to existing nodesAfter creating or editing a canvas file, verify:1. All `id` values are unique across both nodes and edges2. Every `fromNode` and `toNode` references an existing node ID3. Required fields are present for each node type (`text` for text nodes, `file` for file nodes, `url` for link nodes)4. `type` is one of: `text`, `file`, `link`, `group`5. `fromSide`/`toSide` values are one of: `top`, `right`, `bottom`, `left`6. `fromEnd`/`toEnd` values are one of: `none`, `arrow`7. Color presets are `"1"` through `"6"` or valid hex (e.g., `"#FF0000"`)8. JSON is valid and parseableIf validation fails, check for duplicate IDs, dangling edge references, or malformed JSON strings (especially unescaped newlines in text content).从这里开始 · 工作说明SKILL.md
json-canvas文件引用关系图
1 处引用哪些文件发起引用引用了什么
文件与检查记录2 个文件
检查范围与遗漏
逐文件查看涉及的内容
下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。
SKILL.md已纳入全文references/EXAMPLES.md已纳入全文
这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。
SKILL.md工作说明references/EXAMPLES.md配套文件
代码和说明中提到的操作
连接外部网站
A canvas file (`.canvas`) contains two top-level arrays following the [JSON Canvas Spec 1.0](https://jsoncanvas.org/spec/1.0/): "height": 200, "url": "https://obsidian.md"}- [JSON Canvas Spec 1.0](https://jsoncanvas.org/spec/1.0/)- [JSON Canvas GitHub](https://github.com/obsidianmd/jsoncanvas)- 读取了多少行
- 575
- 文件校验值(用于核对版本)
- bc84ebd7975bea0aa8caca512fbde72edcbec4731d9f6559bb084c2561553ee5