Skip to content

chore(deps): address Dependabot vulnerabilities#425

Open
freshtonic wants to merge 4 commits into
mainfrom
fix/dependabot-vulnerabilities
Open

chore(deps): address Dependabot vulnerabilities#425
freshtonic wants to merge 4 commits into
mainfrom
fix/dependabot-vulnerabilities

Conversation

@freshtonic

@freshtonic freshtonic commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

  • resolve all 32 currently open Dependabot alerts across Rust, Go, and Python manifests
  • update vulnerable Rust packages including Diesel, hickory-proto, rustls-webpki, rand, jsonwebtoken, and aws-lc-sys
  • update Go dependencies golang.org/x/crypto and github.com/jackc/pgx/v5
  • update pytest to the patched 9.x line and align pytest-asyncio

Verification

  • Rust: full workspace and all targets compile with cargo check --workspace --all-targets
  • Go: integration test binary compiles with GOTOOLCHAIN=auto go test -c
  • Python: poetry check --lock passes; pytest 9.1.1 collects and runs all 49 tests
  • Full Go/Python integration execution requires the local proxy/database; Python tests fail only because port 6432 is not running

Summary by CodeRabbit

  • Improvements

    • Improved authentication token processing and handling of malformed token headers.
    • Updated authentication components for compatibility with newer JWT libraries.
  • Testing

    • Refreshed Go and Python test tooling to newer supported versions.
    • Updated database and testing libraries used by integration tests for improved compatibility and reliability.

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-version: 0.52.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@freshtonic, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 32 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 81adb8f6-0e42-4986-87e9-aaa6201c3fc2

📥 Commits

Reviewing files that changed from the base of the PR and between 5391b63 and b0c1cac.

📒 Files selected for processing (1)
  • tests/integration/golang/Dockerfile
📝 Walkthrough

Walkthrough

Integration test dependencies are upgraded for Go and Python. The stack-auth JWT dependency is updated, and service-token and token claim decoding now use insecure claim extraction after header decoding.

Changes

Dependency and JWT decoding updates

Layer / File(s) Summary
Test dependency versions
tests/integration/golang/go.mod, tests/python/pyproject.toml
Go, pgx, testify, crypto, text, pytest, and pytest-asyncio version requirements are updated.
JWT library upgrade
vendor/stack-auth/Cargo.toml
jsonwebtoken is upgraded to 10.3.0 with the aws_lc_rs feature enabled.
JWT claim decoding paths
vendor/stack-auth/src/service_token.rs, vendor/stack-auth/src/token.rs
Service-token and regular token claim decoding use dangerous::insecure_decode after explicit header decoding, replacing custom validation-based decoding.

Estimated code review effort: 3 (Moderate) | ~20 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the dependency updates made to address Dependabot alerts.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dependabot-vulnerabilities

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.

@freshtonic freshtonic changed the title chore(deps): address x/crypto Dependabot vulnerabilities chore(deps): address Dependabot vulnerabilities Jul 22, 2026

@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.

🧹 Nitpick comments (1)
vendor/stack-auth/src/service_token.rs (1)

146-167: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Extract shared JWT insecure-decode helper to remove duplication.

service_token.rs::try_decode and token.rs::decode_claims both reimplement the same "call decode_header for a specific error message, then call dangerous::insecure_decode for claims, then map errors" sequence, with slightly divergent header-error wording ("failed to decode JWT header" vs "invalid JWT header").

  • vendor/stack-auth/src/service_token.rs#L146-L167: extract the decode_header→insecure_decode→error-mapping sequence into a shared internal helper (e.g. fn insecure_decode_jwt<T: DeserializeOwned>(token: &str) -> Result<TokenData<T>, String>) and call it here.
  • vendor/stack-auth/src/token.rs#L172-L180: call the same shared helper here instead of re-implementing the sequence, standardizing the header-error message text with the service_token.rs variant.
♻️ Sketch of a shared helper
fn insecure_decode_jwt<T: serde::de::DeserializeOwned>(
    token_str: &str,
) -> Result<jsonwebtoken::TokenData<T>, String> {
    use jsonwebtoken::dangerous::insecure_decode;

    jsonwebtoken::decode_header(token_str)
        .map_err(|e| format!("failed to decode JWT header: {e}"))?;
    insecure_decode(token_str).map_err(|e| format!("failed to decode JWT claims: {e}"))
}
🤖 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 `@vendor/stack-auth/src/service_token.rs` around lines 146 - 167, Extract the
duplicated JWT header validation and insecure claims decoding into a shared
internal generic helper, such as insecure_decode_jwt, using DeserializeOwned and
standardized “failed to decode JWT header/claims” errors. Update
service_token.rs try_decode and token.rs decode_claims to call this helper,
preserving their existing claim-processing behavior; apply the changes at
vendor/stack-auth/src/service_token.rs lines 146-167 and
vendor/stack-auth/src/token.rs lines 172-180.
🤖 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.

Nitpick comments:
In `@vendor/stack-auth/src/service_token.rs`:
- Around line 146-167: Extract the duplicated JWT header validation and insecure
claims decoding into a shared internal generic helper, such as
insecure_decode_jwt, using DeserializeOwned and standardized “failed to decode
JWT header/claims” errors. Update service_token.rs try_decode and token.rs
decode_claims to call this helper, preserving their existing claim-processing
behavior; apply the changes at vendor/stack-auth/src/service_token.rs lines
146-167 and vendor/stack-auth/src/token.rs lines 172-180.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c072b59d-e81d-4ae7-be94-8c6ff2e48349

📥 Commits

Reviewing files that changed from the base of the PR and between 6a2db82 and 5391b63.

⛔ Files ignored due to path filters (4)
  • Cargo.lock is excluded by !**/*.lock
  • tests/integration/golang/go.sum is excluded by !**/*.sum
  • tests/python/poetry.lock is excluded by !**/*.lock
  • vendor/stack-auth/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • tests/integration/golang/go.mod
  • tests/python/pyproject.toml
  • vendor/stack-auth/Cargo.toml
  • vendor/stack-auth/src/service_token.rs
  • vendor/stack-auth/src/token.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/integration/golang/go.mod

@freshtonic
freshtonic requested a review from tobyhede July 22, 2026 13:05
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.

1 participant