Skip to content

Commit bfd402b

Browse files
authored
Merge pull request #1439 from stratosphereips/develop
Slips v1.1.9
2 parents 84cbbda + 14c3596 commit bfd402b

File tree

83 files changed

+2158
-889
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+2158
-889
lines changed

.github/workflows/install-slips-dependencies.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
name: Install Slips Dependencies
22

33
on:
4-
# workflow_call make this workflow re-usable
54
workflow_call:
6-
# these are like variables to make the workflow more clean
7-
# we can pass these variable from another workflows if we want
85
inputs:
96
zeek-repo-url:
107
description: 'Zeek repository URL'
@@ -25,6 +22,8 @@ on:
2522
jobs:
2623
install-dependencies:
2724
runs-on: ubuntu-22.04
25+
outputs:
26+
dependencies_installed: ${{ steps.mark_installed.outputs.installed }}
2827
steps:
2928
- uses: actions/checkout@v4
3029
with:
@@ -62,3 +61,7 @@ jobs:
6261
curl -fsSL ${{ inputs.zeek-key-url }} | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/security_zeek.gpg
6362
sudo apt update && sudo apt install -y --no-install-recommends zeek
6463
sudo ln -s /opt/zeek/bin/zeek /usr/local/bin/bro
64+
65+
- name: Mark dependencies as installed
66+
id: mark_installed
67+
run: echo "installed=true" >> $GITHUB_OUTPUT

.github/workflows/publish-slips-images.yml

Lines changed: 71 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -3,64 +3,85 @@ name: CI-production-publishing-slips-images
33
on:
44
push:
55
branches:
6-
- 'master'
7-
- '!develop'
6+
- 'master'
7+
- '!develop'
88

99
jobs:
10-
publish_slips_docker_image:
11-
# runs the tests in a docker(built by this job) on stop of a GH VM
12-
runs-on: ubuntu-20.04
10+
setup:
11+
runs-on: ubuntu-22.04
1312
# 2 hours timeout
14-
timeout-minutes: 7200
13+
timeout-minutes: 120
14+
outputs:
15+
slips_version: ${{ steps.get_version.outputs.slips_version }}
16+
builder_name: ${{ steps.create_builder.outputs.name }}
1517

