Skip to content

Commit 02a97b0

Browse files
committed
Python: Move urllib and urllib2 to be part of stdlib modeling
1 parent c65839b commit 02a97b0

File tree

10 files changed

+22
-13
lines changed

10 files changed

+22
-13
lines changed

python/ql/lib/semmle/python/Frameworks.qll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ private import semmle.python.frameworks.Toml
4747
private import semmle.python.frameworks.Tornado
4848
private import semmle.python.frameworks.Twisted
4949
private import semmle.python.frameworks.Ujson
50-
private import semmle.python.frameworks.Urllib
51-
private import semmle.python.frameworks.Urllib2
5250
private import semmle.python.frameworks.Urllib3
5351
private import semmle.python.frameworks.Yaml
5452
private import semmle.python.frameworks.Yarl

python/ql/lib/semmle/python/frameworks/Stdlib.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ private import semmle.python.frameworks.PEP249
1313
private import semmle.python.frameworks.internal.PoorMansFunctionResolution
1414
private import semmle.python.frameworks.internal.SelfRefMixin
1515
private import semmle.python.frameworks.internal.InstanceTaintStepsHelper
16+
// modeling split over multiple files to keep this file from becoming too big
17+
private import semmle.python.frameworks.Stdlib.Urllib
18+
private import semmle.python.frameworks.Stdlib.Urllib2
1619

1720
/** Provides models for the Python standard library. */
1821
module Stdlib {

python/ql/lib/semmle/python/frameworks/Urllib.qll renamed to python/ql/lib/semmle/python/frameworks/Stdlib/Urllib.qll

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
/**
2-
* Provides classes modeling security-relevant aspects of the `urllib` PyPI package.
3-
* See https://docs.python.org/3.9/library/urllib.html
2+
* Provides classes modeling security-relevant aspects of the `urllib` module, part of
3+
* the Python standard library.
4+
*
5+
* See
6+
* - https://docs.python.org/2/library/urllib.html
7+
* - https://docs.python.org/3/library/urllib.html
48
*/
59

610
private import python
711
private import semmle.python.Concepts
812
private import semmle.python.ApiGraphs
913

1014
/**
11-
* Provides models for the `Urllib` PyPI package.
12-
* see https://docs.python.org/3.9/library/urllib.html
15+
* Provides models for the `urllib` module, part of
16+
* the Python standard library.
17+
*
18+
* See
19+
* - https://docs.python.org/2/library/urllib.html
20+
* - https://docs.python.org/3/library/urllib.html
1321
*/
1422
private module Urllib {
1523
/**

python/ql/lib/semmle/python/frameworks/Urllib2.qll renamed to python/ql/lib/semmle/python/frameworks/Stdlib/Urllib2.qll

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
/**
2-
* Provides classes modeling security-relevant aspects of the `urllib2` PyPI package.
2+
* Provides classes modeling security-relevant aspects of the `urllib2` module, part of
3+
* the Python 2 standard library.
4+
*
35
* See https://docs.python.org/2/library/urllib2.html
46
*/
57

@@ -8,8 +10,10 @@ private import semmle.python.Concepts
810
private import semmle.python.ApiGraphs
911

1012
/**
11-
* Provides models for the `urllib2` PyPI package.
12-
* see https://docs.python.org/2/library/urllib2.html
13+
* Provides models for the the `urllib2` module, part of
14+
* the Python 2 standard library.
15+
*
16+
* See https://docs.python.org/2/library/urllib2.html
1317
*/
1418
private module Urllib2 {
1519
/**

python/ql/test/library-tests/frameworks/urllib/ConceptsTest.expected

Whitespace-only changes.

python/ql/test/library-tests/frameworks/urllib/ConceptsTest.ql

Lines changed: 0 additions & 2 deletions
This file was deleted.

python/ql/test/library-tests/frameworks/urllib2/ConceptsTest.expected

Whitespace-only changes.

python/ql/test/library-tests/frameworks/urllib2/ConceptsTest.ql

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)