sonatype-lift[bot] commented on a change in pull request #178: URL: https://github.com/apache/skywalking-python/pull/178#discussion_r794172917
########## File path: tests/plugin/data/sw_mysqlclient/consumer.py ########## @@ -0,0 +1,32 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import requests + + +if __name__ == '__main__': + from flask import Flask, jsonify + + app = Flask(__name__) + + @app.route('/users', methods=['POST', 'GET']) + def application(): + res = requests.post('http://provider:9091/users') + return jsonify(res.json()) + + PORT = 9090 + app.run(host='0.0.0.0', port=PORT, debug=True) Review comment: *flask_debug_true:* A Flask app appears to be run with debug=True, which exposes the Werkzeug debugger and allows the execution of arbitrary code. (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) ########## File path: tests/plugin/data/sw_mysqlclient/provider.py ########## @@ -0,0 +1,39 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import time + +if __name__ == '__main__': + from flask import Flask, jsonify + import MySQLdb + + app = Flask(__name__) + + @app.route('/users', methods=['POST', 'GET']) + def application(): + time.sleep(0.5) + connection = MySQLdb.connect(host='127.0.0.1', user='root', passwd='123456', db='mysql', charset='utf8mb4') + with connection.cursor() as cursor: + sql = 'select * from user where user = %s' + cursor.execute(sql, ('root',)) + + connection.close() + + return jsonify({'song': 'Despacito', 'artist': 'Luis Fonsi'}) + + PORT = 9091 + app.run(host='0.0.0.0', port=PORT, debug=True) Review comment: *flask_debug_true:* A Flask app appears to be run with debug=True, which exposes the Werkzeug debugger and allows the execution of arbitrary code. (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) ########## File path: tests/plugin/data/sw_mysqlclient/services/consumer.py ########## @@ -0,0 +1,32 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import requests + + +if __name__ == '__main__': + from flask import Flask, jsonify + + app = Flask(__name__) + + @app.route('/users', methods=['POST', 'GET']) + def application(): + res = requests.post('http://provider:9091/users') + return jsonify(res.json()) + + PORT = 9090 + app.run(host='0.0.0.0', port=PORT, debug=True) Review comment: *flask_debug_true:* A Flask app appears to be run with debug=True, which exposes the Werkzeug debugger and allows the execution of arbitrary code. (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) ########## File path: tests/plugin/data/sw_mysqlclient/services/provider.py ########## @@ -0,0 +1,39 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import time + +if __name__ == '__main__': + from flask import Flask, jsonify + import MySQLdb + + app = Flask(__name__) + + @app.route('/users', methods=['POST', 'GET']) + def application(): + time.sleep(0.5) + connection = MySQLdb.connect(host='127.0.0.1', user='root', passwd='123456', db='mysql', charset='utf8mb4') + with connection.cursor() as cursor: + sql = 'select * from user where user = %s' + cursor.execute(sql, ('root',)) + + connection.close() + + return jsonify({'song': 'Despacito', 'artist': 'Luis Fonsi'}) + + PORT = 9091 + app.run(host='0.0.0.0', port=PORT, debug=True) Review comment: *flask_debug_true:* A Flask app appears to be run with debug=True, which exposes the Werkzeug debugger and allows the execution of arbitrary code. (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) ########## File path: tests/plugin/data/sw_mysqlclient/consumer.py ########## @@ -0,0 +1,32 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import requests + + +if __name__ == '__main__': + from flask import Flask, jsonify + + app = Flask(__name__) + + @app.route('/users', methods=['POST', 'GET']) + def application(): + res = requests.post('http://provider:9091/users') + return jsonify(res.json()) + + PORT = 9090 + app.run(host='0.0.0.0', port=PORT, debug=True) Review comment: *hardcoded_bind_all_interfaces:* Possible binding to all interfaces. (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) ########## File path: tests/plugin/data/sw_mysqlclient/provider.py ########## @@ -0,0 +1,39 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import time + +if __name__ == '__main__': + from flask import Flask, jsonify + import MySQLdb + + app = Flask(__name__) + + @app.route('/users', methods=['POST', 'GET']) + def application(): + time.sleep(0.5) + connection = MySQLdb.connect(host='127.0.0.1', user='root', passwd='123456', db='mysql', charset='utf8mb4') + with connection.cursor() as cursor: + sql = 'select * from user where user = %s' + cursor.execute(sql, ('root',)) + + connection.close() + + return jsonify({'song': 'Despacito', 'artist': 'Luis Fonsi'}) + + PORT = 9091 + app.run(host='0.0.0.0', port=PORT, debug=True) Review comment: *hardcoded_bind_all_interfaces:* Possible binding to all interfaces. (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) ########## File path: tests/plugin/data/sw_mysqlclient/services/consumer.py ########## @@ -0,0 +1,32 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import requests + + +if __name__ == '__main__': + from flask import Flask, jsonify + + app = Flask(__name__) + + @app.route('/users', methods=['POST', 'GET']) + def application(): + res = requests.post('http://provider:9091/users') + return jsonify(res.json()) + + PORT = 9090 + app.run(host='0.0.0.0', port=PORT, debug=True) Review comment: *hardcoded_bind_all_interfaces:* Possible binding to all interfaces. (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) ########## File path: tests/plugin/data/sw_mysqlclient/services/provider.py ########## @@ -0,0 +1,39 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import time + +if __name__ == '__main__': + from flask import Flask, jsonify + import MySQLdb + + app = Flask(__name__) + + @app.route('/users', methods=['POST', 'GET']) + def application(): + time.sleep(0.5) + connection = MySQLdb.connect(host='127.0.0.1', user='root', passwd='123456', db='mysql', charset='utf8mb4') + with connection.cursor() as cursor: + sql = 'select * from user where user = %s' + cursor.execute(sql, ('root',)) + + connection.close() + + return jsonify({'song': 'Despacito', 'artist': 'Luis Fonsi'}) + + PORT = 9091 + app.run(host='0.0.0.0', port=PORT, debug=True) Review comment: *hardcoded_bind_all_interfaces:* Possible binding to all interfaces. (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) ########## File path: tests/plugin/data/sw_mysqlclient/provider.py ########## @@ -0,0 +1,39 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import time + +if __name__ == '__main__': + from flask import Flask, jsonify + import MySQLdb + + app = Flask(__name__) + + @app.route('/users', methods=['POST', 'GET']) + def application(): + time.sleep(0.5) + connection = MySQLdb.connect(host='127.0.0.1', user='root', passwd='123456', db='mysql', charset='utf8mb4') Review comment: *hardcoded_password_funcarg:* Possible hardcoded password: '123456' (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) ########## File path: tests/plugin/data/sw_mysqlclient/services/provider.py ########## @@ -0,0 +1,39 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import time + +if __name__ == '__main__': + from flask import Flask, jsonify + import MySQLdb + + app = Flask(__name__) + + @app.route('/users', methods=['POST', 'GET']) + def application(): + time.sleep(0.5) + connection = MySQLdb.connect(host='127.0.0.1', user='root', passwd='123456', db='mysql', charset='utf8mb4') Review comment: *hardcoded_password_funcarg:* Possible hardcoded password: '123456' (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
