Skip to content

Conversation

@aegilops
Copy link
Collaborator

No description provided.

@aegilops aegilops requested a review from a team as a code owner November 18, 2025 17:45
@aegilops aegilops requested review from adrienpessu, Copilot and felickz and removed request for a team November 18, 2025 17:45
@aegilops aegilops merged commit a955cfb into main Nov 18, 2025
8 checks passed
Copilot finished reviewing on behalf of aegilops November 18, 2025 17:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR improves code quality by removing unused imports, making exception handling more specific, and standardizing generator return behavior.

Key Changes:

  • Removed unused time import from enrich_code_scanning_alerts.py
  • Replaced bare except: clause with specific exception types
  • Modified generator functions to explicitly yield and return None

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
list_secret_scanning_alerts.py Refactored generator function to explicitly yield alerts and return None instead of returning the generator directly, improving consistency between raw and processed output paths
enrich_code_scanning_alerts.py Removed unused time import and replaced bare except: with specific exception types for better error handling

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

rule_metadata["security-severity"]
)
except:
except (FloatingPointError, ValueError):
Copy link

Copilot AI Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FloatingPointError is not the appropriate exception to catch here. The float() function raises ValueError when it cannot parse the input string, not FloatingPointError. FloatingPointError is only raised during floating-point arithmetic operations (like division by zero with floating-point numbers), not during string-to-float conversion. The correct exception handling should be except ValueError: only.

Suggested change
except (FloatingPointError, ValueError):
except ValueError:

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants