Skip to content

Introduce shared taint tracking library - #13881

Merged
jketema merged 9 commits into
github:mainfrom
jketema:shared-taint-tracking
Aug 21, 2023
Merged

Introduce shared taint tracking library#13881
jketema merged 9 commits into
github:mainfrom
jketema:shared-taint-tracking

Conversation

@jketema

Copy link
Copy Markdown
Contributor

No description provided.

Comment threadshared/dataflow/codeql/dataflow/TaintTracking.qll Fixed
Comment threadshared/dataflow/codeql/dataflow/TaintTracking.qll Fixed
Comment threadshared/dataflow/codeql/dataflow/TaintTracking.qll Fixed
Comment threadshared/dataflow/codeql/dataflow/TaintTracking.qll Fixed
Comment threadshared/dataflow/codeql/dataflow/TaintTracking.qll Fixed
Comment threadshared/dataflow/codeql/dataflow/TaintTracking.qll Outdated
Comment threadshared/dataflow/codeql/dataflow/TaintTracking.qll Outdated
Comment threadshared/dataflow/codeql/dataflow/TaintTracking.qll Outdated
@aschackmull

Copy link
Copy Markdown
Contributor

A few stylistic comments, otherwise mostly LGTM.

private import DataFlowMake<DataFlowLang> as DataFlow
private import MakeImpl<DataFlowLang> as DataFlowInternal

private module AddTaintDefaults<DataFlowInternal::FullStateConfigSig Config> implements

Check warning

Code scanning / CodeQL

Data flow configuration module naming

Modules implementing a data flow configuration should end in `Config`.
* Constructs a global taint tracking computation.
*/
module Global<DataFlow::ConfigSig Config> implements DataFlow::GlobalFlowSig {
private module Config0 implements DataFlowInternal::FullStateConfigSig {

Check warning

Code scanning / CodeQL

Data flow configuration module naming

Modules implementing a data flow configuration should end in `Config`.
import Config
}

private module C implements DataFlowInternal::FullStateConfigSig {

Check warning

Code scanning / CodeQL

Data flow configuration module naming

Modules implementing a data flow configuration should end in `Config`.
* Constructs a global taint tracking computation using flow state.
*/
module GlobalWithState<DataFlow::StateConfigSig Config> implements DataFlow::GlobalFlowSig {
private module Config0 implements DataFlowInternal::FullStateConfigSig {

Check warning

Code scanning / CodeQL

Data flow configuration module naming

Modules implementing a data flow configuration should end in `Config`.
import Config
}

private module C implements DataFlowInternal::FullStateConfigSig {

Check warning

Code scanning / CodeQL

Data flow configuration module naming

Modules implementing a data flow configuration should end in `Config`.
@aschackmull

aschackmull commented Aug 4, 2023

Copy link
Copy Markdown
Contributor

LGTM now. Although, preferably we'll switch all languages in one go, so we don't have a mix of shared lib usage and parameterised modules.

@jketema

Copy link
Copy Markdown
ContributorAuthor

LGTM now. Although, preferably we'll switch all languages in one go, so we don't have a mix of shared lib usage and parameterised modules.

That is the plan (as part of this PR). I only did C++ first, because I wanted to know if the approach was good.

@aschackmull

Copy link
Copy Markdown
Contributor

Beware that you have an incoming merge conflict in #13851

@jketema

Copy link
Copy Markdown
ContributorAuthor

Beware that you have an incoming merge conflict in #13851

I'll rebase this PR and then kick off all the DCAs.

@jketema
jketemaforce-pushed the shared-taint-tracking branch from 9f12a4e to c4a65e5CompareAugust 4, 2023 20:53
@jketema

Copy link
Copy Markdown
ContributorAuthor

I sightly refactored this to follow #13901

@jketema

jketema commented Aug 7, 2023

Copy link
Copy Markdown
ContributorAuthor

@aschackmullI'm slightly confused by the DCA results. I see OOMs in Java (which seem to be sort of expected), C# and C++. I tried the C++ and C# OOM'ing projects on larger runners to see if there are any suspicious tuple counts stage timings. I see slightly slower stage timings, in a few cases but nothing really jumps out to me.

I re-ran the DCA experiments (which was before the OOM-related revert we did yesterday). All DCA results look uneventful to me, except for the Java ones which show a large number of OOMs. Let me know if I should re-run those with the OOM-related revert.

@jketema
jketema marked this pull request as ready for review August 18, 2023 08:40
@jketema
jketema requested review from a team as code ownersAugust 18, 2023 08:40
hvitved
hvitved previously approved these changes Aug 21, 2023

@hvitvedhvitved left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🎉

Comment threadjava/ql/lib/semmle/code/java/dataflow/TaintTracking.qll

@RasmusWLRasmusWL left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍 for Python

@jketema
jketema merged commit 2d0f73d into github:mainAug 21, 2023
@jketema
jketema deleted the shared-taint-tracking branch August 21, 2023 10:45
Sign up for freeto 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.

6 participants

@jketema@aschackmull@RasmusWL@hvitved@MathiasVP@github-advanced-security