Skip to content

chore: resolve open dependabot security alerts - #399

Open
jonathannorris wants to merge 6 commits into
mainfrom
chore/dependabot-alerts
Open

chore: resolve open dependabot security alerts#399
jonathannorris wants to merge 6 commits into
mainfrom
chore/dependabot-alerts

Conversation

@jonathannorris

@jonathannorris jonathannorris commented Jun 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Resolved 12 open Dependabot security alerts by bumping vulnerable transitive dependencies in uv.lock.
  • Bumped aiohttp to 3.14.1 (resolves 11 alerts, chore: add CODEOWNERS #34-ModuleNotFoundError when importing flagd provider #44).
  • Bumped cryptography to 49.0.0 (resolves 1 high-severity alert, fix: include proto file in build for openfeature-provider-flagd #45).
  • Bumped grpcio/grpcio-health-checking to 1.82.1 and the isolated build-time grpcio-tools pin to match, since the runtime grpcio>=1.81.0 constraint had drifted ahead of the previously-pinned grpcio-tools, which generates gRPC stubs incompatible with the runtime version at import time (breaking the flagd provider test job).
  • Aligned the flagd provider's build-time protobuf pin (used only by the isolated Hatch protobuf build hook) from ~=6.0 to >=7.0.0,<8.0.0, matching the runtime constraint. grpcio-tools>=1.82 dropped protobuf 6.x support entirely and now requires protobuf 7.35+, so the old 6.x pin (originally added in chore(deps): bump protobuf to 7.35.1 #400 to work around grpcio-tools' pre-release-only protobuf 7 support) no longer resolves.

All changes are to transitive dependencies. aiohttp and grpcio come in via the provider packages; cryptography via moto/aiobotocore in openfeature-provider-aws-ssm's dev group. The lockfile was regenerated with uv lock --upgrade-package <pkg>. Verified uv build, mypy, ruff, and the affected package test suites (flagd, aws-ssm) on the patched versions.

Dependabot Alerts Resolved

Alert Package Severity Fix
#34 aiohttp medium Bumped to 3.14.1 (Deserialization of Untrusted Data)
#35 aiohttp medium Bumped to 3.14.1 (cross-origin redirect with per-request cookies)
#36 aiohttp low Bumped to 3.14.1 (host-only cookies become domain cookies)
#37 aiohttp low Bumped to 3.14.1 (CRLF injection in multipart headers)
#38 aiohttp medium Bumped to 3.14.1 (unread compressed bodies bypass client_max_size)
#39 aiohttp low Bumped to 3.14.1 (payload resources not closed after mid-body disconnect)
#40 aiohttp medium Bumped to 3.14.1 (DigestAuthMiddleware leaks creds on cross-origin redirect)
#41 aiohttp medium Bumped to 3.14.1 (HTTP/1 pipelined requests queue without limit)
#42 aiohttp medium Bumped to 3.14.1 (incomplete websocket frames bypass memory limits)
#43 aiohttp low Bumped to 3.14.1 (TLS hostname override ignored on reused connections)
#44 aiohttp medium Bumped to 3.14.1 (C HTTP parser bypasses max_line_size)
#45 cryptography high Bumped to 49.0.0 (vulnerable OpenSSL in cryptography wheels)

@jonathannorris
jonathannorris requested review from a team as code owners June 8, 2026 14:37
@jonathannorris
jonathannorris marked this pull request as draft June 8, 2026 14:37

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates dependencies in the uv.lock file, upgrading aiohttp from 3.13.5 to 3.14.1 along with its corresponding wheels and a conditional dependency on typing-extensions. Additionally, openfeature-provider-flagd is upgraded from 0.4.1 to 0.5.0. As there are no review comments, no further feedback is provided.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@jonathannorris
jonathannorris requested a review from Copilot June 8, 2026 14:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.23%. Comparing base (cde03cc) to head (68992aa).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #399      +/-   ##
==========================================
+ Coverage   95.54%   96.23%   +0.69%     
==========================================
  Files          24       47      +23     
  Lines        1033     1754     +721     
==========================================
+ Hits          987     1688     +701     
- Misses         46       66      +20     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jonathannorris
jonathannorris marked this pull request as ready for review June 8, 2026 14:50
@jonathannorris
jonathannorris marked this pull request as draft June 15, 2026 14:13
@jonathannorris
jonathannorris marked this pull request as ready for review June 15, 2026 14:14
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The flagd provider’s Hatch protobuf build hook now requires protobuf 7.x and pins grpcio-tools to version 1.82.1, aligning build-time tooling with the configured runtime dependencies.

Changes

Protobuf tooling alignment

Layer / File(s) Summary
Update protobuf build dependencies
providers/openfeature-provider-flagd/pyproject.toml
The protobuf build hook changes its protobuf constraint to >=7.0.0,<8.0.0 and pins grpcio-tools to 1.82.1.

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

Possibly related PRs

Suggested reviewers: federicobond, aepfli, toddbaert

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: resolving Dependabot security alerts.
Description check ✅ Passed The description clearly relates to the changeset and describes the dependency/security updates.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

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

Comment @coderabbitai help to get the list of available commands.

@jonathannorris
jonathannorris marked this pull request as draft June 22, 2026 14:16
@jonathannorris
jonathannorris marked this pull request as ready for review June 22, 2026 14:30
@github-actions
github-actions Bot requested review from aepfli and federicobond July 6, 2026 14:37
- aiohttp 3.13.5 -> 3.14.1 (medium, alerts #34, #35)

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
…ntime

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
grpcio-tools 1.82+ dropped protobuf 6.x support and now requires
protobuf>=7.35.1,<8.0.0, so the isolated build hook's protobuf pin
must track the runtime protobuf constraint instead of staying on
~=6.0 (see #400 for why it was pinned there originally).

Signed-off-by: Jonathan Norris <jonathan.norris@dynatrace.com>
@jonathannorris
jonathannorris force-pushed the chore/dependabot-alerts branch from ec72952 to 68992aa Compare July 20, 2026 14:25
@jonathannorris
jonathannorris marked this pull request as draft July 27, 2026 14:07
@jonathannorris
jonathannorris marked this pull request as ready for review July 27, 2026 17:28

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@providers/openfeature-provider-flagd/pyproject.toml`:
- Around line 50-62: Align the runtime dependency constraints with
grpcio-tools==1.82.1 by raising the protobuf floor to >=7.35.1 and the grpcio
floor to >=1.82.1 in the corresponding runtime dependency declarations. Keep the
existing upper bounds and ensure the build-tool and runtime versions remain
compatible.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0c5fd530-a96a-4abb-961c-5ddb8a9411bc

📥 Commits

Reviewing files that changed from the base of the PR and between cde03cc and 68992aa.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (1)
  • providers/openfeature-provider-flagd/pyproject.toml

Comment on lines +50 to +62
# protobuf here used to stay pinned to ~=6.0 because grpcio-tools only
# supported protobuf 7 in pre-releases (see #400). grpcio-tools >=1.82
# now requires protobuf>=7.35.1,<8.0.0, so this is aligned with the
# runtime `protobuf` dependency above instead.
"protobuf>=7.0.0,<8.0.0",
"hatch-protobuf",
"mypy-protobuf~=3.0",
# Pin grpcio-tools to the same version as the runtime `grpcio` dependency
# above. hatch-protobuf otherwise resolves grpcio-tools unpinned in an
# isolated build environment, so newer grpcio-tools releases can generate
# gRPC stubs that are incompatible with the pinned runtime grpcio,
# breaking mypy/import at build time.
"grpcio-tools==1.82.1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

python - <<'PY'
import json
import urllib.request

url = "https://pypi.org/pypi/grpcio-tools/1.82.1/json"
with urllib.request.urlopen(url) as response:
    metadata = json.load(response)

for requirement in metadata["info"].get("requires_dist", []):
    if requirement.lower().startswith("protobuf"):
        print(requirement)
PY

rg -n 'grpcio|protobuf|grpcio-tools' providers/openfeature-provider-flagd/pyproject.toml

Repository: open-feature/python-sdk-contrib

Length of output: 2798


🌐 Web query:

PyPI grpcio-tools 1.82.1 requires dist protobuf grpcio

💡 Result:

The Python package grpcio-tools version 1.82.1, released on July 8, 2026, has specific dependency requirements enforced via PyPI [1][2][3]. To install or use this version, the following packages must be met: - protobuf: Version >= 7.35.1 and < 8.0.0 [1]. (Note: This reflects an update in this release, which raised the lower bound from 6.33.5 [2][3].) - grpcio: Version >= 1.82.1 [1]. - setuptools: Version >= 77.0.1 [1]. These constraints ensure compatibility with the gRPC Core 1.82.1 release [2][3]. If you are encountering dependency resolution errors, ensure that your environment's package manager is satisfying these specific version ranges [1].

Citations:


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '--- pyproject dependency snippets ---\n'
rg -n -C 3 '"grpcio|protobuf|grpcio-tools|hatch-protobuf|mypy-protobuf' providers/openfeature-provider-flagd/pyproject.toml || true

printf '\n--- check generated proto imports using local package metadata text ---\n'
# Read-only scan; print Python import-like snippets around generated proto code if present.
fd -a '\.py$' providers/openfeature-provider-flagd | sed 's#^\./##' | while read -r file; do
  if rg -q 'protobuf|grpc|protobuf_reflection|google/protobuf' "$file"; then
    printf '\nFILE: %s\n' "$file"
    rg -n -C 2 'from google|import google|protobuf|grpc' "$file" | head -80
  fi
done

Repository: open-feature/python-sdk-contrib

Length of output: 260


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- pyproject dependency snippets ---'
rg -n -C 3 '"grpcio|protobuf|grpcio-tools|hatch-protobuf|mypy-protobuf' providers/openfeature-provider-flagd/pyproject.toml || true

printf '%s\n' ''
printf '%s\n' '--- check generated proto imports using local package metadata text ---'
fd -a '\.py$' providers/openfeature-provider-flagd | sed 's#^\./##' | while read -r file; do
  if rg -q 'protobuf|grpc|protobuf_reflection|google/protobuf' "$file"; then
    printf '%s\n' ""
    printf '%s\n' "FILE: $file"
    rg -n -C 2 'from google|import google|protobuf|grpc' "$file" | head -80
  fi
done

Repository: open-feature/python-sdk-contrib

Length of output: 13398


Align the runtime dependency floors with the build toolchain.

grpcio-tools==1.82.1 requires protobuf >=7.35.1,<8.0.0 and grpcio >=1.82.1, but the runtime metadata still allows protobuf >=7.0.0,<8.0.0 and grpcio >=1.81.0. Either raise/pin those runtime floors, or verify generated flagd gRPC modules import and pass tests across every allowed metadata version.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@providers/openfeature-provider-flagd/pyproject.toml` around lines 50 - 62,
Align the runtime dependency constraints with grpcio-tools==1.82.1 by raising
the protobuf floor to >=7.35.1 and the grpcio floor to >=1.82.1 in the
corresponding runtime dependency declarations. Keep the existing upper bounds
and ensure the build-tool and runtime versions remain compatible.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants