jsnBLOCK
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
A command-line interface for ServiceNow. Type jsn and start working — no web UI needed.
Works standalone or with AI agents (Claude Code, OpenCode, Hermes, Cursor, Copilot).
Install
npm install -g @jacebenson/jsn
Node.js 22.5.0 or newer. macOS, Linux, Windows.
The install also copies an AI agent skill file to ~/.agents/skills/servicenow/SKILL.md.
Install from GitHub (test unreleased builds)
To test a branch or the freshly merged main before it's published to npm:
npm install -g github:jacebenson/jsn#main # merged but not yet tagged npm install -g github:jacebenson/jsn# # any PR/feature branch
Go back to the released version with:
npm install -g @jacebenson/jsn
Note: git installs build better-sqlite3 (docs search) from source, so the machine needs build tools (Python, make, a C++ compiler).
Direct MID installation
jsn midservers add --install-method direct --name worker1
Official x86-64 ZIPs for Linux and Windows, selected from the instance's mid.version. Credentials are prompted and validated before installation. Linux supports a user-owned background runtime. Windows currently prepares private files and offers a foreground console, not native service registration. See direct MID installation for security boundaries, lifecycle commands and the untested Windows host phases. Docker remains available.
Quick Start
jsn setup # Interactive: add, switch, remove, modify instances jsn incidents list --query "priority=1" # Critical incidents
What It Does
jsn talks to the ServiceNow REST API. Read, create, update, delete — tickets, users, groups, records on any table. Inspect flows and business rules. Export update sets. Run background scripts.
Everything outputs JSON when piped, styled tables in a terminal.
# Core ticket work jsn incidents list --query
24b243ee1c8aOBSERVED · 2026-10-13Install
Commands as the repository documents them. They are shown, not run.
npm install
npm install -g @jacebenson/jsn
npm install -g github:jacebenson/jsn#main # merged but not yet tagged
npm install -g github:jacebenson/jsn#<branch> # any PR/feature branch
npm install -g @jacebenson/jsn
git clone https://github.com/jacebenson/jsn.git
Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| claude-code | mentioned | |
| codex | mentioned | |
| copilot | mentioned | |
| cursor | mentioned | |
| openclaw | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
--- name: servicenow description: | Interact with ServiceNow instances via the jsn CLI. Use when working with ServiceNow development, administration, or data exploration. Handles tables, records, business rules, flows, script includes, ACLs, update sets, and more. Triggered by ServiceNow URLs (service-now.com, servicenow.com) or when the user mentions ServiceNow, jsn, servicenow, or related terms like tables, records, business rules, flows, script includes, ACLs, update sets, or encoded queries. license: MIT compatibility: | Requires jsn CLI (github.com/jacebenson/jsn). Install via: npm install -g @jacebenson/jsn Works with Claude Code, OpenCode, Cursor, and agentskills-compatible tools. metadata: author: jacebenson version: "4.3.6" repository: https://github.com/jacebenson/jsn --- # Jace's ServiceNow CLI (jsn) Explore and manage ServiceNow instances. Interactive paginated pickers with server-side search on all list commands. ## Discovery ```bash jsn --help # All commands grouped by domain jsn <command> --help # Flags, subcommands, and examples ``` ## Interactive Picker All `list` subcommands use a paginated interactive picker in TTY mode: - Arrow through items (10 per page) - Type to search (server-side LIKE query) - Scroll past last loaded item to load next page - Enter to select, Esc to cancel - Falls back to table output with `--json` ## Agent Rules 1. **Output modes** — `--json` when parsing data; text when presenting to humans 2. **Use sys_id for updates** — All update/delete operations require sys_id 3. **Check auth first** — Run `jsn auth status` before operations 4. **NEVER logout** — Only run `jsn auth logout` if the user explicitly asks 5. **Use `--profile <name>`** to target a specific instance, or `jsn auth switch <name>` to change the default 6. **Before using `eval` or `rest`** — Ask: *"Is there a more specific jsn command?"* Prefer specific over generic over escape hatch over eval. 7. **CONFIRM before destructive operations** — Show what will be created/updated/deleted and ask for approval. ## Command Hierarchy Pick the most specific tool for the job. **Never default to eval** — it's the last resort: 1. **Specific commands** — `jsn flows`, `jsn rules`, `jsn catalogitems`, etc. 2. **`jsn records --table <name>`** — generic CRUD on any table 3. **`jsn docs search <query>`** — offline ServiceNow documentation search (no instance needed) 4. **`jsn rest`** — raw Table API escape hatch 5. **`jsn eval`** — ⚠️ **LAST RESORT ONLY** 6. **Ask the human** — if none of the above work ## Key Commands | Domain | Commands | |--------|---------| | **Core** | `incidents`, `changes`, `requests`, `tasks` | | **Catalog** | `catalogitems list/show/create` — items with variables and flow info | | **Automation** | `flows`, `actions`, `rules`, `triggers`, `scheduledjobs` | | **Access** | `acls`, `b4rules`, `roles`, `groups`, `users` | | **UX** | `forms` (section/element layout), `lists`, `clientscripts`, `uipolicies` | | **Data** | `tables`, `columns`, `includes`, `logs`, `properties`, `records` | | **Config** | `setup`, `auth`, `updatesets`, `scopes` | | **Docs** | `docs sync`, `docs status`, `docs search`, `docs serve` | | **Developer** | `eval`, `rest`, `skill`, `version` | ### Table and raw REST examples ```bash # Query a table with the normal records command jsn records list --table incident --query "active=true" --limit 5 --json # Get a single record jsn records get --table incident --sys-id abc123... --json # Raw endpoint access when no specific command fits jsn rest "/api/now/table/incident?sysparm_limit=3" --json ``` ### `jsn docs` — offline documentation search No ServiceNow instance required. Searches the full ServiceNow docs locally with FTS5 + semantic hybrid search. ```bash # First run: download docs and build the index (~45k files, ~3-5 min) jsn docs sync # Check state jsn docs status # Search (keyword + semantic hybrid) jsn docs search "GlideRecord query" --limit 5 --json # Filter by bundle jsn docs search "REST API" --bundle it-service-management --json # Start the web UI jsn docs serve ``` **Re-running `jsn docs sync`** does a smart incremental refresh — pulls latest docs and only rebuilds changed files (seconds, not minutes). ## Troubleshooting Field Behavior Check order (priority): 1. **Before-query business rules** — `sys_script` with `when=before`, `action=query` ```bash jsn b4rules list --query "collection=sys_user" ``` 2. **ACLs** — `jsn acls list --query "name=incident"` 3. **Dictionary overrides** — `jsn records list --table sys_dictionary --query "name=incident^element=caller_id"` 4. **Client scripts** / **UI policies** — form-level field behavior ## Configuration ``` ~/.config/servicenow/ ├── config.json # Profiles and settings └── credentials/ # Auth tokens (fallback, one file per key) ```
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | FAIL |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (5 observation(s))
- Network
- declared (6 observation(s))
- Shell
- declared (3 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- found
Findings (12)
const parsed = yaml.load(raw);
const secret = 'super-secret-token-and-cookie';
.eleventy.js
import { getStringField } from '../../helpers.js';import { parseFrontmatter, stringifyFrontmatter } from '../../frontmatter.js';import { declareCapabilities } from '../../capabilities.js';import { parseFrontmatter } from '../../frontmatter.js';import { parseFrontmatter } from '../../frontmatter.js';...(served && { served: 'http://127.0.0.1:3000' }),@11ty/eleventy
@inquirer/core, @inquirer/prompts, better-sqlite3, js-yaml, turndown, @eslint/js, globals
`auth status` uses safe metadata and a read-only current-user probe. It does not refresh tokens, update `last_seen`, migrate credentials, or persist credentials. JSON diagnostics contain method, sourc
Gates applied: no_behavioural_pass.
24b243ee1c8afull audit observations/trust-audit/skill/jacebenson__jsn.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-13 | 24b243ee1c8a | BLOCK | D | 69 | first audit |
Questions
Is jsn safe to install?
No — not without reading the findings first. The audit graded it D (69/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on.
What can jsn access on my machine?
The audit observed that it reaches the network, runs shell commands and reads or writes files. Each of those is consistent with what it says it does. Secrets in the source: found — see the findings.
Which assistants does jsn work with?
Its documentation mentions claude-code, codex, copilot, cursor and openclaw. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (24b243ee1c8a), read on 2026-10-13. The repository is watched, and a new audit runs when it changes — this is the first audit.