Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Improvements to clear-text logging query#243

Merged
max-schaefer merged 10 commits intogithub:masterfrom
max-schaefer:cve-2019-11250
Jul 7, 2020
Merged

Improvements to clear-text logging query#243
max-schaefer merged 10 commits intogithub:masterfrom
max-schaefer:cve-2019-11250

Conversation

@max-schaefer
Copy link
Copy Markdown
Contributor

The overall aim of this PR is twofold: (1) flag CVE-2019-11250, (2) without introducing lots of false positives.

The first two commits are all it takes to achieve (1): extend our model of the glog logging library to also include a fork that Kubernetes uses, and recognise HTTP-request headers (in particular Authorization) as a source of confidential data.

All the other commits are about achieving (2); see individual commit messages for explanations.

On the whole, the results are good (internal link): we flag the CVE in the vulnerable version, and don't flag it in the fixed version. We also flag the same CVE in two other old versions of Kubernetes that we have in our benchmark suite.

Additionally, we lose a large number of alerts. I have looked through most of them, and they all looked like false positives, many of them involving spurious flow through imprecisely resolved calls to String or Error, and a few where we consider the first argument of Fprintf and its cousins as a sink, which makes very little sense.

There were a few mild performance regressions at first, but rerunning made them go away.

@max-schaefer max-schaefer requested a review from a team July 3, 2020 14:17
Copy link
Copy Markdown
Contributor

@owen-mc owen-mc left a comment

Choose a reason for hiding this comment

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

The changes to CleartextLogging.expected in "Teach CleartextLogging not to track through" should be in the following commit, "Make clear-text logging sources more precise."

@max-schaefer max-schaefer merged commit bc778b5 into github:master Jul 7, 2020
ceh pushed a commit to ceh-forks/codeql-go that referenced this pull request Jul 22, 2020
IncompleteHostnameRegexp: Use a reluctant regexp
@max-schaefer max-schaefer deleted the cve-2019-11250 branch August 28, 2020 06:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants