このページは機械翻訳されています。英語の原文を読む。

FeatureRecipe

prompt-injection-shield-nginx

Component-scope FeatureRecipe for core/prompt-injection-shield on the NGINX gateway, core/gateway/nginx, on Kubernetes. It emits no file: it points the proxy_pass target the gateway's Recipe writes at the guard wired to the gateway's guard socket, in place of the component on its upstream socket, so every request the gateway forwards goes to the guard. The guard checks each chat request and forwards what it admits to the model its own infra.upstream_endpoint names, which the Release sets to the model the upstream socket names; it answers no completions, embeddings, responses or messages route, and its model listing passes the caller's Authorization header to the model's. The guard must be core/security/nemo-guardrails running the threshold the sensitivity names, 0.5 for standard and 0.001 for strict, the values measured for its detector's default classifier. The build halts otherwise, with nothing on the guard socket, naming it, with more than one guard, on a second attachment, beside core/traffic-shadowing, whose copies would bypass the guard, and on any component other than core/gateway/nginx. The guard reads only the latest user message, and judges no reply, tool-call argument or image. A request it refuses is answered with an ordinary completion, streamed when asked; when the guard or its detector cannot be reached the request is refused and nothing reaches the model.

来歴

公式このカタログが公式の公開者として認めている署名 ID によって署名されています。
コンテンツダイジェスト
sha256:bd94d065cb465626dc9b4bb11fc72edf3d92bc37dd74a8730ba0652f7c26df6b
公開日
2026-11-10T10:16:05Z
署名 ID
https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

署名

  • 公式application/vnd.dev.sigstore.bundle.v0.3+json

    https://token.actions.githubusercontent.com/https://github.com/aggrega-ai/aggrega-hub/.github/workflows/catalog-publish-sign.yml@refs/heads/main

    sha256:5df7e73447c4306c34fe00ea92a6f9de9fde5a05dca00e53acea7ab613f2ed11

このバージョンの参照

oci://hub.aggrega.ai/featurerecipe/helm/prompt-injection-shield-nginx:1.0.0
ターゲット
—
実装対象
core/prompt-injection-shield:1.0.0

提供

このレシピが利用側のために配線する決定論的なポインターテンプレートです。

provides テンプレートは宣言されていません。

注入マッピング

{{- $guards := list }}
{{- range $alias, $edge := .context.uses }}{{ if eq $edge.socket "guard" }}{{ $guards = append $guards $edge }}{{ end }}{{ end }}
{{- if ne (len $guards) 1 }}{{ fail (printf "core/prompt-injection-shield attachment %q on %q needs exactly one guard, but %d components are wired to the gateway's guard socket; wire a single core/security/nemo-guardrails to it" .attachment_name .context.instance_id (len $guards)) }}{{ end }}
{{- $guard := first $guards }}
{{- $type := first (splitList ":" (toString $guard.component)) }}
{{- if ne $type "core/security/nemo-guardrails" }}{{ fail (printf "core/prompt-injection-shield attachment %q on %q is wired to the guard %q, a %s, but this realization sends the gateway's requests through core/security/nemo-guardrails alone, the one guard its two sensitivities are measured on and proved to refuse a request without the model's server receiving it; wire a core/security/nemo-guardrails to the guard socket instead" .attachment_name .context.instance_id $guard.target $type) }}{{ end }}
{{- $want := optional (fromJson .locals.sensitivity_thresholds) (toString .values.sensitivity) "" }}
{{- $have := optional $guard.provides "threshold" "" }}
{{- if not $have }}{{ fail (printf "core/prompt-injection-shield attachment %q on %q is wired to the guard %q, which publishes no threshold, so the sensitivity it refuses at cannot be checked; bind %q in the Manifest to a Recipe that publishes one" .attachment_name .context.instance_id $guard.target $guard.target) }}{{ end }}
{{- if ne (float64 $have) (float64 $want) }}{{ fail (printf "core/prompt-injection-shield attachment %q on %q asks for sensitivity %s, which this realization runs as the guard's threshold %v, but the guard %q runs at %v; set values.threshold of %q to %v" .attachment_name .context.instance_id (toString .values.sensitivity) $want $guard.target $have $guard.target $want) }}{{ end }}
{{- $hostVar := optional .locals "upstream_host_variable" "" }}
{{- $portVar := optional .locals "upstream_port_variable" "" }}
{{- if not (and $hostVar $portVar) }}{{ fail (printf "core/prompt-injection-shield attachment %q on %q points the gateway's proxy_pass target at the guard through the two variables the NGINX Recipe names in its locals, but the Recipe rendering %q names none; bind the component in the Manifest to a Recipe that does" .attachment_name .context.instance_id .context.instance_id) }}{{ end }}
env:
  {{ $hostVar }}: {{ $guard.provides.host | toJson }}
  {{ $portVar }}: {{ $guard.provides.port | toJson }}

Workload

ワークロードテンプレートは宣言されていません。

ローカル変数

名前テンプレート
sensitivity_thresholds{"standard": 0.5, "strict": 0.001}

値のマッピング

値のマッピングは宣言されていません。

関係

他の公開エンティティとの間の型付きエッジです。公開されたターゲットがない参照は、リンクではなく切れたエッジとして表示されます。

使用先

使用元

カタログ内にこのエンティティに依存しているものはありません。

FeatureRecipe の概念リファレンス →

Aggrega カタログ — コンポーネント、機能、レシピ、およびそれらをレンダリングするプラグインのオープンなインデックスです。

共有の Aggrega デザインシステムで構築されています。

プライバシー