Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions bugbot_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
"""Throwaway file to check that Cursor Bugbot reviews PRs. Do not merge."""


def add_tag(tag, tags=[]):
tags.append(tag)
return tags

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Mutable default argument shares state

Medium Severity

add_tag uses a mutable list as the default for tags, so one list is reused across calls. When callers omit tags, earlier tags leak into later results and independent invocations share state.

Fix in Cursor聽Fix in Web

Triggered by project rule: Bugbot review rules

Reviewed by Cursor Bugbot for commit 0d0cbfd. Configure here.



def last_item(items):
return items[len(items)]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Off-by-one index always fails

High Severity

last_item indexes items at len(items), which is one past the last valid position. Every call raises IndexError instead of returning the final element.

Fix in Cursor聽Fix in Web

Reviewed by Cursor Bugbot for commit 0d0cbfd. Configure here.



def read_config(path):
try:
return open(path).read()
except:
return None

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bare except swallows all errors

Medium Severity

read_config uses a bare except, which the Python review rules flag. That catch-all hides unexpected failures, including KeyboardInterrupt and SystemExit, so real errors and shutdown signals are swallowed and the caller only sees None.

Fix in Cursor聽Fix in Web

Triggered by project rule: Bugbot review rules

Reviewed by Cursor Bugbot for commit 0d0cbfd. Configure here.

Loading