-
Notifications
You must be signed in to change notification settings - Fork 990
chore(bandit): address false positives and other warnings #1502
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
base: main
Are you sure you want to change the base?
Conversation
validate_asset_id(asset_id) | ||
return f""" | ||
query = ( # nosec B608 - safe: asset_id is validated, length limit, no direct execution | ||
f""" |
Check warning
Code scanning / Bandit
Possible SQL injection vector through string-based query construction. Warning
validate_string_for_injection(time_range) | ||
return f""" | ||
query = ( # nosec B608 - safe: exploration_goal, time_range are validated | ||
f""" |
Check warning
Code scanning / Bandit
Possible SQL injection vector through string-based query construction. Warning
|
||
# Use the paginate_aws_response utility for consistent pagination | ||
all_coverages, pagination_metadata = await paginate_aws_response( | ||
all_coverages, pagination_metadata = await paginate_aws_response( # nosec B105: paginate_aws_response is used for pagination |
Check notice
Code scanning / Bandit
Possible hardcoded password: 'NextPageToken' Note
|
||
# Use the paginate_aws_response utility for consistent pagination | ||
all_utilizations, pagination_metadata = await paginate_aws_response( | ||
all_utilizations, pagination_metadata = await paginate_aws_response( # nosec B105: paginate_aws_response is used for pagination |
Check notice
Code scanning / Bandit
Possible hardcoded password: 'NextPageToken' Note
|
||
# Use the paginate_aws_response utility for consistent pagination | ||
all_coverages, pagination_metadata = await paginate_aws_response( | ||
all_coverages, pagination_metadata = await paginate_aws_response( # nosec B105: paginate_aws_response is used for pagination |
Check notice
Code scanning / Bandit
Possible hardcoded password: 'NextToken' Note
|
||
# Use the paginate_aws_response utility for consistent pagination | ||
all_utilizations, pagination_metadata = await paginate_aws_response( | ||
all_utilizations, pagination_metadata = await paginate_aws_response( # nosec B105: paginate_aws_response is used for pagination |
Check notice
Code scanning / Bandit
Possible hardcoded password: 'NextToken' Note
|
||
# Use the paginate_aws_response utility for consistent pagination | ||
all_details, pagination_metadata = await paginate_aws_response( | ||
all_details, pagination_metadata = await paginate_aws_response( # nosec B105: paginate_aws_response is used for pagination |
Check notice
Code scanning / Bandit
Possible hardcoded password: 'NextToken' Note
try: | ||
# Check if Checkov is available | ||
subprocess.run( | ||
subprocess.run( # nosec B603: uses shell=False, inputs are validated, safe file operations, only subprocess calls |
Check notice
Code scanning / Bandit
Starting a process with a partial executable path Note
exec( # nosec B102 - These exec calls are necessary to import modules in the namespace | ||
'from diagrams import Diagram, Cluster, Edge', namespace | ||
) # nosem: python.lang.security.audit.exec-detected.exec-detected | ||
# nosec B102 - These exec calls are necessary to import modules in the namespace | ||
exec( # nosem: python.lang.security.audit.exec-detected.exec-detected | ||
) |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: python.lang.security.audit.exec-detected.exec-detected Warning
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: python.lang.security.audit.exec-detected.exec-detected Warning
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: python.lang.security.audit.exec-detected.exec-detected Warning
Fixes
Summary
Changes
User experience
Checklist
If your change doesn't seem to apply, please leave them unchecked.
Is this a breaking change? (Y/N)
RFC issue number:
Checklist:
Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.