I want to use 'openvas-nasl ’ to run my nasl script , but I can’t find this command
did you try the following command:
docker compose -f $DOWNLOAD_DIR/docker-compose.yml -p greenbone-community-edition exec ospd-openvas openvas-nasl --help
Background: the ospd-openvas container image is build from the openvas-scanner image and therefore contains the openvas-scanner executables too.
I have a problem.
when I execute the nasl script in the directory of this file
docker-compose -f docker-compose.yml -p greenbone-community-edition exec ospd-openvas openvas-nasl -X ./nasl_script.nasl
it always says that
lib nasl-Message: 13:54:12.700: nasl_script.nasl: Not able to open nor to locate it in include paths
I don’t know why not able to open nor to locate it in include paths.
I guess you are trying to run a nasl file located on your docker host inside the container. This of course wont work. A docker container can’t access the content of your docker host without additional work. You need to mount the file or the local directory into the container. Please take a look at the docker and docker compose docs on how to do that.