securing-s3-buckets
Pass
Audited by Gen Agent Trust Hub on Sep 14, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- Command Execution: The skill utilizes the AWS CLI and MCP server to perform infrastructure management tasks. It incorporates several safety controls to mitigate risks:
- Permission Validation: Uses
aws iam simulate-principal-policyto verify effective permissions before executing write operations. - Policy Safety Rules: Implements a mandatory workflow for
put-bucket-policythat includes retrieving the existing policy, creating a timestamped backup, and merging new statements rather than overwriting blindly. - Syntax Validation: Employs
python3 -m json.toolto validate JSON policy syntax before application. - User Confirmation: Instructs the agent to display write commands and wait for explicit user confirmation before execution.
- Indirect Prompt Injection Surface: The skill ingests data from existing S3 bucket policies during audit and remediation workflows. While this presents a potential surface for indirect prompt injection, the risk is managed by treating the data as structured JSON and applying validation steps.
- Ingestion Points: Reads existing policies via
aws s3api get-bucket-policy(documented inSKILL.mdandreferences/remediation.md). - Boundary Markers: No explicit boundary markers are used for the ingested policy content.
- Capability Inventory: The skill has capabilities to modify S3 configurations, create KMS keys, and update CloudTrail settings.
- Sanitization: Validates JSON structure using Python's standard library before processing.
- Infrastructure Management: The skill interacts with various AWS services including S3, KMS, IAM, CloudTrail, and GuardDuty. All documented endpoints (e.g.,
s3.amazonaws.com) are official vendor resources.
Audit Metadata