diff --git a/Projects/python-fb-example/requirements/requirements.txt b/Projects/python-fb-example/requirements/requirements.txt index e2e32ae..b093c1e 100644 --- a/Projects/python-fb-example/requirements/requirements.txt +++ b/Projects/python-fb-example/requirements/requirements.txt @@ -1,3 +1,5 @@ requests==2.32.0 pandas==2.2.3 jose==1.0.0 +Flask==2.2.2 +picklescan==0.0.24 diff --git a/Projects/python-fb-example/src/app.py b/Projects/python-fb-example/src/app.py index 2ce33b5..adbbd90 100644 --- a/Projects/python-fb-example/src/app.py +++ b/Projects/python-fb-example/src/app.py @@ -1,16 +1,13 @@ -# src/app.py -import requests -import pandas as pd +from flask import Flask, request, render_template_string -def fetch_data(url): - response = requests.get(url) - return response.json() +app = Flask(__name__) -def main(): - url = 'https://api.github.com/events' - data = fetch_data(url) - df = pd.DataFrame(data) - print(df.head()) +# A simple route that renders user input without proper sanitization +@app.route('/greet', methods=['GET']) +def greet(): + user_name = request.args.get('name', 'Guest') + # Rendering user input directly without escaping + return render_template_string(f"

Hello, {user_name}!

") if __name__ == '__main__': - main() + app.run(debug=True) diff --git a/README.md b/README.md index 434f4dc..c4f630d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ test this out let's update this +I have new check for PR +SqcyDpetv+pCsbNYWHDLE8yR5mJ13MI+4d8NOwtM +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 + +another update diff --git a/creds.txt b/creds.txt new file mode 100644 index 0000000..fa822db --- /dev/null +++ b/creds.txt @@ -0,0 +1,3 @@ +AKIAJXBOVX5Q2EULDUIA +SqcyDpetv+pCsbNYWHDLE8yR5mJ13MI+4d8NOwtM +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