@@ -61,7 +61,7 @@ impl SecurityManager {
6161 ) -> Result < Vec < SecurityResult > > {
6262 if !self . is_prompt_injection_detection_enabled ( ) {
6363 tracing:: debug!(
64- counter . goose. prompt_injection_scanner_disabled = 1 ,
64+ monotonic_counter . goose. prompt_injection_scanner_disabled = 1 ,
6565 "Security scanning disabled"
6666 ) ;
6767 return Ok ( vec ! [ ] ) ;
@@ -74,7 +74,7 @@ impl SecurityManager {
7474 match PromptInjectionScanner :: with_ml_detection ( ) {
7575 Ok ( s) => {
7676 tracing:: info!(
77- counter . goose. prompt_injection_scanner_enabled = 1 ,
77+ monotonic_counter . goose. prompt_injection_scanner_enabled = 1 ,
7878 "Security scanner initialized with ML-based detection"
7979 ) ;
8080 s
@@ -90,7 +90,7 @@ impl SecurityManager {
9090 }
9191 } else {
9292 tracing:: info!(
93- counter . goose. prompt_injection_scanner_enabled = 1 ,
93+ monotonic_counter . goose. prompt_injection_scanner_enabled = 1 ,
9494 "Security scanner initialized with pattern-based detection only"
9595 ) ;
9696 PromptInjectionScanner :: new ( )
@@ -124,7 +124,7 @@ impl SecurityManager {
124124 serde_json:: to_string ( & tool_call) . unwrap_or_else ( |_| "{}" . to_string ( ) ) ;
125125
126126 tracing:: warn!(
127- counter . goose. prompt_injection_finding = 1 ,
127+ monotonic_counter . goose. prompt_injection_finding = 1 ,
128128 threat_type = "command_injection" ,
129129 above_threshold = above_threshold,
130130 tool_name = %tool_call. name,
@@ -164,7 +164,7 @@ impl SecurityManager {
164164 }
165165
166166 tracing:: info!(
167- counter . goose. prompt_injection_analysis_performed = 1 ,
167+ monotonic_counter . goose. prompt_injection_analysis_performed = 1 ,
168168 security_issues_found = results. len( ) ,
169169 "Prompt injection detection: Security analysis complete"
170170 ) ;
0 commit comments