Skip to content

Commit 5857dd3

Browse files
authored
Merge pull request #1929 from stratosphereips/develop
Slips v1.1.20
2 parents 9a2af63 + 634a916 commit 5857dd3

377 files changed

Lines changed: 27295 additions & 26354 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
name: create a new release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
create_release:
13+
runs-on: ubuntu-22.04
14+
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v5
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Fetch tags
22+
run: git fetch --tags --force
23+
24+
- name: Prepare release metadata
25+
id: prepare_release
26+
env:
27+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
run: |
29+
python3 <<'PY'
30+
import os
31+
import pathlib
32+
import re
33+
import subprocess
34+
35+
github_output = pathlib.Path(os.environ["GITHUB_OUTPUT"])
36+
release_notes_path = pathlib.Path("release_notes.md")
37+
38+
def write_output(name, value):
39+
with github_output.open("a", encoding="utf-8") as output_file:
40+
print(f"{name}={value}", file=output_file)
41+
42+
def capitalize_sentences(text):
43+
"""Capitalize the first alphabetical character of each sentence."""
44+
result = []
45+
capitalize_next = True
46+
for character in text:
47+
if capitalize_next and character.isalpha():
48+
result.append(character.upper())
49+
capitalize_next = False
50+
else:
51+
result.append(character)
52+
53+
if character in ".!?":
54+
capitalize_next = True
55+
return "".join(result)
56+
57+
version = pathlib.Path("VERSION").read_text(encoding="utf-8").strip()
58+
if not re.fullmatch(r"\d+\.\d+\.\d+", version):
59+
raise SystemExit(f"VERSION must contain x.y.z, found: {version}")
60+
61+
tag_name = f"v{version}"
62+
63+
changelog_lines = pathlib.Path("CHANGELOG.md").read_text(
64+
encoding="utf-8"
65+
).splitlines()
66+
67+
latest_section = []
68+
started = False
69+
version_heading = re.compile(r"^\d+\.\d+\.\d+\b")
70+
71+
for line in changelog_lines:
72+
if not started:
73+
if line.strip():
74+
started = True
75+
latest_section.append(line)
76+
continue
77+
78+
if version_heading.match(line.strip()):
79+
break
80+
81+
latest_section.append(line)
82+
83+
while latest_section and not latest_section[-1].strip():
84+
latest_section.pop()
85+
86+
if not latest_section:
87+
raise SystemExit("Could not extract the latest release notes from CHANGELOG.md")
88+
89+
latest_heading = latest_section[0].strip()
90+
if not latest_heading.startswith(version):
91+
raise SystemExit(
92+
"The top section in CHANGELOG.md does not match the version in VERSION"
93+
)
94+
95+
normalized_lines = [latest_section[0].strip(), ""]
96+
for line in latest_section[1:]:
97+
stripped = line.strip()
98+
if not stripped:
99+
normalized_lines.append("")
100+
continue
101+
102+
bullet_match = re.match(r"^([*-]\s+)(.*)$", stripped)
103+
if bullet_match:
104+
prefix, content = bullet_match.groups()
105+
normalized_lines.append(f"{prefix}{capitalize_sentences(content.strip())}")
106+
continue
107+
108+
normalized_lines.append(capitalize_sentences(stripped))
109+
110+
release_notes_path.write_text(
111+
"\n".join(normalized_lines).strip() + "\n",
112+
encoding="utf-8",
113+
)
114+
115+
existing_tag = subprocess.run(
116+
["git", "tag", "--list", tag_name],
117+
check=True,
118+
capture_output=True,
119+
text=True,
120+
).stdout.strip()
121+
122+
release_exists = subprocess.run(
123+
["gh", "release", "view", tag_name],
124+
capture_output=True,
125+
text=True,
126+
).returncode == 0
127+
128+
write_output("tag_name", tag_name)
129+
write_output("tag_exists", "true" if existing_tag else "false")
130+
write_output("release_exists", "true" if release_exists else "false")
131+
PY
132+
133+
- name: Create and push tag
134+
if: steps.prepare_release.outputs.tag_exists == 'false'
135+
run: |
136+
git config user.name "github-actions[bot]"
137+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
138+
git tag "${{ steps.prepare_release.outputs.tag_name }}"
139+
git push origin "${{ steps.prepare_release.outputs.tag_name }}"
140+
141+
- name: Create GitHub release
142+
if: steps.prepare_release.outputs.release_exists == 'false'
143+
env:
144+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
145+
run: |
146+
gh release create "${{ steps.prepare_release.outputs.tag_name }}" \
147+
--title "${{ steps.prepare_release.outputs.tag_name }}" \
148+
--notes-file release_notes.md \
149+
--latest
150+
151+
- name: Skip existing tag and release
152+
if: steps.prepare_release.outputs.tag_exists == 'true' && steps.prepare_release.outputs.release_exists == 'true'
153+
run: |
154+
echo "Tag ${{ steps.prepare_release.outputs.tag_name }} and its release already exist. Skipping."

