Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[SECURITY] Organization Variables Exposed in Plain Text to All Repository Users

オープン
#529 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
github-actions, typescript, vscode

調査の方向性

src/treeViews/settings/orgVariablesNode.ts と src/treeViews/settings/variableNode.ts から始め、次に非管理者アカウントを使って organization-variables request を再現します。拡張機能の endpoint と auth flow を、REST、CLI、web に関するドキュメント化された動作と比較します。非管理者ユーザーが organization variable の値を表示できず、動作が想定される permission model と一致すれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug

[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-variables correctly 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

  1. 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
  2. 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”

    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:

  1. Calls the org variables API for the current repo
  2. Wraps each result in a VariableNode
  3. 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
  • 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:

  1. Confirm the behavior with a non-admin test account?
  2. Clarify which endpoint + auth flow the extension uses here?
  3. Align the extension’s behavior with GitHub’s documented and enforced permission model for org variables?
主要言語
TypeScript
スター
661
フォーク
214
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/vscode-github-actions のほかの issue

github/vscode-github-actions の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。