-
-
Notifications
You must be signed in to change notification settings - Fork 606
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot seek stdin on pipe #496
Conversation
@ericwb This fixes the issue described in #495 regarding being able to pipe data into stdin for bandit using something like Just implemented a Happy to make changes if anyone has feedback or knows a better way to get around the OSError. |
added list handling for hard fname swaps
@ericwb Just wanted to ping on this as it is fixing a bug and may be eligible for release in 1.6.1 in the next few days |
@ericwb just wanted to ping in this again |
I'm working a project that uses bandit stdin and this PR works perfectly 👍 |
@ericwb can this get merged and released? It's been sitting a while |
@tylerwince Could you add a unit test recreating the issue described in #495 and the fix? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add unit test that recreates and exhibits the fix.
I'd like to merge once there is a unit test that verifies the fix. |
Fixes tylerwince#21 flake8-bandit 1.7.3 (PyCQA/bandit#496) introduced an `fdata` argument.
Fixes tylerwince#21 flake8-bandit 1.7.3 (PyCQA/bandit#496) introduced an `fdata` argument and this just passes a `None` to make things work with the latest version of bandit.
Fixes: tylerwince#21 flake8-bandit 1.7.3 (PyCQA/bandit#496) introduced an `fdata` argument and this just passes a `None` to make things work with the latest version of bandit.
Fixes tylerwince#21 flake8-bandit 1.7.3 (PyCQA/bandit#496) introduced an `fdata` argument and this just passes a `None` to make things work with the latest version of bandit.
Fixes tylerwince#21 flake8-bandit 1.7.3 (PyCQA/bandit#496) introduced an `fdata` argument and this just passes a `None` to make things work with the latest version of bandit.
@@ -15,7 +15,9 @@ | |||
|
|||
|
|||
class BanditNodeVisitor: | |||
def __init__(self, fname, metaast, testset, debug, nosec_lines, metrics): | |||
def __init__( | |||
self, fname, fdata, metaast, testset, debug, nosec_lines, metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bump for visibility, please see the number of issues that are being linked to this PR. This change to BanditNodeVisitor
, which introduces new positional argument fdata
in the middle of the signature, causes a backwards-incompatible break with flake8-bandit
, which uses this object.
Ideally, this new argument should have been added to the end of the signature as an optional kwarg. Barring that, as small as this change is, this is now more than a patch update: I think this should have been released as 1.8.0
instead of 1.7.3
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bandit doesn't guarantee stability of its internals. Tools reaching in and trying to use them will break much like tools that reach directly into Flake8 for things they shouldn't
Fixes tylerwince#21 flake8-bandit 1.7.3 (PyCQA/bandit#496) introduced an `fdata` argument and this just passes a `None` to make things work with the latest version of bandit.
Fixes #495