Skip to content

Fix gitee add env token - #17266

Closed
myf-bee wants to merge 3 commits into
infiniflow:mainfrom
myf-bee:fix-gitee-add-token
Closed

myf-bee wants to merge 3 commits into
infiniflow:mainfrom
myf-bee:fix-gitee-add-token

Conversation

@myf-bee

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

Copy link
Copy Markdown
Collaborator

Summary

Fix gitee add env token

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

coderabbitai Bot commented Jul 23, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The CI workflow now runs PR checks through pull_request_target, preserves existing gating and diff detection, permits PR checkouts, and supplies GITEE_TOKEN to Infinity and Elasticsearch nightly builds and test environments.

Changes

CI event and mirror authentication

Layer / File(s) Summary
pull_request_target event handling
.github/workflows/sep-tests.yml
Triggers, job conditions, checkout steps, preflight branching, and changed-file detection support pull_request_target alongside pull_request.
Authenticated nightly mirror builds
.github/workflows/sep-tests.yml
Infinity and Elasticsearch Docker builds mount GITEE_TOKEN through BuildKit, set NEED_MIRROR=1, clean up temporary token files, and use the token for Gitee URL rewriting.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant DockerBuild
  participant Gitee
  GitHubActions->>DockerBuild: pass GITEE_TOKEN as a BuildKit secret
  DockerBuild->>Gitee: fetch mirrored build resources with NEED_MIRROR=1
  GitHubActions->>Gitee: rewrite test-environment git URLs with GITEE_TOKEN
Loading

Possibly related PRs

Suggested reviewers: qinling0210, yuzhichang

Poem

I’m a rabbit in the workflow line,
Pull requests hop through gates just fine.
Tokens hide in builds below,
Mirror paths now neatly flow.
CI carrots grow tonight! 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the main change by describing the Gitee token fix in the workflow.
Description check ✅ Passed The description includes the required Summary section and states the PR's purpose, though it is brief.
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.

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

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


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.

@myf-bee myf-bee added the ci Continue Integration label Jul 23, 2026

@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: 3

🤖 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:
- Around line 351-359: Ensure temporary Gitee token files are cleaned up on
failed builds by installing an EXIT trap immediately after each GITEE_TOKEN_FILE
mktemp assignment: update .github/workflows/sep-tests.yml lines 351-359 and
930-938 with the same cleanup trap, while retaining the existing explicit rm
cleanup.
- Around line 17-20: Replace the pull_request_target trigger in the workflow
with pull_request so fork PR code runs without repository secrets, preserving
the synchronize and labeled activity types. Remove or revise any dependent
secret usage, including GITEE_TOKEN, so the workflow remains safe when checking
out and executing PR-controlled code.
- Line 245: Replace the global Git configuration used at all three sites in
.github/workflows/sep-tests.yml (lines 245, 364, and 943) with one temporary
job-scoped GIT_CONFIG_GLOBAL file, and remove that file after the corresponding
uv command completes. Ensure each site uses the temporary config for its Git
access and does not persist the token in the runner’s user-level configuration.
🪄 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 Plus

Run ID: bee4ae7c-ed99-4d83-9a6b-e6c451eccf6a

📥 Commits

Reviewing files that changed from the base of the PR and between f7446ca and d88c2d3.

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

Comment on lines +17 to 20
# We use pull_request_target so that GITEE_TOKEN (and other repo secrets) are available when building
# ragflow:nightly from a fork PR, while still running the full test suite on PRs labeled with `ci`.
pull_request_target:
types: [synchronize, labeled]

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 | 🔴 Critical | ⚡ Quick win

Do not execute fork PR code under pull_request_target.

This event grants repository secrets, but the workflow checks out the PR merge ref (Lines 58 and 287) and executes PR-controlled Dockerfiles, hooks, package setup, and tests on a self-hosted runner. Once a PR has the ci label, an attacker can push a later commit and exfiltrate GITEE_TOKEN from the Git config or BuildKit secret mount. Run untrusted PR CI under pull_request without secrets; reserve pull_request_target for trusted base-repository metadata or an explicitly trusted, immutable ref.

