Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2ad2f64
Cleanup certs + added dockerignore.
vladd-bit Aug 27, 2026
bc7bcea
Removed DS_Store
vladd-bit Aug 27, 2026
9cde36a
Merge branch 'main' of https://github.com/CogStack/CogStack-NiFi into…
vladd-bit Sep 1, 2026
2ab613d
Deploy: added cert generation make commands.
vladd-bit Sep 1, 2026
f96c5d5
Updated uv.lock.
vladd-bit Sep 1, 2026
398fc3f
Updated uv.lock + requirements.txt.
vladd-bit Sep 1, 2026
ae8bd74
Deploy: updated gitea img veresion.
vladd-bit Sep 1, 2026
251f0f3
Added gitea cert gen + revised doc link.
vladd-bit Sep 1, 2026
c1d14a1
Deploy: helm updates for gitea.
vladd-bit Sep 1, 2026
e0ae421
NiFi: requirements update.
vladd-bit Sep 1, 2026
9ab604a
Security: fixed bash sh perms.
vladd-bit Sep 1, 2026
52653d5
Security: removed credential output from sh scripts.
vladd-bit Sep 1, 2026
5fbe569
Security: updates to x509 templates and gitea cert creation sh.
vladd-bit Sep 1, 2026
3e784ad
Gitea fixes.
vladd-bit Sep 1, 2026
cea4b5c
Workflow updates.
vladd-bit Sep 1, 2026
3d83ce7
Fixed pip audit deps.
vladd-bit Sep 1, 2026
539715d
Security: Added proper cert usage to curl commands.
vladd-bit Sep 1, 2026
bf398cd
Updated OS/ES user creation scripts.
vladd-bit Sep 1, 2026
0d7e42a
Updated nifi reqs.
vladd-bit Sep 1, 2026
846de1e
Shellcheck .sh scripts.
vladd-bit Sep 1, 2026
8c98213
NiFi: transitioned to req to pyproject.toml & updated GA workflows.
vladd-bit Sep 1, 2026
df5e04f
Fixed script.
vladd-bit Sep 1, 2026
ce31ad6
Pinned build/lint tooling, depdendabot uv pin.
vladd-bit Sep 2, 2026
c2cd069
GHA updates.
vladd-bit Sep 2, 2026
5e8d336
NiFi: removed old netty download script from docker image build.
vladd-bit Sep 2, 2026
4d73dbd
Updated smoke tests.
vladd-bit Sep 2, 2026
d66b02e
Merge branch 'main' of https://github.com/CogStack/CogStack-NiFi into…
vladd-bit Sep 2, 2026
22f6a96
NiFi: updated Dockerfile, Security: removed legacy nifi cert gen script.
vladd-bit Sep 2, 2026
edad611
Docs fix.
vladd-bit Sep 2, 2026
fe7c02c
Deploy: updated ES to 9.5.2 (untested, likely last release to test be…
vladd-bit Sep 2, 2026
7703e19
Updated GHAs.
vladd-bit Sep 2, 2026
e70e502
GHA updates + NiFi docker build updates(NAR step)
vladd-bit Sep 2, 2026
db376c3
Docs: updated url refs for ES/OS.
vladd-bit Sep 3, 2026
fa6c44d
NiFi: removed unused repos from apt (dockerfile).
vladd-bit Sep 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# The NiFi image only copies pyproject.toml and the nifi source tree.
# Keep the build context small and prevent unrelated repository content,
# credentials, and local development state from entering image layers.
**
!pyproject.toml
!uv.lock
!nifi/
!nifi/**

# Local NiFi runtime state. These files may contain environment-specific
# endpoints, identifiers, or other data and are not reproducible inputs.
nifi/conf/flow.json.gz
nifi/conf/archive/

# Development and operating-system artefacts within the included source tree.
nifi/**/__pycache__/
nifi/**/*.py[cod]
nifi/**/.DS_Store
nifi/**/.pytest_cache/
nifi/**/.ruff_cache/
nifi/**/.mypy_cache/
nifi/**/*.egg-info/
18 changes: 15 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,29 @@ updates:
schedule:
interval: "weekly"

# Keep Dockerfile base images (in repo root) up to date
# Keep the owned NiFi Dockerfile base image up to date.
- package-ecosystem: "docker"
directory: "/"
directory: "/nifi"
schedule:
interval: "weekly"
registries:
- dockerhub

# Keep the root Python project and lock file up to date.
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "weekly"

# Keep the documentation project and lock file up to date.
- package-ecosystem: "uv"
directory: "/docs"
schedule:
interval: "weekly"

registries:
dockerhub:
type: "docker-registry"
url: "https://index.docker.io"
username: "${{secrets.DOCKER_HUB_USERNAME}}"
password: "${{secrets.DOCKER_HUB_ACCESS_TOKEN}}"
password: "${{secrets.DOCKER_HUB_ACCESS_TOKEN}}"
28 changes: 24 additions & 4 deletions .github/workflows/_docker_template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,40 @@ jobs:
type=ref,event=branch,enable=${{ github.event_name != 'pull_request' }}
type=sha,format=short

- name: Wait for Docker Hub to register images
run: sleep 60

- name: Create multi-arch manifest
shell: bash
run: |
set -euo pipefail

wait_for_image() {
local image_ref="$1"
local attempt

for attempt in {1..12}; do
if docker buildx imagetools inspect "$image_ref" >/dev/null 2>&1; then
echo "Available: ${image_ref}"
return 0
fi

if [[ "$attempt" -lt 12 ]]; then
echo "Waiting for ${image_ref} (${attempt}/12)..."
sleep 5
fi
done

echo "Timed out waiting for ${image_ref}" >&2
return 1
}

while IFS= read -r ref; do
[[ -z "$ref" ]] && continue
img="${ref%%:*}"
tag="${ref#*:}"
wait_for_image "${img}:${tag}-amd64"
wait_for_image "${img}:${tag}-arm64"
echo "🌀 Creating manifest for ${img}:${tag}"
docker buildx imagetools create \
--tag "${img}:${tag}" \
"${img}:${tag}-amd64" \
"${img}:${tag}-arm64"
done < <(printf "%s" "${{ steps.meta_manifest.outputs.tags }}")
done < <(printf "%s\n" "${{ steps.meta_manifest.outputs.tags }}")
4 changes: 4 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
schedule:
- cron: '35 5 * * 4'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze (${{ matrix.language }})
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/compose_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: compose-config

on:
push:
branches: ['**']
paths:
- "deploy/*.env"
- "deploy/export_env_vars.sh"
- "deploy/services*.yml"
- "security/env/*.env"
- ".github/workflows/compose_config.yml"
pull_request:
paths:
- "deploy/*.env"
- "deploy/export_env_vars.sh"
- "deploy/services*.yml"
- "security/env/*.env"
- ".github/workflows/compose_config.yml"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
validate:
name: Validate Docker Compose configuration
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- name: Validate Compose files
shell: bash
run: |
set -euo pipefail
source deploy/export_env_vars.sh
docker compose -f deploy/services.yml config --quiet
docker compose -f deploy/services.dev.yml config --quiet
29 changes: 25 additions & 4 deletions .github/workflows/dependency_hygiene.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,27 @@ on:
workflow_dispatch:
schedule:
- cron: "0 6 * * 1" # weekly Monday UTC
push:
branches: ['**']
paths:
- "docs/pyproject.toml"
- "docs/uv.lock"
- "pyproject.toml"
- "uv.lock"
- "scripts/maintenance/audit_pip_dependency.sh"
- ".github/workflows/dependency_hygiene.yml"
pull_request:
paths:
- "docs/requirements.txt"
- "nifi/requirements.txt"
- "docs/pyproject.toml"
- "docs/uv.lock"
- "pyproject.toml"
- "uv.lock"
- "scripts/maintenance/audit_pip_dependency.sh"
- ".github/workflows/dependency_hygiene.yml"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read
Expand All @@ -23,7 +39,7 @@ jobs:
uses: actions/cache@v6
with:
path: ~/.cache/pip
key: pip-${{ runner.os }}-${{ hashFiles('docs/requirements.txt', 'nifi/requirements.txt', 'scripts/maintenance/audit_pip_dependency.sh') }}
key: pip-${{ runner.os }}-${{ hashFiles('docs/pyproject.toml', 'docs/uv.lock', 'pyproject.toml', 'uv.lock', 'scripts/maintenance/audit_pip_dependency.sh') }}
restore-keys: |
pip-${{ runner.os }}-

Expand All @@ -32,7 +48,12 @@ jobs:
with:
python-version: "3.11"

- name: Install pip-audit
- name: Install uv
uses: astral-sh/setup-uv@v10.0.1
with:
version-file: "pyproject.toml"

- name: Install audit tools
run: python -m pip install --upgrade pip pip-audit

- name: Ensure script is executable
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/doc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ name: doc-build

on:
push:
branches: [ main ]
branches: ['**']
pull_request:
branches: [ main ]

release:
types: [published]

workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -22,8 +25,9 @@ jobs:
- uses: actions/checkout@v7

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@v10.0.1
with:
version-file: "pyproject.toml"
python-version: "3.12"
enable-cache: true
cache-dependency-glob: "docs/uv.lock"
Expand All @@ -39,4 +43,4 @@ jobs:

- name: Build docs
working-directory: docs
run: uv run mkdocs build -f ../mkdocs.yml
run: uv run mkdocs build --strict -f ../mkdocs.yml
23 changes: 13 additions & 10 deletions .github/workflows/python_quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@ on:
branches: ['**']
paths:
- "pyproject.toml"
- "nifi/requirements.txt"
- "nifi/requirements-dev.txt"
- "uv.lock"
- "nifi/**/*.py"
- "scripts/**/*.py"
- "typings/**/*.pyi"
- ".github/workflows/python_quality.yml"
pull_request:
paths:
- "pyproject.toml"
- "nifi/requirements.txt"
- "nifi/requirements-dev.txt"
- "uv.lock"
- "nifi/**/*.py"
- "scripts/**/*.py"
- "typings/**/*.pyi"
- ".github/workflows/python_quality.yml"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -39,17 +41,18 @@ jobs:
python-version: "3.11"

- name: Install uv
run: |
python -m pip install --upgrade pip uv
uses: astral-sh/setup-uv@v10.0.1
with:
version-file: "pyproject.toml"

- name: Install requirements with uv
- name: Install locked project dependencies
run: |
uv pip install --system -r nifi/requirements.txt -r nifi/requirements-dev.txt
uv sync --locked --dev

- name: Ruff (critical rules)
run: |
python -m ruff check scripts nifi/user_python_extensions --select F,E9
uv run --locked ruff check scripts nifi/user_python_extensions --select F,E9

- name: MyPy
run: |
python -m mypy --config-file pyproject.toml nifi/user_python_extensions scripts
uv run --locked mypy --config-file pyproject.toml nifi/user_python_extensions scripts
40 changes: 40 additions & 0 deletions .github/workflows/shell_script_enforce_exec_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
push:
branches: ['**']

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

Expand Down Expand Up @@ -40,3 +44,39 @@ jobs:
echo "Fix with: git update-index --chmod=+x <file>"
exit 1
fi

shell-quality:
name: ShellCheck and syntax
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7

- name: Check root-owned shell scripts
shell: bash
run: |
set -euo pipefail

scripts=()
while IFS= read -r -d '' file; do
scripts+=("$file")
done < <(
git ls-files -z -- '*.sh' \
':(exclude)services/**' \
':(exclude)deploy/charts/**'
)

if [[ "${#scripts[@]}" -eq 0 ]]; then
echo "No root-owned shell scripts found."
exit 0
fi

echo "Checking ${#scripts[@]} root-owned shell scripts."
docker run --rm \
--volume "${GITHUB_WORKSPACE}:/mnt:ro" \
--workdir /mnt \
koalaman/shellcheck:v0.11.0@sha256:61862eba1fcf09a484ebcc6feea46f1782532571a34ed51fedf90dd25f925a8d \
"${scripts[@]}"

for file in "${scripts[@]}"; do
bash -n "$file"
done
4 changes: 4 additions & 0 deletions .github/workflows/smoke_elastic_services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches: ['**']
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/smoke_gitea_service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
branches: ['**']
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: read

Expand All @@ -24,10 +28,11 @@ jobs:
java-version: '21'

- name: Generate certificates
working-directory: security/scripts
run: |
set -euo pipefail
./create_root_ca_cert.sh
make -C deploy init-security-gitea
sudo chown 1000:1000 security/certificates/gitea/gitea.key
sudo chmod 600 security/certificates/gitea/gitea.key

- name: Start Gitea service
run: |
Expand Down
Loading
Loading