fix(ci): remove workflow-level env block exposing secrets#111
Conversation
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (5)
WalkthroughThis PR refactors credential handling in GitHub Actions workflows and modifies environment variable bundling in the Vite configuration. Four OBS deployment workflows now reference Huawei Cloud secrets directly in commands instead of through workflow-level environment variables. The Vite configuration changes how Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
将 secrets 映射到 workflow 级别的 `env:` 会使敏感凭据暴露在环境上下文中
(可通过 debug logs 等方式泄露)。直接引用 `${{ secrets.* }}` 更安全,
GitHub Actions 会自动在日志中遮盖 secrets 值。
参照 opentiny/opentiny.design#111
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(ci): remove workflow-level env block exposing secrets
将 secrets 映射到 workflow 级别的 `env:` 会使敏感凭据暴露在环境上下文中
(可通过 debug logs 等方式泄露)。直接引用 `${{ secrets.* }}` 更安全,
GitHub Actions 会自动在日志中遮盖 secrets 值。
参照 opentiny/opentiny.design#111
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
* fix(vite): only expose NODE_ENV to client bundle via process.env
---------
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Summary
HUAWEI_CLOUD_*环境变量安全问题env:块对 secrets 的映射,改为直接使用${{ secrets.HUAWEI_CLOUD_* }}deploy-obs-docs.yml、deploy-obs-tech-college.yml、deploy-obs-tiny-engine.yml、deploy-obs.ymlWhy
将 secrets 映射到 workflow 级别的
env:会使敏感凭据暴露在环境上下文中(可通过 debug logs 等方式泄露)。直接引用${{ secrets.* }}更安全,GitHub Actions 会自动在日志中遮盖 secrets 值。Test plan
env.HUAWEI_CLOUD_*引用🤖 Generated with Claude Code
Summary by CodeRabbit