🤖 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 around lines 17 - 20, Replace the
pull_request_target trigger in the workflow with pull_request so fork PR code
runs without repository secrets, preserving the synchronize and labeled activity
types. Remove or revise any dependent secret usage, including GITEE_TOKEN, so
the workflow remains safe when checking out and executing PR-controlled code.

if: steps.detect_changes.outputs.has_python_changes == 'true'
run: |
git config --global url."https://oauth2:796df937ae36d0014a35aa8ab2b02609@gitee.com/".insteadOf "https://gitee.com/"
git config --global url."https://oauth2:${{ secrets.GITEE_TOKEN }}@gitee.com/".insteadOf "https://gitee.com/"

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

Avoid persisting the token in the runner’s global Git config. git config --global writes the credential to the runner user’s ~/.gitconfig without cleanup, allowing later jobs on this self-hosted runner to read it.

  • .github/workflows/sep-tests.yml#L245-L245: use a temporary GIT_CONFIG_GLOBAL and remove it after uv completes.
  • .github/workflows/sep-tests.yml#L364-L364: use the same temporary, job-scoped Git config.
  • .github/workflows/sep-tests.yml#L943-L943: use the same temporary, job-scoped Git config.
📍 Affects 1 file
  • .github/workflows/sep-tests.yml#L245-L245 (this comment)
  • .github/workflows/sep-tests.yml#L364-L364
  • .github/workflows/sep-tests.yml#L943-L943
🤖 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 245, Replace the global Git
configuration used at all three sites in .github/workflows/sep-tests.yml (lines
245, 364, and 943) with one temporary job-scoped GIT_CONFIG_GLOBAL file, and
remove that file after the corresponding uv command completes. Ensure each site
uses the temporary config for its Git access and does not persist the token in
the runner’s user-level configuration.

Comment on lines +351 to +359
GITEE_TOKEN_FILE="$(mktemp)"
printf '%s' '${{ secrets.GITEE_TOKEN }}' > "${GITEE_TOKEN_FILE}"
(
flock -w 10800 9 || { echo "Timed out waiting for the shared Docker build slot" >&2; exit 1; }
echo "Acquired Docker build slot for ${DOC_ENGINE}/${API_PROXY_SCHEME}"
##sudo docker pull ubuntu:24.04
sudo DOCKER_BUILDKIT=1 docker build --build-arg NEED_MIRROR=0 --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile -t ${RAGFLOW_IMAGE} .
sudo DOCKER_BUILDKIT=1 docker build --build-arg NEED_MIRROR=1 --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY} --secret id=gitee_token,src=${GITEE_TOKEN_FILE} -f Dockerfile -t ${RAGFLOW_IMAGE} .
) 9>"${BUILD_LOCK_FILE}"
rm -f "${GITEE_TOKEN_FILE}"

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

Clean up token files on failed builds. With set -e, a failed docker build exits before the following rm, leaving a readable credential file on the persistent runner. Install an EXIT trap immediately after mktemp.

  • .github/workflows/sep-tests.yml#L351-L359: add trap 'rm -f "$GITEE_TOKEN_FILE"' EXIT.
  • .github/workflows/sep-tests.yml#L930-L938: add the same failure-safe cleanup trap.
📍 Affects 1 file
  • .github/workflows/sep-tests.yml#L351-L359 (this comment)
  • .github/workflows/sep-tests.yml#L930-L938
🤖 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 around lines 351 - 359, Ensure temporary
Gitee token files are cleaned up on failed builds by installing an EXIT trap
immediately after each GITEE_TOKEN_FILE mktemp assignment: update
.github/workflows/sep-tests.yml lines 351-359 and 930-938 with the same cleanup
trap, while retaining the existing explicit rm cleanup.

@myf-bee myf-bee added ci Continue Integration and removed ci Continue Integration labels Jul 23, 2026
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 23, 2026

@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: 3

🧹 Nitpick comments (1)
internal/admin/router.go (1)

14-15: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Remove CI marker comments from source files. These comments do not document runtime behavior and should not remain in production or test source. Preserve only the meaningful Vite explanation on Line 9 and remove its trailing marker text.

  • internal/admin/router.go#L14-L15: restore the header and remove both CI marker lines.
  • internal/cli/admin_parser.go#L15-L15: delete the marker comment.
  • internal/cli/benchmark.go#L15-L15: delete the marker comment.
  • internal/cli/cli_test.go#L15-L15: delete the marker comment.
  • internal/common/constants_test.go#L15-L15: delete the marker comment.
  • mcp/client/streamable_http_client.py#L14-L14: remove the marker suffix.
  • memory/utils/infinity_conn.py#L15-L15: delete the marker comment.
  • ragflow_deps/download_deps.py#L31-L31: restore the original header wording.
  • test/testcases/test_http_api/test_chat_assistant_management/test_chat_sdk_routes_unit.py#L14-L14: remove the marker suffix.
  • test/unit_test/api/apps/restful_apis/test_agentbots_access_control.py#L14-L14: remove the marker suffix.
  • web/tailwind.config.js#L1-L1: delete the marker comment.
  • web/vite.config.ts#L9-L9: remove only test web ci 2.

As per coding guidelines, remove stale documentation and unnecessary compatibility or marker-only surfaces.

🤖 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 `@internal/admin/router.go` around lines 14 - 15, Remove the CI marker comments
while preserving meaningful headers and explanations: in
internal/admin/router.go lines 14-15 restore the header and remove both marker
lines; delete the marker comments at internal/cli/admin_parser.go:15,
internal/cli/benchmark.go:15, internal/cli/cli_test.go:15,
internal/common/constants_test.go:15, memory/utils/infinity_conn.py:15,
web/tailwind.config.js:1; remove marker suffixes at
mcp/client/streamable_http_client.py:14,
test/testcases/test_http_api/test_chat_assistant_management/test_chat_sdk_routes_unit.py:14,
and test/unit_test/api/apps/restful_apis/test_agentbots_access_control.py:14;
restore the original header wording at ragflow_deps/download_deps.py:31; and at
web/vite.config.ts:9 remove only the specified CI marker text while retaining
the Vite explanation.

Source: Coding guidelines

🤖 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/tests.yml:
- Around line 222-230: Update the workflow’s Docker build shell block to
register cleanup for the temporary file immediately after creating it, so the
token file is removed on success, failure, or cancellation. Apply the same
change to both affected build blocks, preserving the existing token creation and
build commands while replacing the success-only rm flow with exit-safe cleanup.
- Around line 222-230: Restrict secret-bearing Docker builds to trusted refs and
contexts: in .github/workflows/tests.yml lines 222-230 and 671-679, remove
GITEE_TOKEN from PR-controlled builds and ensure those builds cannot pass it to
Dockerfile instructions; in Dockerfile lines 53-65, consume the token only when
the build context is trusted and never from an untrusted pull request.

In `@internal/admin/router.go`:
- Line 14: Restore the exact Apache license header boilerplate at
internal/admin/router.go:14-14, mcp/client/streamable_http_client.py:14-14,
test/testcases/test_http_api/test_chat_assistant_management/test_chat_sdk_routes_unit.py:14-14,
and test/unit_test/api/apps/restful_apis/test_agentbots_access_control.py:14-14
by removing all appended test or CI text; make no other changes.

---

Nitpick comments:
In `@internal/admin/router.go`:
- Around line 14-15: Remove the CI marker comments while preserving meaningful
headers and explanations: in internal/admin/router.go lines 14-15 restore the
header and remove both marker lines; delete the marker comments at
internal/cli/admin_parser.go:15, internal/cli/benchmark.go:15,
internal/cli/cli_test.go:15, internal/common/constants_test.go:15,
memory/utils/infinity_conn.py:15, web/tailwind.config.js:1; remove marker
suffixes at mcp/client/streamable_http_client.py:14,
test/testcases/test_http_api/test_chat_assistant_management/test_chat_sdk_routes_unit.py:14,
and test/unit_test/api/apps/restful_apis/test_agentbots_access_control.py:14;
restore the original header wording at ragflow_deps/download_deps.py:31; and at
web/vite.config.ts:9 remove only the specified CI marker text while retaining
the Vite explanation.
🪄 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 Plus

Run ID: e9d4d7c0-266a-45c5-9e51-9bf88cd9be86

📥 Commits

Reviewing files that changed from the base of the PR and between d88c2d3 and 8f1c68f.

