E2 shell arm matches one `env | grep` spelling: a second grep flag, quotes, or egrep all evade "Env Variable Harvesting"
Los mantenedores suelen responder en 4 días
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- security, testing-qa
Línea de trabajo
Empieza en src/skillspector/nodes/analyzers/static_patterns_data_exfiltration.py:73 y revisa después los casos E2 de tests/unit/test_patterns.py alrededor de las líneas 150-255. Añade cobertura para las formas de escritura de shell y las exclusiones descritas en la reproducción, usando el fixture preparado si es necesario. Está hecho cuando las formas de filtrado compatibles de env/printenv activan E2, mientras que PATH y los ejemplos con filtros negativos no lo hacen.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
Rule E2 (Data Exfiltration / Env Variable Harvesting) has a shell arm for env | grep, but it accepts exactly one flag (-i) followed by a bare keyword. A second flag, combined flags, a quoted pattern, or egrep all evade it. The README defines E2 as "enumerating, copying, or searching environment data to collect secrets"; the missed spellings are the searching case.
#329 and #441 cover the Python os.environ path. This is the shell path and is independent of both.
Environment
- SkillSpector v2.11.0 (commit
7805bb9), installed withuv tool install git+https://github.com/NVIDIA/skillspector.git skillspector scan <dir> --no-llm --format json(static-only, deterministic)- macOS 15 (Darwin 25.6.0), Python 3.13 runtime
Reproduction
One SKILL.md with one fenced bash block. Only the marked line varies between runs.
| spelling | E2 fires |
|---|---|
env | grep secret |
yes, 0.8 |
env | grep -i -E 'token|key|secret' > /tmp/ctx.txt |
no |
env | grep -iE "aws_|secret" |
no |
env | grep --ignore-case token |
no |
env | egrep -e password -e token |
no |
printenv | grep -i secret |
yes, but only because the line contains the substring env | grep -i secret |
The second row is the shape a harvester would write: case-insensitive, alternation over several names, redirected to a file for a later upload. In a skill that goes on to POST that file, the scan reports E1, E3, PE3 and SC2 on the surrounding lines and nothing on the harvest line itself.
Cause
src/skillspector/nodes/analyzers/static_patterns_data_exfiltration.py:73:
(r"env\s*\|\s*grep\s+(?:-i\s+)?(?:key|secret|token|password)", 0.8),
(?:-i\s+)? consumes one -i and nothing else, and the keyword has to follow as a bare word, so a quote or a second flag ends the match. Nothing in tests/unit/test_patterns.py pins a shell spelling; the E2 cases there (lines 150-255) are all Python.
Expected behavior
The shell arm should key on the behavior (the environment piped through a filter for secret-looking names) rather than on one flag layout: env or printenv as the source, grep, egrep or fgrep as the filter, any flags, optional quoting, and the keyword anywhere in the pattern argument. env | grep PATH and env | grep -v SECRET should still pass.
I have a fix with tests and a fixture ready to open against this issue.
- Lenguaje dominante
- Python
- Estrellas
- 23.2k
- Forks
- 2k
- Merge medio
- 5 d 9 h
- PR fusionados (30 d)
- 121
Preparar el entorno
- 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 NVIDIA/SkillSpector
-
TM1 flags the HTTP verb DELETE in REST route tables despite the pattern comment saying it avoids themPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
NVIDIA/SkillSpector#832 ·
Los mantenedores suelen responder en 4 días
-
RP1 `npx` pattern matches across line breaks, so a line ending in "npx" plus the next word becomes a commandPosiblemente ocupada @agentsope la tomó hace 33 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
NVIDIA/SkillSpector#639 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
Quoted version metadata creates a false missing-file reference and changes score 0 from SAFE to CAUTIONPosiblemente ocupada @goodhee la tomó hace 49 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
NVIDIA/SkillSpector#524 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
-
compare_scan_accuracy: editable-dependency file:// URL resolves to "C:\C:\..." on WindowsPosiblemente ocupada @mohgupta-ship-it la tomó hace 53 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
NVIDIA/SkillSpector#485 · 4 comentarios ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
NVIDIA/SkillSpector#444 · 2 comentarios ·
Los mantenedores suelen responder en 4 días
Todos los issues de NVIDIA/SkillSpector
Issues similares
-
Support .aac audio uploadsPosiblemente ocupada @julien731 la tomó hoy. Abiertofeature
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
nimblehq/audio-transcriber#153 ·
-
help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
antonyrag/ragleap-core#1062 ·
-
needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
gke-labs/kube-agents#4321 ·
Los mantenedores suelen responder en 1 día
-
enhancement help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Git-Hospital/githealthcheck#61 ·
Los mantenedores suelen responder en 1 día
-
changelog investigate
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
ramnes/notion-sdk-py#433 ·