Hello,
In codeql-python, I quoted the function of file1 in file2. In this case, can the data stream be passed?
file1: cmd.py
import subprocess
from subprocess import check_output
def exec_cmd(cmd):
return subprocess.check_output(cmd)
file2:
import flask
import subprocess
from subprocess import check_output
from flask import request
from cmd import exec_cmd
app = flask.Flask(__name__)
@app.route('/index15')
def index15():
tmp = request.args.get('c', 'ls')
return exec_cmd(rmp)