T09 · Insecure Skill Coding Practices
- Location
scripts/scan.py:174- Finding
Configured threat-blocking policy is not enforced
- Content
View full analysis
= min_block: verdict = "threat" elif max_score >= min_warn: verdict = "suspicious" else: verdict = "clean" ``` ```python # Output if args.json: print(result.to_json()) else: print(_format_result(result, args.verbose)) ``` ### Technical Analysis The configuration exposes an `action_on_threat` policy and automatic-scanning flags for web fetches, file reads, and group messages. The scanner never reads or enforces these settings. It calculates and prints a verdict, but does not provide a blocking exit code, raise a security exception, or implement interception hooks for the configured content sources. Consequently, setting `action_on_threat` to `block` would not change runtime behavior. The scanner remains a detection component, while the documentation and configuration can cause integrators to treat it as an enforcement component. This is a fail-open design weakness. It does not directly grant an attacker operating-system privileges, but it can allow attacker-controlled prompt-injection content to reach a downstream agent if the caller assumes that Guardian Shield has already blocked the content. ### Attack Path 1. An application integrates the scanner and enables or relies on the documented blocking policy. 2. An attacker submits content containing a recogniz ...[truncated 937 chars]- Remediation
View remediation
