ai-harness: an input with no principal runs with the owner session's principal
Los mantenedores suelen responder en 1 día
@tombeckenham ya está trabajando en esto.
Desde el 15/10/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
TanStack AI version
@tanstack/ai-harness on the feat/harness-core branch, with #1780 (not released yet).
Framework/Library version
Node 24.8.0. No UI framework: the bug is in the durable host.
Describe the bug and the steps to reproduce it
An input that has no principal runs with the principal of the owner's session. So an anonymous input can get the credentials and provider keys of another user.
How it happens with #1780:
- Host B opens a thread with no principal. Host A opened the same thread with principal
alice, and owns it. - Host B gets an input. It stores it in
stores.inboxwith noprincipal. - Host A applies it in
applyForwarded(packages/ai-harness/src/session/base.ts). With noprincipal,prompt()usesoptions?.principal ?? this.principal, which isalice.
The same fallback runs today when a session recovers a logged input that has no principal, so this is not new to #1780. But forwarding makes it reachable across hosts.
Possible fixes:
- Store a principal on every input. Refuse an input with no principal on a host that has an authorizer.
- Add a way to say "no principal" on
promptand the other inputs, so the owner does not fall back to its own.
This needs a decision on the public API, so it is an issue and not a change in #1780.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
packages/ai-harness/tests/forwarding.test.ts on #1780 has the two-host setup (sharedStores()). Open the owner with principal: { id: 'alice' } and the other host with no principal. Then check which principal a tool sees in a turn sent from the other host.
Do you intend to try to help solve this bug with your own PR?
Maybe, I'll investigate and start debugging
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.2k
- Forks
- 365
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 261
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TanStack/ai
-
withPersistence does not save activity rows when a run is stopped or failsPosiblemente ocupada @tombeckenham la tomó hace 1 día. Abiertowaiting-on: maintainer
TanStack/ai#1804 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Activity events that a chat middleware emits are streamed but never recorded or persistedPosiblemente ocupada @AlemTuzlak la tomó hace 1 día. Abiertowaiting-on: maintainer
TanStack/ai#1803 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
withPersistence stores the durability batch hint on a stopped or failed assistant messagePosiblemente ocupada @tombeckenham la tomó hace 1 día. Abiertohas-pr waiting-on: maintainer
TanStack/ai#1802 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Activity events that a chat middleware emits are streamed but never recorded or persistedPosiblemente ocupada @AlemTuzlak la tomó hace 1 día. Abiertowaiting-on: maintainer
TanStack/ai#1801 · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
withPersistence stores the durability batch hint on a stopped or failed assistant messagePosiblemente ocupada @tombeckenham la tomó hace 1 día. Abiertowaiting-on: maintainer
TanStack/ai#1800 · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de TanStack/ai
Issues similares
-
backend priority:P3 privacy-fix
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
[Bug]: 【优化】对话消息底部增加发送时间展示Abiertobug desktop v3 windows
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
esengine/DeepSeek-Reasonix#13697 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area:security documentation effort:S priority:P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
app:web meta:ops
Dificultad 2/5 Medio día Aptitud para principiantes 78/100
osu-tournament-rating/otr#1113 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100