PyCQA / bandit

Bandit is a tool designed to find common security issues in Python code.
https://bandit.readthedocs.io
Apache License 2.0
6.52k stars 612 forks source link

Correct passenv in tox #981

Closed gliptak closed 1 year ago

gliptak commented 1 year ago

Signed-off-by: Gábor Lipták gliptak@gmail.com

https://github.com/PyCQA/bandit/actions/runs/3839481628/jobs/6537302402

format: failed with pass_env values cannot contain whitespace, use comma to have multiple values in a single line, invalid values found 'http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY'

https://packaging-guide.openastronomy.org/en/latest/tox.html?highlight=passenv#environment-variables

sigmavirus24 commented 1 year ago

This is a breaking change in Tox 4 https://github.com/tox-dev/tox/issues/2615

I'd rather we just split these over new lines

gliptak commented 1 year ago

splitting to multiple lines fails with below

https://github.com/gliptak/bandit/actions/runs/4097526333/jobs/7065963353

configparser.DuplicateOptionError: While reading from '/home/runner/work/bandit/bandit/tox.ini' [line 20]: option 'passenv' in section 'testenv' already exists
sigmavirus24 commented 1 year ago

Sounds like you didn't read the issue or split the values appropriately because it should work as

passenv  =
    Var
    OtherVar
    Etc
gliptak commented 1 year ago

@sigmavirus24 thank you for the pointer, that format worked

https://github.com/gliptak/bandit/actions/runs/4098703824/jobs/7068010528

gliptak commented 1 year ago

HEAD is green https://github.com/PyCQA/bandit/actions/runs/4149444489