Skip to content
KitploitKITPLOIT
도구블로그
제출
도구블로그
제출

해킹, 침투 테스트 및 사이버 보안 도구를 당신의 보안 무기고에!

Kitploit은 해킹, 사이버 보안 및 침투 테스트 도구 디렉토리입니다. 최신 프로젝트 업데이트를 발견하여 취약점을 찾고, 시스템을 분석하고, 테스트를 자동화하고, 보안을 강화하세요.

··피드·문의·개인정보·© 2026 Kitploit

도구 디렉토리

카테고리

모든 카테고리 보기
Loading categories
hush — AI 에이전트의 행동 경계를 위한 이식 가능한 보안 규칙 | Kitploit
도구/GitHubGitHub/backbay-labs/hush
Cloud SecurityDevSecOpsSecret DetectionThreat IntelligenceSupply Chain SecurityIncident ResponseAI Security
GitHubbackbay-labs/hush

hush

AI 에이전트의 행동 경계를 위한 이식 가능한 보안 규칙

저장소 보기
2311개월 전Kitploit 검토 완료

인기

모두 보기 →

커뮤니티에서 가장 많이 사용되는 도구를 찾아보세요.

모든 도구 탐색

도구 컬렉션을 둘러보세요

모든 도구 보기 →
공유
웹사이트

HushSpec

AI 에이전트 보안 규칙을 위한 이식 가능한 오픈 사양

CI License Spec Version crates.io npm PyPI

사양 · 문서 · 규칙 세트 · JSON Schema


HushSpec은 AI 에이전트 보안 규칙을 위한 오픈 정책 형식입니다. 파일 시스템 접근, 네트워크 이그레스, 도구 사용, 시크릿 탐지 등을 포함하여 에이전트가 런타임에 무엇을 할 수 있는지 정의하지만, 그러한 통제가 어떻게 적용되어야 하는지는 규정하지 않습니다. 이러한 분리를 통해 정책은 런타임, 프레임워크, 언어를 넘어 이식이 가능합니다.

v0.1.1-alpha — 핵심 사양, 4개 SDK(Rust, TypeScript, Python, Go) 및 h2h CLI가 모두 공개되어 정상 작동합니다. 10가지 규칙 유형과 3가지 확장 모듈을 통해 파싱, 검증, 평가, 병합, 해석, 탐지, 서명, 감사를 수행할 수 있습니다. API 표면은 안정화되고 있지만 아직 확정(frozen)되지는 않았습니다 — v1.0 이전에 개선이 있을 것으로 예상됩니다.

빠른 예시

root@kitploit:~
hushspec: "0.1.0"
name: production-agent

rules:
  forbidden_paths:
    patterns:
      - "**/.ssh/**"
      - "**/.aws/**"
      - "/etc/shadow"

  egress:
    allow:
      - "api.openai.com"
      - "*.anthropic.com"
      - "api.github.com"
    default: block

  tool_access:
    block: [shell_exec, run_command]
    require_confirmation: [file_write, git_push]
    default: allow

  secret_patterns:
    patterns:
      - name: aws_key
        pattern: "AKIA[0-9A-Z]{16}"
        severity: critical
    skip_paths: ["**/test/**"]

  shell_commands:
    forbidden_patterns:
      - "rm\\s+-rf\\s+/"
      - "curl.*\\|.*bash"

SDK 적합성

4개 SDK 모두 파싱 및 검증부터 해석과 평가까지 전체 HushSpec 파이프라인을 구현합니다.

설치

CLI

Homebrew, npm 및 사전 빌드 바이너리는 릴리스 파이프라인이 아티팩트, tap 포뮬러, npm 패키지를 게시하는 첫 번째 v0.x 태그부터 사용할 수 있습니다. 그때까지는 Cargo로 설치하세요.

모든 방법은 h2h 명령을 설치합니다. 아래 CLI 도구를 참조하세요.

Rust

root@kitploit:~
[dependencies]
hushspec = "0.1"

TypeScript

root@kitploit:~
npm install @hushspec/core

Python

root@kitploit:~
pip install hushspec

Go

root@kitploit:~
go get github.com/backbay-labs/hush/packages/go@main

시작하기

Rust

root@kitploit:~
use hushspec::HushSpec;

let yaml_str = "hushspec: \"0.1.0\"\nname: example\n";
let spec = HushSpec::parse(yaml_str)?;
let result = hushspec::validate(&spec);
assert!(result.is_valid());

