Skip to content

Commit cc22f94

Browse files
authored
Merge pull request #8565 from sfayer/check_passwd
[int] Check for hardcoded passwords
2 parents 3af6d21 + 687fb66 commit cc22f94

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/DIRAC/Core/DISET/TransferClient.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def _sendTransferHeader(self, actionName, fileInfo):
4040
self._disconnect(trid)
4141
return S_ERROR(f"Cound not request transfer: {str(e)}")
4242

43-
def sendFile(self, filename, fileId, token=""):
43+
def sendFile(self, filename, fileId, token=""): # nosec B107
4444
"""
4545
Send a file to server
4646
@@ -74,7 +74,7 @@ def sendFile(self, filename, fileId, token=""):
7474
fileHelper.oFile.close()
7575
self._disconnect(trid)
7676

77-
def receiveFile(self, filename, fileId, token=""):
77+
def receiveFile(self, filename, fileId, token=""): # nosec B107
7878
"""
7979
Receive a file from the server
8080
@@ -117,7 +117,7 @@ def __checkFileList(self, fileList):
117117
bogusEntries.append(entry)
118118
return bogusEntries
119119

120-
def sendBulk(self, fileList, bulkId, token="", compress=True, bulkSize=-1, onthefly=True):
120+
def sendBulk(self, fileList, bulkId, token="", compress=True, bulkSize=-1, onthefly=True): # nosec B107
121121
"""
122122
Send a bulk of files to server
123123
@@ -154,7 +154,7 @@ def sendBulk(self, fileList, bulkId, token="", compress=True, bulkSize=-1, onthe
154154
finally:
155155
self._disconnect(trid)
156156

157-
def receiveBulk(self, destDir, bulkId, token="", compress=True):
157+
def receiveBulk(self, destDir, bulkId, token="", compress=True): # nosec B107
158158
"""
159159
Receive a bulk of files from server
160160
@@ -188,7 +188,7 @@ def receiveBulk(self, destDir, bulkId, token="", compress=True):
188188
finally:
189189
self._disconnect(trid)
190190

191-
def listBulk(self, bulkId, token="", compress=True):
191+
def listBulk(self, bulkId, token="", compress=True): # nosec B107
192192
"""
193193
List the contents of a bulk
194194

src/DIRAC/Core/Utilities/MySQL.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ class MySQL:
504504

505505
__connectionPools = {}
506506

507-
def __init__(self, hostName="localhost", userName="dirac", passwd="dirac", dbName="", port=3306, debug=False):
507+
def __init__(self, hostName="localhost", userName="dirac", passwd=None, dbName="", port=3306, debug=False):
508508
"""
509509
set MySQL connection parameters and try to connect
510510

src/DIRAC/FrameworkSystem/private/authorization/utils/Tokens.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def groups(self):
182182
"""
183183
return [s.split(":")[1] for s in self.scopes if s.startswith("g:") and s.split(":")[1]]
184184

185-
def get_payload(self, token_type="access_token"):
185+
def get_payload(self, token_type="access_token"): # nosec B107
186186
"""Decode token
187187
188188
:param str token_type: token type
@@ -196,7 +196,7 @@ def get_payload(self, token_type="access_token"):
196196
options=dict(verify_signature=False, verify_exp=False, verify_aud=False, verify_nbf=False),
197197
)
198198

199-
def get_claim(self, claim, token_type="access_token"):
199+
def get_claim(self, claim, token_type="access_token"): # nosec B107
200200
"""Get token claim without verification
201201
202202
:param str attr: attribute

src/DIRAC/WorkloadManagementSystem/Service/TornadoSandboxStoreHandler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ def initializeRequest(self):
2020
def export_streamFromClient(self, fileId, token, fileSize, data):
2121
return self._getFromClient(fileId, token, fileSize, data=data)
2222

23-
def export_streamToClient(self, fileId, token=""):
23+
def export_streamToClient(self, fileId, token=""): # nosec B107
2424
return self._sendToClient(fileId, token, raw=True)

0 commit comments

Comments
 (0)