From 48bc5e2d4547276d888939fa0830ab83055423fe Mon Sep 17 00:00:00 2001 From: Isaac <46466538+ikoas@users.noreply.github.com> Date: Tue, 5 Sep 2023 15:43:08 -0600 Subject: [PATCH 1/4] Update README.md to improve Linux and macOS installation. Added steps explaining how to use python virtual environments to use Loki due to some Linux distros locking the python global installation of modules. --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cd7723f0..36c61979 100644 --- a/README.md +++ b/README.md @@ -229,9 +229,11 @@ To include the msvcr100.dll to improve the target os compatibility change the li # Use LOKI on Mac OS X (Or later) or Linux -- Install libraries ```sudo pip install colorama yara-python psutil rfc5424-logging-handler netaddr``` -- Run loki-upgrader.py ```sudo python loki-upgrader.py``` -- Run loki ```sudo python loki.py``` +- Initialize a python virtual enviroment for loki. To do this you have to make sure you have the python module `venv` then run `sudo python -m venv path/to/venv` where `path/to/venv` is the path to your virtual enviroment. Test your virtual enviroment by running `sudo path/to/venv/bin/python --version`. +- Upgrade your virtual enviroment modules for `pip`, `setuptools` and `wheel` by running `sudo path/to/venv/bin/python -m pip install --upgrade pip setuptools wheel`. +- Install libraries ```sudo path/to/venv/bin/python -m pip install colorama yara-python psutil rfc5424-logging-handler netaddr``` +- Run loki-upgrader.py ```sudo path/to/venv/bin/python path/to/loki/loki-upgrader.py``` where `path/to/loki` is the path of the Loki repository. +- Run loki ```sudo path/to/venv/bin/python loki.py``` # Yara sources From 06a5e1412a53832c74d15519468e2888b94ce380 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Wed, 30 Oct 2024 11:09:28 +0100 Subject: [PATCH 2/4] Keep GitHub Actions up to date with GitHub's Dependabot Fixes software supply chain safety warnings like at the bottom right of https://github.com/Neo23x0/Loki/actions/runs/11588354903 * [Keeping your actions up to date with Dependabot](https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot) * [Configuration options for the dependabot.yml file - package-ecosystem](https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem) --- .github/dependabot.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..be006de9 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +# Keep GitHub Actions up to date with GitHub's Dependabot... +# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot +# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#package-ecosystem +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + groups: + github-actions: + patterns: + - "*" # Group all Actions updates into a single larger pull request + schedule: + interval: weekly From 7aa977b87322b7974b8cb8bc78c5be7a80def069 Mon Sep 17 00:00:00 2001 From: Florian Roth Date: Wed, 30 Oct 2024 17:01:27 +0100 Subject: [PATCH 3/4] Update README.md Co-authored-by: Christian Clauss --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 36c61979..8d78c39f 100644 --- a/README.md +++ b/README.md @@ -229,10 +229,10 @@ To include the msvcr100.dll to improve the target os compatibility change the li # Use LOKI on Mac OS X (Or later) or Linux -- Initialize a python virtual enviroment for loki. To do this you have to make sure you have the python module `venv` then run `sudo python -m venv path/to/venv` where `path/to/venv` is the path to your virtual enviroment. Test your virtual enviroment by running `sudo path/to/venv/bin/python --version`. -- Upgrade your virtual enviroment modules for `pip`, `setuptools` and `wheel` by running `sudo path/to/venv/bin/python -m pip install --upgrade pip setuptools wheel`. -- Install libraries ```sudo path/to/venv/bin/python -m pip install colorama yara-python psutil rfc5424-logging-handler netaddr``` -- Run loki-upgrader.py ```sudo path/to/venv/bin/python path/to/loki/loki-upgrader.py``` where `path/to/loki` is the path of the Loki repository. +- Initialize a Python virtual environment for loki. To do this you have to make sure you have the Python module `venv` then run `python -m venv path/to/venv` where `path/to/venv` is the path to your virtual environment. Test your virtual environment by running `path/to/venv/bin/python --version`. +Upgrade your virtual environment modules for `pip`, `setuptools`, and `wheel` by running `path/to/venv/bin/python -m pip install --upgrade pip setuptools wheel`. +- Install libraries ```path/to/venv/bin/python -m pip install colorama yara-python psutil rfc5424-logging-handler netaddr``` +- Run loki-upgrader.py ```path/to/venv/bin/python path/to/loki/loki-upgrader.py``` where `path/to/loki` is the path of the Loki repository. - Run loki ```sudo path/to/venv/bin/python loki.py``` # Yara sources From 5f2a2b34b386c8cc63ab6383100567261d03aacc Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Sat, 9 Nov 2024 20:13:48 +0100 Subject: [PATCH 4/4] lint_python.yml: ruff check --output-format=github --- .github/workflows/lint_python.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint_python.yml b/.github/workflows/lint_python.yml index 51e3e032..65367129 100644 --- a/.github/workflows/lint_python.yml +++ b/.github/workflows/lint_python.yml @@ -7,9 +7,9 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 - run: pip install --upgrade pip setuptools wheel - - run: pip install black codespell mypy pytest ruff safety - - run: ruff --output-format=github --ignore=E501,E701,E713,E722,F401,F403,F405,F841 --line-length=263 . - - run: black --check . || true + - run: pip install codespell mypy pytest ruff safety + - run: ruff check --output-format=github --ignore=E501,E701,E713,E722,F401,F403,F405,F841 --line-length=263 . + - run: ruff format || true - run: codespell --ignore-words-list="datas" --skip="./.git/*" - run: pip install -r requirements.txt - run: mypy --install-types --non-interactive . || true