hf-cloud-sagemaker-iam-preflight
Pass
Audited by Gen Agent Trust Hub on Sep 17, 2026
Risk Level: SAFECOMMAND_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The skill uses Python's
subprocess.runto execute local shell commands via theawsCLI for IAM role discovery and management. - Evidence: Both
scripts/check_role.pyandscripts/create_role.pyinvoke theawsbinary to perform actions likeiam list-roles,iam get-role, andiam create-role. - Security Review: The scripts use list-based argument passing (e.g.,
subprocess.run([aws_bin(), *args], ...)), which avoids the use of a shell and mitigates command injection vulnerabilities from user-provided role or bucket names. - [PRIVILEGE_ESCALATION]: The skill is designed to create and modify IAM roles/policies, which is a high-privilege operation.
- Context: This is the primary intended purpose of the skill (pre-flighting SageMaker roles). The skill implements safety checks, such as identifying if the caller is an SSO principal (who typically lack IAM write permissions), and uses a narrowly-scoped "minimum permissions" policy template rather than granting full administrative access.
- [DATA_EXPOSURE_AND_EXFILTRATION]: The scripts read IAM role configurations and account identity.
- Security Review: Data retrieved from the AWS CLI is processed locally to rank and validate roles. There are no network operations (e.g.,
curl,requests) present in the code that would exfiltrate this configuration to an external server.
Audit Metadata