TypeScript

root@kitploit:~
import { parseOrThrow, validate } from '@hushspec/core';

const yamlString = 'hushspec: "0.1.0"\nname: example\n';
const spec = parseOrThrow(yamlString);
const result = validate(spec);
console.log(result.valid); // true

Python

root@kitploit:~
from hushspec import parse_or_raise, validate

yaml_string = 'hushspec: "0.1.0"\nname: example\n'
spec = parse_or_raise(yaml_string)
result = validate(spec)
assert result.is_valid

Go

root@kitploit:~
import (
    "fmt"

    "github.com/backbay-labs/hush/packages/go/hushspec"
)

yamlString := "hushspec: \"0.1.0\"\nname: example\n"
spec, err := hushspec.Parse(yamlString)
if err != nil {
    panic(err)
}
result := hushspec.Validate(spec)
fmt.Println(result.IsValid())

평가

각 SDK는 파싱된 사양과 액션을 받아 결정(allow, warn, deny)과 일치하는 규칙 세부 정보를 반환하는 evaluate() 함수를 제공합니다.

root@kitploit:~
import { parseOrThrow, evaluate } from '@hushspec/core';

const spec = parseOrThrow(policyYaml);
const result = evaluate(spec, { type: 'egress', target: 'api.openai.com' });
// result.decision === 'allow' | 'warn' | 'deny'
// result.matched_rule === 'egress'
root@kitploit:~
from hushspec import parse_or_raise, evaluate

spec = parse_or_raise(policy_yaml)
result = evaluate(spec, {"type": "egress", "target": "api.openai.com"})
assert result.decision in ("allow", "warn", "deny")

HushGuard 미들웨어

HushGuard는 정책 로딩 및 평가를 애플리케이션 코드를 위한 간단한 evaluate, check, enforce 인터페이스로 캡슐화합니다.

root@kitploit:~
import { HushGuard } from '@hushspec/core';

const guard = HushGuard.fromFile('./policy.yaml');
guard.enforce({ type: 'tool_call', target: 'bash' }); // throws HushSpecDenied if denied
root@kitploit:~
from hushspec import HushGuard

guard = HushGuard.from_file("./policy.yaml")
guard.enforce({"type": "tool_call", "target": "bash"})  # raises HushSpecDenied if denied

CLI 도구

h2h CLI는 일반적인 정책 워크플로우를 다룹니다: 검증(validate), 테스트(test), 단일 액션 평가 및 설명(evaluate·explain), 린트(lint), diff, 포맷(format), 초기화(init), 서명(sign), 검증(verify), 패닉 모드 트리거(panic).

root@kitploit:~
# Validate a policy against the HushSpec schema
h2h validate policy.yaml

# Run evaluation test suites
h2h test --fixtures ./tests/

# Evaluate one action and explain the decision
h2h eval policy.yaml --type egress --target api.example.com
h2h explain policy.yaml --type egress --target api.example.com

# Static analysis and linting
h2h lint policy.yaml

# Lint and auto-fix decision-neutral issues
h2h lint policy.yaml --fix

# Compare two policies and show effective decision changes
h2h diff old.yaml new.yaml

# Format policy files canonically
h2h fmt policy.yaml

# Scaffold a new policy project
h2h init --preset default

# Sign a policy with Ed25519
h2h sign policy.yaml --key h2h.key

# Verify a policy signature
h2h verify policy.yaml --key h2h.pub

# Generate a new Ed25519 keypair
h2h keygen

# Emergency override (deny-all kill switch)
h2h panic activate --sentinel /tmp/hushspec.panic
h2h panic deactivate --sentinel /tmp/hushspec.panic

설치 옵션(Homebrew, npm, Cargo, 사전 빌드 바이너리)은 위의 설치를 참조하세요.

결정 영수증 (감사 추적)

evaluate_audited()는 규칙 추적, 정책 요약, 선택적 콘텐츠 편집(redaction)을 포함한 구조화된 결정 영수증을 생성합니다. 영수증은 hushspec-receipt.v0.schema.json을 준수하며 SOC 2, HIPAA, PCI-DSS, FedRAMP와 같은 감사 중심 환경을 지원하도록 설계되었습니다.

root@kitploit:~
import { parseOrThrow, evaluateAudited } from '@hushspec/core';

