T09 · Insecure Skill Coding Practices
- Location
scripts/on_serverless/jobs.py:477- Finding
Cross-job disclosure caused by unbound S3 result lookup
- Content
View full analysis
latest_modified ): latest_modified = modified result_key = key if not result_key: return { "error": "No result file found in S3 for this job run.", "job_run_id": job_run_id, } # Read the result JSON. obj_response = self._s3_client.get_object(Bucket=bucket, Key=result_key) raw_text = obj_response["Body"].read().decode("utf-8").strip() return json.loads(raw_text) ``` ### Technical Analysis The method accepts a `job_run_id` and verifies that the corresponding EMR job completed successfully, but it does not bind that identifier to the S3 object subsequently returned. Instead, it lists a shared `skill-results/` prefix and selects the most recently modified object whose key ends in `/ ...[truncated 1989 chars]- Remediation
View remediation