📒 Files selected for processing (15)
  • .github/workflows/sep-tests.yml
  • .github/workflows/tests.yml
  • Dockerfile
  • internal/admin/router.go
  • internal/cli/admin_parser.go
  • internal/cli/benchmark.go
  • internal/cli/cli_test.go
  • internal/common/constants_test.go
  • mcp/client/streamable_http_client.py
  • memory/utils/infinity_conn.py
  • ragflow_deps/download_deps.py
  • test/testcases/test_http_api/test_chat_assistant_management/test_chat_sdk_routes_unit.py
  • test/unit_test/api/apps/restful_apis/test_agentbots_access_control.py
  • web/tailwind.config.js
  • web/vite.config.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/sep-tests.yml

Comment thread .github/workflows/tests.yml Outdated
Comment on lines +222 to +230
env:
GITEE_TOKEN: ${{ secrets.GITEE_TOKEN }}
run: |
set -euo pipefail
sudo docker pull ubuntu:24.04
sudo DOCKER_BUILDKIT=1 docker build --build-arg NEED_MIRROR=1 --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile -t ${RAGFLOW_IMAGE} .
_gitee_secret=$(mktemp)
printf '%s' "${GITEE_TOKEN}" > "${_gitee_secret}"
sudo DOCKER_BUILDKIT=1 docker build --secret id=gitee_token,src="${_gitee_secret}" --build-arg NEED_MIRROR=1 --build-arg HTTPS_PROXY=${HTTPS_PROXY} --build-arg HTTP_PROXY=${HTTP_PROXY} -f Dockerfile -t ${RAGFLOW_IMAGE} .
rm -f "${_gitee_secret}"

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

Clean up the temporary token file on every exit path.

rm -f runs only after a successful build. A failed or cancelled build can leave the plaintext token on the persistent self-hosted runner.

Proposed cleanup
           _gitee_secret=$(mktemp)
+          trap 'rm -f -- "${_gitee_secret}"' EXIT
           printf '%s' "${GITEE_TOKEN}" > "${_gitee_secret}"
           sudo DOCKER_BUILDKIT=1 docker build ...
-          rm -f "${_gitee_secret}"

Also applies to: 671-679

🤖 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/tests.yml around lines 222 - 230, Update the workflow’s
Docker build shell block to register cleanup for the temporary file immediately
after creating it, so the token file is removed on success, failure, or
cancellation. Apply the same change to both affected build blocks, preserving
the existing token creation and build commands while replacing the success-only
rm flow with exit-safe cleanup.

🔒 Security & Privacy | 🔴 Critical | 🏗️ Heavy lift

The Gitee token crosses an untrusted PR build boundary.

pull_request_target checks out the PR merge ref and then supplies GITEE_TOKEN to Dockerfile instructions controlled by that PR. Keep secret-bearing builds on trusted refs/contexts only.

  • .github/workflows/tests.yml#L222-L230: remove GITEE_TOKEN from builds that can execute PR-controlled Dockerfiles.
  • .github/workflows/tests.yml#L671-L679: apply the same trusted-context restriction to the Elasticsearch build.
  • Dockerfile#L53-L65: consume the token only from a Dockerfile/context that is not supplied by an untrusted pull request.
📍 Affects 2 files
  • .github/workflows/tests.yml#L222-L230 (this comment)
  • .github/workflows/tests.yml#L671-L679
  • Dockerfile#L53-L65
🤖 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/tests.yml around lines 222 - 230, Restrict secret-bearing
Docker builds to trusted refs and contexts: in .github/workflows/tests.yml lines
222-230 and 671-679, remove GITEE_TOKEN from PR-controlled builds and ensure
those builds cannot pass it to Dockerfile instructions; in Dockerfile lines
53-65, consume the token only when the build context is trusted and never from
an untrusted pull request.

Comment thread internal/admin/router.go Outdated
// See the License for the specific language governing permissions and
// limitations under the License.
//
// limitations under the License. ci test 7 8

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 | 🟡 Minor | ⚡ Quick win

