Go: Revert problematic conversion from QL-specified sink nodes to models-as-data; add change note for one correct but undocumented fix#17296
Merged
smowton merged 15 commits intogithub:codeql-cli-2.18.3from Aug 25, 2024
Conversation
This reverts commit 6f5a045.
This reverts commit fa472f5.
This reverts commit 2d2afb1.
This reverts commit ec9d88b.
This reverts commit 652dd88.
This reverts commit 501bb3e.
This reverts commit ad21357.
This reverts commit 3eb5b26.
This reverts commit 3b2b7d7.
This reverts commit ba31041.
This reverts commit 7ad63fc.
This reverts commit db559f7.
This reverts commit ce0cb12.
…hods removed)" This reverts commit 06f86dd.
Contributor
Author
Contributor
Author
|
That didn't work because latest semmle-code no longer works with 2.18.2 ql. New DCA: https://github.com/github/codeql-dca-main/issues/23231 |
Contributor
Author
|
See https://github.com/github/codeql-dca-main/issues/23231 for detailed outcome of DCA -- 4 projects continue to cause trouble in DCA due to go1.23 requirement; they don't appear to cause trouble in QA. Issues otherwise resolved as expected. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR:
io/ioutil.WriteFile, actually fixed a bug wherein writing user-controlled data to a non-user-controlled path would be incorrectly flagged as a path-injection vulnerability.Note there was a small amount of conflict resolution around the revert, due to Beego having converted other kinds of models to MaD (uneventfully) in the meantime, and conflicts surrounding the introduction of
DefaultLoggerCall, which will need resolving again on reinstating these commits.The problems leading to the reverts were:
any(Method m | m.hasQualifiedName("mypackage", "MyType", "mymethod").getACall()), which accounts for embedding (viahasQualifiedName) and interface implementation including subinterfaces (viagetACall). Some relevant MaD models simply setsubtypes = false, but some that setsubtypes = truestill missed the subinterface case (e.g. usinglogrus.FieldLogger, a subinterface of the modelledlogrus.Logger). This lead to widespread new false negatives.Release QA showing the full extent of the trouble can be found at https://dataexplorer.azure.com/dashboards/751779bb-c379-4cc4-8f09-0448e8c0cb39?p-tag_left=v-QA-2.18.2-2024-08-21&p-tag_right=v-QA-2.18.3-2024-08-21&p-languages=v-go&p-_build_modes=all&p-_runner_oses=all&p-_measure=v-steps%3A+e2e#5f0f4e2a-de2f-4853-b62f-be252143fd87
I now intend to create a DCA run to quickly confirm that all alert differences have been removed between
codeql-cli-2.18.2and this PR tip, except for the correct FP resolutions caused by the conversion ofio/ioutil.WriteFileto MaD.