dify-knowledge-base-upload
Pass
Audited by Gen Agent Trust Hub on Sep 23, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/upload_to_dataset.pyexecutes thecurlbinary via thesubprocess.runfunction to perform all network operations. While this uses an argument list rather than a shell string, it remains a method of system command execution. - Evidence: The
run_curl_jsonfunction inscripts/upload_to_dataset.pyis invoked throughout the workflow (discovery, upload, pipeline execution, and metadata management) to interact with the Dify API endpoints. - [INDIRECT_PROMPT_INJECTION]: The skill processes external file data, creating an attack surface where malicious instructions embedded in files could be processed by the agent or the target system.
- Ingestion points: Local files are read via the
--fileCLI argument inscripts/upload_to_dataset.pyand transmitted to the Dify API. - Boundary markers: There are no explicit delimiters or instructions provided to the agent to ignore or isolate content within the files being uploaded.
- Capability inventory: The skill possesses file read capabilities and network access via
subprocesscalls tocurl. - Sanitization: The script does not perform sanitization or validation of the file content before transmission to the remote API.
Audit Metadata