-
-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MRG] Merge pull request #430 from dfir-iris/develop
v2.4.6
- Loading branch information
Showing
49 changed files
with
1,290 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# IRIS Source Code | ||
# Copyright (C) 2023 - DFIR-IRIS | ||
# [email protected] | ||
# | ||
# This program is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Lesser General Public | ||
# License as published by the Free Software Foundation; either | ||
# version 3 of the License, or (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU Lesser General Public License | ||
# along with this program; if not, write to the Free Software Foundation, | ||
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | ||
|
||
name: Continuous Integration | ||
on: push | ||
|
||
jobs: | ||
|
||
tests: | ||
name: API tests | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Check out iris | ||
uses: actions/checkout@v4 | ||
- name: Build dockers | ||
run: | | ||
# TODO using the environment file from tests to build here. | ||
# I am a bit uneasy with this choice. | ||
# For now this works, but if we come to have different .env files for different tests, it won't anymore. | ||
# Maybe the .env should be split to differentiate the variables used during the build from the variables used at runtime, | ||
# or maybe the docker building phase should also be part of the tests | ||
# and we should build different dockers according to the scenarios? This sounds like an issue to me... | ||
cp tests/data/basic.env .env | ||
docker-compose build | ||
- name: Run tests | ||
working-directory: tests | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install -r requirements.txt | ||
PYTHONUNBUFFERED=true python -m unittest --verbose | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
source/app/alembic/versions/9e4947a207a6_add_modification_history_to_case_objects.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
"""Add modification history to case objects | ||
Revision ID: 9e4947a207a6 | ||
Revises: 35c095f8be2b | ||
Create Date: 2024-02-16 15:22:17.780516 | ||
""" | ||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
from app.alembic.alembic_utils import _table_has_column | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '9e4947a207a6' | ||
down_revision = '35c095f8be2b' | ||
branch_labels = None | ||
depends_on = None | ||
|
||
|
||
def upgrade(): | ||
tables = ['ioc', 'case_assets', 'case_received_file', 'case_tasks', 'notes', 'cases_events'] | ||
for table in tables: | ||
if not _table_has_column(table, 'modification_history'): | ||
op.add_column(table, | ||
sa.Column('modification_history', sa.JSON) | ||
) | ||
t_ua = sa.Table( | ||
table, | ||
sa.MetaData(), | ||
sa.Column('modification_history', sa.JSON) | ||
) | ||
conn = op.get_bind() | ||
conn.execute(t_ua.update().values( | ||
modification_history={} | ||
)) | ||
pass | ||
|
||
|
||
def downgrade(): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.