T09 · Insecure Skill Coding Practices
- Location
scripts/asr.py:358- Finding
Default ASR selection can upload video audio to a cloud service without per-invocation consent
- Content
View full analysis
openai-whisper > SiliconFlow)" ), ) ``` ```python # scripts/download_video.py:100-108 if not args.metadata_only and args.asr != "none" and result.get("video_path"): asr_result = run_asr( Path(result["video_path"]), Path(result["output_dir"]), backend=args.asr, model=args.asr_model, language=args.asr_language, prompt=args.asr_prompt, max_seconds=args.asr_max_seconds, ) ``` ```python # scripts/asr.py:94-101 if selected_backend == "siliconflow": transcribe_with_siliconflow( audio_path, transcript_path, siliconflow_json_path, model=resolved_model, ) raw_json_path = siliconflow_json_path ``` ```python # scripts/asr.py:358-378 api_key = os.environ.get("SILICONFLOW_API_KEY") if not api_key: raise RuntimeError("SILICONFLOW_API_KEY is required for ASR backend 'siliconflow'.") body, content_type = _multipart_body( fields={"model": model}, file_field="file", file_path=audio_path, file_content_type="audio/mpeg", ) request = Request( SILICONFLOW_TRANSCRIPTION_URL, data=body, headers={ "Authorization": f"Bearer {api_key}", "Content-Type": content_type, }, method="POST", ) try: with urlopen(request, timeout=600) as response: response_text = response.read().decode("utf-8", errors="replace") ``` ...[truncated 2465 chars]- Remediation
View remediation
