
opamをインストールしてテストAPIをビルドします。
cargoをインストールしてGaiaをビルドします。
docker v26.0.1とdocker compose v2.26.1をインストールしてELK Stackと共にGaiaをビルドします(不要な場合はオプション)。
node >= v18.0.0 および npm >= v8.6.0をインストールします。
opamのローカルスイッチを作成するには:
make opam-switch
make deps
make build
make build-test
make generate-swagger
make clean-swagger
make format
make clean-build-files
make clean
./_bin/gaia --help
gaia --configuration <configuration> --openapi-path <openapi-path> --workdir-path <workdir-path> --verbose <verbose>
workdir-path: ファザーの各種ログが保存される作業ディレクトリ。
openapi-path: 実際のAPIのOpenAPIファイルのパス。ファジングまたはモニタリングを使用する場合に必須。統計では不要
verbose : 冗長レベル {NOTHING, LOW, MID, HIGH, ALL}(デフォルト値: NOTHING)
configuration: 以下の内容を含むJSONファイルのパス:
{
"configuration": {
// One of : fuzzing or monitoring
"fuzzing": {
//Required
"config_fuzzer": {
//Required
// In hours
"timeout": 1,
//Optional
// Disable fuzzers
"disable_fuzzers": [{
"Restler":{
// Bfs, BfsFast, BfsCheap or RandomWalk
"strategy" : "Bfs"
}
},
"Schemathesis",
{"Custom": {"id": "1"}}
],
//Optional
"custom_fuzzers": [
"<command line that can accept `--output_dir <PATH>`, `--openapi_path <PATH>` and `--timeout <FLOAT>` as arguments>"
],
//Optional
"generation_config": {
//optional (Required if you set a function to generate a value)
"lib_path": "Absolute path to the dynamic library (.so, .dll, or .rs).",
//Optional
"generate_string": {
//One of : Command, Value, File path or Function
"command": "<command line that returns a string array>",
//Or
"value": ["fuzzstring"],
//Or
"function": "<function() that returns a string array>",
//Or
"file": "The file path to the dictionary of values"
},
//Optional
"generate_datetime": {
//One of : Command, Value, File path or Function
"command": "<command line that returns a datetime array in a string format>",
//Or
"value": ["2019-06-26T20:20:39+00:00"],
//Or
"function": "<function() that returns a datetime array in a string format>",
//Or
"file": "The file path to the dictionary of values"
},
//Optional
"generate_date": {
//One of : Command, Value, File path or Function
"command": "<command line that returns a date array in a string format>",
//Or
"value": ["2019-06-26"],
//Or
"function": "<function() that returns a date array in a string format>",
//Or
"file": "The file path to the dictionary of values"
},
//Optional
"generate_int": {
//One of : Command, Value, File path or Function
"command": "<command line that returns an int array in a string format>",
//Or
"value": ["0"],
//Or
"function": "<function() that returns an int array in a string format>",
//Or
"file": "The file path to the dictionary of values"
},
//Optional
"generate_number": {
//One of : Command, Value, File path or Function
"command": "<command line that returns a float array in a string format>",
//Or
"value": ["1.5"],
//Or
"function": "<function() that returns a float array in a string format>",
//Or
"file": "The file path to the dictionary of values"
},
//Optional
"generate_object": {
//One of : Command, Value, File path or Function
"command": "<command line that returns a json object array in a string format>",
//Or
"value": ["{\"k\" : {\"v\" : \"value\" }}"],
//Or
"function": "<function() that returns a json object array in a string format>",
//Or
"file": "The file path to the dictionary of values"
},
//Optional
"generate_path_parameter": {
//One of : Command, Value, File path or Function
"command": "<command line that returns a key-value map with a string key referring to a path parameter and a string array of values>",
//Or
"value": {
"k": {
"v": ["value"]
}
},
//Or
"function": "<function() that returns a key-value map with a string key referring to a path parameter and a string array of values>",
//Or
"file": "The file path to the dictionary of values"
},
//Optional
"generate_query_parameter": {
//One of : Command, Value, File path or Function
"command": "<command line that returns a key-value map with a string key referring to a query parameter and a string array of values>",
//Or
"value": {
"k": {
"v": ["value"]
}
},
//Or
"function": "<function() that returns a key-value map with a string key referring to a query parameter and a string array of values>",
//Or
"file": "The file path to the dictionary of values"
}
}
},
//Required
"config_process_manager": {
//Optional
"config_reset": {
//Required
"reset_lib": "Absolute path to the dynamic library (.so, .dll, or .rs).",
//Required
"function": "Function name that takes two strings as arguments and returns a unit. The first string represents the log in JSON format, and the second represents the path to the real-time log file."
},
//Required
"config_proxy": {
//Optional
"headers_config": {
//Optional
"custom_headers": [
{
//Required
"title": "title",
//Required
"header_type": {
//One of : Command or Value
"Command": {
//Required
"cmd": "<Command that returns the value of the header>",
//Required
//Refresh value in milliseconds
"duration": 0
},
// or
"Value": { "value": "Header value" }
}
}
]
},
//Optional
"openapi_config": {
//Optional
"responses_to_string": true, // Change the type of the responses to string
//Optional
"requests_config": {