A diff scan (--since) still seeds the whole tree, and the lead cap applies before the diff filter
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 50/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- cli, performance
Línea de trabajo
Start in internal/engine/run.go around lines 175-180, where seed.RunAll runs over the whole tree before keepChanged in internal/engine/diffscan.go filters by diff. Then read capLeads in internal/seed/seed.go, since the per-seeder cap of 5000 runs before the diff filter. Done means a test with more than 5000 leads in unchanged files still reports a changed-file lead under --since, and built-in seeders read only changed files in a diff scan. Scanner-specific changes (semgrep, gitleaks, hadolint) need maintainer input first.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
--since computes the changed files before mapping, but every seeder still runs over the whole tree, and leads outside the diff are thrown away afterwards. The per-seeder cap of 5000 leads is applied before that filter, so a new lead in a changed file can be dropped on large repositories.
Where
internal/engine/run.go:175-180internal/engine/diffscan.go:38(keepChanged)internal/seed/seed.go:124(capLeadsinsideRunAll)docs/ci.md:133
Details
leads, statuses := seed.RunAll(ctx, seeders, root, m.Files, texts) // whole tree, capped per seeder
leads, scanNotes := applyScanConfig(leads, opts.Config.Scan)
if changed != nil {
leads, note = keepChanged(leads, changed, opts.Since) // filtered afterwards
The built-in seeders are per-file, so running them on unchanged files is pure waste.
Impact
- A PR scan of a 3-file change in a 100k-file repository reads and rule-matches every file; without a model it costs the same as a full scan on every push.
- If one seeder has more than 5000 leads across the tree, the cap keeps the first 5000 in file order, and a lead in a changed file later in sort order is dropped before the diff filter. Only the seeder's status note mentions the drop.
Suggested fix
When changed != nil, pass only the changed files to the shared built-in pass, so the cap applies to changed-file leads only. Pass changed paths to scanners that accept file targets (semgrep, gitleaks, hadolint); keep whole-tree runs only where needed (osv-scanner, trivy). Update docs/ci.md:133.
Acceptance criteria
- A test with more than 5000 leads in unchanged files still reports a lead in a changed file under
--since. - Built-in seeders read only changed files in a diff scan.
Getting started
- Relevant files:
internal/engine/run.go,internal/engine/diffscan.go,internal/seed/seed.go - How to run tests:
make test(Unix) or.\make.ps1 test(Windows PowerShell); one package:go test ./internal/<pkg>
Filed by repo-audit/full-audit at a7f6edc. Severity: medium. Effort: M. audit-key: performance|internal/engine/run.go|keepChanged
- Lenguaje dominante
- Go
- Estrellas
- 0
- Forks
- 1
- Métricas de merge de PR
- Sin PR fusionados en 30 d
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
- 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 TMHSDigital/Spackle
-
enhancement good first issue severity: low
Dificultad 2/5 Medio día Aptitud para principiantes 72/100
TMHSDigital/Spackle#139 ·
-
enhancement good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
TMHSDigital/Spackle#138 ·
-
documentation good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
TMHSDigital/Spackle#135 ·
-
bug good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
TMHSDigital/Spackle#131 ·
-
runs and runs compare print target text without the control-character cleaning the reports useAbiertobug good first issue severity: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
TMHSDigital/Spackle#129 ·
Todos los issues de TMHSDigital/Spackle
Issues similares
-
bug raised-by:reviewer
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
medici-finance/assay#7655 ·
Los mantenedores suelen responder en 1 día
-
helm chart: make DaemonSet pod affinity configurable via values.yamlPosiblemente ocupada @Young-Zen la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
flannel-io/flannel#2632 ·
Los mantenedores suelen responder en 6 días
-
go-vulnerability security-scan
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
teslashibe/agent-go#36 ·
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
nwverse/persona#15194 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug flaky-test
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
rosskukulinski/tailworks#411 ·
Los mantenedores suelen responder en 1 día