Skip to content

🔒 fix: replace assert with explicit exception raising in AppiumService - #34

Closed
Dor-bl wants to merge 6 commits into
masterfrom
fix/appium-service-assert-vulnerability-10549833086463993059
Closed

Dor-bl wants to merge 6 commits into
masterfrom
fix/appium-service-assert-vulnerability-10549833086463993059

Conversation

@Dor-bl

@Dor-bl Dor-bl commented Oct 19, 2026

Copy link
Copy Markdown
Owner

🎯 What: Replaced the assert self._cmd statement in AppiumService.is_listening (appium/webdriver/appium_service.py) with an explicit if not self._cmd: check that raises AppiumServiceError.

⚠️ Risk: When Python code is run in optimized mode (python -O), assert statements are stripped out at bytecode compilation time. Leaving assert in production logic allows checks to be bypassed, which could lead to unexpected TypeError or unhandled exceptions when calling dependent methods with None values.

🛡️ Solution: Replaced assert self._cmd with an explicit state validation check that raises AppiumServiceError if self._cmd is empty or uninitialized, and added unit test coverage verifying exception handling.


PR created automatically by Jules for task 10549833086463993059 started by @Dor-bl

claude and others added 2 commits September 12, 2026 22:34
The Release workflow triggers on every push to master. On a fork that means
semantic-release rewrites the version in pyproject.toml, commits the change to
the default branch, tags it and then tries to publish the result to PyPI under
the upstream package name.

Gate the job on the repository name so forks keep a clean master.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjZRpyoEfSCLjTx5ctzQmJ
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@Dor-bl
Dor-bl force-pushed the master branch 2 times, most recently from df25536 to ce054d4 Compare October 26, 2026 18:03
@Dor-bl Dor-bl closed this Nov 9, 2026
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