File tree Expand file tree Collapse file tree 3 files changed +7
-8
lines changed
Expand file tree Collapse file tree 3 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -10,21 +10,21 @@ class TestSonarUseSecureProtocols(SonarIntegrationTest):
1010 code_path = "tests/samples/use_secure_protocols.py"
1111 replacement_lines = [
1212 (
13- 5 ,
13+ 4 ,
1414 """url = "https://example.com"\n """ ,
1515 ),
1616 ]
1717 # fmt: off
1818 expected_diff = (
1919 """--- \n """
2020 """+++ \n """
21- """@@ -2,4 +2,4 @@\n """
21+ """@@ -1,4 +1,4 @@\n """
22+ ''' import ftplib\n '''
2223 ''' import smtplib\n '''
23- ''' import telnetlib\n '''
2424 ''' \n '''
2525 '''-url = "http://example.com"\n '''
2626 '''+url = "https://example.com"\n '''
2727 )
2828 # fmt: on
29- expected_line_change = "5 "
29+ expected_line_change = "4 "
3030 change_description = SonarUseSecureProtocolsTransformer .change_description
Original file line number Diff line number Diff line change 136136 "securityCategory" : " encrypt-data" ,
137137 "vulnerabilityProbability" : " LOW" ,
138138 "status" : " TO_REVIEW" ,
139- "line" : 5 ,
139+ "line" : 4 ,
140140 "message" : " Using http protocol is insecure. Use https instead" ,
141141 "creationDate" : " 2025-01-22T13:20:10+0100" ,
142142 "updateDate" : " 2025-01-22T13:29:45+0100" ,
143143 "textRange" : {
144- "startLine" : 5 ,
145- "endLine" : 5 ,
144+ "startLine" : 4 ,
145+ "endLine" : 4 ,
146146 "startOffset" : 6 ,
147147 "endOffset" : 26
148148 },
Original file line number Diff line number Diff line change 11import ftplib
22import smtplib
3- import telnetlib
43
54url = "http://example.com"
You can’t perform that action at this time.
0 commit comments