Skip to content

Commit 7716b35

Browse files
authored
Merge pull request #772 from BC-SECURITY/release/6.0.0
v6.0.0 into main
2 parents 2765c6a + 1d6bd02 commit 7716b35

File tree

1,335 files changed

+34639
-55175
lines changed

Some content is hidden

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

1,335 files changed

+34639
-55175
lines changed

.github/CONTRIBUTING.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,13 @@ The `main` branch in `BC-SECURITY/Empire` automatically syncs.
4545

4646
### Code Formatting and Linting
4747

48-
* We are using [psf/black](https://github.com/psf/black) for code formatting.
49-
* We are using [charliermarsh/ruff](https://github.com/charliermarsh/ruff) for linting.
48+
* We are using [astral-sh/ruff](https://github.com/astral-sh/ruff) for linting and formatting.
5049
* After implementing your changes:
51-
1. run `ruff . --fix` (or `poetry run ruff . --fix`).
52-
2. run `black .` (or `poetry run black .`).
50+
1. run `ruff check . --fix` (or `poetry run ruff check . --fix`).
51+
2. run `ruff format .` (or `poetry run ruff format .`).
5352
* The repo is also configured to use [pre-commit](https://pre-commit.com/) to automatically format code.
5453
* Once you have pre-commit installed, you can run `pre-commit install` to install the pre-commit hooks.
55-
* Then pre-commit will execute black and ruff automatically before committing.
54+
* Then pre-commit will execute ruff automatically before committing.
5655

5756
### Tests
5857

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# These are supported funding model platforms
2-
32
github: [bc-security]

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 66 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -3,70 +3,71 @@ description: File a bug/issue
33
title: "[BUG] <title>"
44
labels: ["bug"]
55
body:
6-
- type: checkboxes
7-
attributes:
8-
label: Is there an existing issue for this?
9-
description: Please search to see if an issue already exists for the bug you encountered.
10-
options:
11-
- label: I have searched the existing issues
6+
- type: checkboxes
7+
attributes:
8+
label: Is there an existing issue for this?
9+
description: Please search to see if an issue already exists for the bug you
10+
encountered.
11+
options:
12+
- label: I have searched the existing issues
13+
required: true
14+
- type: input
15+
attributes:
16+
label: Empire Version
17+
description: What version of Empire are you using?
18+
validations:
1219
required: true
13-
- type: input
14-
attributes:
15-
label: Empire Version
16-
description: What version of Empire are you using?
17-
validations:
18-
required: true
19-
- type: input
20-
attributes:
21-
label: Python Version
22-
description: What version of Python are you using?
23-
validations:
24-
required: true
25-
- type: input
26-
attributes:
27-
label: Operating System
28-
description: What operating system are you using?
29-
validations:
30-
required: true
31-
- type: dropdown
32-
attributes:
33-
label: Database
34-
description: What database are you using?
35-
options:
36-
- SQLite
37-
- MySQL
38-
- MariaDB
39-
validations:
40-
required: true
41-
- type: textarea
42-
attributes:
43-
label: Current Behavior
44-
description: A concise description of what you're experiencing.
45-
validations:
46-
required: true
47-
- type: textarea
48-
attributes:
49-
label: Expected Behavior
50-
description: A concise description of what you expected to happen.
51-
validations:
52-
required: true
53-
- type: textarea
54-
attributes:
55-
label: Steps To Reproduce
56-
description: Steps to reproduce the behavior.
57-
placeholder: |
58-
1. In this environment...
59-
1. With this config...
60-
1. Run '...'
61-
1. See error...
62-
validations:
63-
required: true
64-
- type: textarea
65-
attributes:
66-
label: Anything else?
67-
description: |
68-
Links? References? Anything that will give us more context about the issue you are encountering!
20+
- type: input
21+
attributes:
22+
label: Python Version
23+
description: What version of Python are you using?
24+
validations:
25+
required: true
26+
- type: input
27+
attributes:
28+
label: Operating System
29+
description: What operating system are you using?
30+
validations:
31+
required: true
32+
- type: dropdown
33+
attributes:
34+
label: Database
35+
description: What database are you using?
36+
options:
37+
- SQLite
38+
- MySQL
39+
- MariaDB
40+
validations:
41+
required: true
42+
- type: textarea
43+
attributes:
44+
label: Current Behavior
45+
description: A concise description of what you're experiencing.
46+
validations:
47+
required: true
48+
- type: textarea
49+
attributes:
50+
label: Expected Behavior
51+
description: A concise description of what you expected to happen.
52+
validations:
53+
required: true
54+
- type: textarea
55+
attributes:
56+
label: Steps To Reproduce
57+
description: Steps to reproduce the behavior.
58+
placeholder: |
59+
1. In this environment...
60+
1. With this config...
61+
1. Run '...'
62+
1. See error...
63+
validations:
64+
required: true
65+
- type: textarea
66+
attributes:
67+
label: Anything else?
68+
description: |
69+
Links? References? Anything that will give us more context about the issue you are encountering!
6970
70-
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
71-
validations:
72-
required: false
71+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
72+
validations:
73+
required: false

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,30 @@ description: File a bug/issue
33
title: "[FEATURE REQUEST] <title>"
44
labels: ["enhancement"]
55
body:
6-
- type: textarea
7-
attributes:
8-
label: Description
9-
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
10-
validations:
11-
required: true
12-
- type: textarea
13-
attributes:
14-
label: Solution
15-
description: A clear and concise description of what you want to happen.
16-
validations:
17-
required: true
18-
- type: textarea
19-
attributes:
20-
label: Alternatives
21-
description: A clear and concise description of any alternative solutions or features you've considered.
22-
validations:
23-
required: false
24-
- type: textarea
25-
attributes:
26-
label: Additional Context
27-
description: Add any other context or screenshots about the feature request here.
28-
validations:
29-
required: false
6+
- type: textarea
7+
attributes:
8+
label: Description
9+
description: A clear and concise description of what the problem is. Ex. I'm
10+
always frustrated when [...]
11+
validations:
12+
required: true
13+
- type: textarea
14+
attributes:
15+
label: Solution
16+
description: A clear and concise description of what you want to happen.
17+
validations:
18+
required: true
19+
- type: textarea
20+
attributes:
21+
label: Alternatives
22+
description: A clear and concise description of any alternative solutions or
23+
features you've considered.
24+
validations:
25+
required: false
26+
- type: textarea
27+
attributes:
28+
label: Additional Context
29+
description: Add any other context or screenshots about the feature request
30+
here.
31+
validations:
32+
required: false

.github/actions/clean-merge/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: 'Clean Merge'
2-
description: 'Merge a branch into another branch without creating a merge commit. Fail if the merge would create merge conflicts.'
2+
description: 'Merge a branch into another branch without creating a merge commit.
3+
Fail if the merge would create merge conflicts.'
34
inputs:
45
from-branch:
56
description: 'The branch to merge from'
@@ -47,4 +48,4 @@ runs:
4748
shell: bash
4849
run: |
4950
git push ${{ inputs.push-repo }} ${{ inputs.to-branch }}
50-
echo "MERGE_STATUS=NO_CHANGES" >> $GITHUB_ENV
51+
echo "MERGE_STATUS=NO_CHANGES" >> $GITHUB_ENV

.github/actions/update-starkiller/action.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,8 @@ runs:
2525
sed -i "s|repo:.*|repo: ${{ inputs.repo }}|" empire/server/config.yaml
2626
- name: Update config.yaml ref
2727
shell: bash
28-
# this depends on there not being any other keys in the config named ref
29-
# if there are, this will break. We could be safer to load/dump the yaml,
30-
# but would lose the comments.
3128
run: |
32-
sed -i "s/ref: .*/ref: ${{ inputs.starkiller-version }}/" empire/server/config.yaml
29+
sed -i '0,/ref: .*/s//ref: ${{ inputs.starkiller-version }}/' empire/server/config.yaml
3330
- name: Update changelog
3431
shell: bash
3532
run: |

.github/cst-config-docker.yaml

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ commandTests:
77
- name: "python3 version"
88
command: "python3"
99
args: ["--version"]
10-
expectedOutput: ["Python 3.12.*"]
10+
expectedOutput: ["Python 3.13.*"]
1111
- name: "poetry"
1212
command: "which"
1313
args: ["poetry"]
@@ -19,15 +19,7 @@ commandTests:
1919
- name: "poetry python version"
2020
command: "poetry"
2121
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.*"]
22+
expectedOutput: ["Python 3.13.*"]
3123
- name: "powershell which"
3224
command: "which"
3325
args: ["pwsh"]
@@ -38,19 +30,24 @@ commandTests:
3830
expectedOutput: ["PowerShell 7.*"]
3931
- name: "ps-empire help"
4032
command: "./ps-empire"
41-
args: ["server", "--help"]
33+
args: ["-f", "server", "--help"]
4234
expectedOutput: ["usage: empire.py server [-h]*"]
4335
- name: "ps-empire version"
4436
command: "./ps-empire"
45-
args: ["server", "--version"]
46-
expectedOutput: ["5.* BC Security Fork"]
37+
args: ["-f", "server", "--version"]
38+
expectedOutput: ["6.* BC Security Fork"]
39+
- name: "go which"
40+
command: "which"
41+
args: ["go"]
42+
expectedOutput: ["/usr/bin/go"]
43+
- name: "go version"
44+
command: "go"
45+
args: ["version"]
46+
expectedOutput: ["go version go1.23.* linux/*"]
4747
fileExistenceTests:
4848
- name: 'profiles'
4949
path: '/empire/empire/server/data/profiles/'
5050
shouldExist: true
51-
- name: 'sharpire'
52-
path: '/empire/empire/server/csharp/Covenant/Data/ReferenceSourceLibraries/Sharpire'
53-
shouldExist: true
5451
- name: 'starkiller'
55-
path: '/empire/empire/server/api/v2/starkiller/index.html'
52+
path: '/root/.local/share/empire/starkiller/'
5653
shouldExist: true

.github/docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# This is for running the tests in the Docker file, so we can catch
22
# issues with the Dockerfile itself.
33
version: '3'
4-
54
services:
65
test:
76
depends_on:
@@ -13,9 +12,10 @@ services:
1312
entrypoint: /bin/bash
1413
platform: linux/amd64
1514
command: >
16-
-c "DATABASE_USE=sqlite poetry run python -m pytest . --runslow
17-
&& sed -i 's/localhost:3306/db:3306/g' empire/test/test_server_config.yaml
18-
&& DATABASE_USE=mysql poetry run python -m pytest . --runslow"
15+
-c "DATABASE_USE=sqlite poetry run python -m pytest . --nodocker && sed -i
16+
's/localhost:3306/db:3306/g' empire/test/test_server_config.yaml && DATABASE_USE=mysql
17+
poetry run python -m pytest . --nodocker"
18+
1919
db:
2020
image: mysql:8.0
2121
restart: always
@@ -25,7 +25,7 @@ services:
2525
MYSQL_PASSWORD: 'empire_password'
2626
MYSQL_DATABASE: test_empire
2727
volumes:
28-
- db:/var/lib/mysql
28+
- db:/var/lib/mysql
2929
volumes:
3030
db:
3131
driver: local

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

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,7 @@ commandTests:
2525
- name: "poetry python version"
2626
command: "poetry"
2727
args: ["run", "python3", "--version"]
28-
expectedOutput: ["Python 3.12.*"]
29-
# dotnet
30-
- name: "dotnet which"
31-
command: "which"
32-
args: ["dotnet"]
33-
expectedOutput: ["/usr/bin/dotnet"]
34-
- name: "dotnet version"
35-
command: "dotnet"
36-
args: [ "--version" ]
37-
expectedOutput: ["6.0.*"]
28+
expectedOutput: ["Python 3.13.*"]
3829
# powershell
3930
- name: "powershell which"
4031
command: "which"
@@ -49,15 +40,15 @@ commandTests:
4940
command: "which"
5041
args: ["mysql"]
5142
expectedOutput: ["/usr/bin/mysql"]
52-
# nim
53-
- name: "nim which"
43+
# go
44+
- name: "go which"
5445
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.*"]
46+
args: ["go"]
47+
expectedOutput: ["/usr/bin/go"]
48+
- name: "go version"
49+
command: "go"
50+
args: ["version"]
51+
expectedOutput: ["go version go1.23.* linux/*"]
6152
# run
6253
- name: "ps-empire help"
6354
command: "./ps-empire"
@@ -66,11 +57,8 @@ commandTests:
6657
- name: "ps-empire version"
6758
command: "./ps-empire"
6859
args: ["server", "--version"]
69-
expectedOutput: ["5.* BC Security Fork"]
60+
expectedOutput: ["6.* BC Security Fork"]
7061
fileExistenceTests:
7162
- name: 'profiles'
7263
path: '/empire/empire/server/data/profiles/'
7364
shouldExist: true
74-
- name: 'sharpire'
75-
path: '/empire/empire/server/csharp/Covenant/Data/ReferenceSourceLibraries/Sharpire'
76-
shouldExist: true

0 commit comments

Comments
 (0)