Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ on:
tags:
- 'v*.*.*'

env:

PYTHONDONTWRITEBYTECODE: 1

jobs:

release:
runs-on: ubuntu-24.04
steps:

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0

Expand Down Expand Up @@ -48,15 +52,15 @@ jobs:
steps:

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install packages
run: sudo apt-get install libgl1 libpoppler-cpp-dev libpoppler-cpp0v5 libzbar0 tesseract-ocr
run: sudo apt-get install libgl1 libfuzzy-dev libpoppler-cpp-dev libpoppler-cpp0v5 libzbar0 tesseract-ocr libjpeg-dev

- name: Set up Python 3.12
uses: actions/setup-python@v5
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: 3.12
python-version: 3.14

- name: Install poetry
run: python -m pip install poetry
Expand Down Expand Up @@ -93,15 +97,15 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install packages
run: sudo apt-get install libgl1 libpoppler-cpp-dev libpoppler-cpp0v5 libzbar0 tesseract-ocr
run: sudo apt-get install libgl1 libfuzzy-dev libpoppler-cpp-dev libpoppler-cpp0v5 libzbar0 tesseract-ocr libjpeg-dev

- name: Set up Python 3.12
uses: actions/setup-python@v5
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: 3.12
python-version: 3.14

- name: Install poetry
run: python -m pip install poetry
Expand All @@ -113,7 +117,7 @@ jobs:
run: poetry build

- name: Upload package artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: dist/
Expand All @@ -127,7 +131,7 @@ jobs:

steps:
- name: Download dist files
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist/
Expand Down
31 changes: 18 additions & 13 deletions .github/workflows/test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,27 @@ on:
pull_request:
branches: [ main ]


env:

PYTHONDONTWRITEBYTECODE: 1

jobs:

docs:
runs-on: ubuntu-24.04
steps:

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install packages
run: sudo apt-get install libgl1 libpoppler-cpp-dev libpoppler-cpp0v5 libzbar0 tesseract-ocr
run: sudo apt-get install libgl1 libfuzzy-dev libpoppler-cpp-dev libpoppler-cpp0v5 libzbar0 tesseract-ocr libjpeg-dev

- name: Set up Python 3.12
uses: actions/setup-python@v5
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: 3.12
python-version: 3.14

- name: Install poetry
run: python -m pip install poetry
Expand All @@ -37,18 +42,18 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:

- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install packages
run: sudo apt-get install libgl1 libpoppler-cpp-dev libpoppler-cpp0v5 libzbar0 tesseract-ocr
run: sudo apt-get install libgl1 libfuzzy-dev libpoppler-cpp-dev libpoppler-cpp0v5 libzbar0 tesseract-ocr libjpeg-dev

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -81,9 +86,9 @@ jobs:
if: always()
run: cat error.log

- name: Upload package artifcat
if: ${{ matrix.python-version == '3.12' }}
uses: actions/upload-artifact@v4
- name: Upload package artifact
if: ${{ matrix.python-version == '3.14' }}
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: dist/
Expand All @@ -97,7 +102,7 @@ jobs:

steps:
- name: Download dist files
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: python-package-distributions
path: dist/
Expand Down
2 changes: 1 addition & 1 deletion misp_modules/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def main():
ioloop.IOLoop.instance().start()
finally:
ioloop.IOLoop.instance().stop()
return 0
return 0


if __name__ == "__main__":
Expand Down
5 changes: 3 additions & 2 deletions misp_modules/modules/import_mod/taxii21.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
import requests
import taxii2client
import taxii2client.exceptions
from misp_stix_converter import ExternalSTIX2toMISPParser, InternalSTIX2toMISPParser, _is_stix2_from_misp
from misp_stix_converter import ExternalSTIX2toMISPParser, InternalSTIX2toMISPParser
from misp_stix_converter.tools import is_stix2_from_misp
from stix2.v20 import Bundle as Bundle_v20
from stix2.v21 import Bundle as Bundle_v21

Expand Down Expand Up @@ -296,7 +297,7 @@ def _query_taxii(config):

bundle = (Bundle_v21 if config.spec_version == "2.1" else Bundle_v20)(stix_objects, allow_custom=True)

converter = InternalSTIX2toMISPParser() if _is_stix2_from_misp(bundle.objects) else ExternalSTIX2toMISPParser()
converter = InternalSTIX2toMISPParser() if is_stix2_from_misp(bundle.objects) else ExternalSTIX2toMISPParser()
converter.load_stix_bundle(bundle)
converter.parse_stix_bundle(single_event=True)

Expand Down
Loading