.github/workflows/integration-tests.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,18 @@ jobs:
5353
run: |
5454
python3 -m pytest tests/${{ matrix.test_file }} -p no:warnings -vv -s -n 3
5555
56+
- name: Build Artifact Name
57+
# otherwise we get numeric names for the artifacts and we dont know which is which
58+
id: artifact-name
59+
run: |
60+
sanitized_test_file="${{ matrix.test_file }}"
61+
sanitized_test_file=$(printf '%s\n' "$sanitized_test_file" | tr '/' '_')
62+
echo "name=${sanitized_test_file}-integration-output" >> "$GITHUB_OUTPUT"
63+
5664
- name: Upload Artifacts
5765
if: always()
5866
uses: actions/upload-artifact@v6
5967
with:
60-
# Replaces slashes with underscores for valid artifact naming
61-
name: ${{ github.run_id }}-${{ strategy.job-index }}-integration-output
68+
name: ${{ steps.artifact-name.outputs.name }}
6269
path: |
63-
output/integration
70+
output/integration_tests

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ slack_bot_token_secret
1818
# Ignore daemon output files
1919
daemon/
2020

21+
# Ignore private AGENTS.md, may contain private paths
22+
private/AGENTS.md
23+
24+
2125
# Ignore the results folders
2226
2019-
2327
2020-
@@ -29,7 +33,7 @@ daemon/
2933
*.swp
3034
*.swo
3135

32-
# apple shit
36+
# apple-related
3337
*.bst
3438

3539
# pcap

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@
1919
path = SlipsWeb
2020
url = https://github.com/stratosphereips/SlipsWeb.git
2121
branch = master
22+
[submodule "modules/kalipso"]
23+
path = modules/kalipso
24+
url = https://github.com/stratosphereips/Kalipso
25+
branch = main

.secrets.baseline

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
"filename": "config/slips.yaml",
150150
"hashed_secret": "4cac50cee3ad8e462728e711eac3e670753d5016",
151151
"is_verified": false,
152-
"line_number": 278
152+
"line_number": 304
153153
}
154154
],
155155
"dataset/test14-malicious-zeek-dir/http.log": [
@@ -7174,16 +7174,7 @@
71747174
"is_verified": false,
71757175
"line_number": 791
71767176
}
7177-
],
7178-
"webinterface/templates/app.html": [
7179-
{
7180-
"type": "Base64 High Entropy String",
7181-
"filename": "webinterface/templates/app.html",
7182-
"hashed_secret": "4541da42e4bee42db18b73a671a93eee3fe5caf9",
7183-
"is_verified": false,
7184-
"line_number": 139
7185-
}
71867177
]
71877178
},
7188-
"generated_at": "2026-03-27T14:25:16Z"
7179+
"generated_at": "2026-04-27T14:39:21Z"
71897180
}

0 commit comments

Comments
 (0)