TavernKeeper Scan Report

p-e-w/sorcery

Commit 77b885b Reviewed

No material or immediate-danger concern was identified in this review.

This advisory report describes what the named tools and contextual reviewer found at one exact commit. Unknown or unobserved behavior may still exist.

0 immediate danger 0 material 2 low

What this review found

No material or immediate-danger item was identified.

Expected scanner matches (2)

OpenGrep reported tavernkeeper.dynamic-execution.javascript-eval

Expected behavior · high confidence

This extension lets you write your own JavaScript code that runs when AI characters say certain things. The code on this line is how it runs your code. That's exactly what the extension is supposed to do, and you choose what code to run. It's like giving the AI a remote control that only presses buttons you set up beforehand.

Technical evidence

Scanner reason: OpenGrep matched static-analysis rule tavernkeeper.dynamic-execution.javascript-eval in this repository.

Contextual assessment: The `Function(javascript)()` call on line 103 executes user-authored JavaScript stored in the extension's settings. This is the core, transparently documented purpose of the Sorcery extension: enabling users to bind arbitrary JavaScript code to chat events. The execution path is entirely controlled by the user through the settings UI. The streaming hook (onProgressStreaming) only parses script IDs from AI-generated markers and selects pre-existing user-written scripts; it never injects code from the model output. No concealed execution, obfuscation, or unintended data exfiltration is present. The risk of self-harm from running user's own code is inherent and expected.

Impact: low · Exploitability: unlikely

Developer action: none

Scanner
opengrep 1.26.0
Rule
tavernkeeper.dynamic-execution.javascript-eval
File role
production
Source
main.js:103

JavaScript analysis reported javascript.xray.unsafe-stmt

Expected behavior · high confidence

This extension is designed to run code that you write yourself. The AI can't make up its own code, it can only trigger one of the scripts you've already set up. So using Function() here is exactly the intended way to run those scripts.

Technical evidence

Scanner reason: JavaScript analysis matched static JavaScript security signal javascript.xray.unsafe-stmt in this repository.

Contextual assessment: The Function() constructor on line 103 executes JavaScript code stored in the user's script configuration. The variable `javascript` originates from `script.javascript`, which is user-defined through the extension's settings UI and persisted locally. The extension's stated purpose is to execute user-configured scripts triggered by AI-generated markers in streaming responses. The model cannot inject arbitrary code; it can only select among pre-configured scripts by ID. There is no evidence that `javascript` is derived from untrusted input, network sources, or AI output. The code is plainly visible and directly implements the intended functionality described in the project's README.

Impact: none · Exploitability: unlikely

Developer action: none

Scanner
javascript-analysis webcrack-2.16.0_js-x-ray-16.0.0_signatures-1_literals-1
Rule
javascript.xray.unsafe-stmt
File role
production
Source
main.js:103

Coverage and limitations

JavaScript coverage

Tools

Limitations

Technical scan identity