How the security audit scores
What HarnessKit does
Section titled “What HarnessKit does”An audit runs when you click Run Audit or run hk audit, and right after you install a skill from Marketplace, Git or a local folder. Install to Agent audits the new copy only if the source skill has a recorded source. Other installs and every update wait for the next full audit.
- Read the extension. A skill’s
SKILL.md, an MCP server’s command, arguments, environment and headers, a hook’s command, or a plugin’s script files. For a CLI, its entry in a built-in list and its install method. - Strip invisible characters. Zero-width characters then cannot break up a pattern.
- Run the 20 rules. Each finding has a severity.
- Deduct points. The first finding of a rule costs 25 points if Critical, 15 if High, 8 if Medium and 3 if Low. Each further finding of the same rule costs 1 point. The score stops at 0.
- Assign a tier. 80 or more is Safe, 60 to 79 is Low Risk, and below 60 is Needs Review.
A skill with one prompt-injection finding and no known source scores 100 − 25 − 3 = 72, which is Low Risk.
The rules
Section titled “The rules”Names match the Security Audit page.
| Severity | Rules |
|---|---|
| Critical | Prompt Injection, Remote Code Execution, Plaintext Secrets, Safety Bypass |
| High | Broad Permissions, Permission Combination Risk, CLI Credential Storage, MCP Command Injection |
| Medium | Skill Invocation Key Case, dsh !!js Env Without Fallback, Supply Chain Risk, CLI Network Access, CLI Permission Scope |
| Low | Unknown Source |
| Two levels | Credential Theft (Critical or High), Dangerous Commands (High in hooks, else Medium), CLI Binary Source (High or Medium), CLI Aggregate Risk (High or Low), Plugin Source Trust (Medium or Low), Plugin Lifecycle Scripts (Medium or Low) |
The text rules look for:
- Prompt Injection checks skills and plugins for “ignore previous instructions”, “disregard previous”, “you are now a”, “new system prompt”, “override system prompt” and
[SYSTEM]. - Remote Code Execution looks for
curlorwgetpiped into a shell, acurldownload to/tmp/that is then run,base64 -dpiped onward, andeval(. - Credential Theft looks for
~/.sshkeys,known_hostsandconfig,.env,.netrc,.pgpassand cloud credential files. It is Critical when the text also sends data out. - Plaintext Secrets looks for words that start with
sk-,ghp_,gho_,AKIA,xoxb-orxoxp-, in text and in MCP environment and header values. - Safety Bypass looks for
--no-verify,--force,--yes,allowedTools: "*", and sentences about skipping or bypassing a confirmation.
Permissions
Section titled “Permissions”HarnessKit infers five kinds of access during a scan. They are labels to review, not limits it enforces.
- File System. Paths such as
~/…or/etc/…in a skill or hook, or absolute paths in MCP arguments. Every skill shows this kind. - Network. Domains from
http://andhttps://URLs. AnnpxoruvxMCP server always gets any domain (*). A remote MCP server gets its host. - Shell. The first word of each line in a skill’s
bash,sh,zshorshellcode blocks, or an MCP server’s or hook’s command. - Database. Mentions of PostgreSQL, MySQL, MariaDB, SQLite, MongoDB or Redis.
- Environment. MCP servers only: the names of environment variables and headers, never the values.
For a plugin, HarnessKit reads the script and .json files at the top of its folder, not its subfolders, and every plugin shows Shell and File System. A CLI combines its binary’s known API domains and credential file with its child skills’ and MCP servers’ permissions.
Limitations
Section titled “Limitations”Under the hood
Section titled “Under the hood”crates/hk-core/src/auditor/rules.rslists the 20 rules in run order.crates/hk-core/src/auditor/rules/holds each rule’s patterns.crates/hk-core/src/auditor/mod.rsstrips invisible characters and computes scores.crates/hk-core/src/scanner.rsinfers permissions during a scan.crates/hk-core/src/service.rsdecides what each extension’s audit reads.