Insecure CORS policy
The same-origin policy prevents Web application front-ends from loading resources that come from a different domain, protocol, or Cross-Origin Resource Sharing (CORS) policies can be used to relax this restriction. CORS policies that are too permissive may lead to loading content from untrusted or malicious sources.
from flask import app, request
from flask import Flask
from flask_cors import CORS


app = Flask(__name__)
# Noncompliant: the send_wildcard is set to allow any domain.
CORS(app, send_wildcard=True)
from flask import app, request
from flask import Flask
from flask_cors import CORS

app = Flask(__name__)
# Compliant: the send_wildcard is set to allow only a specific list of
# trusted domains.
CORS(app, send_wildcard=False)