Skip to content

Commit b2cc15d

Browse files
fix(api): upgrade Cartography to 0.132.0 to fix exposed_internet on ELB/ELBv2 nodes (#10309)
Co-authored-by: Josema Camacho <josema@prowler.com>
1 parent 2c9efdc commit b2cc15d

File tree

5 files changed

+32
-29
lines changed

5 files changed

+32
-29
lines changed

api/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ All notable changes to the **Prowler API** are documented in this file.
1515
### 🐞 Fixed
1616

1717
- Attack Paths: Add missing logging for query execution and exception details in scan error handling [(#10269)](https://github.com/prowler-cloud/prowler/pull/10269)
18+
- Attack Paths: Upgrade Cartography from 0.129.0 to 0.132.0, fixing `exposed_internet` not set on ELB/ELBv2 nodes [(#10272)](https://github.com/prowler-cloud/prowler/pull/10272)
1819

1920
---
2021

api/Dockerfile

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2424
python3-dev \
2525
&& rm -rf /var/lib/apt/lists/*
2626

27-
# Cartography depends on `dockerfile` which has no pre-built arm64 wheel and requires Go to compile
28-
# hadolint ignore=DL3008
29-
RUN if [ "$(uname -m)" = "aarch64" ]; then \
30-
apt-get update && apt-get install -y --no-install-recommends golang-go \
31-
&& rm -rf /var/lib/apt/lists/* ; \
32-
fi
33-
3427
# Install PowerShell
3528
RUN ARCH=$(uname -m) && \
3629
if [ "$ARCH" = "x86_64" ]; then \

api/poetry.lock

Lines changed: 5 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ dependencies = [
3737
"matplotlib (>=3.10.6,<4.0.0)",
3838
"reportlab (>=4.4.4,<5.0.0)",
3939
"neo4j (>=6.0.0,<7.0.0)",
40-
"cartography (==0.129.0)",
40+
"cartography (==0.132.0)",
4141
"gevent (>=25.9.1,<26.0.0)",
4242
"werkzeug (>=3.1.4)",
4343
"sqlparse (>=0.5.4)",

api/src/backend/tasks/jobs/attack_paths/aws.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def start_aws_ingestion(
4343
"aws_guardduty_severity_threshold": cartography_config.aws_guardduty_severity_threshold,
4444
"aws_cloudtrail_management_events_lookback_hours": cartography_config.aws_cloudtrail_management_events_lookback_hours,
4545
"experimental_aws_inspector_batch": cartography_config.experimental_aws_inspector_batch,
46+
"aws_tagging_api_cleanup_batch": cartography_config.aws_tagging_api_cleanup_batch,
4647
}
4748

4849
boto3_session = get_boto3_session(prowler_api_provider, prowler_sdk_provider)
@@ -116,6 +117,30 @@ def start_aws_ingestion(
116117
neo4j_session,
117118
common_job_parameters,
118119
)
120+
121+
if all(
122+
s in requested_syncs
123+
for s in ["ecs", "ec2:load_balancer_v2", "ec2:load_balancer_v2:expose"]
124+
):
125+
logger.info(
126+
f"Syncing lb_container_exposure scoped analysis for AWS account {prowler_api_provider.uid}"
127+
)
128+
cartography_aws.run_scoped_analysis_job(
129+
"aws_lb_container_exposure.json",
130+
neo4j_session,
131+
common_job_parameters,
132+
)
133+
134+
if all(s in requested_syncs for s in ["ec2:network_acls", "ec2:load_balancer_v2"]):
135+
logger.info(
136+
f"Syncing lb_nacl_direct scoped analysis for AWS account {prowler_api_provider.uid}"
137+
)
138+
cartography_aws.run_scoped_analysis_job(
139+
"aws_lb_nacl_direct.json",
140+
neo4j_session,
141+
common_job_parameters,
142+
)
143+
119144
db_utils.update_attack_paths_scan_progress(attack_paths_scan, 91)
120145

121146
logger.info(f"Syncing metadata for AWS account {prowler_api_provider.uid}")

0 commit comments

Comments
 (0)