T08 · Insecure Dependencies
- Location
scripts/monitor.sh:207- Finding
Unverified Execution of an External Sibling Skill
- Content
View full analysis
&1 | tail -3 else echo "语音:$message" fi ``` ### Technical Analysis The monitoring script executes `send_voice.sh` from a sibling directory that is not included in the audited package. It only checks whether the containing directory exists. It does not verify that the script: - Is a regular file rather than a symbolic link. - Is owned by a trusted user. - Has not been modified. - Matches a pinned version or cryptographic digest. - Originates from a declared and trusted dependency. The child process inherits the monitor's environment. This environment includes the Feishu and Noiz credentials required by `scripts/monitor.sh:86-92`. Consequently, a substituted sibling script could read those credentials and perform arbitrary actions with the account privileges of the user running the monitor. This is particularly relevant when the monitor is launched through cron, because the substituted script would subsequently execute without additional user interaction whenever an alert condition invokes `send_voice_alert`. ### Attack Path 1. An attacker obtains local write access to the parent skills directory or can pre-create the expected `feishu-edge-tts/scripts` sibling path. 2. The attacker places a malicious `send_voice.sh` at the expected location or replaces it with a symbolic link to attacker-controlled code. 3. The stock monitor runs with Feishu and Noiz credentials present in its environment. 4. A monitored stock meets an alert condition, causing `send_voice_alert` to execute. 5. The monitor launches the attacker-controlled script through `bash`. 6. The malicious script reads inherited credentials, a ...[truncated 648 chars]- Remediation
View remediation
