Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/build_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ jammy, bookworm, noble ]
os: [ jammy, bookworm, noble, trixie ]
target: ${{ fromJson(needs.generate-matrix.outputs.target) }}
runs-on: [ self-hosted, linux, x64, "${{ matrix.os }}" ]
timeout-minutes: 35
Expand Down
3 changes: 1 addition & 2 deletions src/config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ http {
send_timeout 600;

server {
listen 443;
listen 443 ssl;
server_name localhost;
client_max_body_size 512M;

ssl on;
ssl_certificate /etc/nginx/fact.crt;
ssl_certificate_key /etc/nginx/fact.key;
ssl_prefer_server_ciphers on;
Expand Down
32 changes: 19 additions & 13 deletions src/install/frontend.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
INSTALL_DIR = Path(__file__).parent
PIP_DEPENDENCIES = INSTALL_DIR / 'requirements_frontend.txt'
STATIC_WEB_DIR = INSTALL_DIR.parent / 'web_interface' / 'static'
CONFIG_DIR = INSTALL_DIR.parent / 'config'
MIME_ICON_DIR = STATIC_WEB_DIR / 'file_icons'
ICON_THEME_INSTALL_PATH = Path('/usr/share/icons/Papirus/24x24')
NODEENV_DIR = 'nodeenv'
Expand Down Expand Up @@ -83,6 +84,10 @@ def _install_nginx(distribution):
],
error='restore selinux context',
)
if not Path('/run/nginx.pid').exists():
proc = subprocess.run('sudo service nginx restart', shell=True, capture_output=True, text=True, check=False)
if proc.returncode != 0:
raise InstallationError(f'Failed to start nginx\n{proc.stderr}')
nginx_process = subprocess.run('sudo nginx -s reload', shell=True, capture_output=True, text=True, check=False)
if nginx_process.returncode != 0:
raise InstallationError(f'Failed to start nginx\n{nginx_process.stderr}')
Expand All @@ -103,18 +108,19 @@ def _generate_and_install_certificate():

def _configure_nginx():
logging.info('Configuring nginx')
execute_commands_and_raise_on_return_code(
[
'sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak',
'sudo rm /etc/nginx/nginx.conf',
# copy is better on redhat to respect selinux context
'(cd ../config && sudo install -m 644 $PWD/nginx.conf /etc/nginx/nginx.conf)',
'(sudo mkdir /etc/nginx/error || true)',
'(cd ../web_interface/templates/ '
'&& sudo ln -s $PWD/maintenance.html /etc/nginx/error/maintenance.html) || true',
],
error='configuring nginx',
)
with OperateInDirectory(CONFIG_DIR):
execute_commands_and_raise_on_return_code(
[
'sudo cp /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bak',
'sudo rm /etc/nginx/nginx.conf',
# copy is better on redhat to respect selinux context
'sudo install -m 644 $PWD/nginx.conf /etc/nginx/nginx.conf',
'(sudo mkdir /etc/nginx/error || true)',
'(cd ../web_interface/templates/ '
'&& sudo ln -s $PWD/maintenance.html /etc/nginx/error/maintenance.html) || true',
],
error='configure nginx',
)


def _install_docker_images(radare):
Expand Down Expand Up @@ -167,7 +173,7 @@ def _install_nodejs(nodejs_version: str = '22'):
def _find_latest_node_version(target_version: str) -> str:
proc = subprocess.run(split('nodeenv --list'), capture_output=True, text=True, check=False)
if proc.returncode != 0:
raise InstallationError('nodejs installation failed. Is nodeenv installed?')
raise InstallationError(f'nodejs installation failed. Is nodeenv installed?\n{proc.stderr}')
available_versions = [
parse_version(v) for v in re.split(r'[\n\t ]', proc.stderr) if v and v.startswith(target_version)
]
Expand Down
4 changes: 2 additions & 2 deletions src/install/requirements_frontend.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ flask-restx~=1.3.0
flask-sqlalchemy~=3.1.1
gql~=3.5.0
itsdangerous~=2.2.0
matplotlib~=3.7.5
matplotlib~=3.10.5
more-itertools~=10.5.0
prompt-toolkit~=3.0.50
python-dateutil~=2.9.0
Expand All @@ -19,7 +19,7 @@ uwsgi~=2.0.28
virtualenv~=20.29.1

# npm installation
nodeenv~=1.8.0
nodeenv~=1.9.1

# must be below dependent packages (flask, flask-login, flask-restx)
werkzeug~=3.0.6
Expand Down
2 changes: 1 addition & 1 deletion src/install/requirements_pre_install.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pydantic==2.10.6
werkzeug~=3.0.6
toml==0.10.2
# needed during installation of cve_lookup plugin
ijson==3.3.0
ijson==3.4.0

git+https://github.com/fkie-cad/common_helper_files.git

2 changes: 1 addition & 1 deletion src/plugins/analysis/binwalk/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
capstone==4.0.2
cstruct==4.0
matplotlib==3.7.3
matplotlib==3.10.5
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ def test_detect_type_of_file(analysis_plugin):
summary = analysis_plugin.summarize(result)

assert result.mime == 'application/zip', 'mime-type not detected correctly'
assert result.full.startswith('Zip archive data, at least'), 'full type not correct'
assert result.full.startswith('Zip archive data,'), 'full type not correct'

assert summary == ['application/zip']
Loading