Skip to content

Commit 06a37c8

Browse files
authored
Merge pull request #4188 from CactuseSecurity/develop
v9 release
2 parents f739113 + 0aaf22a commit 06a37c8

1,592 files changed

Lines changed: 105726 additions & 102221 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.

.editorconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33

44
root = true
55

6-
[*]
6+
[*.cs]
77
indent_style = space
88
indent_size = 4
99
end_of_line = lf
1010
charset = utf-8
1111
trim_trailing_whitespace = false
1212
insert_final_newline = true
13+
14+
[*.razor]
15+
indent_style = space
16+
indent_size = 4
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
RUFF_PATH=.venv/bin/ruff
4+
5+
$RUFF_PATH check --fix
6+
$RUFF_PATH format

.githooks/post-checkout

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
"$(dirname "$0")/submodule-sync"

.githooks/post-merge

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
"$(dirname "$0")/submodule-sync"

.githooks/post-rewrite

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
"$(dirname "$0")/submodule-sync"

.githooks/submodule-sync

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Sync submodules quietly after common Git operations.
5+
6+
# Resolve repository root; bail out if not inside a Git repo.
7+
repo_root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
8+
if [[ -z "${repo_root}" ]]; then
9+
exit 0
10+
fi
11+
12+
cd "${repo_root}"
13+
14+
# No submodules configured.
15+
if [[ ! -f .gitmodules ]]; then
16+
exit 0
17+
fi
18+
19+
# No submodule paths registered in .gitmodules.
20+
if ! git config --file .gitmodules --get-regexp '^submodule\..*\.path$' >/dev/null 2>&1; then
21+
exit 0
22+
fi
23+
24+
# Disable prompts and keep this hook silent for users without repo access.
25+
export GIT_TERMINAL_PROMPT=0
26+
export GIT_ASKPASS=/bin/true
27+
export GIT_SSH_COMMAND="ssh -o BatchMode=yes"
28+
29+
run_quiet() {
30+
# Ignore failures to avoid blocking normal Git operations.
31+
"$@" >/dev/null 2>&1 || true
32+
}
33+
34+
# Initialize submodules first so each path exists.
35+
run_quiet git submodule update --init --recursive
36+
37+
# Iterate configured submodules to ensure we are on a branch (not detached).
38+
while read -r key path; do
39+
# Convert `submodule.<name>.path` -> `<name>`.
40+
name="${key#submodule.}"
41+
name="${name%.path}"
42+
43+
# Skip if the submodule path is missing or not initialized.
44+
if [[ ! -d "${path}" ]]; then
45+
continue
46+
fi
47+
48+
# Skip if the path is not a Git repo.
49+
if ! git -C "${path}" rev-parse --git-dir >/dev/null 2>&1; then
50+
continue
51+
fi
52+
53+
# Prefer repo-local submodule.<name>.branch, fallback to .gitmodules.
54+
branch="$(git config --get "submodule.${name}.branch" || true)"
55+
if [[ -z "${branch}" ]]; then
56+
branch="$(git config --file .gitmodules --get "submodule.${name}.branch" || true)"
57+
fi
58+
59+
if [[ -n "${branch}" ]]; then
60+
# Try to checkout the branch if it already exists locally.
61+
run_quiet git -C "${path}" checkout -q "${branch}"
62+
63+
# If still detached, create/reset the branch from origin.
64+
if ! git -C "${path}" symbolic-ref -q HEAD >/dev/null 2>&1; then
65+
run_quiet git -C "${path}" checkout -q -B "${branch}" "origin/${branch}"
66+
fi
67+
fi
68+
done < <(git config --file .gitmodules --get-regexp '^submodule\..*\.path$')
69+
70+
# Move submodules to the newest commit on their tracking branch, merging instead of detaching.
71+
run_quiet git submodule update --remote --merge --recursive

.github/workflows/auto-sync-develop-to-importer-rework.yml.yml renamed to .github/workflows/auto-sync-develop-to-importer-rework.yml.yml.disabled

File renamed without changes.

.github/workflows/test-install.yml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: do test install
1+
name: Checks
22

33
on:
44
push:
@@ -18,11 +18,10 @@ jobs:
1818
strategy:
1919
matrix:
2020
os: [ubuntu-latest]
21-
# os: [ubuntu-latest, ubuntu-22.04]
2221
steps:
23-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v6
2423

25-
- uses: actions/setup-dotnet@v4
24+
- uses: actions/setup-dotnet@v5
2625
with:
2726
dotnet-version: '8.0.x'
2827

@@ -38,3 +37,28 @@ jobs:
3837
dotnet restore
3938
dotnet build
4039
dotnet test --filter "Name=HtmlToPdfTest"
40+
41+
42+
python-code-check:
43+
name: Python Code Check
44+
runs-on: ubuntu-latest
45+
steps:
46+
- uses: actions/checkout@v6
47+
48+
- uses: actions/setup-python@v6
49+
with:
50+
python-version: '3.11'
51+
52+
- run: pip install -r roles/importer/files/importer/requirements.txt
53+
54+
- run: pip install -r scripts/customizing/app_data_import/requirements-for-app-data-import.txt
55+
56+
- uses: astral-sh/ruff-action@57714a7c8a2e59f32539362ba31877a1957dded1
57+
with:
58+
version: "0.14.8"
59+
60+
- run: pyright
61+
62+
- run: ruff check
63+
64+
- run: ruff format --exit-non-zero-on-format

.gitignore

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,70 @@
11
.vs/
2-
.idea/
2+
.vscode/launch.json
3+
.vscode/settings.local.json
34
.test_data/
45
roles/importer/venv/
56
ansible_venv/
7+
*.todo
68
**/.venv/
79
**/__pycache__/
810
**/*.pyc
911
.vscode/launch.json
12+
13+
# Created by https://www.toptal.com/developers/gitignore/api/jetbrains+iml
14+
# Edit at https://www.toptal.com/developers/gitignore?templates=jetbrains+iml
15+
16+
### JetBrains+iml ###
17+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
18+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
19+
20+
# Jetbrains IDE generated content
21+
**/.idea/
22+
# Specifically instructed to keep this file out of the ignore
23+
!.idea/
24+
!.idea/ruff.xml
25+
26+
# Gradle and Maven with auto-import
27+
# When using Gradle or Maven with auto-import, you should exclude module files,
28+
# since they will be recreated, and may cause churn. Uncomment if using
29+
# auto-import.
30+
# *.iml
31+
# *.ipr
32+
33+
# CMake
34+
cmake-build-*/
35+
36+
# File-based project format
37+
*.iws
38+
39+
# IntelliJ
40+
out/
41+
42+
# mpeltonen/sbt-idea plugin
43+
.idea_modules/
44+
45+
# JIRA plugin
46+
atlassian-ide-plugin.xml
47+
48+
# Crashlytics plugin (for Android Studio and IntelliJ)
49+
com_crashlytics_export_strings.xml
50+
crashlytics.properties
51+
crashlytics-build.properties
52+
fabric.properties
53+
54+
### JetBrains+iml Patch ###
55+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
56+
57+
*.iml
58+
modules.xml
59+
*.ipr
60+
61+
# End of https://www.toptal.com/developers/gitignore/api/jetbrains+iml
62+
63+
.idea/copilot*
64+
.idea/vcs.xml
65+
.idea/inspectionProfiles
66+
.idea/.gitignore
67+
cov.xml
68+
.coverage
69+
.DS_Store
70+
.dotnet

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[submodule "agents"]
2+
path = agents
3+
url = https://github.com/CactuseSecurity/firewall-orchestrator-agents
4+
branch = main

0 commit comments

Comments
 (0)