Use octal file modes in the Redis and Valkey modules
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 79/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- docker, node.js, typescript
Línea de trabajo
Lee packages/modules/redis/src/redis-container.ts y packages/modules/valkey/src/valkey-container.ts, centrándote en los valores de mode de withCopyFilesToContainer. Comprueba cómo está documentado o se usa FileToCopy.mode y, después, ejecuta las pruebas pertinentes de los módulos Redis y Valkey. La tarea estará terminada cuando el archivo de datos use 0o644 y el script de importación use 0o755 en ambos módulos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happens
The Redis and Valkey modules pass file modes as decimal numbers where octal was intended:
this.withCopyFilesToContainer([
{ mode: 666, source: this.initialImportScriptFile, target: this.importFilePath },
{ mode: 777, source: path.join(__dirname, "import.sh"), target: "/tmp/import.sh" },
]);
Decimal 666 is octal 1232 and decimal 777 is octal 1411. Copying files with those modes and running stat in the container:
/tmp/mode-decimal-666 1232 --w--wx-wT
/tmp/mode-decimal-777 1411 -r----x--t
/tmp/mode-octal-666 666 -rw-rw-rw-
/tmp/mode-octal-777 777 -rwxrwxrwx
So the import data file is write-only for its owner, and import.sh is read-only for its owner and execute-only for everyone else. withInitialData works today only because exec runs as root (uid 0), which bypasses the permission bits. A non-root exec user could read neither file.
Expected
The modes are written in octal (0o644 for the data file, 0o755 for the script).
Where
packages/modules/redis/src/redis-container.tspackages/modules/valkey/src/valkey-container.ts
Notes
FileToCopy.modeandContentToCopy.modeare typednumberwith no JSDoc. A one-line comment saying the value is an octal permission (0o644) would help prevent this.- The
statoutput was reproduced onmain(aa60a746, 12.2.0) withGenericContainerand the samemodevalues. The non-root case is from reading the permission bits, not run.
Dependencies
- Nothing blocks this. It can start now.
- Coordinate with #1525: the
execcall in the same two files sits a few lines below the modes. Change both in one pull request.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.6k
- Forks
- 274
- Merge medio
- 1 d 14 h
- PR fusionados (30 d)
- 44
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin 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 testcontainers/testcontainers-node
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
testcontainers/testcontainers-node#1539 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
testcontainers/testcontainers-node#1533 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
testcontainers/testcontainers-node#1531 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
testcontainers/testcontainers-node#1529 ·
Los mantenedores suelen responder en 1 día
-
enhancement minor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
testcontainers/testcontainers-node#1528 ·
Los mantenedores suelen responder en 1 día
Todos los issues de testcontainers/testcontainers-node
Issues similares
-
enhancement good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
OWASP/cve-lite-cli#1335 ·
Los mantenedores suelen responder en 1 día
-
Windows: main-screen mouse tracking requires WT_SESSION, so it never enables inside herdr panesAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 66/100
code-yeongyu/senpi#3353 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Channels status: needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
mastra-ai/mastra#27093 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
enhancement needs-triage ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día