Skip to content

Commit 7e03b42

Browse files
feat(api): add MongoDBAtlas provider to api (#9167)
1 parent 0ad5bbf commit 7e03b42

File tree

14 files changed

+230
-18
lines changed

14 files changed

+230
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ prowler dashboard
9090
| M365 | 70 | 7 | 3 | 2 | Official | UI, API, CLI |
9191
| OCI | 51 | 13 | 1 | 10 | Official | UI, API, CLI |
9292
| IaC | [See `trivy` docs.](https://trivy.dev/latest/docs/coverage/iac/) | N/A | N/A | N/A | Official | UI, API, CLI |
93-
| MongoDB Atlas | 10 | 3 | 0 | 0 | Official | CLI |
93+
| MongoDB Atlas | 10 | 3 | 0 | 0 | Official | CLI, API |
9494
| LLM | [See `promptfoo` docs.](https://www.promptfoo.dev/docs/red-team/plugins/) | N/A | N/A | N/A | Official | CLI |
9595
| NHN | 6 | 2 | 1 | 0 | Unofficial | CLI |
9696

api/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ All notable changes to the **Prowler API** are documented in this file.
1414
- Support muting findings based on simple rules with custom reason [(#9051)](https://github.com/prowler-cloud/prowler/pull/9051)
1515
- Support C5 compliance framework for the GCP provider [(#9097)](https://github.com/prowler-cloud/prowler/pull/9097)
1616
- Support for Amazon Bedrock and OpenAI compatible providers in Lighthouse AI [(#8957)](https://github.com/prowler-cloud/prowler/pull/8957)
17+
- Support for MongoDB Atlas provider [(#9167)](https://github.com/prowler-cloud/prowler/pull/9167)
1718

1819
---
1920

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Generated by Django 5.1.13 on 2025-11-05 08:37
2+
3+
from django.db import migrations
4+
5+
import api.db_utils
6+
7+
8+
class Migration(migrations.Migration):
9+
dependencies = [
10+
("api", "0054_iac_provider"),
11+
]
12+
13+
operations = [
14+
migrations.AlterField(
15+
model_name="provider",
16+
name="provider",
17+
field=api.db_utils.ProviderEnumField(
18+
choices=[
19+
("aws", "AWS"),
20+
("azure", "Azure"),
21+
("gcp", "GCP"),
22+
("kubernetes", "Kubernetes"),
23+
("m365", "M365"),
24+
("github", "GitHub"),
25+
("mongodbatlas", "MongoDB Atlas"),
26+
("iac", "IaC"),
27+
("oraclecloud", "Oracle Cloud Infrastructure"),
28+
],
29+
default="aws",
30+
),
31+
),
32+
]

api/src/backend/api/models.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ class ProviderChoices(models.TextChoices):
284284
KUBERNETES = "kubernetes", _("Kubernetes")
285285
M365 = "m365", _("M365")
286286
GITHUB = "github", _("GitHub")
287+
MONGODBATLAS = "mongodbatlas", _("MongoDB Atlas")
287288
IAC = "iac", _("IaC")
288289
ORACLECLOUD = "oraclecloud", _("Oracle Cloud Infrastructure")
289290

@@ -381,6 +382,15 @@ def validate_oraclecloud_uid(value):
381382
pointer="/data/attributes/uid",
382383
)
383384

385+
@staticmethod
386+
def validate_mongodbatlas_uid(value):
387+
if not re.match(r"^[0-9a-fA-F]{24}$", value):
388+
raise ModelValidationError(
389+
detail="MongoDB Atlas organization ID must be a 24-character hexadecimal string.",
390+
code="mongodbatlas-uid",
391+
pointer="/data/attributes/uid",
392+
)
393+
384394
id = models.UUIDField(primary_key=True, default=uuid4, editable=False)
385395
inserted_at = models.DateTimeField(auto_now_add=True, editable=False)
386396
updated_at = models.DateTimeField(auto_now=True, editable=False)

0 commit comments

Comments
 (0)