Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./auto-merge.sh Main #2

Open
wants to merge 53 commits into
base: gh-pages
Choose a base branch
from
Open

./auto-merge.sh Main #2

wants to merge 53 commits into from

Conversation

RFOF-NETWORK
Copy link
Owner

#!/bin/bash

Konfiguriere die Branch-Namen

BASE_BRANCH="gh-pages"
FEATURE_BRANCH="main"

Checke den Basis-Branch aus

git checkout $BASE_BRANCH

Hole die neuesten Änderungen

git pull origin $BASE_BRANCH

Versuche, den Feature-Branch zu mergen

git merge $FEATURE_BRANCH

Überprüfe, ob es Merge-Konflikte gibt

if [ $? -ne 0 ]; then
echo "Es gibt Merge-Konflikte. Lösen und fortfahren."

# Automatische Konfliktlösung (hier einfach als Beispiel, spezifische Logik kann benötigt werden)
git merge --abort
git checkout --theirs .
git add .
git commit -m "Automatische Konfliktlösung"

else
echo "Merge erfolgreich. Pushe die Änderungen."

# Push die Änderungen zum Remote-Repository
git push origin $BASE_BRANCH

fi
chmod +x auto-merge.sh

BSL 1.1 for non-commercial use
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
git add index.html
git commit -m "Füge index.html hinzu"
git push origin main


Signed-off-by: rfof-network.org <[email protected]>
git add index.html
git commit -m "Füge index.html hinzu"
git push origin main


Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
@RFOF-NETWORK 

Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
git add docs/index.html docs/style.css docs/script.js
git commit -m "Hinzufügen der index.html und zugehöriger Dateien"
git push origin main


Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
Signed-off-by: rfof-network.org <[email protected]>
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

return jsonify(response)

if __name__ == "__main__":
app.run(debug=True)

Check failure

Code scanning / CodeQL

Flask app is run in debug mode High

A Flask app appears to be run in debug mode. This may allow an attacker to run arbitrary code through the debugger.

Copilot Autofix AI about 10 hours ago

To fix the problem, we need to ensure that the Flask application does not run in debug mode in a production environment. The best way to achieve this is to use an environment variable to control the debug mode. This way, we can enable debug mode during development and disable it in production without changing the code.

  1. Import the os module to access environment variables.
  2. Use an environment variable (e.g., FLASK_DEBUG) to control the debug mode.
  3. Modify the app.run call to set debug based on the value of the environment variable.
Suggested changeset 1
project-root/api/main.py

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/project-root/api/main.py b/project-root/api/main.py
--- a/project-root/api/main.py
+++ b/project-root/api/main.py
@@ -2,2 +2,3 @@
 from handlers import transaction_handler, token_handler, user_handler
+import os
 
@@ -12,2 +13,3 @@
 if __name__ == "__main__":
-    app.run(debug=True)
+    debug_mode = os.getenv('FLASK_DEBUG', 'False').lower() in ['true', '1', 't']
+    app.run(debug=debug_mode)
EOF
@@ -2,2 +2,3 @@
from handlers import transaction_handler, token_handler, user_handler
import os

@@ -12,2 +13,3 @@
if __name__ == "__main__":
app.run(debug=True)
debug_mode = os.getenv('FLASK_DEBUG', 'False').lower() in ['true', '1', 't']
app.run(debug=debug_mode)
Copilot is powered by AI and may make mistakes. Always verify output.
Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Comment on lines +14 to +69
runs-on: ubuntu-latest
environment: dev
steps:
- name: 'Checkout GitHub Action'
uses: actions/checkout@v4

# If you want to use Azure RBAC instead of Publish Profile, then uncomment the task below
# - name: 'Login via Azure CLI'
# uses: azure/login@v1
# with:
# creds: ${{ secrets.AZURE_RBAC_CREDENTIALS }} # set up AZURE_RBAC_CREDENTIALS secrets in your repository

- name: Setup Python ${{ env.PYTHON_VERSION }} Environment
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: 'Resolve Project Dependencies Using Pip'
shell: bash
run: |
pushd './${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}'
python -m pip install --upgrade pip
pip install -r requirements.txt --target=".python_packages/lib/site-packages"
popd

- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1
id: fa
with:
app-name: ${{ env.AZURE_FUNCTIONAPP_NAME }}
package: ${{ env.AZURE_FUNCTIONAPP_PACKAGE_PATH }}
publish-profile: ${{ secrets.AZURE_FUNCTIONAPP_PUBLISH_PROFILE }} # Remove publish-profile to use Azure RBAC
scm-do-build-during-deployment: true
enable-oryx-build: true

# Custom steps to include your specific inventions and concepts
- name: 'Custom Step 1: Execute Special Function'
shell: bash
run: |
echo "Executing special function related to RFOF-NETWORK..."
python -c "print('Hallo, @RFOF-NETWORK <my name is @PRAI>!')"

- name: 'Custom Step 2: Matrix Calculation'
shell: bash
run: |
python -c "
def create_matrix(rows, cols, fill_value=0):
return [[fill_value for _ in range(cols)] for _ in range(rows)]
def print_matrix(matrix):
for row in matrix:
print(' '.join(map(str, row)))
matrix = create_matrix(5, 5, fill_value=1)
enhance_matrix = lambda m: [[x * 42 for x in row] for row in m]
matrix = enhance_matrix(matrix)
print_matrix(matrix)
"

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
popd

- name: 'Run Azure Functions Action'
uses: Azure/functions-action@v1

Check warning

Code scanning / CodeQL

Unpinned tag for a non-immutable Action in workflow Medium

Unpinned 3rd party Action 'Deploy Python project to Azure Function App' step
Uses Step: fa
uses 'Azure/functions-action' with ref 'v1', not a pinned commit hash
Comment on lines +12 to +20
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Build the site in the jekyll/builder container
run: |
docker run \
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions Job or Workflow does not set permissions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant