Repository navigation
fix CI add gitee token temporarily - #17263
Conversation
📝 WalkthroughWalkthroughThe CI workflows now configure OAuth2-based Git URL rewrites for ChangesGitee CI authentication
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Checkov (3.3.8).github/workflows/sep-tests.ymlTraceback (most recent call last): .github/workflows/tests.ymlTraceback (most recent call last): 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. Comment |
There was a problem hiding this comment.
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 @.github/workflows/sep-tests.yml:
- Line 241: Rotate and revoke the exposed token, then replace the literal
credentials in the git configuration commands at .github/workflows/sep-tests.yml
lines 241, 355, and 929, and .github/workflows/tests.yml lines 135, 229, and 673
with a GitHub secret. Use temporary, non-global Git configuration, clean it up
on exit, and provide an explicit unauthenticated or safe fallback for fork pull
requests where the secret is unavailable.
🪄 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
Run ID: 4952767b-e816-4713-8ddd-9aaced4b9f4f
📒 Files selected for processing (2)
.github/workflows/sep-tests.yml.github/workflows/tests.yml
| - name: Prepare Python test environment | ||
| if: steps.detect_changes.outputs.has_python_changes == 'true' | ||
| run: | | ||
| git config --global url."https://oauth2:[email protected]/".insteadOf "https://gitee.com/" |
There was a problem hiding this comment.
🔒 Security & Privacy | 🔴 Critical | 🏗️ Heavy lift
Remove the committed token and avoid global credential persistence.
The same credential is exposed in workflow source and stored globally on self-hosted runners. Rotate/revoke it immediately; use a GitHub secret, local temporary Git configuration, cleanup on exit, and an explicit fallback for fork PRs where secrets may be unavailable.
.github/workflows/sep-tests.yml#L241-L241: replace the literal token with secret-backed authentication..github/workflows/sep-tests.yml#L355-L355: replace the literal token with secret-backed authentication..github/workflows/sep-tests.yml#L929-L929: replace the literal token with secret-backed authentication..github/workflows/tests.yml#L135-L135: replace the literal token with secret-backed authentication..github/workflows/tests.yml#L229-L229: replace the literal token with secret-backed authentication..github/workflows/tests.yml#L673-L673: replace the literal token with secret-backed authentication.
📍 Affects 2 files
.github/workflows/sep-tests.yml#L241-L241(this comment).github/workflows/sep-tests.yml#L355-L355.github/workflows/sep-tests.yml#L929-L929.github/workflows/tests.yml#L135-L135.github/workflows/tests.yml#L229-L229.github/workflows/tests.yml#L673-L673
🤖 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 @.github/workflows/sep-tests.yml at line 241, Rotate and revoke the exposed
token, then replace the literal credentials in the git configuration commands at
.github/workflows/sep-tests.yml lines 241, 355, and 929, and
.github/workflows/tests.yml lines 135, 229, and 673 with a GitHub secret. Use
temporary, non-global Git configuration, clean it up on exit, and provide an
explicit unauthenticated or safe fallback for fork pull requests where the
secret is unavailable.
Summary
fix CI add gitee token temporarily