ms365-tenant-manager
Warn
Audited by Gen Agent Trust Hub on Jul 18, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONPROMPT_INJECTIONEXTERNAL_DOWNLOADS
Full Analysis
- [COMMAND_EXECUTION]: The Python scripts (
scripts/powershell_generator.py,scripts/user_management.py, andscripts/tenant_setup.py) generate PowerShell scripts by directly interpolating user-controlled strings (from CLI arguments or CSV files) into script templates using f-strings. For example, inuser_management.py, theUserPrincipalNameandDisplayNameare inserted into the script body without escaping. A malicious entry in a CSV file or argument (e.g., containing quotes or semicolons) could allow for arbitrary PowerShell command execution when the generated script is run by a Global Administrator. - [PROMPT_INJECTION]: The skill exhibits an attack surface for indirect prompt injection by processing external CSV files for high-privilege operations.
- Ingestion points:
scripts/user_management.pyandscripts/powershell_generator.pyaccept--csvpaths to read user data. - Boundary markers: The skill lacks instructions or mechanisms to treat CSV data as untrusted or to ignore embedded instructions.
- Capability inventory: The generated scripts have the capability to create users, assign licenses, modify security policies, and offboard accounts.
- Sanitization: Validation in
scripts/user_management.pyis limited to checking for spaces in usernames and does not protect against script injection. - [EXTERNAL_DOWNLOADS]: The skill requires the installation of several official Microsoft PowerShell modules (
Microsoft.Graph,ExchangeOnlineManagement, andMicrosoftTeams) to function. These are downloaded from the official PowerShell Gallery, which is a trusted source for Microsoft 365 administration tools.
Audit Metadata