feat(aws): add bedrock_prompt_have_multiple_variants security check#10905
feat(aws): add bedrock_prompt_have_multiple_variants security check#10905danibarranqueroo wants to merge 1 commit intomasterfrom
Conversation
Add new security check bedrock_prompt_have_multiple_variants for aws provider. Includes check implementation, metadata, and unit tests.
|
✅ All necessary |
591ff3b to
2854a74
Compare
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
Compliance Mapping ReviewThis PR adds new checks. Please verify that they have been mapped to the relevant compliance framework requirements. New checks already mapped in this PR
Use the |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10905 +/- ##
===========================================
- Coverage 88.14% 7.62% -80.53%
===========================================
Files 131 849 +718
Lines 5542 24572 +19030
===========================================
- Hits 4885 1873 -3012
- Misses 657 22699 +22042
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
🔒 Container Security ScanImage: 📊 Vulnerability Summary
4 package(s) affected
|
Context
A Bedrock prompt configured with only a single variant creates a single point of failure in AI/ML pipelines — if the underlying model experiences degradation or outage, there is no fallback available. Additionally, without multiple variants, teams cannot perform A/B testing to compare prompt performance across different models, templates, or inference parameters, limiting their ability to optimize prompt quality and resilience.
Description
This check evaluates each Amazon Bedrock prompt to verify it has more than one variant configured. A prompt with two or more variants receives a PASS status, while a prompt with zero or one variant receives a FAIL. The recommended remediation is to add additional variants to each prompt using different models or configurations, enabling A/B testing and ensuring fallback options are available in case of model degradation.
Steps to review
prowler/providers/aws/services/bedrock/bedrock_prompt_have_multiple_variants/prowler/compliance/aws/to ensure the check is correctly mapped to relevant requirementspoetry run pytest tests/providers/aws/services/bedrock/bedrock_prompt_have_multiple_variants/ -vRelated Issues
https://prowlerpro.atlassian.net/browse/PROWLER-636
Checklist
Community Checklist
SDK/CLI
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.