[Feature Request] Runtime Tool Availability Detection and Graceful Recovery from Missing Executables

Aperta
#339 2 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
18/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
docker, go, shell
Ambito
backend, security

Direzione di ricerca

The payload names no source files, so start from the shell execution path that runs Worker commands and reproduce the exit-127 case with command -v nikto inside the artex:local Docker image. Design choices remain open: where availability is cached, how the tool inventory is exposed to agents, and how missing tools are reported. Done means the acceptance criteria in the issue are met and failed invocations are not recorded as successful coverage. Confirm the design with maintainers before writing code.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

feature

Problem

ARTEX agents can attempt to execute security tools that are not installed or accessible in the Worker runtime environment.

During a recent assessment, a Worker attempted to execute:

nikto -h https://iranopasmigirim.com/fa

The command failed with exit code 127.

Further verification inside the ARTEX Docker container confirmed:

sh: 1: nikto: not found

Nikto was not installed in the container. The agent selected the command, but its availability had not been verified before execution.

This raises a broader concern: agents should be aware of which external executables are actually available at runtime and recover appropriately when a required tool is missing.

Proposed Solution

Introduce runtime tool availability awareness and structured recovery for shell-based external tools.

  • Capability discovery: Provide agents with an accurate inventory of recognized security tools and their runtime availability.
  • Availability checks: Verify executable presence before invoking known external tools, using lightweight checks such as command -v.
  • Structured errors: Distinguish missing executables from tool execution failures, invalid arguments, and target-related errors.
  • Graceful recovery: Allow agents to select an available alternative or report the missing dependency without repeatedly invoking the unavailable command.
  • Evidence integrity: Ensure failed tool executions are recorded accurately and are not counted as successful security coverage.

These checks should be lightweight, cached where appropriate, and should not restrict agents from using legitimate custom commands through the shell.

Alternatives Considered

1. Install every security tool in the Docker image

This increases image size, dependency complexity, and maintenance overhead. It also cannot cover every tool an agent might need.

2. Rely entirely on the LLM to check tool availability

The model can run command -v, but this behavior is not guaranteed. Runtime-level capability awareness would make execution more predictable.

3. Handle exit code 127 only after execution

This is a useful fallback, but proactive capability discovery could avoid unnecessary failed commands and improve tool selection.

Additional Context

The issue was reproduced using the local ARTEX Docker runtime:

  • Runtime image: artex:local
  • Base OS: Debian 12
  • Agent: Worker
  • Failed command exit code: 127
  • Root cause: missing Nikto executable
  • No evidence of a PATH configuration or interpreter failure

This is not necessarily a request to bundle Nikto with ARTEX. The request concerns the broader reliability of autonomous tool selection and execution.

The existing tool installation and build-time verification mechanisms are valuable, but runtime capability awareness would complement them, particularly for tools invoked dynamically through shell commands.

Acceptance Criteria

  • Agents can discover which recognized external tools are available in their current execution environment.
  • Missing executables produce clear, structured diagnostics.
  • Agents can recover by selecting an available alternative when appropriate.
  • Repeated attempts to execute the same unavailable tool are avoided.
  • Failed tool invocations are not represented as successful assessments.
  • Existing shell flexibility and custom tool usage remain supported.
Lingua principale
Go
Stelle
18.7k
Fork
7k
Merge medio
10h 41m
PR unite (30g)
342

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di BaaRai/ARTEX

Tutte le issue di BaaRai/ARTEX

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.