Skip to content

Conversation

@Chan9390
Copy link
Contributor

@Chan9390 Chan9390 commented Nov 28, 2025

Context

Lighthouse AI supported integration with Amazon Bedrock using IAM Access Key pair. This PR adds support to integrate with Amazon Bedrock using Bedrock API keys.

Description

This PR passes Amazon Bedrock API key to Langchain AWS SDK to interact with Amazon Bedrock models. From the Django side, theres logic added to ensure Bedrock provider can be created either with (API key + region) OR (access key + secret + region) and can't have both. Django migrations are not needed for the change as this API key is stored as KV pair inside the credentials JSON in DB table.
From the UI side, the LLM configuration code is slightly refactored to support different modes of configuring Amazon Bedrock. Based on the mode, the input fields collect the keys and pass them to Django.

Steps to review

In Django backend:

  1. Feature added to support Amazon Bedrock API key and stores it inside the credentials JSON.
  2. Test updated in test_views.
  3. On creating a provider with Amazon Bedrock, the lighthouse task to validate keys is updated to check API token validity.
  4. Test for lighthouse task to validate bedrock api key updated.
bedrock-api-key.mov

Checklist

UI

  • All issue/task requirements work as expected on the UI
  • Screenshots/Video of the functionality flow (if applicable) - Mobile (X < 640px)
  • Screenshots/Video of the functionality flow (if applicable) - Table (640px > X < 1024px)
  • Screenshots/Video of the functionality flow (if applicable) - Desktop (X > 1024px)
  • Ensure new entries are added to CHANGELOG.md, if applicable.

API

  • Verify if API specs need to be regenerated.
  • Check if version updates are required (e.g., specs, Poetry, etc.).
  • Ensure new entries are added to CHANGELOG.md, if applicable.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2025

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2025

✅ All necessary CHANGELOG.md files have been updated.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2025

🔒 Container Security Scan

Image: prowler-ui:c0d5e3f
Last scan: 2025-11-28 10:06:14 UTC

✅ No Vulnerabilities Detected

The container image passed all security checks. No known CVEs were found.

📋 Resources:

@github-actions
Copy link
Contributor

github-actions bot commented Nov 28, 2025

🔒 Container Security Scan

Image: prowler-api:c0d5e3f
Last scan: 2025-11-28 10:09:42 UTC

📊 Vulnerability Summary

Severity Count
🔴 Critical 4
Total 4

3 package(s) affected

⚠️ Action Required

Critical severity vulnerabilities detected. These should be addressed before merging:

  • Review the detailed scan results
  • Update affected packages to patched versions
  • Consider using a different base image if updates are unavailable

📋 Resources:

@codecov
Copy link

codecov bot commented Nov 28, 2025

Codecov Report

❌ Patch coverage is 98.72340% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.62%. Comparing base (dc9e91a) to head (8234c48).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9343      +/-   ##
==========================================
+ Coverage   88.74%   92.62%   +3.87%     
==========================================
  Files          93      154      +61     
  Lines        3509    21323   +17814     
==========================================
+ Hits         3114    19750   +16636     
- Misses        395     1573    +1178     
Flag Coverage Δ
api 92.62% <98.72%> (?)
prowler-py3.10-m365 ?
prowler-py3.11-m365 ?
prowler-py3.12-m365 ?
prowler-py3.9-m365 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
prowler ∅ <ø> (∅)
api 92.62% <98.72%> (∅)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants