@highflame/policy 2.2.25 → 2.2.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -233,6 +233,24 @@
233
233
  "required": true,
234
234
  "description": "Indirect prompt injection risk score (0-100) — injection via tool outputs or retrieved content"
235
235
  },
236
+ {
237
+ "key": "package_install_detected",
238
+ "type": "boolean",
239
+ "required": false,
240
+ "description": "True iff a package install/download command was recognized in the request content."
241
+ },
242
+ {
243
+ "key": "malicious_package_detected",
244
+ "type": "boolean",
245
+ "required": false,
246
+ "description": "True iff any referenced package has a known-malicious (MAL-) OSV advisory."
247
+ },
248
+ {
249
+ "key": "package_check_status",
250
+ "type": "string",
251
+ "required": false,
252
+ "description": "Set to 'degraded' when the osv.dev lookup failed (fail-open); empty otherwise."
253
+ },
236
254
  {
237
255
  "key": "session_pii_detected",
238
256
  "type": "boolean",
@@ -1654,8 +1654,8 @@ when {
1654
1654
  const OVERWATCH_AGENT_SECURITY_MALICIOUS_PACKAGE_CEDAR = `// =============================================================================
1655
1655
  // Malicious Package (Default)
1656
1656
  // =============================================================================
1657
- // Blocks tool calls that install or download packages flagged as malicious
1658
- // by the osv.dev database (OpenSSF MAL- advisories). The malicious_package
1657
+ // Blocks prompts and tool calls that install or download packages flagged as
1658
+ // malicious by the osv.dev database (OpenSSF MAL- advisories). The malicious_package
1659
1659
  // detector (Shield, Tier Slow) parses package-manager invocations (pip, npm,
1660
1660
  // yarn, pnpm, bun, uv, gem, cargo, go, composer) out of tool-call arguments
1661
1661
  // and checks each referenced package against the OSV batch API.
@@ -1678,13 +1678,13 @@ const OVERWATCH_AGENT_SECURITY_MALICIOUS_PACKAGE_CEDAR = `// ===================
1678
1678
 
1679
1679
  @id("agent-security.block-malicious-package")
1680
1680
  @name("Block malicious package installs")
1681
- @description("Blocks call_tool when a referenced package carries a known-malicious osv.dev (MAL-) advisory.")
1681
+ @description("Blocks process_prompt and call_tool when a referenced package carries a known-malicious osv.dev (MAL-) advisory.")
1682
1682
  @severity("critical")
1683
- @tags("category:agent-security,threat:supply-chain,detection:aggregate,surface:call-tool,owasp:llm03,owasp:asi02")
1683
+ @tags("category:agent-security,threat:supply-chain,detection:aggregate,surface:process-prompt,surface:call-tool,owasp:llm03,owasp:asi02")
1684
1684
  @reject_message("Package install blocked: the requested package is flagged as malicious in the osv.dev database.")
1685
1685
  forbid (
1686
1686
  principal,
1687
- action == Overwatch::Action::"call_tool",
1687
+ action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
1688
1688
  resource
1689
1689
  )
1690
1690
  when {
@@ -1699,13 +1699,13 @@ when {
1699
1699
  //
1700
1700
  // @id("agent-security.block-unverified-package")
1701
1701
  // @name("Block unverified package installs")
1702
- // @description("Blocks call_tool package installs when the malicious-package lookup is degraded.")
1702
+ // @description("Blocks process_prompt and call_tool package installs when the malicious-package lookup is degraded.")
1703
1703
  // @severity("medium")
1704
- // @tags("category:agent-security,threat:supply-chain,detection:aggregate,surface:call-tool,owasp:llm03")
1704
+ // @tags("category:agent-security,threat:supply-chain,detection:aggregate,surface:process-prompt,surface:call-tool,owasp:llm03")
1705
1705
  // @reject_message("Package install blocked: the package could not be verified against the malicious-package database.")
1706
1706
  // forbid (
1707
1707
  // principal,
1708
- // action == Overwatch::Action::"call_tool",
1708
+ // action in [Overwatch::Action::"process_prompt", Overwatch::Action::"call_tool"],
1709
1709
  // resource
1710
1710
  // )
1711
1711
  // when {
@@ -3968,6 +3968,9 @@ export const OVERWATCH_CONTEXT = {
3968
3968
  { "key": "jailbreak_pulse_score", "type": "number", "required": false, "description": "Highflame single-turn classifier score for jailbreak attempts (0-100). Raw score from Pulse detector before combination with deep-context" },
3969
3969
  { "key": "jailbreak_deep_context_score", "type": "number", "required": false, "description": "DeepContext multi-turn analyzer score for jailbreak attempts (0-100). Detects jailbreak escalation patterns across conversation turns" },
3970
3970
  { "key": "indirect_injection_score", "type": "number", "required": true, "description": "Indirect prompt injection risk score (0-100) — injection via tool outputs or retrieved content" },
3971
+ { "key": "package_install_detected", "type": "boolean", "required": false, "description": "True iff a package install/download command was recognized in the request content." },
3972
+ { "key": "malicious_package_detected", "type": "boolean", "required": false, "description": "True iff any referenced package has a known-malicious (MAL-) OSV advisory." },
3973
+ { "key": "package_check_status", "type": "string", "required": false, "description": "Set to \'degraded\' when the osv.dev lookup failed (fail-open); empty otherwise." },
3971
3974
  { "key": "session_pii_detected", "type": "boolean", "required": false, "description": "Whether PII was detected in any previous turn of the session" },
3972
3975
  { "key": "session_pii_types", "type": "array", "required": false, "description": "PII types detected across the session (accumulated)" },
3973
3976
  { "key": "session_secrets_detected", "type": "boolean", "required": false, "description": "Whether secrets were detected in any previous turn of the session" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highflame/policy",
3
- "version": "2.2.25",
3
+ "version": "2.2.26",
4
4
  "engines": {
5
5
  "node": ">=18"
6
6
  },