{"id":31926082,"url":"https://github.com/evotecit/wizcloud","last_synced_at":"2025-10-14T01:17:45.114Z","repository":{"id":315253503,"uuid":"1026197621","full_name":"EvotecIT/WizCloud","owner":"EvotecIT","description":"WizCloud is an async C# library and PowerShell module for interacting with the Wiz.io GraphQL API. It provides a simple way to query cloud security data including users, projects, cloud accounts, and more. It supports multiple regions and provides both typed and raw data access. It's available for .NET 8, .NET Standard 2.0, and .NET 4.7.2","archived":false,"fork":false,"pushed_at":"2025-09-17T15:24:07.000Z","size":346,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-11T00:18:39.043Z","etag":null,"topics":["csharp","powershell","wiz","wizio"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EvotecIT.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"PrzemyslawKlys","custom":["https://paypal.me/PrzemyslawKlys"]}},"created_at":"2025-07-25T13:23:42.000Z","updated_at":"2025-09-17T15:24:10.000Z","dependencies_parsed_at":"2025-09-17T15:46:39.439Z","dependency_job_id":"144d613d-e7f5-4da8-b96c-2beb19608c0d","html_url":"https://github.com/EvotecIT/WizCloud","commit_stats":null,"previous_names":["evotecit/wizcloud"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/EvotecIT/WizCloud","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvotecIT%2FWizCloud","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvotecIT%2FWizCloud/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvotecIT%2FWizCloud/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvotecIT%2FWizCloud/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EvotecIT","download_url":"https://codeload.github.com/EvotecIT/WizCloud/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EvotecIT%2FWizCloud/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017448,"owners_count":26086081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","powershell","wiz","wizio"],"created_at":"2025-10-14T01:17:43.506Z","updated_at":"2025-10-14T01:17:45.108Z","avatar_url":"https://github.com/EvotecIT.png","language":"C#","readme":"# WizCloud - Modern Wiz.io Client for .NET and PowerShell\n\nWizCloud is available as NuGet from the NuGet Gallery and as PowerShell module from PSGallery\n\n📦 NuGet Package\n\n[![nuget downloads](https://img.shields.io/nuget/dt/WizCloud?label=nuget%20downloads)](https://www.nuget.org/packages/WizCloud)\n[![nuget version](https://img.shields.io/nuget/v/WizCloud)](https://www.nuget.org/packages/WizCloud)\n\n💻 PowerShell Module\n\n[![powershell gallery version](https://img.shields.io/powershellgallery/v/WizCloud.svg)](https://www.powershellgallery.com/packages/WizCloud)\n[![powershell gallery preview](https://img.shields.io/powershellgallery/vpre/WizCloud.svg?label=powershell%20gallery%20preview\u0026colorB=yellow)](https://www.powershellgallery.com/packages/WizCloud)\n[![powershell gallery platforms](https://img.shields.io/powershellgallery/p/WizCloud.svg)](https://www.powershellgallery.com/packages/WizCloud)\n[![powershell gallery downloads](https://img.shields.io/powershellgallery/dt/WizCloud.svg)](https://www.powershellgallery.com/packages/WizCloud)\n\n🛠️ Project Information\n\n[![top language](https://img.shields.io/github/languages/top/evotecit/WizCloud.svg)](https://github.com/EvotecIT/WizCloud)\n[![license](https://img.shields.io/github/license/EvotecIT/WizCloud.svg)](https://github.com/EvotecIT/WizCloud)\n[![codecov](https://codecov.io/gh/EvotecIT/WizCloud/branch/main/graph/badge.svg)](https://codecov.io/gh/EvotecIT/WizCloud)\n\n👨‍💻 Author \u0026 Social\n\n[![Twitter follow](https://img.shields.io/twitter/follow/PrzemyslawKlys.svg?label=Twitter%20%40PrzemyslawKlys\u0026style=social)](https://twitter.com/PrzemyslawKlys)\n[![Blog](https://img.shields.io/badge/Blog-evotec.xyz-2A6496.svg)](https://evotec.xyz/hub)\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-pklys-0077B5.svg?logo=LinkedIn)](https://www.linkedin.com/in/pklys)\n[![Threads](https://img.shields.io/badge/Threads-@PrzemyslawKlys-000000.svg?logo=Threads\u0026logoColor=White)](https://www.threads.net/@przemyslaw.klys)\n[![Discord](https://img.shields.io/discord/508328927853281280?style=flat-square\u0026label=discord%20chat)](https://evo.yt/discord)\n\n## What it's all about\n\n**WizCloud** is an async C# library and PowerShell module for interacting with the Wiz.io GraphQL API. It provides a simple way to query cloud security data including users, projects, cloud accounts, and more. It supports multiple regions and provides both typed and raw data access. It's available for .NET 8, .NET Standard 2.0, and .NET 4.7.2.\n\n## 🚀 Quick Start\n\n### PowerShell\n```powershell\n# Install the module\nInstall-Module -Name WizCloud\n\n# Connect to Wiz\nConnect-Wiz -ClientId \"your-client-id\" -ClientSecret \"your-secret\" -Region EU17\n\n# Get users\n$users = Get-WizUser -MaxResults 100\n$users | Where-Object { $_.Type -eq 'USER_ACCOUNT' } | Select-Object Name, Email, HasMfa\n\n# Get cloud accounts\n$accounts = Get-WizCloudAccount\n$accounts | Group-Object CloudProvider | Select-Object Name, Count\n```\n\n### C#\n```csharp\nusing WizCloud;\n\n// Create client\nvar client = new WizClient(token, WizRegion.EU17);\n\n// Get users\nvar users = await client.GetUsersAsync(pageSize: 100);\nforeach (var user in users.Where(u =\u003e u.Type == WizUserType.USER_ACCOUNT)) {\n    Console.WriteLine($\"{user.Name} - MFA: {user.HasMfa}\");\n}\n\n// Stream users (for large datasets)\nawait foreach (var user in client.GetUsersAsyncEnumerable(pageSize: 500)) {\n    ProcessUser(user);\n}\n```\n\n## 📊 Response Format Options: Raw vs Comprehensive Objects\n\nWizCloud gives you **two ways** to work with API results, depending on your needs:\n\n### 🔤 **Raw Objects (PowerShell with -Raw)**\nReturns basic objects with GraphEntityProperties as a dictionary:\n```powershell\n$users = Get-WizUser -Raw\n$users[0].GraphEntityProperties[\"userPrincipalName\"]\n```\n\n### 🎯 **Comprehensive Objects (Default)**\nAutomatically expands all properties into **strongly-typed objects** with 73+ properties:\n```powershell\n$users = Get-WizUser\n$users[0].UserPrincipalName     # Direct property access\n$users[0].Department            # All properties exposed\n$users[0].ProxyAddresses        # Complex properties parsed\n$users[0].EmailAddresses        # Extracted from ProxyAddresses\n```\n\n**When to use each approach:**\n- **Raw**: Direct API access, custom processing, smaller memory footprint\n- **Comprehensive**: Full IntelliSense, easy filtering, all properties accessible\n\n## 📋 Method/Cmdlet Comparison\n\n| Operation | C# Method | PowerShell Cmdlet | Description |\n|-----------|-----------|-------------------|-------------|\n| **Authentication** | `new WizClient(token, region)` | `Connect-Wiz` | Authenticate with Wiz |\n| | | `Disconnect-Wiz` | Clear stored credentials |\n| **Users** | `GetUsersAsync()` | `Get-WizUser` | Get all users |\n| | `GetUsersAsyncEnumerable()` | `Get-WizUser` | Stream users |\n| **Projects** | `GetProjectsAsync()` | `Get-WizProject` | Get all projects |\n| | `GetProjectsAsyncEnumerable()` | `Get-WizProject` | Stream projects |\n| **Cloud Accounts** | `GetCloudAccountsAsync()` | `Get-WizCloudAccount` | Get cloud accounts |\n| | `GetCloudAccountsAsyncEnumerable()` | `Get-WizCloudAccount` | Stream cloud accounts |\n\n## 🔧 Installation\n\n### PowerShell Module\n```powershell\n# Install from PowerShell Gallery\nInstall-Module -Name WizCloud -Force\n\n# Import the module\nImport-Module WizCloud\n```\n\n### NuGet Package\n```bash\n# Package Manager\nInstall-Package WizCloud\n\n# .NET CLI\ndotnet add package WizCloud\n\n# PackageReference\n\u003cPackageReference Include=\"WizCloud\" Version=\"1.0.0\" /\u003e\n```\n\n## 💡 Examples\n\n### PowerShell Examples\n\n#### Connect and Get Users\n```powershell\n# Connect to Wiz\nConnect-Wiz -ClientId $env:WIZ_CLIENT_ID -ClientSecret $env:WIZ_CLIENT_SECRET -Region EU17 -TestConnection\n\n# Get all users with progress\n$allUsers = Get-WizUser -Verbose\n\n# Get specific user types\n$serviceAccounts = Get-WizUser -Type SERVICE_ACCOUNT\n$accessKeys = Get-WizUser -Type ACCESS_KEY\n\n# Filter users without MFA\n$noMfaUsers = Get-WizUser | Where-Object { $_.Type -eq 'USER_ACCOUNT' -and -not $_.HasMfa }\n\n# Get users from specific project\n$projectUsers = Get-WizUser -ProjectId \"project-id\"\n\n# Export to CSV\nGet-WizUser | Export-Csv -Path \"WizUsers.csv\" -NoTypeInformation\n```\n\n#### Work with Projects\n```powershell\n# Get all projects\n$projects = Get-WizProject\n\n# Find folder projects\n$folders = $projects | Where-Object { $_.IsFolder }\n\n# Get project hierarchy\n$projects | Select-Object Name, Slug, IsFolder | Format-Table\n```\n\n#### Cloud Account Management\n```powershell\n# Get all cloud accounts\n$accounts = Get-WizCloudAccount\n\n# Group by provider\n$accountsByProvider = $accounts | Group-Object CloudProvider\n$accountsByProvider | ForEach-Object {\n    Write-Host \"$($_.Name): $($_.Count) accounts\"\n}\n\n# Find AWS accounts\n$awsAccounts = $accounts | Where-Object { $_.CloudProvider -eq 'AWS' }\n\n# Find Azure subscriptions by name pattern\n$devAccounts = $accounts | Where-Object { $_.Name -like '*DEV*' }\n```\n\n### C# Examples\n\n#### Basic Usage\n```csharp\nusing WizCloud;\n\n// Create client with token refresh support\nvar client = new WizClient(token, WizRegion.US1, clientId, clientSecret);\n\n// Get all users\nvar users = await client.GetUsersAsync(pageSize: 500);\nConsole.WriteLine($\"Total users: {users.Count}\");\n\n// Filter by type\nvar userAccounts = users.Where(u =\u003e u.Type == WizUserType.USER_ACCOUNT);\nvar serviceAccounts = users.Where(u =\u003e u.Type == WizUserType.SERVICE_ACCOUNT);\n```\n\n#### Streaming Large Datasets\n```csharp\n// Stream users for memory efficiency\nawait foreach (var user in client.GetUsersAsyncEnumerable(pageSize: 1000)) {\n    if (user.HasHighPrivileges) {\n        Console.WriteLine($\"High privilege user: {user.Name}\");\n    }\n}\n\n// Stream with cancellation\nvar cts = new CancellationTokenSource();\nawait foreach (var project in client.GetProjectsAsyncEnumerable(cancellationToken: cts.Token)) {\n    ProcessProject(project);\n    if (ShouldStop()) cts.Cancel();\n}\n```\n\n#### Working with Comprehensive User Data\n```csharp\n// When using from C#, cast to WizUserComprehensive for all properties\nvar users = await client.GetUsersAsync();\nforeach (var user in users) {\n    // Access basic properties\n    Console.WriteLine($\"Name: {user.Name}\");\n    Console.WriteLine($\"Type: {user.Type}\");\n\n    // Access GraphEntityProperties directly\n    if (user.GraphEntityProperties.TryGetValue(\"department\", out var dept)) {\n        Console.WriteLine($\"Department: {dept}\");\n    }\n}\n```\n\n## 🌍 Supported Regions\n\n| Region | Enum Value | API Endpoint |\n|--------|------------|--------------|\n| EU (Frankfurt) | `EU1` | `api.eu1.app.wiz.io` |\n| EU (Belgium) | `EU2` | `api.eu2.app.wiz.io` |\n| EU (London) | `EU17` | `api.eu17.app.wiz.io` |\n| US East | `US1` | `api.us1.app.wiz.io` |\n| US West | `US2` | `api.us2.app.wiz.io` |\n| Australia | `AP1` | `api.ap1.app.wiz.io` |\n| Japan | `AP2` | `api.ap2.app.wiz.io` |\n| India | `AP3` | `api.ap3.app.wiz.io` |\n| Singapore | `AP4` | `api.ap4.app.wiz.io` |\n| US Gov | `GOV1` | `api.gov1.app.wiz.io` |\n\n## 📊 User Types\n\n| Type | Description | Common Properties |\n|------|-------------|-------------------|\n| `USER_ACCOUNT` | Regular user accounts | Email, MFA status, Department |\n| `SERVICE_ACCOUNT` | Service/application accounts | ClientId, Managed status |\n| `GROUP` | User groups | Member count |\n| `ACCESS_KEY` | Access keys/credentials | ValidBefore, EverUsed, CredentialType |\n\n## 🔒 Security Considerations\n\n- Store credentials securely using environment variables or secure vaults\n- Use service accounts with minimal required permissions\n- Enable MFA for all user accounts\n- Regularly rotate access keys\n- Monitor API usage and rate limits\n\n## 📈 Performance Tips\n\n1. **Use Streaming for Large Datasets**\n   ```powershell\n   # Instead of loading all users into memory\n   Get-WizUser | ForEach-Object { Process-User $_ }\n   ```\n\n2. **Specify MaxResults**\n   ```powershell\n   # Limit results when testing or when you need only a subset\n   Get-WizUser -MaxResults 100\n   ```\n\n3. **Use Appropriate Page Sizes**\n   ```powershell\n   # Larger page sizes = fewer API calls\n   Get-WizUser -PageSize 5000  # Max supported\n   ```\n\n4. **Filter at API Level**\n   ```powershell\n   # More efficient than client-side filtering\n   Get-WizUser -Type SERVICE_ACCOUNT -ProjectId \"project-id\"\n   ```\n\n## 🐛 Troubleshooting\n\n### Common Issues\n\n1. **Authentication Errors**\n   ```powershell\n   # Ensure credentials are correct and have required permissions\n   Connect-Wiz -ClientId \"...\" -ClientSecret \"...\" -TestConnection -Verbose\n   ```\n\n2. **Region Mismatch**\n   ```powershell\n   # Make sure you're connecting to the correct region\n   Connect-Wiz -Region EU17  # Check your Wiz tenant region\n   ```\n\n3. **Rate Limiting**\n   ```powershell\n   # Add delays or reduce page size if hitting rate limits\n   Get-WizUser -PageSize 100\n   ```\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## 🙏 Acknowledgments\n\n- Built on top of the Wiz.io GraphQL API\n- Inspired by modern .NET practices and PowerShell standards\n- Uses async/await patterns for optimal performance","funding_links":["https://github.com/sponsors/PrzemyslawKlys","https://paypal.me/PrzemyslawKlys"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevotecit%2Fwizcloud","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevotecit%2Fwizcloud","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevotecit%2Fwizcloud/lists"}