T09 · Insecure Skill Coding Practices
- Location
scripts/cn_meme_generator.py:140- Finding
Unbounded and Unvalidated Remote Image Response
- Content
View full analysis
- Remediation
View remediation
MAX_DOWNLOAD_BYTES: raise ValueError("The remote image exceeds the permitted size") output_dir = os.path.dirname(os.path.abspath(output)) fd, temporary_path = tempfile.mkstemp(dir=output_dir, suffix=".download") try: received = 0 with os.fdopen(fd, "wb") as temporary_file: for chunk in resp.iter_content(chunk_size=64 * 1024): if not chunk: continue received += len( ...[truncated 431 chars]
