Skip to content

gitee add token - #17248

Closed
myf-bee wants to merge 1 commit into
infiniflow:mainfrom
myf-bee:fix-ci-add-token
Closed

myf-bee wants to merge 1 commit into
infiniflow:mainfrom
myf-bee:fix-ci-add-token

Conversation

@myf-bee

@myf-bee myf-bee commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

gitee add token

@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 22, 2026
@myf-bee myf-bee added ci Continue Integration and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jul 22, 2026
@coderabbitai

coderabbitai Bot commented Jul 22, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

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

Changes

Mirror-enabled nightly builds

Layer / File(s) Summary
Configure authenticated mirror builds
.github/workflows/sep-tests.yml, Dockerfile
The Infinity and Elasticsearch nightly jobs pass NEED_MIRROR=1, and the Dockerfile uses an OAuth2-authenticated Gitee URL for the mirror resource clone.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested labels: size:XS

Suggested reviewers: euvre

Poem

I’m a small rabbit hopping through the build,
Mirror paths now run as willed.
Gitee brings resources to the door,
Authenticated, ready to explore.
Nightly images rise with cheer—
A tidy change for tests to steer!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description only repeats the title and lacks the required summary and background context from the template. Expand the Summary with the problem being solved, why the Gitee token is needed, and the expected impact on builds or tests.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and refers to the Gitee token change reflected in the workflow and Dockerfile updates.
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.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between d5ff757 and a5b1c42.

📒 Files selected for processing (2)
  • .github/workflows/sep-tests.yml
  • Dockerfile

Comment thread Dockerfile
Comment on lines +55 to +56
#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; \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 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 Dockerfile

Repository: 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' . || true

Repository: 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 || true

Repository: 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

@myf-bee myf-bee added ci Continue Integration and removed ci Continue Integration labels Jul 22, 2026
This was referenced Jul 22, 2026
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.65%. Comparing base (6a85d1c) to head (a5b1c42).
⚠️ Report is 56 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@myf-bee myf-bee closed this Jul 23, 2026
@myf-bee
myf-bee deleted the fix-ci-add-token branch August 5, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant