go-button assumes and enforces relative paths for config file
When running ./go-button -c CONFIG_FILE
, it is assumed that the path passed in as the value for CONFIG_FILE
is relative to the ~/harness/experiment/
directory. Using an absolute path such as /users/USERNAME/harness/configs/config-file.yml
produces the following error:
Traceback (most recent call last):
File "./harness/experiment/harness.py", line 588, in <module>
FuzzerCampaign.run()
File "/usr/lib/python3/dist-packages/plumbum/cli/application.py", line 498, in run
f(inst, *a)
File "./harness/experiment/harness.py", line 54, in load_config
with open(config_file) as f:
FileNotFoundError: [Errno 2] No such file or directory: './harness/experiment//users/USERNAME/harness/configs/config-file.yml'
This appears to be caused by this line of the cmd
option in run-experiment.yml
:
--config ./harness/experiment/{{ config_file }} \
I don't think relative paths should be required. I think this should be able to be handled by the harness.py
script directly via the pathlib
module instead of doing string interpolation in the Ansible playbook (i.e., the playbook should just have --config {{ config_file }}
and the Python script should deal with finding the actual file).