4 ms·
This article's interesting. But my biggest takeaway is the existence of Bandit [1]. It looks really neat. This "try_except_pass" check for example [2], is a
by wyldfire 11y ago
This article's interesting. But my biggest takeaway is the existence of Bandit [1]. It looks really neat.
This "try_except_pass" check for example [2], is a great one. It might be rated "Low" severity from a security context. But from a functionality point-of-view, it's high on my list. It masks NameError among many others. You very nearly always want NameError to propagate, lest you conceal a glaring design error.
[1] https://github.com/openstack/bandit https://github.com/openstack/bandit
[2] https://github.com/openstack/bandit/blob/430dfceca9cebd7ebe4c808f65bcace22965911e/bandit/plugins/try_except_pass.py https://github.com/openstack/bandit/blob/430dfceca9cebd7ebe4...
- ryan_lane 11y agoYeah. Bandit is really nice. We're also really excited about it and are working on enabling many of the checks :).
- nbadg 11y agoI would be ecstatic if Bandit integrated with Code Climate. But wait, there's more! 18F is discussing pushing for exactly that. [1] There's also a sorta-recent call on Twitter to figure out interest. [2] Speak up if you think it would be useful! [1] https://trello.com/c/PTL7z9uU/20-investigate-writing-a-code-climate-platform-engine-for-bandit https://trello.com/c/PTL7z9uU/20-investigate-writing-a-code-... [2] https://twitter.com/aidanfeldman/status/695670289879928832 https://twitter.com/aidanfeldman/status/695670289879928832