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

[bug] Session traces persist API credentials in plaintext headers

Cerrado
#118 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
security

Línea de trabajo

Start at buildTraceRecord and cloneRequestHeaders, then inspect FetchHttpTransport and SessionTraceStore, using the isolated production-transport regression test described in the issue. Verify that persisted trace JSON redacts authorization, x-api-key, and response cookies across header casing, response status, and streaming mode while credentials still reach the endpoint.

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

Descripción

Version and environment

main at 87c344501f5960cda6bf9f47eec5af0a4664cdba (1.0.0), Node.js 26.8.1, macOS 26.5.2 arm64.

Reproduction
  1. Create a FetchHttpTransport with a real SessionTraceStore targeting a temporary storage root.
  2. Send a request with complete trace metadata and dummy authorization: Bearer fake-key-for-regression-only / x-api-key: fake-anthropic-key headers. Mock only the fetch response; do not use real credentials or call a model endpoint.
  3. Read the generated sessions/s1/trace/span1.json.
  4. Both dummy credentials appear verbatim in request.headers.
Expected behavior

Authentication credentials should reach the model endpoint but be redacted from persisted diagnostic headers, regardless of header-name casing, response status, or streaming mode.

Actual behavior and cause

buildTraceRecord copies request headers with cloneRequestHeaders without redaction. OpenAI-compatible requests contain a bearer token and Anthropic requests contain x-api-key. Session tracing is enabled by default in BUILTIN_CLI_DEFAULTS.

Trace files use mode 0600, so this is not a claim of unauthenticated remote access. The problem is that diagnostic files contain reusable API credentials and can disclose them if copied or shared. Response cookies should likewise be redacted from trace headers.

Verification

An isolated regression test using the production transport and filesystem trace store fails on current main because the saved JSON contains the dummy credential.

  • Searched existing issues and PRs for duplicates.
  • Read CONTRIBUTING.md.
Lenguaje dominante
TypeScript
Estrellas
654
Forks
55
Merge medio
1 d 12 h
PR fusionados (30 d)
43

Preparar el entorno

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 stepfun-ai/Step-Code

Todos los issues de stepfun-ai/Step-Code

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.