Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#529 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
github-actions, typescript, vscode

Línea de trabajo

Comienza con src/treeViews/settings/orgVariablesNode.ts y src/treeViews/settings/variableNode.ts y, a continuación, reproduce la solicitud de variables de organización usando una cuenta que no sea de administrador. Compara el endpoint y el flujo de autenticación de la extensión con el comportamiento documentado de REST, CLI y web. Se considera terminado cuando los usuarios que no son administradores no pueden ver los valores de las variables de organización y el comportamiento coincide con el modelo de permisos esperado.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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?
Lenguaje dominante
TypeScript
Estrellas
661
Forks
214
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de github/vscode-github-actions

Todos los issues de github/vscode-github-actions

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.