You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below is a summary of compliance checks for this PR:
Security Compliance
⚪
Unsafe script usage guidance
Description: The comment suggests accessing logging via driver.script, which may encourage executing arbitrary scripts for logging and could lead to security risks if user input is passed to script execution; verify documentation does not promote unsafe script injection patterns. log_handler.rb [23-27]
Referred Code
# Implements the Log of the WebDriver-BiDi specification# This functionality should be accessed through `driver.script` method## @api private#
def as_json
map do |name, val|
- self[:name] = name.to_s- self[:value] = {type: 'string', value: val.to_s}-- [compact]+ {+ name: name.to_s,+ value: {type: 'string', value: val.to_s}+ }
end
end
Apply / Chat
Suggestion importance[1-10]: 9
__
Why: The suggestion correctly identifies a critical bug where the as_json method mutates the hash it is iterating over, leading to incorrect behavior and data corruption. The proposed fix is accurate and resolves the issue.
High
Learned best practice
Fix inaccurate module comment
Update the comment to accurately reflect that this class implements the Network module, not Navigation, to avoid misleading documentation.
-# Implements the Navigation Module of the WebDriver-BiDi specification-# Continue to use functionality from existing `driver.navigate` method+# Implements the Network Module of the WebDriver-BiDi specification+# Continue to use functionality from existing `driver.network`-related methods
Apply / Chat
Suggestion importance[1-10]: 6
__
Why:
Relevant best practice - Keep API and documentation accurate and consistent by aligning comments/annotations with actual functionality.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
We all know anyone can do whatever they want with Ruby objects, but the source code should indicate which things we should be trying to use.
PR Type
Documentation
Description
Mark low-level BiDi implementation classes as private API
Add
@api privateYARD documentation tags to internal modulesClarify recommended public API alternatives in class documentation
Improve code documentation with module descriptions
Diagram Walkthrough
File Walkthrough
13 files
Add private API documentation to Browser classAdd private API tag and usage guidance to BrowsingContextAdd private API documentation to LogHandler classAdd private API documentation to Network classAdd private API tag to Cookies classAdd private API tag to Credentials classAdd private API tag to Headers classAdd private API tag to InterceptedAuth classAdd private API tag to InterceptedItem classAdd private API tag to InterceptedRequest classAdd private API tag to InterceptedResponse classAdd private API tag to UrlPattern moduleAdd private API documentation to Session class