const spec = parseOrThrow(policyYaml);
const receipt = evaluateAudited(spec, action, {
  enabled: true,
  include_rule_trace: true,
  redact_content: false,
});
// receipt.decision, receipt.rule_evaluations, receipt.policy_summary

영수증 싱크(FileReceiptSink, ConsoleReceiptSink, FilteredSink, MultiSink, CallbackSink)는 4개 SDK 모두에서 영수증을 스토리지, 로깅 또는 OTLP 엔드포인트로 라우팅하는 데 사용할 수 있습니다.

탐지 파이프라인

탐지 파이프라인은 프롬프트 인젝션, 젤브레이크, 유출(exfiltration) 검사를 평가 흐름에 연결합니다. 정규식 기반 참조 탐지기는 모든 SDK에 포함되어 있으며, 사용자 정의 탐지기는 DetectorRegistry를 통해 등록할 수 있습니다.

root@kitploit:~
import { parseOrThrow, evaluateWithDetection, DetectorRegistry } from '@hushspec/core';

const registry = DetectorRegistry.withDefaults();
const result = evaluateWithDetection(spec, action, registry, {
  enabled: true,
  prompt_injection_threshold: 0.5,
});
// result.detection_results contains matched patterns and confidence scores
프레임워크 어댑터

사전 빌드된 어댑터는 프레임워크별 도구 호출을 HushSpec 평가 액션으로 변환합니다.

관찰 가능성

EvaluationObserver 인터페이스와 ObservableEvaluator 래퍼는 모든 평가, 정책 로드 및 정책 리로드에 대해 구조화된 이벤트를 내보냅니다. 내장 관찰자에는 JsonLineObserver, ConsoleObserver, MetricsCollector가 있습니다.

root@kitploit:~
import { ObservableEvaluator, JsonLineObserver, MetricsCollector } from '@hushspec/core';

const evaluator = new ObservableEvaluator();
evaluator.addObserver(new JsonLineObserver(process.stderr));
evaluator.addObserver(new MetricsCollector());
const result = evaluator.evaluate(spec, action);
정책 서명

정책은 Ed25519 키로 서명하고 로드 시 검증할 수 있습니다. CLI는 sign, verify, keygen 명령을 제공합니다. 서명 형식은 hushspec-signature.v0.schema.json을 준수합니다.

root@kitploit:~
# Generate a keypair
h2h keygen --output-dir mykeys

# Sign a policy (creates policy.yaml.sig)
h2h sign policy.yaml --key mykeys/h2h.key

# Verify the signature
h2h verify policy.yaml --key mykeys/h2h.pub
긴급 재정의 (패닉 모드)

패닉 모드는 정책을 재배포하지 않고 즉시 활성화할 수 있는 전면 거부(deny-all) 킬 스위치입니다. 센티널 파일, CLI 또는 API 호출로 트리거할 수 있습니다. 패닉 모드가 활성화되어 있는 동안 모든 평가는 deny를 반환합니다.

root@kitploit:~
# Activate panic mode
h2h panic activate --sentinel /tmp/hushspec.panic

# Deactivate
h2h panic deactivate --sentinel /tmp/hushspec.panic
root@kitploit:~
import { activatePanic, deactivatePanic, isPanicActive } from '@hushspec/core';

activatePanic();
// All evaluate() calls now return deny
deactivatePanic();
정책 로딩 및 핫 리로드

정책은 로컬 파일, HTTPS URL(ETag 캐싱 및 SSRF 보호 포함) 또는 내장 규칙 세트에서 로드할 수 있습니다. PolicyWatcher와 PolicyPoller는 프로세스를 재시작하지 않고도 핫 리로드를 지원합니다.

root@kitploit:~
import { PolicyWatcher, HushGuard } from '@hushspec/core';

const guard = HushGuard.fromFile('./policy.yaml');
const watcher = new PolicyWatcher('./policy.yaml', {
  onChange: (newSpec) => guard.swapPolicy(newSpec),
});
watcher.start();

10가지 핵심 규칙

확장

HushSpec은 더 고급 정책 동작을 위한 선택적 확장 모듈을 지원합니다:

확장목적
Posture능력 및 예산을 위한 선언적 상태 머신
Origins출처 인식 정책 프로젝션 (Slack, GitHub, 이메일 등)
Detection프롬프트 인젝션, 젤브레이크, 위협 인텔리전스를 위한 임계값 구성
root@kitploit:~
extensions:
  posture:
    initial: standard
    states:
      standard: { capabilities: [file_access, egress] }
      restricted: { capabilities: [file_access] }
    transitions:
      - { from: "*", to: restricted, on: critical_violation }
  detection:
    prompt_injection:
      block_at_or_above: high

내장 규칙 세트

바로 사용 가능한 정책은 rulesets/에 있습니다:

Clawdstrike와 함께 사용하기

HushSpec 문서는 Clawdstrike에서 기본적으로 로드됩니다:

root@kitploit:~
// Auto-detects HushSpec vs Clawdstrike-native format
let policy = clawdstrike::Policy::from_yaml_auto(yaml)?;
root@kitploit:~
# Convert between formats
hush policy migrate policy.yaml --to hushspec

저장소 구조

root@kitploit:~
spec/              Normative specification, including core and extension docs
schemas/           JSON Schema definitions
crates/            Rust crates
  hushspec/          Core library: parse, validate, merge, resolve, evaluate, detect, sign
  hushspec-cli/      CLI tool
  hushspec-testkit/  Conformance test runner
packages/          Language SDKs for TypeScript, Python, and Go
rulesets/          Built-in security rulesets
fixtures/          Conformance and evaluation fixtures
docs/              mdBook documentation site
generated/         Generated shared SDK contract artifacts
scripts/           Code generation and CI tooling

설계 원칙

  • 기본 차단(Fail-closed): 알 수 없는 필드는 거부되며, 유효하지 않은 문서는 명시적 오류와 함께 실패합니다.
  • 무상태(Stateless): 핵심 규칙은 런타임 상태가 없는 순수한 선언입니다.
  • 엔진 중립(Engine-neutral): 사양은 특정 강제 실행 엔진, 탐지기 또는 플러그인 모델을 요구하지 않습니다.
  • 확장 가능(Extensible): Posture, origins, detection은 핵심 형식을 비대하게 만들지 않도록 선택 사항으로 유지됩니다.

사양

표준 사양은 spec/에 있습니다. 프로그램적 검증을 위한 JSON Schema 정의는 schemas/에 있습니다. 전체 문서는 docs/에 있습니다.

라이선스

Apache-2.0. LICENSE를 참조하세요.

도구 다운로드
기능RustTypeScriptPythonGo
파싱 + 검증 (Level 1)예예예예
병합 (Level 2)예예예예
해석 (Level 2+)예예예예
평가 (Level 3)예예예예
감사 추적 (Level 4)예예예예
탐지예예예예
관찰 가능성예예예예
영수증 싱크예예예예
방법명령어
Homebrew (macOS/Linux)brew install backbay-labs/tap/h2h
npmnpm install -g @hushspec/cli (또는 npx @hushspec/cli validate policy.yaml)
Cargo (소스에서)cargo install hushspec-cli
사전 빌드 바이너리GitHub 릴리스 — h2h-<tag>-<target>.tar.gz + SHA256SUMS, 출처 증명(provenance) 포함
프레임워크어댑터SDK
Claude / AnthropicmapClaudeToolToAction, createSecureToolHandlerTypeScript
OpenAImapOpenAIToolCall, createOpenAIGuardTypeScript
MCP (Model Context Protocol)mapMCPToolCall, createMCPGuardTypeScript
root@kitploit:~
import { HushGuard, mapClaudeToolToAction } from '@hushspec/core';

const guard = HushGuard.fromFile('./policy.yaml');
const action = mapClaudeToolToAction(toolUseBlock);
guard.enforce(action);
규칙목적
forbidden_paths민감한 파일시스템 경로에 대한 접근 차단
path_allowlist허용 목록 기반 읽기/쓰기/패치 접근
egress도메인별 네트워크 이그레스 제어
secret_patterns파일 콘텐츠에서 시크릿 탐지
patch_integritydiff 안전성 검증 (크기 제한, 금지 패턴)
shell_commands위험한 셸 명령 차단
tool_access도구/MCP 호출 제어
computer_useCUA 동작 제어
remote_desktop_channels원격 데스크톱 사이드 채널 제어
input_injection입력 주입 기능 제어
규칙 세트설명
defaultAI 에이전트 실행을 위한 균형 잡힌 보안
strict최대 보안, 최소 권한
permissive개발 친화적, 완화된 제한
ai-agentAI 코딩 어시스턴트에 최적화
cicdCI/CD 파이프라인 보안
remote-desktop컴퓨터 사용 에이전트 세션
panic전면 거부 긴급 재정의