| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
📝 Walkthrough
WalkthroughWorkflows removed hardcoded PYTHON_VERSION values and either stop passing python-version to actions/setup-python or read the version from a new .python-version file; .python-version was added to the repo and removed from .gitignore. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches 🧪 Generate unit tests (beta)
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. ❤️ ShareComment @coderabbitai help to get the list of available commands and usage tips. |
Sorry, something went wrong.
| ## Summary | ||
|
|
||
| Check \`scripts/update_lib\` for tools. As a note, the current latest Python version is \`${{ env.PYTHON_VERSION }}\`. | ||
| Check \`scripts/update_lib\` for tools. As a note, the current latest Python version is \`${{ steps.cpython-version.outputs.version }}\`. |
| <!-- | ||
| Quick guideline for Copilot: | ||
| # Clone \`github.com/python/cpython\` \`${{ env.PYTHON_VERSION }}\` tag under RustPython working dir with depth 1 option; never 3.14.0 or 3.14.1 or 3.14.2 | ||
| # Clone \`github.com/python/cpython\` \`${{ steps.cpython-version.outputs.version }}\` tag under RustPython working dir with depth 1 option; never 3.14.0 or 3.14.1 or 3.14.2 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agentsVerify each finding against the current code and only fix it if needed. Inline comments: In @.github/workflows/update-libs-status.yaml: - Around line 33-37: The workflow step "Get target CPython version" fails because it runs cat .python-version from the repository root while the code is checked out under rustpython/, so update the command that sets version=$(cat .python-version) to read the correct path (e.g., version=$(cat rustpython/.python-version) or use the GitHub workspace variable) in that step so the file is found and the CPython version is emitted to GITHUB_OUTPUT; change the occurrence of ".python-version" in that step to "rustpython/.python-version" (or equivalent workspace-aware path).
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: c5f5c75a-6f14-46cd-a80e-6f989adb2d5e
📥 CommitsReviewing files that changed from the base of the PR and between d5a90e5 and a96644a.
📒 Files selected for processing (7)
Sorry, something went wrong.
There was a problem hiding this comment.
.github/workflows/update-libs-status.yaml (1)🤖 Prompt for all review comments with AI agents33-37: ⚠️ Potential issue | 🟠 Major
Template expansion in heredoc is still shell-injection prone.
Line 65 and Line 72 insert ${{ steps.cpython-version.outputs.version }} into an unquoted heredoc (<<EOF). If .python-version ever contains shell substitution text, bash will evaluate it while rendering the heredoc body. Please validate the version format at source (Line 33-37) before exporting it.
🔧 Minimal hardening patch- name: Get target CPython version id: cpython-version run: | - version=$(cat rustpython/.python-version) + version="$(tr -d '\r\n' < rustpython/.python-version)" + if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Invalid .python-version: $version" >&2 + exit 1 + fi echo "version=${version}" >> "$GITHUB_OUTPUT"In bash, does a here-document with an unquoted delimiter (<<EOF) perform command substitution on content like $(...)?Also applies to: 65-72
🤖 Prompt for AI AgentsVerify each finding against the current code and only fix it if needed. In @.github/workflows/update-libs-status.yaml around lines 33 - 37, The step with id "cpython-version" currently reads rustpython/.python-version into the variable "version" and writes it to GITHUB_OUTPUT without validation; validate/sanitize "version" before exporting (e.g., allow only a strict pattern such as digits and dots or semver characters), reject or normalize any input containing shell metacharacters like $, `, ;, |, or backslashes, and only echo the validated value to "$GITHUB_OUTPUT"; keep the step id "cpython-version" and the "version" variable but add a regex check and fail or sanitize on mismatch so downstream uses (including unquoted heredocs) cannot trigger shell substitution.
Verify each finding against the current code and only fix it if needed. Duplicate comments: In @.github/workflows/update-libs-status.yaml: - Around line 33-37: The step with id "cpython-version" currently reads rustpython/.python-version into the variable "version" and writes it to GITHUB_OUTPUT without validation; validate/sanitize "version" before exporting (e.g., allow only a strict pattern such as digits and dots or semver characters), reject or normalize any input containing shell metacharacters like $, `, ;, |, or backslashes, and only echo the validated value to "$GITHUB_OUTPUT"; keep the step id "cpython-version" and the "version" variable but add a regex check and fail or sanitize on mismatch so downstream uses (including unquoted heredocs) cannot trigger shell substitution.
Configuration used: Path: .coderabbit.yml
Review profile: CHILL
Plan: Pro
Run ID: 8295493e-fa96-47c0-8098-abc00c54e769
📥 CommitsReviewing files that changed from the base of the PR and between a96644a and b6b006e.
📒 Files selected for processing (1)
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
fix #7570
Summary by CodeRabbit