medharness

medharness is a settings file for Claude Code from charliehzm/medharness. Its token cost is not measured, scanned E, original, Apache-2.0.

A Claude Code settings file for governing how an organisation's medical-data traffic is handled, including access restrictions and auditing requirements.

In plain words
What is it for?
Use it as a baseline for medical-data SaaS projects that need restrictions around secrets, patient data, destructive commands, approved models, auditing, and costs.
Why use it?
It is intended to reduce the risk of exposing patient information, using unapproved models, unsafe commands, or untracked activity.

Settings file for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add settings/charliehzm/medharness/settings
Clone the repo
git clone --depth 1 https://github.com/charliehzm/medharness

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for medharness

README.md
[![agentmods](https://agentmods.dev/badge/settings/charliehzm/medharness/settings.svg)](https://agentmods.dev/settings/charliehzm/medharness/settings)
Your own site
<a href="https://agentmods.dev/settings/charliehzm/medharness/settings"><img src="https://agentmods.dev/badge/settings/charliehzm/medharness/settings.svg" alt="Measured on agentmods" height="20"></a>
Per session not measured What this adds to a session before it is invoked.
When invoked not measured Not applicable: nothing here is loaded into a session.
Security scan E 3 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Security

Grade E, and why

medharness scanned grade E with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

"Bash(curl * | bash)",

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

"Bash(rm -rf *)",

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

"Bash(curl * | bash)",
.claude/settings.json · 187 lines

How it starts

The opening of the file, as written. The whole thing — 187 lines — stays where its author put it; the contents beside it link to each section on GitHub.

{
  "$schema": "https://json.schemastore.org/claude-code-settings.json",
  "$comment": [
    "企业级 Claude Code baseline — 医疗数据 SaaS",
    "合规约束:HIPAA + PIPL + 数据安全法 + 健康医疗数据安全指南",
    "本文件是 L2 Harness 层的入口治理点,所有团队成员仓库 settings.local.json 必须在此基础上扩展,不允许放宽 deny",
    "维护:Harness Engineer(M1-M3 由 Senior 兼任)",
    "审计:每月由技术委员会复核一次",
    "升级流程:修改本文件须经技术委员会签字 + 合规委员会会签(如涉及 L5 合规层)"
  ],

  "permissions": {
    "$comment": "deny 优先于 allow;ask 用于敏感但可控的命令,由开发者当场决定",

    "deny": [
      "Bash(rm -rf *)",
      "Bash(rm -rf /)",
      "Bash(rm -rf ~/*)",
      "Bash(curl * | bash)",
      "Bash(curl * | sh)",
      "Bash(wget * | bash)",
      "Bash(wget * | sh)",
      "Bash(git push --force *)",
      "Bash(git push -f *)",
      "Bash(git reset --hard *)",
      "Bash(git clean -fd*)",
      "Bash(git checkout -- *)",
      "Bash(* --no-verify*)",
      "Bash(* --no-gpg-sign*)",

      "Read(.env)",
      "Read(.env.*)",
      "Read(**/.env)",
      "Read(**/.env.*)",
      "Read(**/secrets/**)",
      "Read(**/credentials/**)",
      "Read(**/private_key*)",
      "Read(**/*.pem)",
      "Read(**/*.p12)",

      "Read(**/patient_data/**)",
      "Read(**/phi/**)",
      "Read(**/real_patient/**)",
      "Read(**/production_data/**)",

      "Edit(.env)",
      "Edit(.env.*)",
      "Edit(**/secrets/**)",

      "WebFetch(domain:openai.com)",
      "WebFetch(domain:api.openai.com)",
      "$comment_webfetch": "境外 LLM API 默认禁止;如需 architecture-only 调用,由 Compliance Officer 加入白名单"
    ],

    "ask": [
      "Bash(git push *)",
      "Bash(git commit *)",
      "Bash(npm install *)",
      "Bash(pip install *)",
      "Bash(docker *)",
      "Bash(kubectl *)",
      "Bash(curl *)",
      "Bash(psql *)",
      "Bash(mysql *)",
      "WebFetch(*)"
    ],

    "allow": [
      "Bash(ls *)",
      "Bash(cat *)",
      "Bash(grep *)",
      "Bash(find . *)",
      "Bash(git status)",
      "Bash(git log *)",
      "Bash(git diff *)",
      "Bash(git branch *)",
      "Bash(pytest *)",

Read the full file on GitHub · 187 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 187 lines scan E 85e2fda002db

Subscribe to this mod's changes

medharness is a settings file published in the GitHub repository charliehzm/medharness (86 stars, last pushed 3mo ago), licensed Apache-2.0. Its token cost is not measured: this kind of file is read by the harness, not the model. A static security scan graded it E with 3 findings (downloads and executes remote code, recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.