prowler-test-sdk

Generate unit test templates for Prowler SDK security checks with moto and MagicMock.

1|Updated Aug 16, 2025
One-click install
npx skills add https://github.com/professor-moody/cloud-tools --skill prowler-test-sdk-professor-moody
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prowler-test-sdk
Source: https://github.com/professor-moody/cloud-tools/tree/main/repos/prowler/skills/prowler-test-sdk
Command: npx skills add https://github.com/professor-moody/cloud-tools --skill prowler-test-sdk-professor-moody

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides clear, actionable patterns and examples for writing effective unit tests for the Prowler SDK, ensuring robust and reliable security checks.

Core Features & Use Cases

  • Provider-Specific Mocking: Demonstrates correct mocking techniques for AWS (using moto) and other providers (using MagicMock).
  • Test Structure & Scenarios: Outlines the required test file structure, essential test scenarios (pass, fail, no resources), and key assertions.
  • Use Case: When developing a new Prowler security check for Azure, use this Skill's examples to correctly mock Azure services and test your check's compliance logic.

Quick Start

Use the prowler-test-sdk skill to generate a template for testing an AWS S3 bucket check using moto.

Frequently Asked Questions about prowler-test-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write unit tests for a Prowler security check?

To write unit tests for a Prowler security check, follow the required test file structure and cover essential scenarios including pass, fail, and no resources, using specific assertions to validate compliance logic.

What is the best way to mock AWS services for Prowler SDK testing?

The best way to mock AWS services for Prowler SDK testing is using the moto library, which allows you to accurately simulate AWS resources and test security checks without making real API calls.

Can I use MagicMock to test Azure and GCP checks in the Prowler SDK?

Yes, you can use MagicMock to test Azure and GCP checks in the Prowler SDK. It provides the necessary provider-specific mocking strategies for clouds outside of AWS.

What test scenarios should I cover when testing Prowler security checks?

When testing Prowler security checks, you should cover three essential test scenarios: the check passing, the check failing, and the check returning no resources, ensuring robust validation of your compliance logic.

Does Prowler SDK testing require a specific file structure for test scripts?

Yes, Prowler SDK testing requires a specific test file structure to ensure your unit tests are correctly organized and executed. Following these file structure requirements is essential for developing reliable security checks.