Closed tommasop closed 1 month ago
@tommasop From within a container, with default networking config, 127.0.0.1
will resolve to localhost of that container, not localhost of the host machine. To reach services running on the host machine from inside a container try using an address like host.containers.internal
, e.g.
https://stackoverflow.com/questions/58678983/accessing-host-from-inside-container
Note that the service still may not be reachable if it is bound to 127.0.0.1
. The bind address might need to be changed to match host.containers.internal
or 0.0.0.0
(though be careful of this as it will expose the service on all interfaces, i.e. be reachable from other devices)
@sfowl thanks for the prompt reply.
Is it possible to pass parameters to the zap container in the container --> parameter
section?
Thanks a lot
Found the solution.
Podman has the host.containers.internal
that works out of the box.
The working config file is:
config:
configVersion: 5
defectDojo:
url: "http://host.containers.internal:8080"
ssl: False
authorization:
username: "admin"
password: "K9fuLeoBYEZjTrajg7T8s4"
application:
shortName: "iXi_Center"
url: "http://host.containers.internal:4000/api/"
general:
container:
type: "podman"
scanners:
zap:
apiScan:
apis:
apiFile: "/home/tommasop/code/work/rapidast/examples/ixi_openapi.json"
passiveScan:
# optional list of passive rules to disable
disabledRules: "2,10015,10027,10096,10024,10098,10023"
activeScan:
policy: API-scan-minimal
container:
type: "podman"
parameters:
image: "ghcr.io/zaproxy/zaproxy:stable"
report:
format: ["json"]
miscOptions:
updateAddons: False
additionalAddons: "ascanrulesBeta,postman"
defectDojoExport:
type: "reimport"
parameters:
product_name: "iXi Center"
engagement_name: "RapiDAST"
auto_create_context: False
I've set up rapidast with this configuration file:
when I run the
rapidast.py
script I receive a lot of these errors:But if I try to access the same urls throug browser I can access them correctly:
I've also tried with locahost with the same results.
I am using podman as you can see from the config file.