feat(aws): add bedrock_prompt_management_exists security check#10878
Conversation
Add new security check bedrock_prompt_management_in_use for aws provider. Includes check implementation, metadata, and unit tests.
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 |
|
✅ All necessary |
|
✅ Conflict Markers Resolved All conflict markers have been successfully resolved in this pull request. |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## master #10878 +/- ##
===========================================
- Coverage 71.60% 7.71% -63.89%
===========================================
Files 153 850 +697
Lines 9280 24669 +15389
===========================================
- Hits 6645 1904 -4741
- Misses 2635 22765 +20130
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
|
|
The PR title and description refer to |
|
Quick question on permissions: this check introduces a new |
Related to this, the check was renamed because it actually does not verify if the prompt management is being used or properly configured, it just verify that in each specific region the prompt management has one prompt configured, maybe in use is enough and we can go back to the old name. |
Not needed on this branch. Even though the check uses the |
Context
Without centralized Prompt Management, prompts used with Bedrock foundation models are scattered across applications with no oversight, increasing the risk of prompt injection attacks, inconsistent model behavior, and a lack of auditability over instructions sent to models. Attackers or malicious insiders could exploit ungoverned prompts to manipulate model outputs, bypass safety controls, or exfiltrate sensitive information through crafted inputs.
Description
This check verifies whether Amazon Bedrock Prompt Management is actively being used by checking for the existence of managed prompts in each enabled region. It reports a PASS if at least one managed prompt exists in the region, indicating that prompt governance and standardization practices are in place, and a FAIL if no managed prompts are found. The recommended remediation is to adopt Bedrock Prompt Management to centralize prompt definitions, enforce versioning, and apply least-privilege access controls to restrict who can create or modify prompts.
Steps to review
prowler/providers/aws/services/bedrock/bedrock_prompt_management_exists/prowler/compliance/aws/to ensure the check is correctly mapped to relevant requirementspoetry run pytest tests/providers/aws/services/bedrock/bedrock_prompt_management_exists/ -vChecklist
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.