Route deeper analyzers per component with prerequisites and inert invocation plans

Abierto
#79 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go
Área
cli, devtools, tooling

Línea de trabajo

Start with pkg/capabilities/types.go and the existing planner described by #60, then read the map (#74) and coverage-ledger descriptors (#78). Define the router's descriptor data and inert output shape before implementation. Done means the map and one-shot summary report applicable tools, observed and missing prerequisites, scope, coverage, and inert argv, with golden-corpus and descriptor-versioning tests passing.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement follow-up

Why

The "glue" role needs dircue to say which deeper analyzers apply to which component, what each needs, and what it will and won't cover. It should do this before anything runs, deterministically and offline.

Today plan can only route dircue's own modules. The registry in pkg/capabilities/types.go lists eight: availability, declarations, discovery, environments, focus, formats, metrics, structure. It can't plan any external tool. #25 describes exporting tool prerequisites but has no concrete router.

Proposal

Extend planning into an analyzer router driven by the map (#74) and the same versioned provider descriptors used by the coverage ledger (#78).

For each component and deployable, emit:

  • applicable tools, with the reason (language, framework, build system);
  • prerequisites observed vs. missing, for example:
    • a JVM component: mvnw/gradlew present, declared maven.compiler.release or Gradle toolchain, multi-module parent;
    • .NET: SDK from global.json, target frameworks;
    • Python: requires-python, lockfile presence;
    • Go: go directive, go.work;
  • scope: root, includes and excludes (vendored, generated, test);
  • expected coverage, which feeds the ledger;
  • inert argv templates with placeholders (never executed), and the report format to hand back to --attach (#77).

Initial descriptors:

Tool Notes
Syft always applicable; directory source
OWASP Noir framework-coverage table matched against observed frameworks
OpenTaint Java/Kotlin; Maven/Gradle build or precompiled classes; JDK version; SARIF out
Bifrost 13 languages; build-free; requires a staged regular-file inventory (a relative --sources symlink escape was found in the #24 evaluation); BIFROST_SEMANTIC_PACK_DOWNLOAD=off; private cache dir
BCA / scc languages as today
Semgrep/OpenGrep, CodeQL language support; CodeQL build modes

Rules

  • Never route by PATH contents, and never let repository content choose tools, arguments or budgets. Caller policy is trusted; the repository is evidence.
  • Missing prerequisites are reported, never guessed around. Weak evidence isn't a safe-to-skip recommendation.
  • Absorbs the tool-prerequisite portion of #25. #26 (OpenTaint → ZAP) remains a downstream recipe.

Acceptance

  • Router output in the map and the one-shot summary (#76).
  • On the golden corpus (#75), applicable tools and unmet prerequisites match the hand-written expectations. JVM entries route to JVM-capable tools with correct build prerequisites, and an unsupported-language component shows no taint analyzer.
  • Descriptor data is versioned and tested. Updating a tool version is a data change with its own review.

Related: #9 (trusted profiles), #21, #24, #25, #26, #60 (planner). Epic: #81.

Lenguaje dominante
Go
Estrellas
0
Forks
0
Merge medio
11 h 3 min
PR fusionados (30 d)
5

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de war-and-code/dircue

Todos los issues de war-and-code/dircue

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.