[SECURITY] Organization Variables Exposed in Plain Text to All Repository Users
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- github-actions, typescript, vscode
调研方向
从 src/treeViews/settings/orgVariablesNode.ts 和 src/treeViews/settings/variableNode.ts 开始,然后使用非管理员账户重现组织变量请求。将扩展的 endpoint 和 auth flow 与 REST、CLI 和 web 的文档化行为进行比较。当非管理员用户无法查看组织变量值,并且行为符合预期的权限模型时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
[SECURITY] VS Code GitHub Actions extension exposes organization variables to non-admin users
Summary
The GitHub Actions extension for VS Code exposes organization-level Actions variable values (names + values) to non-admin users via the “Settings → Variables → Organization Variables” view.
This is a privilege escalation:
- GitHub Web UI correctly blocks non-admins from viewing org variables
gh api repos/{owner}/{repo}/actions/organization-variablescorrectly fails for non-admins- Direct REST calls with a non-admin token also fail
- But the VS Code extension shows the full values to the same non-admin users
Impact
Severity: Critical – privilege escalation & credential disclosure
For any repo where org variables are shared:
- Non-admin users with only read access to the repo can see:
- All shared org variable names
- Their plain-text values in the VS Code sidebar
- In our case this exposed (now rotated and moved to Secrets):
GITLAB_API_TOKEN(full access to GitLab Package Registry)GITLAB_API_READ_TOKEN- Multiple third‑party service passwords
How to Reproduce
-
Setup
- In a GitHub organization:
- Create organization-level Actions variables with sensitive values
- Share them with a repository
- Add a non-admin user with read access to that repository
- In a GitHub organization:
-
As the non-admin user
-
Confirm that the org variables are not visible elsewhere:
-
Web: Org Settings → Actions → Variables → access denied
-
CLI:
gh api repos/{owner}/{repo}/actions/organization-variables # => “Must have admin rights to Repository”
-
-
In VS Code:
- Install
github.vscode-github-actions - Open the repo
- Open “GitHub Actions” view → “Settings” → “Variables” → “Organization Variables”
- Install
Observed: All organization variables and their values appear in plain text.
-
Suspected Source
From the public repo:
-
src/treeViews/settings/orgVariablesNode.ts:variables = await this.gitHubRepoContext.client.paginate( "GET /repos/{owner}/{repo}/actions/organization-variables", { owner: this.gitHubRepoContext.owner, repo: this.gitHubRepoContext.name, per_page: 100 } ); return variables.map(v => new VariableNode(this.gitHubRepoContext, v, undefined, true)); -
src/treeViews/settings/variableNode.ts:export class VariableNode extends vscode.TreeItem { constructor(/* ... */, public readonly variable: OrgVariable, /* ... */) { super(variable.name); this.description = variable.value; // shown directly in tree view } }
So the extension:
- Calls the org variables API for the current repo
- Wraps each result in a
VariableNode - Sets
description = variable.value, which is rendered in the tree view
The critical question: why does this succeed for non-admin users when the same endpoint fails via gh api and curl?
Expected Behavior
- For non-admins:
- Either:
- Do not show “Organization Variables” at all, or
- Show only names, with values masked / hidden
- Either:
- Enforce the same permission checks as:
- GitHub Web UI
- GitHub CLI
- Direct REST calls
Mitigations (for other users)
Until fixed, organizations should:
- Rotate any secrets stored in organization variables that may have been exposed
- Move sensitive values to GitHub Secrets
- Avoid using this extension, or at least hide “Settings → Variables” from non-admins
Request
Can the team:
- Confirm the behavior with a non-admin test account?
- Clarify which endpoint + auth flow the extension uses here?
- Align the extension’s behavior with GitHub’s documented and enforced permission model for org variables?
- 主要语言
- TypeScript
- 星标
- 661
- 派生
- 214
- PR 合并指标
- 30 天内没有已合并 PR
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/vscode-github-actions 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 76/100
github/vscode-github-actions#627 · 1 个 reaction ·
-
long work 未关闭
难度 4/5 3-5 天 新手友好度 25/100
github/vscode-github-actions#628 ·
-
bug
难度 3/5 1-2 天 新手友好度 55/100
github/vscode-github-actions#625 ·
-
bug
难度 3/5 1-2 天 新手友好度 64/100
github/vscode-github-actions#621 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 50/100
github/vscode-github-actions#619 ·
查看 github/vscode-github-actions 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 75/100
fil-donadoni/tolaria#4409 ·
-
难度 2/5 1-3 小时 新手友好度 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
难度 2/5 1-3 小时 新手友好度 75/100
corsairdev/corsair#1764 ·