← Back to Pull requests

fix(security): clear the remaining code scanning and Dependabot alerts #6269

Closed
unknown closed this pull request without merging on Nov 20, 2026 02:04 UTC
View on GitHub
unknown unknown commented on Nov 18, 2026 04:12 UTC
Author

<!--
Please make sure you have read and understood the contributing guidelines;
https://github.com/fluid-cloudnative/fluid/blob/master/CONTRIBUTING.md-->

Ⅰ. Describe what this PR does

Follow-up to #6257. It fixes the alerts still open on the Security page, including the ones under the sdk/python submodule now that fluid-cloudnative/fluid-client-python#12 has merged. One commit per area:

| Commit | Change | Alerts |
|---|---|---|
| test(e2e): | In the Mooncake e2e image lock, bump aiohttp 3.14.3 → 3.14.5 together with yarl 1.24.5 → 1.25.1. This replaces Dependabot's #6212, which bumps aiohttp alone and can never build: aiohttp ≥ 3.14.4 requires yarl>=1.25.1, so the hash-locked install fails with ResolutionImpossible. | Dependabot 82–101 (17 aiohttp advisories) |
| samples(vineyard): | Bump scikit-learn 1.4.0 → 1.7.2 in the vineyard sample lock. 1.7.x is the newest series that still supports the image's Python 3.10. The new lock from #6257 is what made this pin visible to Dependabot. Replaces #6260, which leaves the header's regeneration command at 1.4.0. | Dependabot 102 (CVE-2024-5206) |
| fix(scripts): | hack/sdk/post-gen.py now only accepts the SDK directory that gen-sdk.sh generates (sdk/python) and continues with that known path. SonarCloud did not accept the os.path.commonpath check from #6257 as a sanitizer. This uses the same allow-list approach that cleared the mergeByTOC.py alerts. | Code scanning 1481, 1482 |
| chore(sdk): | Bump the sdk/python submodule from e089b77 to b06de4e8, the merge commit of fluid-cloudnative/fluid-client-python#12. That PR pins the release workflow's actions to commit SHAs, and installs its build tooling from a hash-locked file with --only-binary :all: --require-hashes. It also hardens the examples: COPY instead of ADD, a non-root user, --save-model-path confined to /data, torch.load(weights_only=True), a loopback --dist-url default, and a seeded train_test_split. | Code scanning 1490–1497, 1502, 1504, 1513–1515, 1551 (14) |

Not in this PR:

  • Dependabot 43 and 70 (k8s.io/kubernetes v1.29.15). Both fixes are in server components Fluid neither builds nor runs:

  • - CVE-2025-5187 is in kube-apiserver's NodeRestriction admission plugin (kubernetes/kubernetes#133471).
    - CVE-2025-13281 is in kube-controller-manager's in-tree Portworx volume plugin (kubernetes/kubernetes#135525).
    - Fluid compiles only 8 k8s.io/kubernetes packages: pkg/api/v1/pod, pkg/apis/core, pkg/features, pkg/fieldpath, pkg/registry/core/service/{allocator,portallocator} and pkg/util/{hash,slice}.
    - govulncheck lists them only at module level, because the Go vuln DB entries (GO-2025-3915, GO-2025-4240) name no affected packages.
    - These alerts are dismissed as "vulnerable code not used". Moving the k8s libraries off 1.29 is tracked separately in #5392.
  • Code scanning 1489, 1498 and 1499 under sdk/python. These are accepted risks and were dismissed earlier, so the bump doesn't change them.
  • Ⅱ. Does this pull request fix one issue?


    <!--If so, add "fixes #xxxx" so that the issue will be closed when this PR is merged (for example, "fixes #15" to close Issue #15). Otherwise, add "NONE" -->
    NONE

    Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.

    No new test cases. These are lock-file, helper-script and submodule changes. kind-e2e builds the Mooncake e2e image from the updated lock and runs the Mooncake suite, so it covers the aiohttp/yarl bump. CI here doesn't check out submodules, so the sdk/python bump was validated in the upstream PR. All the changes are verified by the local checks below.

    Ⅳ. Describe how to verify it

    Commands I ran locally, with results:

  • pip install --dry-run --ignore-installed --only-binary=:all: --require-hashes --platform manylinux…_x86_64 --python-version 3.12 --implementation cp --abi cp312 -r test/gha-e2e/mooncake/image/requirements.txt: resolves 17 packages.

  • pip download --no-deps --only-binary=:all: --require-hashes with the same platform flags: all 17 wheels download and match their hashes.

  • - Both new hashes match PyPI's digests for the cp312 manylinux x86_64 wheels.
    - The same resolve with only aiohttp bumped reproduces #6212's ResolutionImpossible on yarl==1.24.5.
  • samples/vineyard/requirements.txt:

  • - Regenerated with uv pip compile preferring the existing pins. Only scikit-learn changed.
    - pip download --require-hashes --only-binary=:all: for cp310 on linux x86_64 and aarch64: all 27 wheels per architecture match.
    - On Python 3.10, I installed the locked set (except vineyard, which only ships Linux wheels) with --require-hashes. pip check is clean, and the sample's train_test_split → LinearRegression → joblib dump/load → mean_squared_error flow runs.
  • hack/sdk/post-gen.py:

  • - The gen-sdk.sh invocation (--python-sdk-path=sdk/python) on a fixture produces output byte-identical to master's script.
    - ./sdk/python, sdk/python/, the absolute path and sdk/../sdk/python are accepted. sdk, hack, ., ../, /tmp, an outside directory and a symlink escape are rejected. A missing argument is an argparse error.
    - pyflakes is clean.
  • sdk/python bump:

  • - b06de4e8 is fluid-client-python's master HEAD and the merge commit of #12. Its tree (309351d0) is identical to the PR head 94baaf22, and e089b77...b06de4e8 changes only that PR's 8 files.
    - On that content:
    - actionlint reports nothing on release.yml.
    - hadolint on the example Dockerfile goes from 1 finding (DL3020) to 0.
    - Both notebooks validate with nbformat.
    - pip install --only-binary :all: --require-hashes -r .github/build-requirements.txt then python -m build --no-isolation builds an sdist and a wheel on Python 3.12.
    - The three pinned action SHAs match their release tags.

    Ⅴ. Special notes for reviews

  • Once this merges, Dependabot should close #6212 and #6260 on its own as superseded.

  • post-gen.py used to accept any path inside the repository. It now accepts only sdk/python, the only value hack/sdk/gen-sdk.sh ever passes. If the SDK output path changes, PYTHON_SDK_DIRS needs updating with it.

  • SonarCloud's PR analysis only reports new issues and doesn't analyze submodule content as changed code. So it can't confirm before merge that 1481, 1482 and the sdk/python alerts are cleared. I'll check the code scanning alerts after the next master analysis.
  • Diff: 650 lines (+487 / -163) across 8 files Reviewer: cheyang Review duration: 2752m
    All Vouch review confidence checks passed
    Residual risk 0.33 = Change Risk (0.75) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.75 · 650 lines diff across 8 files
    0.75
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.075
    Real PR Conversation Timeline
    1 comments
    "Review active on #6269"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 75.2% (HIGH) · Higher = larger blast radius
    75.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 32.5% · Safe to merge
    32.5%