Skip to content

Commit 4ba4bab

Browse files
authored
Python 3.12 (#716)
* initial install script updates * more cleanup * merge common code * update Dockerfile * update dependencies for python 3.12 * allow 3.12 for deps * pysecretsocks compat * bump minimum py version to 3.10, upgrade deps for 3.12, add 3.12 to supported versions * bump to python 3.12 * upgrade deps * update pr matrix * ignore thread warnings * take out the huge query * take out the huge query in the perf test * typos in compose file * more tweaks * bump time limit on install tests * bump perf test again because py3.12 is slow on the runner for some reason * disable some steps * run ci * remove token * fix geo issue * run py 3.12 tests * uncomment * move symlink to install script. use sudo for mysql setup * fix symlinks * add keyring bypass to kali * setup keyring no matter the os. update nim symlinking * Update CHANGELOG.md * split install tests * org agnostic check * Fix function * remove release token from checkout in python step * remove release token from checkout in python step * fix function * syntax * update run-all-tests script * change var name * add some echos * split CI * updates * remove token * wrong path * re-enable token * disable parrot for now * install starkiller in the docker build. check or it in cst. update forked dep references * update changelog with warning
1 parent f93afd9 commit 4ba4bab

36 files changed

+1447
-1404
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Git
22
**.git
33
.gitignore
4+
.github
45

56
# CI
67
.codeclimate.yml

.github/cst-config-docker.yaml

+53-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,59 @@
11
schemaVersion: 2.0.0
22
commandTests:
3-
- name: "python3 which"
4-
command: "which"
5-
args: ["python3"]
3+
- name: "poetry python"
4+
command: "poetry"
5+
args: ["run", "which", "python3"]
66
expectedOutput: ["/usr/local/bin/python3"]
77
- name: "python3 version"
88
command: "python3"
99
args: ["--version"]
10-
expectedOutput: ["Python 3.11.*"]
10+
expectedOutput: ["Python 3.12.*"]
11+
- name: "poetry"
12+
command: "which"
13+
args: ["poetry"]
14+
expectedOutput: ["/usr/bin/poetry"]
15+
- name: "poetry version"
16+
command: "poetry"
17+
args: ["--version"]
18+
expectedOutput: ["Poetry (version 1.6*)*"]
19+
- name: "poetry python version"
20+
command: "poetry"
21+
args: ["run", "python3", "--version"]
22+
expectedOutput: ["Python 3.12.*"]
23+
- name: "dotnet which"
24+
command: "which"
25+
args: ["dotnet"]
26+
expectedOutput: ["/usr/bin/dotnet"]
27+
- name: "dotnet version"
28+
command: "dotnet"
29+
args: [ "--version" ]
30+
expectedOutput: ["6.0.*"]
31+
- name: "powershell which"
32+
command: "which"
33+
args: ["pwsh"]
34+
expectedOutput: ["/usr/bin/pwsh"]
35+
- name: "powershell version"
36+
command: "pwsh"
37+
args: ["--version"]
38+
expectedOutput: ["PowerShell 7.*"]
39+
- name: "ps-empire help"
40+
command: "./ps-empire"
41+
args: ["server", "--help"]
42+
expectedOutput: ["usage: empire.py server [-h]*"]
43+
- name: "ps-empire version"
44+
command: "./ps-empire"
45+
args: ["server", "--version"]
46+
expectedOutput: ["5.* BC Security Fork"]
47+
fileExistenceTests:
48+
- name: 'profiles'
49+
path: '/empire/empire/server/data/profiles/'
50+
shouldExist: true
51+
- name: 'invoke obfuscation'
52+
path: '/usr/local/share/powershell/Modules/Invoke-Obfuscation/'
53+
shouldExist: true
54+
- name: 'sharpire'
55+
path: '/empire/empire/server/csharp/Covenant/Data/ReferenceSourceLibraries/Sharpire'
56+
shouldExist: true
57+
- name: 'starkiller'
58+
path: '/empire/empire/server/api/v2/starkiller/index.html'
59+
shouldExist: true

.github/install_tests/Debian10.Dockerfile

-10
This file was deleted.

.github/install_tests/Debian11.Dockerfile

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ARG BASE_IMAGE
2+
FROM $BASE_IMAGE
3+
WORKDIR /empire
4+
COPY . /empire
5+
6+
SHELL ["/bin/bash", "-c"]
7+
8+
RUN apt-get update && apt-get -y install sudo
9+
10+
# Add a non-root user
11+
RUN echo 'empire ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
12+
RUN useradd -m empire
13+
RUN chown -R empire:empire /empire
14+
USER empire
15+
16+
RUN sed -i 's/use: mysql/use: sqlite/g' empire/server/config.yaml
17+
RUN yes | /empire/setup/install.sh
18+
RUN rm -rf /empire/empire/server/data/empire*

.github/install_tests/KaliRolling.Dockerfile

-9
This file was deleted.

.github/install_tests/ParrotRolling.Dockerfile

-9
This file was deleted.

.github/install_tests/Ubuntu2004.Dockerfile

-9
This file was deleted.

.github/install_tests/Ubuntu2204.Dockerfile

-9
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
schemaVersion: 2.0.0
2+
containerRunOptions:
3+
user: "empire"
4+
commandTests:
5+
- name: "mysql version"
6+
command: "mysql"
7+
args: ["--version"]
8+
expectedOutput: ["mysql Ver 15.*10.*-MariaDB"]

.github/install_tests/cst-config-debian10.yaml

-18
This file was deleted.

.github/install_tests/cst-config-debian11.yaml

-18
This file was deleted.

.github/cst-config-base.yaml .github/install_tests/cst-config-install-base.yaml

+43-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
schemaVersion: 2.0.0
22
commandTests:
3+
# pyenv
4+
- name: "pyenv"
5+
command: "which"
6+
args: ["pyenv"]
7+
expectedOutput: ["/usr/bin/pyenv"]
8+
- name: "pyenv version"
9+
command: "pyenv"
10+
args: ["--version"]
11+
expectedOutput: ["pyenv 2.3.*"]
12+
# poetry
13+
- name: "poetry python"
14+
command: "poetry"
15+
args: ["run", "which", "python3"]
16+
expectedOutput: ["/empire/.venv/bin/python3"]
17+
- name: "poetry"
18+
command: "which"
19+
args: ["poetry"]
20+
expectedOutput: ["/usr/bin/poetry"]
21+
- name: "poetry version"
22+
command: "poetry"
23+
args: ["--version"]
24+
expectedOutput: ["Poetry (version 1.6*)*"]
25+
- name: "poetry python version"
26+
command: "poetry"
27+
args: ["run", "python3", "--version"]
28+
expectedOutput: ["Python 3.12.*"]
29+
# dotnet
330
- name: "dotnet which"
431
command: "which"
532
args: ["dotnet"]
@@ -8,6 +35,7 @@ commandTests:
835
command: "dotnet"
936
args: [ "--version" ]
1037
expectedOutput: ["6.0.*"]
38+
# powershell
1139
- name: "powershell which"
1240
command: "which"
1341
args: ["pwsh"]
@@ -16,6 +44,21 @@ commandTests:
1644
command: "pwsh"
1745
args: ["--version"]
1846
expectedOutput: ["PowerShell 7.*"]
47+
# mysql
48+
- name: "mysql which"
49+
command: "which"
50+
args: ["mysql"]
51+
expectedOutput: ["/usr/bin/mysql"]
52+
# nim
53+
- name: "nim which"
54+
command: "which"
55+
args: ["nim"]
56+
expectedOutput: ["/usr/bin/nim"]
57+
- name: "nim version"
58+
command: "nim"
59+
args: ["--version"]
60+
expectedOutput: ["Nim Compiler Version 1.6.*"]
61+
# run
1962
- name: "ps-empire help"
2063
command: "./ps-empire"
2164
args: ["server", "--help"]
@@ -34,4 +77,3 @@ fileExistenceTests:
3477
- name: 'sharpire'
3578
path: '/empire/empire/server/csharp/Covenant/Data/ReferenceSourceLibraries/Sharpire'
3679
shouldExist: true
37-
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
schemaVersion: 2.0.0
2+
containerRunOptions:
3+
user: "empire"
4+
commandTests:
5+
- name: "mysql version"
6+
command: "mysql"
7+
args: ["--version"]
8+
expectedOutput: ["mysql Ver 15.*10.*-MariaDB"]

.github/install_tests/cst-config-kalirolling.yaml

-18
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
schemaVersion: 2.0.0
2+
containerRunOptions:
3+
user: "empire"
4+
commandTests:
5+
- name: "mysql version"
6+
command: "mysql"
7+
args: ["--version"]
8+
expectedOutput: ["mysql Ver 15.*10.*-MariaDB"]

.github/install_tests/cst-config-parrotrolling.yaml

-18
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
schemaVersion: 2.0.0
2+
containerRunOptions:
3+
user: "empire"
4+
commandTests:
5+
- name: "mysql version"
6+
command: "mysql"
7+
args: ["--version"]
8+
expectedOutput: ["mysql Ver 8.0.*"]

.github/install_tests/cst-config-ubuntu2004.yaml

-18
This file was deleted.

.github/install_tests/cst-config-ubuntu2204.yaml

-18
This file was deleted.

0 commit comments

Comments
 (0)