Repository navigation
gitee add token - #17248
gitee add token#17248myf-bee wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughNightly Infinity and Elasticsearch Docker builds now enable the mirror path. When enabled, the Dockerfile clones the Infinity resource repository from Gitee using an authenticated URL. ChangesMirror-enabled nightly builds
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 `@Dockerfile`:
- Around line 55-56: Update the Dockerfile clone RUN step to consume the Gitee
OAuth2 credential through a BuildKit secret instead of embedding it in the
command, and remove the stale commented-out clone line. Ensure the secret is
only available during that build step and is not persisted in image layers or
metadata.
🪄 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: 27b491bd-1e87-49dc-82cf-1a34a53f6e48
📒 Files selected for processing (2)
.github/workflows/sep-tests.ymlDockerfile
| #git clone --depth 1 --single-branch https://gitee.com/infiniflow/resource /tmp/resource; \ | ||
| git clone --depth 1 --single-branch https://oauth2:[email protected]/infiniflow/resource /tmp/resource; \ |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Inspect the Dockerfile around the flagged lines and search for related workflow/secret handling.
git ls-files | rg '(^|/)Dockerfile$|\.yml$|\.yaml$' | sed -n '1,200p'
echo '--- Dockerfile excerpt ---'
cat -n Dockerfile | sed -n '45,70p'
echo '--- Gitee/resource references ---'
rg -n 'gitee\.com/infiniflow/resource|oauth2:|resource /tmp/resource|nightly' -S .Repository: infiniflow/ragflow
Length of output: 8642
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Map nearby structure if the Dockerfile is small enough; otherwise just inspect the relevant slice.
wc -l DockerfileRepository: infiniflow/ragflow
Length of output: 171
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Show any CI/workflow files that may feed build secrets into Docker build args.
fd -a '.*(workflow|ci).*\.ya?ml$|\.github/workflows' . || trueRepository: infiniflow/ragflow
Length of output: 156
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Narrow search for the exact line and any build-arg or secret usage around it.
rg -n -C 3 'oauth2:796df937ae36d0014a35aa8ab2b02609|gitee.com/infiniflow/resource|GITEE|BUILDKIT|secret' Dockerfile .github/workflows 2>/dev/null || trueRepository: infiniflow/ragflow
Length of output: 10629
Remove the Gitee token from the Dockerfile
The OAuth2 credential is committed in plaintext in this RUN step, so it can leak through source history or image metadata. Pass it in as a BuildKit secret and delete the stale commented-out clone line.
🤖 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 `@Dockerfile` around lines 55 - 56, Update the Dockerfile clone RUN step to
consume the Gitee OAuth2 credential through a BuildKit secret instead of
embedding it in the command, and remove the stale commented-out clone line.
Ensure the secret is only available during that build step and is not persisted
in image layers or metadata.
Source: Coding guidelines
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17248 +/- ##
==========================================
- Coverage 94.56% 90.65% -3.91%
==========================================
Files 10 10
Lines 717 717
Branches 118 118
==========================================
- Hits 678 650 -28
- Misses 25 39 +14
- Partials 14 28 +14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Summary
gitee add token