Silmaril Ranger
Latest: v1.0.2
Security
- Added explicit safeguard enforcement for high-risk commands.
- eval-js now requires --allow-unsafe-js, or SILMARIL_ALLOW_UNSAFE_JS=1 in a trusted local session.
- proxy-override, proxy-switch, and openurl-proxy now require --allow-mitm, or SILMARIL_ALLOW_MITM=1 in a trusted local session.
- Proxy helper commands now enforce loopback-only binding by default. Non-local proxy binding requires explicit --allow-nonlocal-bind.
Changed
- Updated eval-js to record the safeguard acknowledgement source in JSON output.
- Updated proxy commands to record the safeguard acknowledgement source in JSON output.
- Updated dispatcher help text to show the new safeguard flags in command usage.
- Updated the openurl-proxy missing-rules guidance to show the new --allow-mitm requirement.
Documentation
- Updated the silmaril-cdp skill documentation to mark eval-js, proxy-override, proxy-switch, and openurl-proxy as high-risk commands.
- Added guidance that cloning or installing the toolkit should only happen after explicit user approval.
- Updated command examples in the skill references, COMMAND_GUIDE.md, and MITM docs to include the new safeguard flags.
- Documented the new environment variable overrides for trusted local sessions.
Tests
- Added unit tests for high-risk safeguard enforcement on eval-js, openurl-proxy, proxy-override, and proxy-switch.
- Added unit tests for shared helper behavior covering truthy opt-in values and loopback host validation.
- Verified the unit test suite passes after the safeguard changes.
Silmaril CDP
Use this skill to operate the local Silmaril toolkit from PowerShell.
Locate the toolkit
- Prefer
D:\silmairl cdp\silmaril.cmdin this environment. - If that path is missing, look for
silmaril.cmdonPATHor in a nearby checkout. - Invoke from PowerShell with
& 'D:\silmairl cdp\silmaril.cmd' ....
Install the toolkit if missing
Use this setup on Windows when the toolkit is not already present:
Only clone or copy the toolkit after the user explicitly approves fetching or installing remote code.
-
Clone or copy the repository:
git clone https://github.com/Malac12/CDP-tools.git "D:\silmairl cdp" -
Ensure Chrome, Chromium, or Edge is installed.
The toolkit checks standard Windows install paths and falls back to
chrome.exeonPATH. -
Run the toolkit from PowerShell:
& 'D:\silmairl cdp\silmaril.cmd' openbrowser --json& 'D:\silmairl cdp\silmaril.cmd' openUrl 'https://example.com' --json& 'D:\silmairl cdp\silmaril.cmd' get-text 'body' --json
This is sufficient for the core CDP workflow. No machine-wide PowerShell execution policy change is required because silmaril.cmd invokes PowerShell with ExecutionPolicy Bypass.
Default workflow
- Start or attach a CDP browser with
openbrowser. - Navigate with
openUrl. - Read page state with
exists,get-text,query, orget-dom. - Mutate only after validating selectors.
- Wait on one clear synchronization signal after each action.
- Prefer
runfor short repeatable flows.
Operating rules
- Prefer
--jsonfor almost every command so later steps can parse structured output. - Prefer live DOM commands over
get-sourcewhen choosing selectors or checking rendered state. - Prefer stable selectors such as
data-test,data-testid, semantic IDs, and meaningful attributes. - Use either
--target-idor--url-matchwhen multiple tabs exist; never use both together. - Pass
--yesfor page actions and mutations such asclick,type,set-text,set-html, andeval-js. - Treat
eval-js,proxy-override,proxy-switch, andopenurl-proxyas high-risk commands. - Use
--allow-unsafe-jsforeval-js, or setSILMARIL_ALLOW_UNSAFE_JS=1only for a trusted local session. - Use
--allow-mitmfor proxy commands, or setSILMARIL_ALLOW_MITM=1only for a trusted local session. - Keep proxy listeners on loopback addresses unless the user explicitly requests
--allow-nonlocal-bind. - Put long JavaScript in a file and use
eval-js --fileinstead of pasting large inline expressions. - Avoid fixed sleeps when a wait command can express the intended state.
Command selection
- Use
get-textfor a single text value. - Use
queryfor structured multi-row extraction. - Use
get-domto debug selector or markup issues. - Use
get-sourceonly when raw response HTML matters more than the rendered DOM. - Use
wait-for,wait-for-any,wait-for-gone,wait-until-js, orwait-for-mutationto synchronize.
References
- Read
references/command-patterns.mdfor common command shapes and PowerShell-safe examples. - Read
references/flows.mdbefore building or editing arunflow. - Read
references/proxy.mdwhen working withopenurl-proxy,proxy-override, orproxy-switch.
