-
Notifications
You must be signed in to change notification settings - Fork 145
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
Enable S rule #1857
Enable S rule #1857
Conversation
@@ -29,7 +29,7 @@ | |||
|
|||
BASE_URL = "https://<domain>.my.salesforce.com" | |||
API_VERSION = "v58.0" | |||
TOKEN_ENDPOINT = "/services/oauth2/token" | |||
TOKEN_ENDPOINT = "/services/oauth2/token" # noqa S105 |
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.
Wild that it thinks this is a password 🤷🏻
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.
Yeah I think the word "TOKEN" triggered it
@@ -128,6 +127,28 @@ async def _start_service(actions, config, loop): | |||
return await multiservice.run() | |||
|
|||
|
|||
def get_event_loop(uvloop=False): |
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.
Out of curiosity, why did get_event_loop
have to be moved?
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.
Cause it had a "try/except" with except
that does nothing. I've added a logger statement there and moved to the only place where the function is used
I agree having this on for tests makes sense. If it ends up raising too many false positives then we can always disable it. |
💔 Failed to create backport PR(s)The backport operation could not be completed due to the following error: The backport PRs will be merged automatically after passing CI. To backport manually run: |
Slightly controversial potentially rule:
Enabling "S" rule for linter: https://pypi.org/project/flake8-bandit/
There are a lot of subrules, but generally this group is about security-related issues.
Reported problems:
All SQL-reported problems will be investigated and fixed later, thus I've added an ignore rule for now, all others I've manually checked and marked as non-problem.
For now I've also ignored it in test files, manually checking them, but would like to discuss it further - to me it makes sense to enable it for tests too, so that if some credentials are leaked by accident, then the linter will complain.