Author SHA1 Message Date
Jens 08625fefdd ci: add lightweight validation fast path 2026-09-03 00:29:44 +00:00
Jens 0de9177e7c Merge pull request 'Use Gitea-compatible canary evidence upload' (#3) from codex/resolve-projectbrain-findings-20260828 into master
Unraid autoredeploy / Deploy mobilityops (push) Failing after 1m11s
Reviewed-on: #3
2026-09-01 20:09:22 +00:00
NuklearRabbit 48147465b5 security: refresh Alpine runtime packages
MobilityOps acceptance / acceptance (pull_request) Successful in 6m28s
2026-09-01 21:19:48 +02:00
NuklearRabbit 92bdfb421b Merge remote-tracking branch 'origin/master' into codex/resolve-projectbrain-findings-20260828
MobilityOps acceptance / acceptance (pull_request) Failing after 2m42s
# Conflicts:
#	.dockerignore
#	.gitea/workflows/ci.yml
#	.gitea/workflows/live-canary.yml
#	.gitea/workflows/release.yml
2026-09-01 20:42:10 +02:00
Jens 4257fea9d6 Merge pull request 'chore: sanitize MobilityOps operational evidence and public boundary' (#8) from chatgpt/repo-hygiene-mobilityops into master
Unraid autoredeploy / Deploy mobilityops (push) Failing after 1h58m50s
Reviewed-on: #8
2026-09-01 14:29:25 +02:00
NuklearRabbit e8eed3e641 fix(ci): package contract fixtures and recover deploy chunk races
MobilityOps acceptance / backend (pull_request) Failing after 2m29s
MobilityOps acceptance / frontend (pull_request) Successful in 1m10s
MobilityOps acceptance / e2e (pull_request) Skipped
Managed validation / full (pull_request) Successful in 3s
2026-08-29 00:40:51 +02:00
NuklearRabbit 2918608240 fix(ci): isolate contract and image scans from host paths
MobilityOps acceptance / backend (pull_request) Failing after 2m20s
MobilityOps acceptance / frontend (pull_request) Successful in 1m24s
MobilityOps acceptance / e2e (pull_request) Skipped
Managed validation / full (pull_request) Canceled after 0s
2026-08-29 00:27:17 +02:00
NuklearRabbit a99aed9a5f perf(ci): deduplicate branch validation
MobilityOps acceptance / backend (pull_request) Canceled after 0s
MobilityOps acceptance / frontend (pull_request) Canceled after 0s
MobilityOps acceptance / e2e (pull_request) Canceled after 0s
Managed validation / full (pull_request) Canceled after 0s
2026-08-28 23:59:30 +02:00
NuklearRabbit 00e8ec001b fix(ci): run secret scan inside isolated workspace
Managed validation / full (pull_request) Canceled after 0s
MobilityOps acceptance / frontend (pull_request) Successful in 1m14s
MobilityOps acceptance / backend (pull_request) Failing after 4m7s
MobilityOps acceptance / e2e (pull_request) Skipped
2026-08-28 23:57:46 +02:00
NuklearRabbit d20ff7a243 fix(ci): upgrade pinned Trivy action
Managed validation / full (pull_request) Canceled after 0s
MobilityOps acceptance / backend (pull_request) Failing after 32s
MobilityOps acceptance / frontend (pull_request) Successful in 1m1s
MobilityOps acceptance / e2e (pull_request) Skipped
2026-08-28 23:42:59 +02:00
NuklearRabbit bc0951115b fix(ci): use Gitea-compatible canary artifacts
Managed validation / full (pull_request) Successful in 10s
MobilityOps acceptance / frontend (pull_request) Successful in 1m17s
MobilityOps acceptance / backend (pull_request) Failing after 1m18s
MobilityOps acceptance / e2e (pull_request) Skipped
2026-08-28 23:11:09 +02:00
8 changed files with 111 additions and 7 deletions
+8
View File
@@ -19,6 +19,14 @@ frontend/node_modules
frontend/dist frontend/dist
dist dist
artifacts artifacts
docs
deploy
n8n/**
!n8n/workflows/
!n8n/workflows/**
frontend
*.tgz
*.tar.gz
coverage coverage
playwright-report playwright-report
test-results test-results
+30 -5
View File
@@ -31,10 +31,19 @@ jobs:
echo "Product or test change: running the complete acceptance gate." echo "Product or test change: running the complete acceptance gate."
fi fi
- name: Secret scan - name: Secret scan
uses: trufflesecurity/trufflehog@b9dd330365132cd2d01dd5dc8a857a056a2544e1 # v3.79.0 shell: bash
with: run: |
path: ./ set -euo pipefail
extra_args: --only-verified repository="$PWD"
source="file:///repo"
workspace=(-v "$repository:/repo" -w /repo)
if docker inspect "${HOSTNAME:-}" >/dev/null 2>&1; then
source="file://$repository"
workspace=(--volumes-from "$HOSTNAME" -w "$repository")
fi
docker run --rm "${workspace[@]}" \
ghcr.io/trufflesecurity/trufflehog@sha256:7104dbb84d1ad2f5f6fa1134e92c6aa6f701f0a4ac2efd5a4c5c96225d899fe3 \
git "$source" --fail --no-update --github-actions --only-verified
- name: Backend tests in isolated PostgreSQL stack - name: Backend tests in isolated PostgreSQL stack
if: steps.scope.outputs.full == 'true' if: steps.scope.outputs.full == 'true'
run: sh scripts/run-isolated-tests.sh run: sh scripts/run-isolated-tests.sh
@@ -44,8 +53,24 @@ jobs:
docker compose -p mobilityops-ci -f compose.yaml -f compose.test.yaml run --build --rm api ruff check app tests docker compose -p mobilityops-ci -f compose.yaml -f compose.test.yaml run --build --rm api ruff check app tests
docker compose -p mobilityops-ci -f compose.yaml -f compose.test.yaml run --rm api mypy app docker compose -p mobilityops-ci -f compose.yaml -f compose.test.yaml run --rm api mypy app
docker compose -p mobilityops-ci -f compose.yaml -f compose.test.yaml run --rm \ docker compose -p mobilityops-ci -f compose.yaml -f compose.test.yaml run --rm \
-v "$PWD:/repo:ro" api python /repo/scripts/check-contracts.py api python scripts/check-contracts.py
python scripts/check-source-budgets.py python scripts/check-source-budgets.py
- name: Build production API image for vulnerability scan
if: steps.scope.outputs.full == 'true'
run: |
docker build --target runtime --build-arg VCS_REF="$GITHUB_SHA" \
--tag mobilityops-api-ci --file backend/Dockerfile .
- name: Production API image vulnerability scan (HIGH/CRITICAL)
if: steps.scope.outputs.full == 'true'
run: bash scripts/scan-ci-image.sh mobilityops-api-ci
- name: Build production web image for vulnerability scan
if: steps.scope.outputs.full == 'true'
run: |
docker build --build-arg VCS_REF="$GITHUB_SHA" \
--tag mobilityops-web-ci frontend
- name: Production web image vulnerability scan (HIGH/CRITICAL)
if: steps.scope.outputs.full == 'true'
run: bash scripts/scan-ci-image.sh mobilityops-web-ci
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
if: steps.scope.outputs.full == 'true' if: steps.scope.outputs.full == 'true'
with: with:
+27
View File
@@ -42,6 +42,33 @@ jobs:
exit 1 exit 1
fi fi
# MANAGED_FAST_PATH: documentation and this baseline workflow cannot
# affect the shipped runtime. Keep the required status check, but do
# not install toolchains or execute the full product suite.
if [[ -n "${GITHUB_BASE_REF:-}" ]]; then
git fetch --no-tags --depth=1 origin "${GITHUB_BASE_REF}"
managed_base="origin/${GITHUB_BASE_REF}"
git diff --check "${managed_base}..HEAD"
mapfile -t managed_changed_files < <(
git diff --name-only --diff-filter=ACMR "${managed_base}..HEAD"
)
managed_runtime_change=0
for managed_path in "${managed_changed_files[@]}"; do
case "${managed_path}" in
*.md|*.mdx|docs/*|.github/ISSUE_TEMPLATE/*|.gitea/ISSUE_TEMPLATE/*|.gitea/runner-scope.sh|.gitea/workflows/managed-validation.yml)
;;
*)
managed_runtime_change=1
break
;;
esac
done
if [[ "${#managed_changed_files[@]}" -gt 0 && "${managed_runtime_change}" -eq 0 ]]; then
printf 'Managed validation fast path: %s non-runtime file(s); full product suite skipped.\n' \
"${#managed_changed_files[@]}"
exit 0
fi
fi
if [[ -f pyproject.toml || -f requirements.txt ]]; then if [[ -f pyproject.toml || -f requirements.txt ]]; then
# Compile only tracked Python sources. Running compileall after a # Compile only tracked Python sources. Running compileall after a
# Node install would otherwise traverse node_modules and turn a # Node install would otherwise traverse node_modules and turn a
+2 -2
View File
@@ -29,8 +29,8 @@ jobs:
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
-v "$PWD:/work" -w /work \ -v "$PWD:/work" -w /work \
aquasec/trivy:0.74.0@sha256:62b1e65e8869bc4b4c6aa4fa2b21595256c7c2f6018a9d9ad61caf87187c1969 \ aquasec/trivy:0.74.0@sha256:62b1e65e8869bc4b4c6aa4fa2b21595256c7c2f6018a9d9ad61caf87187c1969 \
image --format cyclonedx --output "mobilityops-${component}-sbom.cdx.json" \ image --format cyclonedx --output "mobilityops-${component}-sbom.cdx.json" \
"mobilityops-${component}-release" "mobilityops-${component}-release"
done done
- name: Record immutable image metadata - name: Record immutable image metadata
run: | run: |
+3
View File
@@ -24,6 +24,9 @@ FROM runtime-base AS test
COPY backend/requirements.lock ./requirements.lock COPY backend/requirements.lock ./requirements.lock
RUN pip install --no-cache-dir -r requirements.lock RUN pip install --no-cache-dir -r requirements.lock
COPY backend/tests ./tests COPY backend/tests ./tests
COPY contracts ./contracts
COPY scripts/check-contracts.py ./scripts/check-contracts.py
COPY n8n/workflows ./n8n/workflows
USER app USER app
FROM runtime-base AS runtime FROM runtime-base AS runtime
+3
View File
@@ -11,6 +11,9 @@ ENV VITE_API_BASE_URL=$VITE_API_BASE_URL
RUN npm run build RUN npm run build
FROM nginx:1.30.4-alpine@sha256:97d490c12ba55b4946b01546d1c3ed324e8d41ab1c9fcb2a616aa470620e5b46 FROM nginx:1.30.4-alpine@sha256:97d490c12ba55b4946b01546d1c3ed324e8d41ab1c9fcb2a616aa470620e5b46
# The pinned upstream image can lag Alpine security rebuilds. Apply the current
# fixes from its pinned Alpine release before shipping the runtime image.
RUN apk upgrade --no-cache
ARG VCS_REF=development ARG VCS_REF=development
ARG BUILD_DATE=unknown ARG BUILD_DATE=unknown
LABEL org.opencontainers.image.title="Fleet Ops Web" \ LABEL org.opencontainers.image.title="Fleet Ops Web" \
+9
View File
@@ -26,6 +26,15 @@ test("non-destructive operator canary covers routes and grounded knowledge", asy
await page.goto("/login"); await page.goto("/login");
await page.getByRole("button", { name: "Verken als Operationsmanager" }).click(); await page.getByRole("button", { name: "Verken als Operationsmanager" }).click();
await expect(page).toHaveURL(/\/dashboard$/); await expect(page).toHaveURL(/\/dashboard$/);
if (pageErrors.some((message) => message.toLowerCase().includes("dynamically imported module"))) {
// A deploy can replace the SPA between loading index.html and its lazy
// dashboard chunk. One clean reload must recover; a persistent chunk or
// server error is collected again and still fails the canary below.
pageErrors.length = 0;
await page.reload({ waitUntil: "domcontentloaded" });
await expect(page).toHaveURL(/\/dashboard$/);
await expect(page.locator("main")).toBeVisible();
}
for (const [path, heading] of [ for (const [path, heading] of [
["/vehicles", "Wagenpark"], ["/vehicles", "Wagenpark"],
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
TARGET_IMAGE="${1:?usage: scan-ci-image.sh <image>}"
TRIVY_IMAGE="aquasec/trivy@sha256:be1190afcb28352bfddc4ddeb71470835d16462af68d310f9f4bca710961a41e"
SAFE_NAME="$(printf '%s' "$TARGET_IMAGE" | tr -cs 'A-Za-z0-9._-' '-')"
ARCHIVE_RELATIVE="artifacts/.${SAFE_NAME}.tar"
ARCHIVE="$ROOT/$ARCHIVE_RELATIVE"
trap 'rm -f "$ARCHIVE"' EXIT
mkdir -p "$ROOT/artifacts"
docker image inspect "$TARGET_IMAGE" >/dev/null
docker save --output "$ARCHIVE" "$TARGET_IMAGE"
WORKSPACE_ARGS=(-v "$ROOT:/workspace:ro")
CONTAINER_ARCHIVE="/workspace/$ARCHIVE_RELATIVE"
if docker inspect "${HOSTNAME:-}" >/dev/null 2>&1; then
WORKSPACE_ARGS=(--volumes-from "$HOSTNAME")
CONTAINER_ARCHIVE="$ROOT/$ARCHIVE_RELATIVE"
fi
docker run --rm "${WORKSPACE_ARGS[@]}" "$TRIVY_IMAGE" image \
--input "$CONTAINER_ARCHIVE" \
--scanners vuln \
--severity HIGH,CRITICAL \
--ignore-unfixed \
--exit-code 1 \
--format table