Learn how to manage private tools in Trickest.
Public
and Private
.
run.sh
If the tool you use only supports stdin
as an input, check out Parameterizing stdin/stdout where you will learn how to create run.sh
and configure the tool to be compatible with Trickest platform.
/hive/in
and /hive/out
in the final image. These will be used by the platform to store and manage the tool’s input/output.
python:<version>-slim.
This is a variant that has less packages installed, resulting in a smaller image.
alpine
, because it might cause some unexpected issues.
trickest.yaml
file is essential for integrating tools into the Trickest platform, specifically designed for the Workflow Editor. This YAML file contains all the necessary data for the tool to be displayed appropriately and configured within the platform.
Overview of trickest.yaml Structure
The YAML file is structured to provide comprehensive details about the tool, including its functionality, usage, and output handling. Below is a detailed explanation of each field in the trickest.yaml file:
Example trickest.yaml
Name | Description | Required | Example |
---|---|---|---|
name | Name of the tool | Yes | amass |
description | Short description of the tool. The “About” section of GitHub is an excellent starting point if available | Yes | The OWASP Amass Project performs network mapping of attack surfaces and external asset discovery using open source information gathering and active reconnaissance techniques. |
category | High-level category of the tool | No | Recon |
source_url | Original repository’s URL | Yes | https://github.com/OWASP/Amass |
Name | Description | Required | Example |
---|---|---|---|
docker_image | Docker image URL. We use quay.io for hosting images | Yes | quay.io/trickest/amass:v3.10.5 |
command | Command that should be executed on the container when the node runs | Yes | /bin/amass enum |
output_parameter | Command line parameter that designates the tool’s output path | Yes | -o |
output_type | Output type (file or folder) | Yes | file |
license_info.name | Name of the tool’s license | Yes | Apache 2.0 |
license_info.url | URL of the tool’s license | Yes | https://github.com/OWASP/Amass/blob/main/LICENSE |
:latest.
Name | Description | Example |
---|---|---|
command | Command line parameter used by the tool | -d |
name | Name to identify the parameter in the node | domain |
parameter_type | Type of the parameter (string, file, folder, or boolean) | string |
description | Short description of the parameter | Domain names separated by commas |
order | The index of the parameter. The order is followed when building the final command | 0 |
STDIN/STDOUT
:
@
is a list of all the input parameters passed to the script.${@: 1:1}
follows the format ${@: START:COUNT}
, which means “starting from the parameter at START
(index 1 here), get COUNT
(1 in this case) parameters,” which is practically equivalent to $1
, the first parameter.cat "${@: 1:1}"
will output the content of the file passed in the first parameter.$#
refers to the number of parameters passed to the script.tool "${@: 2:$#-2}"
passes all the parameters to tool
except the first and last one.tee "${@: $#:1}"
passes the last command to tee
.STDIN
but accepts an output parameter, i.e., the original command follows this format:
STDOUT
, i.e., the original command follows this format:
STDIN
and writes the output to STDOUT
, i.e., the original command follows this format:
run.sh
and add it to the module’s folder (don’t forget to add the shebang #!/bin/bash
).
trickest.yaml
Main command
Use the script in the command
parameter.
Parameters
The input and output parameters must be adjusted as follows:
output_parameter
should be set to >
.output_type
should be set to file
.run.sh
script should be copied to the docker image on build and used as an ENTRYPOINT
.
trickest.yaml
file is a structured configuration that defines how a tool will be integrated and function within the Trickest platform.
This file includes essential details like the tool’s name, description, category, and technical specifics such as the Docker image URL and command execution parameters. It serves as a blueprint for the Trickest system to recognize and properly handle the tool, ensuring it operates seamlessly within your workflows.
Dockerfile
is essential for defining the environment in which your tool will run. It specifies the base image, necessary dependencies, build instructions, and how the tool should be executed. The Dockerfile ensures that your tool can be consistently deployed and run within the Trickest platform, regardless of the underlying infrastructure.
docker login
command to authenticate with the Docker registry where you intend to push your image.
docker build
command:
username
, tool-name
, and tag
with your Docker registry username, your tool’s name, and the image’s version or tag.
Push the Image to the Registry
After successfully building the image, push it to the Docker registry using docker push
:
cd
command to navigate to the directory where your trickest.yaml
file is located.
Run the Create Command
TRICKEST_TOKEN
to Trickest CLI or have it set as an environment variable. You can find your token at this pagetool.yaml
with the path to your YAML file.Trickest-CLI
:
trickest.yaml
file and then run:
--json
to display the output in JSON format.