Skip to content

fix(container): patch pyasn1 and joserfc CVEs - #13247

Merged
puchy22 merged 2 commits into
masterfrom
fix/container-pyasn1-joserfc-cves
Nov 3, 2026
Merged

puchy22 merged 2 commits into
masterfrom
fix/container-pyasn1-joserfc-cves

Conversation

@puchy22

@puchy22 puchy22 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Context

The sdk-container-build-and-scan Trivy gate is failing on every PR that builds the SDK image (seen on #13246) with 5 HIGH findings:

CVE Package Installed Fixed Issue
CVE-2026-119194 pyasn1 0.6.4 0.6.5 DoS via hash collisions in schemaless decoding
CVE-2026-119195 pyasn1 0.6.4 0.6.5 DoS via quadratic processing of fragmented ASN.1 data
CVE-2026-119196 pyasn1 0.6.4 0.6.5 DoS via constructed bit string decoding
CVE-2026-119197 pyasn1 0.6.4 0.6.5 DoS via quadratic complexity in binary REAL decoding
CVE-2026-119283 joserfc 1.6.8 1.7.5 DoS via unbounded recipient processing during JWE decryption

This PR's own mcp-container-build-and-scan then flagged a CRITICAL in the MCP Server base image:

CVE Package Installed Fixed
CVE-2026-115557 python 3.13.16 3.13.18

Description

Bumps the pins to the fixed versions everywhere they appear:

  • SDK (pyproject.toml, uv.lock): pyasn1 0.6.4 → 0.6.5, joserfc 1.6.8 → 1.7.5
  • API (api/pyproject.toml, api/uv.lock): pyasn1 0.6.4 → 0.6.5
  • MCP server (mcp_server/pyproject.toml, mcp_server/uv.lock): joserfc 1.6.8 → 1.7.5
  • MCP server image (mcp_server/Dockerfile): runtime base python:3.13.16-alpine3.23 → python:3.13.18-alpine3.23, digest-pinned like before. The SDK and API images got the same CVE fix in fix(container): bump Python base image to 3.12.16 #13215.

Only the SDK image failed the gate on #13246, because the API and MCP image scans only run when those components change. Both pin the same vulnerable versions, so they are patched here too.

Compatibility: pyasn1-modules 0.4.2 accepts pyasn1>=0.6.1,<0.7.0, moto accepts joserfc>=0.9.0, and joserfc 1.7.5 still supports Python 3.10. The lockfile diffs change only these two packages.

Steps to review

  1. Check that the lockfile diffs move only pyasn1 and joserfc.
  2. sdk-container-build-and-scan, api-container-build-and-scan and mcp-container-build-and-scan pass with no HIGH findings.
  3. Locally: uv run pytest tests/providers/aws/services/cognito tests/providers/gcp/gcp_provider_test.py tests/providers/huaweicloud (386 passed) and the MCP suite (251 passed). The MCP image builds locally, runs Python 3.13.18 and imports prowler_mcp_server.

Checklist

Community Checklist

SDK/CLI

  • Are there new checks included in this PR? No
    • If so, do we need to update permissions for the provider? Please review this carefully.

API

  • All issue/task requirements work as expected on the API
  • Check if version updates are required (e.g., specs, uv, etc.).
  • Ensure a changelog fragment is added under api/changelog.d/, if applicable.

MCP Server

  • All issue/task requirements work as expected on the MCP Server
  • Ensure a changelog fragment is added under mcp_server/changelog.d/, if applicable.

License

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

Summary by CodeRabbit

  • Bug Fixes
    • Updated security components to patched versions, addressing denial-of-service vulnerabilities in ASN.1 decoding and JWE decryption. These updates improve resilience when processing affected data. The updated versions are pyasn1 0.6.5 and joserfc 1.7.5.
    • Updated the MCP Server’s Python runtime to version 3.13.18, which includes a security fix.

- Bump pyasn1 to 0.6.5 in the SDK and API (CVE-2026-119194..119197)
- Bump joserfc to 1.7.5 in the SDK and MCP server (CVE-2026-119283)
Copilot AI balanced review requested due to automatic review settings November 3, 2026 11:45
@puchy22
puchy22 requested a review from a team as a code owner November 3, 2026 11:45
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

✅ All required changelog fragments are present.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Walkthrough

The API, MCP server, and root project update their pyasn1 and joserfc dependency constraints. The MCP Server image updates its Python base image. Changelog entries record the associated advisories.

Changes: Security updates

Layer / File(s) Summary
Dependency constraints and advisory records
api/pyproject.toml, pyproject.toml, mcp_server/pyproject.toml, api/changelog.d/*, mcp_server/changelog.d/*, prowler/changelog.d/*
Updates pyasn1 from 0.6.4 to 0.6.5 and joserfc from 1.6.8 to 1.7.5. Changelog entries describe the associated advisories.
MCP Server Python image update
mcp_server/Dockerfile, mcp_server/changelog.d/mcp-python-3.13.18.security.md
Updates the runtime image from Python 3.13.16 to 3.13.18 and records the change as addressing CVE-2026-115557.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

  • prowler-cloud/prowler#13215: Both PRs update Python container base images in relation to CVE-2026-115557. This PR updates the MCP image to Python 3.13.18; the related PR updates SDK and API images to Python 3.12.16.

Suggested reviewers: pedrooot, cesararroba

Merge Risk: Minimal · up to 2edb9

No actionable issue was identified in the supplied dependency and runtime-image updates. Merge readiness remains subject to normal build, test, and container security checks.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly identifies the primary change: patching the pyasn1 and joserfc CVEs. It is concise and relevant to the changeset.
Description check Passed The description includes the required context, change summary, dependency updates, review steps, checklist, test results, compatibility notes, and license confirmation. It is sufficiently complete, al…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description includes the required context, change summary, dependency updates, review steps, checklist, test results, compatibility notes, and license confirmation. It is sufficiently complete, although it lists scan success as a review step rather than reporting completed scan results.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Finishing Touches
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 543333c2-8aef-4d95-9157-315bd17447e9
Commits

Reviewing files that changed from the base of the PR and between 797b62f and 2edb941.

Files selected for processing: 2
  • mcp_server/Dockerfile
  • mcp_server/changelog.d/mcp-python-3.13.18.security.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

✅ No Conflicts

No conflict markers, and the branch merges cleanly into its base.

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🔒 Container Security Scan

Image: prowler-mcp:52f9761
Last scan: 2026-11-03 12:06:25 UTC

✅ No Vulnerabilities Detected

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

📋 Resources:

@codecov

codecov Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.56%. Comparing base (67aa941) to head (2edb941).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13247      +/-   ##
==========================================
- Coverage   93.22%   90.56%   -2.67%     
==========================================
  Files         342     2569    +2227     
  Lines       47171   126105   +78934     
==========================================
+ Hits        43975   114206   +70231     
- Misses       3196    11899    +8703     
Flag Coverage Δ
api 94.88% <ø> (ø)
mcp 69.29% <ø> (ø)
prowler-py3.10-aws 91.00% <ø> (?)
prowler-py3.10-azure 91.00% <ø> (?)
prowler-py3.10-config 88.91% <ø> (?)
prowler-py3.10-e2enetworks 89.44% <ø> (?)
prowler-py3.10-external 80.31% <ø> (?)
prowler-py3.10-gcp 91.34% <ø> (?)
prowler-py3.10-github 90.80% <ø> (?)
prowler-py3.10-googleworkspace 89.75% <ø> (?)
prowler-py3.10-huaweicloud 89.36% <ø> (?)
prowler-py3.10-iac 90.80% <ø> (?)
prowler-py3.10-kubernetes 91.00% <ø> (?)
prowler-py3.10-lib 88.41% <ø> (?)
prowler-py3.10-linode 89.39% <ø> (?)
prowler-py3.10-m365 90.95% <ø> (?)
prowler-py3.10-mongodbatlas 90.71% <ø> (+7.60%) ⬆️
prowler-py3.10-nhn 91.00% <ø> (?)
prowler-py3.10-okta 91.04% <ø> (?)
prowler-py3.10-openstack 89.46% <ø> (?)
prowler-py3.10-oraclecloud 89.35% <ø> (?)
prowler-py3.10-scaleway 89.51% <ø> (?)
prowler-py3.10-stackit 89.44% <ø> (?)
prowler-py3.10-vercel 89.57% <ø> (?)
prowler-py3.11-aws 91.00% <ø> (?)
prowler-py3.11-azure 90.97% <ø> (?)
prowler-py3.11-config 88.85% <ø> (?)
prowler-py3.11-e2enetworks 89.35% <ø> (?)
prowler-py3.11-external 80.24% <ø> (?)
prowler-py3.11-gcp 91.31% <ø> (?)
prowler-py3.11-github 90.78% <ø> (?)
prowler-py3.11-googleworkspace 89.66% <ø> (?)
prowler-py3.11-huaweicloud 89.28% <ø> (?)
prowler-py3.11-iac 90.70% <ø> (?)
prowler-py3.11-kubernetes 90.98% <ø> (?)
prowler-py3.11-lib 88.34% <ø> (?)
prowler-py3.11-linode 89.31% <ø> (?)
prowler-py3.11-m365 90.85% <ø> (?)
prowler-py3.11-mongodbatlas 90.61% <ø> (+7.50%) ⬆️
prowler-py3.11-nhn 90.97% <ø> (?)
prowler-py3.11-okta 91.02% <ø> (?)
prowler-py3.11-openstack 89.37% <ø> (?)
prowler-py3.11-oraclecloud 89.26% <ø> (?)
prowler-py3.11-scaleway 89.43% <ø> (?)
prowler-py3.11-stackit 89.35% <ø> (?)
prowler-py3.11-vercel 89.49% <ø> (?)
prowler-py3.12-aws 90.98% <ø> (?)
prowler-py3.12-azure 90.99% <ø> (?)
prowler-py3.12-config 88.91% <ø> (?)
prowler-py3.12-e2enetworks 89.43% <ø> (?)
prowler-py3.12-external 80.30% <ø> (?)
prowler-py3.12-gcp 91.33% <ø> (?)
prowler-py3.12-github 90.79% <ø> (?)
prowler-py3.12-googleworkspace 89.74% <ø> (?)
prowler-py3.12-huaweicloud 89.35% <ø> (?)
prowler-py3.12-iac 90.79% <ø> (?)
prowler-py3.12-kubernetes 90.99% <ø> (?)
prowler-py3.12-lib 88.40% <ø> (?)
prowler-py3.12-linode 89.39% <ø> (?)
prowler-py3.12-m365 90.94% <ø> (?)
prowler-py3.12-mongodbatlas 90.70% <ø> (+7.59%) ⬆️
prowler-py3.12-nhn 90.99% <ø> (?)
prowler-py3.12-okta 91.03% <ø> (?)
prowler-py3.12-openstack 89.46% <ø> (?)
prowler-py3.12-oraclecloud 89.35% <ø> (?)
prowler-py3.12-scaleway 89.51% <ø> (?)
prowler-py3.12-stackit 89.43% <ø> (?)
prowler-py3.12-vercel 89.57% <ø> (?)
prowler-py3.13-aws 90.98% <ø> (?)
prowler-py3.13-azure 90.99% <ø> (?)
prowler-py3.13-config 88.91% <ø> (?)
prowler-py3.13-e2enetworks 89.43% <ø> (?)
prowler-py3.13-external 80.30% <ø> (?)
prowler-py3.13-gcp 91.32% <ø> (?)
prowler-py3.13-github 90.79% <ø> (?)
prowler-py3.13-googleworkspace 89.74% <ø> (?)
prowler-py3.13-huaweicloud 89.35% <ø> (?)
prowler-py3.13-iac 90.79% <ø> (?)
prowler-py3.13-kubernetes 90.99% <ø> (?)
prowler-py3.13-lib 88.40% <ø> (?)
prowler-py3.13-linode 89.38% <ø> (?)
prowler-py3.13-m365 90.93% <ø> (?)
prowler-py3.13-mongodbatlas 90.70% <ø> (+7.59%) ⬆️
prowler-py3.13-nhn 90.98% <ø> (?)
prowler-py3.13-okta 91.03% <ø> (?)
prowler-py3.13-openstack 89.45% <ø> (?)
prowler-py3.13-oraclecloud 89.34% <ø> (?)
prowler-py3.13-scaleway 89.50% <ø> (?)
prowler-py3.13-stackit 89.43% <ø> (?)
prowler-py3.13-vercel 89.56% <ø> (?)

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

Components Coverage Δ
prowler 88.93% <ø> (+5.82%) ⬆️
api 94.88% <ø> (ø)
mcp_server 69.29% <ø> (ø)
🚀 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the security dependency updates across the SDK, API, and MCP server.

No open issues 🎉

What changed in this PR

Updates vulnerable dependencies across Prowler’s SDK, API, and MCP server to address denial-of-service advisories behind the container scan failures observed on #13246.

Changes:

  • Bumps pyasn1 to 0.6.5 in the SDK and API, and joserfc to 1.7.5 in the SDK and MCP server.
  • Refreshes lockfiles, including SDK/API format revisions and dependency-marker adjustments.
  • Adds security changelog fragments for all three components.
File Description
uv.lock Locks patched SDK dependencies and refreshes lock metadata.
pyproject.toml Updates SDK constraints for both packages.
prowler/​changelog.d/​pyasn1-joserfc-cves.security.md Documents the SDK security updates.
mcp_server/​uv.lock Locks joserfc to 1.7.5.
mcp_server/​pyproject.toml Updates the MCP server’s joserfc constraint.
mcp_server/​changelog.d/​joserfc-cve.security.md Documents the MCP server security update.
api/​uv.lock Locks patched pyasn1 and refreshes lock metadata.
api/​pyproject.toml Updates the API’s pyasn1 constraint.
api/​changelog.d/​pyasn1-cves.security.md Documents the API security update.

Review effort: Balanced

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🔎 Container Security Scan (Grype)

Image: prowler-mcp:52f9761
Last scan: 2026-11-03 12:06:48 UTC

✅ Nothing Blocking

No findings at critical or high severity.

Not blocking at this cutoff — medium: 12, low: 2.


📋 Resources:

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🔒 Container Security Scan

Image: prowler-api:52f9761
Last scan: 2026-11-03 12:09:41 UTC

✅ No Vulnerabilities Detected

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

📋 Resources:

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🔒 Container Security Scan

Image: prowler:52f9761
Last scan: 2026-11-03 12:07:33 UTC

✅ No Vulnerabilities Detected

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

📋 Resources:

@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🔎 Container Security Scan (Grype)

Image: prowler-api:52f9761
Last scan: 2026-11-03 12:10:55 UTC

✅ Nothing Blocking

No findings at critical or high severity.

Not blocking at this cutoff — medium: 20, low: 8, negligible: 1.

65 finding(s) excluded by .grype.yaml, each with a documented reason.


📋 Resources:

coderabbitai[bot]
coderabbitai Bot previously approved these changes Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

🔎 Container Security Scan (Grype)

Image: prowler:52f9761
Last scan: 2026-11-03 12:08:53 UTC

✅ Nothing Blocking

No findings at critical or high severity.

Not blocking at this cutoff — medium: 21, low: 8, negligible: 1.

99 finding(s) excluded by .grype.yaml, each with a documented reason.


📋 Resources:

Copilot AI balanced review requested due to automatic review settings November 3, 2026 12:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues were identified for the security dependency and MCP runtime updates.

No open issues 🎉

Review effort: Balanced

@puchy22
puchy22 merged commit 82980d4 into master Nov 3, 2026
@puchy22
puchy22 deleted the fix/container-pyasn1-joserfc-cves branch November 3, 2026 14:18
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.

3 participants