Skip to content
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

Address security issues identified by bandit #1386

Closed
tjtg opened this issue Dec 7, 2020 · 0 comments
Closed

Address security issues identified by bandit #1386

tjtg opened this issue Dec 7, 2020 · 0 comments
Labels
good first issue This issue is simpler to address

Comments

@tjtg
Copy link
Contributor

tjtg commented Dec 7, 2020

Bandit has identified three security related code issues - see PR #1385 and associated Github actions run.

The two assert statements should be easy to replace with a raised exception.
The eval usage will need some investigation in order to determine another approach to implement the same functionality while avoiding use of eval.

@tjtg tjtg added the good first issue This issue is simpler to address label Dec 7, 2020
@tjtg tjtg mentioned this issue Dec 16, 2020
3 tasks
@btrotta-bom btrotta-bom linked a pull request Jan 28, 2021 that will close this issue
@btrotta-bom btrotta-bom removed a link to a pull request Jan 28, 2021
MoseleyS pushed a commit to MoseleyS/improver that referenced this issue Aug 22, 2024
…pv#1421)

* Process weather symbols using nested lists of constraints instead of strings. This avoids the need for eval.

* Sort imports

* Put process method at end of class

* Check that second element of result is correct.

* Use np.isclose for matching thresholds within tolerance

* Fix threshold coord name for vicinity cubes

* Fix comment

* Fix merge mistake

* Minor updates to comments and tests

* Remove unused code; construct_extract_constraint now only accepts single diagnostics, not lists

* Change some references to tolerance properties of WeatherSymbols to instead use the current instance

* Add test for bad input

* Remove unused code

* Fix test

* Fix tests

* Fix formatting

* Change reference to tolerance properties to use self

* Add test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This issue is simpler to address
Projects
None yet
Development

No branches or pull requests

1 participant