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, and scripts/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, in user_management.py, the UserPrincipalName and DisplayName are 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.py and scripts/powershell_generator.py accept --csv paths 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.py is 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, and MicrosoftTeams) to function. These are downloaded from the official PowerShell Gallery, which is a trusted source for Microsoft 365 administration tools.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Jul 18, 2026, 04:18 PM
Security Audit — agent-trust-hub — ms365-tenant-manager