Restore the exact Apache license headers. Do not append test or CI text to the “limitations under the License” line; keep legal boilerplate unchanged to avoid compliance ambiguity.

  • internal/admin/router.go#L14-L14: restore the original Apache header line.
  • mcp/client/streamable_http_client.py#L14-L14: remove test ci.
  • test/testcases/test_http_api/test_chat_assistant_management/test_chat_sdk_routes_unit.py#L14-L14: remove teset ci all.
  • test/unit_test/api/apps/restful_apis/test_agentbots_access_control.py#L14-L14: remove test ci unit_test.

As per coding guidelines, remove stale documentation and preserve comments aligned with the current runtime path.

📍 Affects 4 files
  • internal/admin/router.go#L14-L14 (this comment)
  • mcp/client/streamable_http_client.py#L14-L14
  • test/testcases/test_http_api/test_chat_assistant_management/test_chat_sdk_routes_unit.py#L14-L14
  • test/unit_test/api/apps/restful_apis/test_agentbots_access_control.py#L14-L14
🤖 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 `@internal/admin/router.go` at line 14, Restore the exact Apache license header
boilerplate at internal/admin/router.go:14-14,
mcp/client/streamable_http_client.py:14-14,
test/testcases/test_http_api/test_chat_assistant_management/test_chat_sdk_routes_unit.py:14-14,
and test/unit_test/api/apps/restful_apis/test_agentbots_access_control.py:14-14
by removing all appended test or CI text; make no other changes.

Source: Coding guidelines

@myf-bee
myf-bee force-pushed the fix-gitee-add-token branch from 8f1c68f to fc0a6c9 Compare July 23, 2026 08:03
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jul 23, 2026

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/sep-tests.yml (1)

284-291: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Disable checkout credential persistence.

actions/checkout@v6 persists credentials by default, so set persist-credentials: false in both checkout steps unless later git operations inside PR_NUMBER workflows require the token.

🤖 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 around lines 284 - 291, Disable credential
persistence in both checkout steps by adding the checkout action’s
persist-credentials setting as false. Apply this consistently to both checkout
configurations, while preserving the existing behavior only if later git
operations in PR_NUMBER workflows explicitly require the token.

Source: Linters/SAST tools

🤖 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 61: Remove the unsupported allow-unsafe-pr-checkout input from all
actions/checkout@v6 configurations in the workflow, including the occurrences
near lines 61, 291, and 871. Keep the remaining checkout settings unchanged.

---

Outside diff comments:
In @.github/workflows/sep-tests.yml:
- Around line 284-291: Disable credential persistence in both checkout steps by
adding the checkout action’s persist-credentials setting as false. Apply this
consistently to both checkout configurations, while preserving the existing
behavior only if later git operations in PR_NUMBER workflows explicitly require
the token.
🪄 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 Plus

Run ID: f4258468-8e8c-4373-b53a-06a7cf0f7c96

📥 Commits

Reviewing files that changed from the base of the PR and between 8f1c68f and fc0a6c9.

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

ref: ${{ (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && format('refs/pull/{0}/merge', github.event.pull_request.number) || github.sha }}
fetch-depth: 0
fetch-tags: true
allow-unsafe-pr-checkout: true

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

actionlint .github/workflows/sep-tests.yml

Repository: infiniflow/ragflow

Length of output: 4540


Remove the unsupported checkout input.

actions/checkout@v6 does not define allow-unsafe-pr-checkout; it is not in the available inputs, so this setting is ignored. Remove it from lines 61, 291, and 871, or pin to an action version that actually supports it.

🧰 Tools
🪛 actionlint (1.7.12)

[error] 61-61: input "allow-unsafe-pr-checkout" is not defined in action "actions/checkout@v6". available inputs are "clean", "fetch-depth", "fetch-tags", "filter", "github-server-url", "lfs", "path", "persist-credentials", "ref", "repository", "set-safe-directory", "show-progress", "sparse-checkout", "sparse-checkout-cone-mode", "ssh-key", "ssh-known-hosts", "ssh-strict", "ssh-user", "submodules", "token"

(action)

🪛 zizmor (1.26.1)

[warning] 55-61: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

🤖 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 61, Remove the unsupported
allow-unsafe-pr-checkout input from all actions/checkout@v6 configurations in
the workflow, including the occurrences near lines 61, 291, and 871. Keep the
remaining checkout settings unchanged.

Source: Linters/SAST tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Continue Integration size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant