Skip to content
youdede

Container privilege guard

SecurityHookv1.0.0

A deterministic Claude Code PreToolUse gate that detects privileged mode, host namespaces, dangerous capabilities, engine socket mounts, and device passthrough in container commands and recognized configuration paths.

Runs on

Scope
$npx @youdede/toolkit add container-privilege-guard --target claude-code

What it does

Block explicit container privilege expansion in commands and recognized deployment configuration.

When it fires

  • setup
  • implementation
  • operations

How it behaves

Detect explicit high-impact host privileges in container commands and proposed configuration.

It does not run containers or inspect a live container engine.

It does not claim to validate every Kubernetes security control.

It does not accept a manifest annotation or environment variable as approval.

Configuration

targets/claude-code/container-privilege-guard.mjsnode · none

Version
1.0.0
Requires
Shell command guard
Licence
RiskThis automatic gate blocks explicit container privilege expansion in commands and recognized deployment configuration; a false denial can interrupt legitimate work, but it does not execute the blocked action.
Medium
ModeHow it works: fixed rules, model instructions, or both.
Deterministic only
Behaviour
Enforces, blocks on violation
On failure
Denies and blocks
LatencyThe entrypoint handles one intercepted event to block explicit container privilege expansion in commands and recognized deployment configuration without deferred work.
Immediate
Data retentionWhether data remains after use and who manages its storage.
Not retained

Often used with

All in Security