Skip to content
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

Cpp non constant format as path query #15628

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

Conversation

bdrodes
Copy link
Contributor

@bdrodes bdrodes commented Feb 15, 2024

Modifying the cpp non const format query to be a path query.

Removed dead comment
…cppnon-constant-format-alter-not-const-source
…cppnon-constant-format-alter-not-const-source

# Conflicts:
#	cpp/ql/src/Likely Bugs/Format/NonConstantFormat.ql
… We will test if this causes undesirable cases in DCA and then choose which approach is best.
…he output alert to be more precise on what is being alerted. Minor changes to the query itself to avoid redundancies with argv.
@bdrodes bdrodes requested a review from a team as a code owner February 15, 2024 17:16
@github-actions github-actions bot added the C++ label Feb 15, 2024
p = node.asParameter() and
// Ignore main's argv parameter as it is already considered a `FlowSource`
// not ignoring it will result in path redundancies
(f.getName() = "main" implies p.getName() != "argv")
Copy link
Contributor

Choose a reason for hiding this comment

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

This assumes the parameter is always called argv. That does not have to be true.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I should've copied more verbatim what the current argv model is doing. I'll fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants