prowler-cloud/prowler/prowler-test-sdk
- community
Checking that the SKILL.md file is still in the repository.
Testing patterns for Prowler SDK (Python). Trigger: When writing tests for the Prowler SDK (checks/services/providers), including provider-specific mocking rules (moto for AWS only).
Install
npx vskill@latest install prowler-cloud/prowler/prowler-test-sdkSKILL.md
Generic Patterns: For base pytest patterns (fixtures, mocking, parametrize, markers), see thepytestskill.This skill covers Prowler-specific conventions only.Full Documentation:docs/developer-guide/unit-testing.mdx
CRITICAL: Provider-Specific Testing
| Provider | Mocking Approach | Decorator | |
|---|---|---|---|
| AWS | moto library | @mock_aws | |
| Azure, GCP, K8s, others | MagicMock | None |
NEVER use moto for non-AWS providers. NEVER use MagicMock for AWS.
AWS Check Test Pattern
Critical: Always import the check INSIDE the mock.patch context to ensure proper client mocking.
Azure Check Test Pattern
NO moto decorator. Use MagicMock to mock the service client directly.
GCP/Kubernetes/Other Providers
Follow the same MagicMock pattern as Azure:
Key difference: Each provider has its own fixtures file with set_mocked_{provider}_provider.
Provider Fixtures Reference
| Provider | Fixtures File | Key Constants | |
|---|---|---|---|
| AWS | tests/providers/aws/utils.py | AWS_REGION_US_EAST_1, AWS_ACCOUNT_NUMBER | |
| Azure | tests/providers/azure/azure_fixtures.py | AZURE_SUBSCRIPTION_ID | |
| GCP | tests/providers/gcp/gcp_fixtures.py | GCP_PROJECT_ID | |
| K8s | tests/providers/kubernetes/kubernetes_fixtures.py | - |
Test File Structure
NOTE: Do not create a __init__.py file in the test folder.
Required Test Scenarios
Every check MUST test:
| Scenario | Expected | |
|---|---|---|
| Resource compliant | status == "PASS" | |
| Resource non-compliant | status == "FAIL" | |
| No resources | len(results) == 0 |
Assertions to Include
Commands
Resources
- Templates: See assets/ for complete test templates (AWS with moto, Azure/GCP with MagicMock)
- Documentation: See references/testing-docs.md for official Prowler Developer Guide links
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/prowler-test-sdk/SKILL.md
Popularity
- Repository stars
- 13,387
- Repository forks
- 2,050
- 7-day trend score
- 48
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 24 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/prowler-cloud/prowler/prowler-test-sdk)