[Feature Request] Runtime Tool Availability Detection and Graceful Recovery from Missing Executables
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 18/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Go
- Stars
- 18.7k
- Forks
- 7k
- Avg merge
- 10h 57m
- Merged PRs (30d)
- 494
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from BaaRai/ARTEX
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
BaaRai/ARTEX#981 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
BaaRai/ARTEX#980 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug P2
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
BaaRai/ARTEX#812 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
question
Difficulty 4/5 1-2 days Newbie friendliness 35/100
BaaRai/ARTEX#983 · 4 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug P2
Difficulty 3/5 1-2 days Newbie friendliness 20/100
BaaRai/ARTEX#977 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
Similar issues
-
BUG: Backend Docker build fails due to Go version mismatchPossibly taken @Aakriti0207 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 93/100
gittuf/visualizer#203 ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
agent:ready
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
turbot/flowpipe#1162 · 1 comment ·
Maintainers usually reply within 1 day