Skip to content

Commit

Permalink
Fix qldoc, formatting, and redundant import warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
joefarebrother committed Nov 20, 2024
1 parent 0011ad9 commit 2d04af8
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 12 deletions.
3 changes: 1 addition & 2 deletions python/ql/lib/semmle/python/Concepts.qll
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ class TemplateConstruction extends DataFlow::Node instanceof TemplateConstructio
DataFlow::Node getSourceArg() { result = super.getSourceArg() }
}

/** Provides classes for modelling template construction APIs. */
/** Provides classes for modeling template construction APIs. */
module TemplateConstruction {
/**
* A data-flow node that constructs a template in a templating engine.
Expand All @@ -886,7 +886,6 @@ module TemplateConstruction {
}
}


/** Provides classes for modeling HTTP-related APIs. */
module Http {
/** Gets an HTTP verb, in upper case */
Expand Down
1 change: 0 additions & 1 deletion python/ql/lib/semmle/python/frameworks/Airspeed.qll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

private import python
private import semmle.python.dataflow.new.DataFlow
private import semmle.python.ApiGraphs
private import semmle.python.Concepts

Expand Down
1 change: 0 additions & 1 deletion python/ql/lib/semmle/python/frameworks/Chameleon.qll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

private import python
private import semmle.python.dataflow.new.DataFlow
private import semmle.python.ApiGraphs
private import semmle.python.Concepts

Expand Down
1 change: 0 additions & 1 deletion python/ql/lib/semmle/python/frameworks/Chevron.qll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

private import python
private import semmle.python.dataflow.new.DataFlow
private import semmle.python.ApiGraphs
private import semmle.python.Concepts

Expand Down
2 changes: 0 additions & 2 deletions python/ql/lib/semmle/python/frameworks/Django.qll
Original file line number Diff line number Diff line change
Expand Up @@ -3000,7 +3000,6 @@ module PrivateDjango {
// ---------------------------------------------------------------------------
// Templates
// ---------------------------------------------------------------------------

/** A call to `django.template.Template` */
private class DjangoTemplateConstruction extends TemplateConstruction::Range, API::CallNode {
DjangoTemplateConstruction() {
Expand All @@ -3009,6 +3008,5 @@ module PrivateDjango {

override DataFlow::Node getSourceArg() { result = this.getArg(0) }
}

// TODO: Support `from_string` on instances of `django.template.Engine`.
}
1 change: 0 additions & 1 deletion python/ql/lib/semmle/python/frameworks/Genshi.qll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

private import python
private import semmle.python.dataflow.new.DataFlow
private import semmle.python.ApiGraphs
private import semmle.python.Concepts

Expand Down
1 change: 0 additions & 1 deletion python/ql/lib/semmle/python/frameworks/Jinja2.qll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

private import python
private import semmle.python.dataflow.new.DataFlow
private import semmle.python.ApiGraphs
private import semmle.python.Concepts
private import semmle.python.frameworks.data.ModelsAsData
Expand Down
1 change: 0 additions & 1 deletion python/ql/lib/semmle/python/frameworks/Mako.qll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

private import python
private import semmle.python.dataflow.new.DataFlow
private import semmle.python.ApiGraphs
private import semmle.python.Concepts

Expand Down
1 change: 0 additions & 1 deletion python/ql/lib/semmle/python/frameworks/TRender.qll
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/

private import python
private import semmle.python.dataflow.new.DataFlow
private import semmle.python.ApiGraphs
private import semmle.python.Concepts

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@ import semmle.python.dataflow.new.DataFlow
import semmle.python.dataflow.new.TaintTracking
import TemplateInjectionCustomizations::TemplateInjection

module TemplateInjectionConfig implements DataFlow::ConfigSig {
private module TemplateInjectionConfig implements DataFlow::ConfigSig {
predicate isSource(DataFlow::Node node) { node instanceof Source }

predicate isSink(DataFlow::Node node) { node instanceof Sink }

predicate isBarrierIn(DataFlow::Node node) { node instanceof Sanitizer }
}

/** Global taint-tracking for detecting "template injection" vulnerabilities. */
module TemplateInjectionFlow = TaintTracking::Global<TemplateInjectionConfig>;

0 comments on commit 2d04af8

Please sign in to comment.