List in environment variable (automation framework)

110 views
Skip to first unread message

Patrick Pugh

unread,
Sep 30, 2022, 3:08:45 PM9/30/22
to OWASP ZAP User Group
Hello,

How do I pass a list? I'm using automation framework through the docker images.

Say I use this in a docker-compose or docker command line:

In the yaml file, this works:
  contexts :
    - name: context 1
      urls: ["${url_list}"]

But how do I pass several values? I thought something like this could work:
  - url_list=["https://www.some.app:2443/"]

But it results in an error like this:

Automation plan failures:
        Context URLs should be a list: ${url_list}

I could pass a fixed number of URLs with something like this
  contexts :
    - name: context 1
      urls: ["${url_1}", "${url_2}", "${url_3}"]
But I'd rather not if there's a better way.

Thanks!


Simon Bennetts

unread,
Oct 4, 2022, 5:38:55 AM10/4/22
to OWASP ZAP User Group
Hiya,

Right now I think the urls: ["${url_1}", "${url_2}", "${url_3}"] option will be the only way that works.
We could add support for an envvar which expands to a list but it will require code changes.
Would anyone else find thins useful, or have other suggestions as to how it could work?

Cheers,

Simon

Patrick Pugh

unread,
Oct 4, 2022, 9:38:19 AM10/4/22
to OWASP ZAP User Group
Thanks for the reply! I`ll use multiple variables, it's not really a problem. I just wanted to be sure I didn't miss something obvious.
Reply all
Reply to author
Forward
0 new messages