[go-fan] Go Module Review: mvdan.cc/sh/v3
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
- 74/100
Línea de trabajo
Lee pkg/workflow/taint/javascript_workflow.go alrededor de la línea 223 e inspecciona el recorrido de javascriptExecutables. El informe señala que el callback de syntax.Walk siempre continúa y sugiere syntax.Preorder como alternativa que no cambia el comportamiento; primero comprueba cómo el recorrido actual recopila los ejecutables. Se considera terminado cuando ese punto de llamada usa Preorder y conserva los mismos resultados recopilados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Go Fan Report: mvdan.cc/sh/v3
Module Overview
mvdan.cc/sh/v3 (repo mvdan/sh) is a pure-Go shell parser, formatter, and interpreter (the engine behind shfmt), supporting POSIX Shell, Bash, Zsh, and mksh. gh-aw only imports its syntax subpackage, the AST parser, and does not use interp, expand, shell, or pattern.
Current Usage in gh-aw
- Files: 3 non-test files plus 1 test file, all in pkg/workflow/taint
- Purpose: static taint-tracking security analyzer for shell run steps in agentic workflows. It propagates untrusted data (issue/PR titles, comments, etc.) through assignments, command substitutions, redirects, pipes, and env/curl/wget calls, flagging leaks into logs, files, GITHUB_OUTPUT/GITHUB_ENV, or network requests.
- Key APIs: syntax.NewParser().Parse, syntax.Walk, and type-switching over CallExpr, BinaryCmd, IfClause, ForClause, WhileClause, CaseClause, FuncDecl, ParamExp, CmdSubst, and more.
Research Findings
Version pinned: v3.14.1, which is the latest release (published 2026-09-06). gh-aw is already fully up to date; no version bump needed.
Recent releases: v3.14.1 fixed heredoc indentation and a zsh parsing edge case (no effect on gh-aw). v3.14.0 added syntax.Preorder, a Walk-complementing iter.Seq[Node] range-over-func iterator, plus parser correctness fixes. v3.13.0 added Zsh language support to the parser.
Improvement Opportunities
Quick Wins:
- javascriptExecutables in pkg/workflow/taint/javascript_workflow.go (around line 223) calls syntax.Walk with a callback that always returns true, meaning it never prunes the traversal. This is exactly the case the new (v3.14.0) syntax.Preorder iterator was added for. Replacing it with a for node := range syntax.Preorder(tree) loop is a behavior-neutral readability improvement. The other 4 syntax.Walk call sites in the package rely on pruning and should keep using Walk directly.
Feature Opportunities:
- None of the interp/expand/pattern additions apply, since gh-aw correctly stays with the static syntax parser only.
- Zsh parsing is available since v3.13.0 but not modeled; shell.go explicitly reports a gap for any shell other than bash/sh. Low priority since GitHub Actions built-in shell values do not include zsh on hosted runners.
Best Practice Alignment:
- Parser configuration is already minimal and correct: no Variant, RecoverErrors, StopAt, or KeepPadding options are set, which is the right conservative choice for a security analyzer.
- Dependency surface is already minimal: only syntax is imported, never interp or cmd/shfmt.
Recommendations
- Optional, low risk: replace the javascriptExecutables syntax.Walk call with syntax.Preorder for a small readability win.
- No version bump needed; already on latest v3.14.1.
- No urgent action needed otherwise; the module is well-utilized and scoped tightly to the syntax subpackage for a legitimate static-analysis use case.
Generated by Go Fan. Module summary saved to scratchpad/mods/sh.md
References:
Generated by 🐹 Go Fan · claude · agent · 163.6 AIC · ⌖ 0.88 AIC · ⊞ 6.6K · ◷
- expires on Oct 20, 2026, 12:13 AM UTC-08:00
- Lenguaje dominante
- Go
- Estrellas
- 5.4k
- Forks
- 584
- Merge medio
- 3 h 26 min
- PR fusionados (30 d)
- 822
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 github/gh-aw
-
automation models
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
ai-inspected
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
automation cli cookie documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
github/gh-aw#70526 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
agentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
automated conformance good-first-issue safe-outputs
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
Todos los issues de github/gh-aw
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
aws/amazon-ecs-agent#5177 ·
Los mantenedores suelen responder en 2 días
-
release-followup
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
apache/rocketmq-dashboard#7292 ·
Los mantenedores suelen responder en 3 días
-
[Bug]: Deleting an MCP proxy leaves its API keys in the gateway's memory and in the policy engineAbiertoAspect/API Aspect/Other Severity/Minor Type/Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
wso2/api-platform#3852 ·
Los mantenedores suelen responder en 1 día