1618
steps:
17-
- name: Get slips version
18-
run: |
19-
VER=$(curl -s https://raw.githubusercontent.com/stratosphereips/StratosphereLinuxIPS/develop/VERSION)
20-
echo "SLIPS_VERSION=$VER" >> $GITHUB_ENV
19+
- name: Get slips version
20+
id: get_version
21+
run: |
22+
ver=$(curl -s https://raw.githubusercontent.com/stratosphereips/StratosphereLinuxIPS/develop/VERSION)
23+
echo "slips_version=$ver" >> $GITHUB_OUTPUT
2124
22-
# clone slips and checkout branch
23-
# By default it checks out only one commit
24-
- uses: actions/checkout@v4
25-
with:
26-
ref: 'master'
27-
# Fetch all history for all tags and branches
28-
fetch-depth: ''
29-
# submodules are needed for local and global p2p
30-
submodules: true
25+
# should come before buildx action
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
3128

29+
# Set up Docker Buildx with docker-container driver is required
30+
# at the moment to be able to use a subdirectory with Git context
31+
- name: Create and use Buildx builder
32+
id: create_builder
33+
uses: docker/setup-buildx-action@v3
34+
with:
35+
driver: docker-container # allows multi-platform builds
36+
# allows you to enable special permissions for the build environment that are normally considered insecure,
37+
# such as:network.host
38+
buildkitd-flags: --allow-insecure-entitlement network.host
39+
name: slips_multi_arch_builder
40+
use: true
3241

33-
- name: Login to DockerHub
34-
uses: docker/login-action@v3
35-
with:
36-
username: stratosphereips
37-
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
42+
publish_images:
43+
needs: setup
44+
runs-on: ubuntu-22.04
45+
strategy:
46+
matrix:
47+
image_type:
48+
- name: slips
49+
dockerfile: ./docker/Dockerfile
50+
- name: slips_light
51+
dockerfile: ./docker/light/Dockerfile
3852

39-
# Set up Docker Buildx with docker-container driver is required
40-
# at the moment to be able to use a subdirectory with Git context
41-
- name: Set up Docker Buildx
42-
uses: docker/setup-buildx-action@v3
53+
steps:
54+
- name: Use existing Buildx builder
55+
uses: docker/setup-buildx-action@v3
56+
with:
57+
name: slips_multi_arch_builder
58+
install: true
59+
use: true
60+
61+
# clone slips and checkout branch
62+
# By default it checks out only one commit
63+
- uses: actions/checkout@v4
64+
with:
65+
ref: 'master'
66+
# Fetch all history for all tags and branches
67+
fetch-depth: 0
68+
# submodules are needed for local and global p2p
69+
submodules: true
4370

44-
- name: Build and push the main Slips image
45-
id: docker_build_slips
46-
uses: docker/build-push-action@v6
47-
with:
48-
allow: network.host
49-
context: ./
50-
file: ./docker/Dockerfile
51-
tags: |
52-
stratosphereips/slips:latest
53-
stratosphereips/slips:${{ env.SLIPS_VERSION }}
54-
push: true
71+
- name: Login to DockerHub
72+
uses: docker/login-action@v3
73+
with:
74+
username: stratosphereips
75+
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
5576

56-
- name: Build and push the light Slips image
57-
id: docker_build_light_slips
58-
uses: docker/build-push-action@v6
59-
with:
60-
allow: network.host
61-
context: ./
62-
file: ./docker/light/Dockerfile
63-
tags: |
64-
stratosphereips/slips_light:latest
65-
stratosphereips/slips_light:${{ env.SLIPS_VERSION }}
66-
push: true
77+
- name: Build and push ${{ matrix.image_type.name }} image
78+
uses: docker/build-push-action@v6
79+
with:
80+
allow: network.host
81+
context: ./
82+
file: ${{ matrix.image_type.dockerfile }}
83+
platforms: linux/amd64,linux/arm64
84+
tags: |
85+
stratosphereips/${{ matrix.image_type.name }}:latest
86+
stratosphereips/${{ matrix.image_type.name }}:${{ needs.setup.outputs.slips_version }}
87+
push: true

.github/workflows/unit-tests.yml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,27 +6,24 @@ on:
66
- 'master'
77
- 'develop'
88

9-
109
jobs:
1110
# uses the common workflow that builds slips
1211
install-dependencies-using-reusable-workflow:
1312
uses: ./.github/workflows/install-slips-dependencies.yml
1413

1514
unit-tests:
1615
runs-on: ubuntu-22.04
17-
timeout-minutes: 1800
18-
# make this job depend on the first job
16+
timeout-minutes: 120
1917
needs: install-dependencies-using-reusable-workflow
2018

21-
# suppress tensorflow warnings
2219
env:
2320
TF_CPP_MIN_LOG_LEVEL: 3
2421
TF_ENABLE_ONEDNN_OPTS: 0
2522

2623
strategy:
2724
matrix:
2825
test_file:
29-
- test_inputProc.py
26+
- test_input.py
3027
- test_main.py
3128
- test_conn.py
3229
- test_downloaded_file.py
@@ -86,13 +83,19 @@ jobs:
8683
- test_idea_format.py
8784
- test_fides_sqlite_db.py
8885
- test_fides_module.py
86+
- test_fides_queues.py
87+
- test_fides_bridge.py
8988

9089
steps:
9190
- uses: actions/checkout@v4
9291
with:
9392
ref: ${{ github.ref }}
94-
fetch-depth: ''
93+
fetch-depth: 0
9594

95+
- name: Set up Python
96+
uses: actions/setup-python@v5
97+
with:
98+
python-version: 3.10.12
9699

97100
- name: Restore APT cache
98101
id: apt-cache
@@ -104,20 +107,29 @@ jobs:
104107
key: apt-cache
105108

106109
- if: ${{ steps.apt-cache.outputs.cache-hit == 'true' }}
107-
name: Echo restored from cache
110+
name: Echo restored APT cache
108111
continue-on-error: true
109112
run: echo "Restored APT dependencies from cache successfully"
110113

111-
- name: Install Python dependencies (from cache if possible)
112-
run: |
113-
python3 -m pip install --upgrade pip
114-
python3 -m pip install -r install/requirements.txt
115-
116-
- name: Install apt dependencies (from cache if possible)
114+
- name: Install apt dependencies
117115
run: |
118116
sudo apt-get update
119117
sudo apt-get install -y $(cat install/apt_dependencies.txt)
120118
119+
- name: Restore Python dependencies
120+
id: python-cache
121+
uses: actions/cache@v4
122+
with:
123+
path: ~/.cache/pip
124+
key: ${{ runner.os }}-pip-${{ hashFiles('install/requirements.txt') }}
125+
126+
- if: ${{ steps.python-cache.outputs.cache-hit == 'true' }}
127+
name: Echo restored Python cache
128+
continue-on-error: true
129+
run: echo "Restored Python dependencies from cache successfully"
130+
131+
- name: Install Python dependencies
132+
run: python3 -m pip install -r install/requirements.txt
121133

122134
- name: Start redis server
123135
run: redis-server --daemonize yes

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
1.1.9 (April 30, 2025)
2+
- Add bootstrapping node mode for the global P2P. Thanks to @d-strat
3+
- Add support for ARM64 architecture in Docker images.
4+
- Fix issues getting domain registrants.
5+
- Fix the "Database is locked" SQLite error.
6+
- Fix the issue of Slips hanging when shutting down.
7+
- Ignore URLs when found in threat intelligence feeds.
8+
- Improve handling of Zeek tab-separated log files. Logs from Zeek old versions are now read correctly.
9+
- Optimize IP Info module.
10+
- Print flows processed per minute in the stats printed to the CLI.
11+
- Support reading labeled Zeek logs and using their labels in Slips modules.
12+
113
1.1.8 (Mar 31st, 2025)
214
- Fix SQLite database errors.
315
- Fix CPU and RAM profilers.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<h1 align="center">
2-
Slips v1.1.7
2+
Slips v1.1.9
33
</h1>
44

55

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.8
1+
1.1.9

config/iris_config.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
Identity:
22
GenerateNewKey: true
33
Server:
4-
port: 9010
5-
Host: 127.0.0.1
6-
DhtServerMode: true
4+
Port: 9010
5+
Host: 0.0.0.0
6+
DhtServerMode: 'true'
77
Redis:
88
Host: 127.0.0.1
9-
Port: 6644
9+
Port: 6379
1010
Tl2NlChannel: iris_internal
1111
PeerDiscovery:
12-
DisableBootstrappingNodes: true
12+
DisableBootstrappingNodes: false
13+
ListOfMultiAddresses:
14+
- /dns/melchior.slips.stratosphere.fel.cvut.cz/udp/6437/quic 12D3KooWJJa9PpMFVP7s3TQs2sedypJXxtMVkphRhgkjGH9EYMfM

config/slips.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,8 @@ global_p2p:
507507
# running slips on an interface
508508
use_global_p2p: False
509509
iris_conf: config/iris_config.yaml
510+
bootstrapping_node: False
511+
bootstrapping_modules: ["fidesModule", "irisModule"]
510512

511513
#############################
512514
local_p2p:

docker/Dockerfile

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,14 @@ RUN apt update && apt install -y --no-install-recommends \
5656
python3-dev \
5757
python3-tzlocal \
5858
python3-pip \
59+
nano \
60+
tree \
61+
tmux \
5962
&& echo 'deb http://download.opensuse.org/repositories/security:/zeek/xUbuntu_22.04/ /' | tee /etc/apt/sources.list.d/security:zeek.list \
6063
&& curl -fsSL https://download.opensuse.org/repositories/security:zeek/xUbuntu_22.04/Release.key | gpg --dearmor | tee /etc/apt/trusted.gpg.d/security_zeek.gpg > /dev/null \
61-
&& curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg \
62-
&& echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" > /etc/apt/sources.list.d/redis.list \
6364
&& apt update \
6465
&& apt install -y --no-install-recommends --fix-missing \
6566
zeek \
66-
redis \
6767
npm \
6868
&& ln -s /opt/zeek/bin/zeek /usr/local/bin/bro \
6969
&& apt clean \
@@ -73,8 +73,17 @@ RUN apt update && apt install -y --no-install-recommends \
7373
&& [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" \
7474
&& nvm install 22
7575

76+
# why are we compiling redis instead od just using apt?
77+
# to support running slips on the rpi (arm64). the rpi uses jemmalloc by default, which expects a different page size
78+
# than the default on x86_64
79+
RUN pip3 install --no-cache-dir --upgrade pip \
80+
&& git clone https://github.com/redis/redis \
81+
&& cd redis \
82+
&& make distclean \
83+
&& make MALLOC=libc
84+
85+
ENV PATH="$PATH:/redis/src"
7686

77-
RUN pip3 install --no-cache-dir --upgrade pip
7887

7988
# Switch to Slips installation dir on login.
8089
WORKDIR ${SLIPS_DIR}
@@ -90,14 +99,11 @@ RUN pip install --ignore-installed --no-cache-dir -r install/requirements.txt \
9099
&& git init \
91100
&& git remote add origin https://github.com/stratosphereips/StratosphereLinuxIPS.git \
92101
&& cd modules/kalipso \
93-
&& npm install
94-
95-
96-
# build the pigeon and add pigeon to path
97-
RUN cd p2p4slips \
98-
&& go build \
99-
&& export PATH="{$PATH}:/StratosphereLinuxIPS/p2p4slips/";
102+
&& npm install \
103+
&& cd ../../p2p4slips \
104+
&& go build
100105

106+
ENV PATH="$PATH:/StratosphereLinuxIPS/p2p4slips/"
101107

102108

103109
WORKDIR ${SLIPS_DIR}

docker/light/excluded_libs.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
tensorflow
2-
recommonmark
32
Keras
43
scipy
54
pytest

0 commit comments

Comments
 (0)