Skip to content

Rust: Clean up some odds and ends #20167

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

geoffw0
Copy link
Contributor

@geoffw0 geoffw0 commented Aug 4, 2025

Clean up some odds and ends:

  • address a maintainability issue in the QLDoc for the sinkModel predicate.
  • remove unnecessary pattern matching in CleartextLoggingExtensions.qll.
  • reword the alert message for rust/cleartext-transmission to be more consistent with similar Rust and non-Rust queries.

@geoffw0 geoffw0 requested a review from a team as a code owner August 4, 2025 18:56
@geoffw0 geoffw0 added the no-change-note-required This PR does not need a change note label Aug 4, 2025
@geoffw0 geoffw0 removed the request for review from a team August 4, 2025 18:56
@geoffw0 geoffw0 added the Rust Pull requests that update Rust code label Aug 4, 2025
@Copilot Copilot AI review requested due to automatic review settings August 4, 2025 18:56
Copy link
Contributor

@Copilot 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 performs minor cleanup tasks across the Rust security analysis codebase to improve maintainability and consistency. The changes focus on documentation clarity, simplifying pattern matching, and standardizing alert messages.

  • Updated QLDoc for the sinkModel predicate to be more maintainable by removing hardcoded examples
  • Simplified pattern matching in CleartextLoggingExtensions.qll by removing unnecessary wildcards
  • Reworded alert message for rust/cleartext-transmission to match consistent formatting

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
rust/ql/test/query-tests/security/CWE-311/CleartextTransmission.expected Updated expected test output to reflect new alert message format
rust/ql/src/queries/security/CWE-311/CleartextTransmission.ql Changed alert message from "The operation" to "This operation" format
rust/ql/lib/codeql/rust/security/CleartextLoggingExtensions.qll Simplified pattern matching by removing wildcard usage
rust/ql/lib/codeql/rust/dataflow/internal/ModelsAsData.qll Updated documentation to be more maintainable and less specific

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-change-note-required This PR does not need a change note Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant