Merge remote-tracking branch 'github/main'
CI (SIAX Cloud) / quality (pull_request) Successful in 1m7s
CI (SIAX Cloud) / integration (pull_request) Successful in 2m10s
CI (SIAX Cloud) / security (pull_request) Successful in 1m15s
CI (SIAX Cloud) / sonar (pull_request) Skipped
CI (SIAX Cloud) / Component conformance (blocking) (pull_request) Successful in 6s
masterplan-lock / check (pull_request) Successful in 3s
security / scan (pull_request) Failing after 46s
CI (SIAX Cloud) / quality (pull_request) Successful in 1m7s
CI (SIAX Cloud) / integration (pull_request) Successful in 2m10s
CI (SIAX Cloud) / security (pull_request) Successful in 1m15s
CI (SIAX Cloud) / sonar (pull_request) Skipped
CI (SIAX Cloud) / Component conformance (blocking) (pull_request) Successful in 6s
masterplan-lock / check (pull_request) Successful in 3s
security / scan (pull_request) Failing after 46s
# Conflicts: # next.config.mjs
This commit is contained in:
+7
-7
@@ -1,11 +1,11 @@
|
|||||||
# CI-14 — CODEOWNERS bor i .gitea/, aldrig i .github/ (SEC-25).
|
# CI-14 — CODEOWNERS bor i .gitea/, aldrig i .github/ (SEC-25).
|
||||||
# Granskning krävs särskilt för kontrakt, deploy och migrationer.
|
# Granskning krävs särskilt för kontrakt, deploy och migrationer.
|
||||||
|
|
||||||
* @sax3l
|
* @admin
|
||||||
/contracts/ @sax3l
|
/contracts/ @admin
|
||||||
/deploy/ @sax3l
|
/deploy/ @admin
|
||||||
/.gitea/ @sax3l
|
/.gitea/ @admin
|
||||||
/siax.repo.json @sax3l
|
/siax.repo.json @admin
|
||||||
/siax.config.json @sax3l
|
/siax.config.json @admin
|
||||||
# TODO: lägg till migrationskatalogen när den finns, t.ex.
|
# TODO: lägg till migrationskatalogen när den finns, t.ex.
|
||||||
# /packages/db/migrations/ @sax3l
|
# /packages/db/migrations/ @admin
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ on:
|
|||||||
# in-flight deploy (it may already be restarting the container); the newest
|
# in-flight deploy (it may already be restarting the container); the newest
|
||||||
# commit still wins because Coolify builds from the branch head.
|
# commit still wins because Coolify builds from the branch head.
|
||||||
# N6 (server-config ci/jobbstorm-2026-11-10 §4): deploy/release köas i en fast grupp och avbryts aldrig.
|
# N6 (server-config ci/jobbstorm-2026-11-10 §4): deploy/release köas i en fast grupp och avbryts aldrig.
|
||||||
|
# ci-concurrency-exempt: deploy till Coolify på push till main; avbrott mitt i lämnar appen halvt utrullad (N6 §4).
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ gitea.workflow }}
|
group: ${{ gitea.workflow }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
@@ -94,7 +95,7 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|||||||
+19
-11
@@ -33,8 +33,8 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||||
with:
|
with:
|
||||||
node-version: "22"
|
node-version: "22"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
@@ -134,8 +134,8 @@ jobs:
|
|||||||
--health-timeout 5s
|
--health-timeout 5s
|
||||||
--health-retries 60
|
--health-retries 60
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||||
with:
|
with:
|
||||||
node-version: "22"
|
node-version: "22"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
@@ -271,10 +271,18 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
- name: Install Trivy
|
- name: Install Trivy (pinned + checksum verified)
|
||||||
run: |
|
run: |
|
||||||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
|
set -euo pipefail
|
||||||
|
TRIVY_VERSION=0.76.2
|
||||||
|
BASE="https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}"
|
||||||
|
curl -fsSLO "${BASE}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz"
|
||||||
|
curl -fsSLO "${BASE}/trivy_${TRIVY_VERSION}_checksums.txt"
|
||||||
|
grep " trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz$" "trivy_${TRIVY_VERSION}_checksums.txt" | sha256sum -c -
|
||||||
|
tar -xzf "trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" -C /usr/local/bin trivy
|
||||||
|
rm -f "trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" "trivy_${TRIVY_VERSION}_checksums.txt"
|
||||||
|
trivy --version
|
||||||
# `siax/sbom/` är CycloneDX-evidenens för REDAN BYGGDA images (release-kedjan),
|
# `siax/sbom/` är CycloneDX-evidenens för REDAN BYGGDA images (release-kedjan),
|
||||||
# inte källberoenden. Att scanna dem här återrapporterar gamla image-versioner
|
# inte källberoenden. Att scanna dem här återrapporterar gamla image-versioner
|
||||||
# (next 16.3.x, sharp 0.35.4) och blockerar källfixar som redan är patchade.
|
# (next 16.3.x, sharp 0.35.4) och blockerar källfixar som redan är patchade.
|
||||||
@@ -292,7 +300,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: SonarQube analysis (self-hosted sonar.siax.dev)
|
- name: SonarQube analysis (self-hosted sonar.siax.dev)
|
||||||
@@ -316,12 +324,12 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||||
with:
|
with:
|
||||||
node-version: '22'
|
node-version: '22'
|
||||||
- name: Checkout canonical siax-standard (SSOT)
|
- name: Checkout canonical siax-standard (SSOT)
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
with:
|
with:
|
||||||
repository: admin/siax-standard
|
repository: admin/siax-standard
|
||||||
token: ${{ secrets.SIAX_CI_TOKEN }}
|
token: ${{ secrets.SIAX_CI_TOKEN }}
|
||||||
|
|||||||
@@ -7,18 +7,26 @@ on:
|
|||||||
# N6 (server-config ci/jobbstorm-2026-11-10 §4): schemalagd/manuell körning köas i en fast grupp, avbryts inte.
|
# N6 (server-config ci/jobbstorm-2026-11-10 §4): schemalagd/manuell körning köas i en fast grupp, avbryts inte.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ gitea.workflow }}
|
group: ${{ gitea.workflow }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
health:
|
health:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
- name: Required files
|
- name: Required files
|
||||||
run: |
|
run: |
|
||||||
for f in README.md LICENSE .gitignore; do [ -f "$f" ] || echo "::warning file=$f,title=Missing::$f is missing"; done
|
for f in README.md LICENSE .gitignore; do [ -f "$f" ] || echo "::warning file=$f,title=Missing::$f is missing"; done
|
||||||
[ -f .gitea/workflows/ci.yml ] || echo "::warning title=No CI::No CI workflow found"
|
[ -f .gitea/workflows/ci.yml ] || echo "::warning title=No CI::No CI workflow found"
|
||||||
- name: Install Trivy
|
- name: Install Trivy (pinned + checksum verified)
|
||||||
run: curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
TRIVY_VERSION=0.76.2
|
||||||
|
BASE="https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}"
|
||||||
|
curl -fsSLO "${BASE}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz"
|
||||||
|
curl -fsSLO "${BASE}/trivy_${TRIVY_VERSION}_checksums.txt"
|
||||||
|
grep " trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz$" "trivy_${TRIVY_VERSION}_checksums.txt" | sha256sum -c -
|
||||||
|
tar -xzf "trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" -C /usr/local/bin trivy
|
||||||
|
rm -f "trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" "trivy_${TRIVY_VERSION}_checksums.txt"
|
||||||
|
trivy --version
|
||||||
- name: Secret scan
|
- name: Secret scan
|
||||||
run: trivy fs --scanners secret --exit-code 0 .
|
run: trivy fs --scanners secret --exit-code 0 .
|
||||||
@@ -21,6 +21,6 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
- name: Masterplan lock check
|
- name: Masterplan lock check
|
||||||
run: sh scripts/check-masterplan-lock.sh
|
run: sh scripts/check-masterplan-lock.sh
|
||||||
@@ -11,15 +11,14 @@ on:
|
|||||||
# N6 (server-config ci/jobbstorm-2026-11-10 §4): schemalagd/manuell körning köas i en fast grupp, avbryts inte.
|
# N6 (server-config ci/jobbstorm-2026-11-10 §4): schemalagd/manuell körning köas i en fast grupp, avbryts inte.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ gitea.workflow }}
|
group: ${{ gitea.workflow }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
quality:
|
quality:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 45
|
timeout-minutes: 45
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||||
with:
|
with:
|
||||||
node-version: "22"
|
node-version: "22"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
@@ -44,10 +43,18 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
- name: Install Trivy
|
- name: Install Trivy (pinned + checksum verified)
|
||||||
run: |
|
run: |
|
||||||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
|
set -euo pipefail
|
||||||
|
TRIVY_VERSION=0.76.2
|
||||||
|
BASE="https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}"
|
||||||
|
curl -fsSLO "${BASE}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz"
|
||||||
|
curl -fsSLO "${BASE}/trivy_${TRIVY_VERSION}_checksums.txt"
|
||||||
|
grep " trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz$" "trivy_${TRIVY_VERSION}_checksums.txt" | sha256sum -c -
|
||||||
|
tar -xzf "trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" -C /usr/local/bin trivy
|
||||||
|
rm -f "trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz" "trivy_${TRIVY_VERSION}_checksums.txt"
|
||||||
|
trivy --version
|
||||||
# A nightly scan exists to catch CVEs published against code that did
|
# A nightly scan exists to catch CVEs published against code that did
|
||||||
# not change. With `--exit-code 0` it could never report failure, so it
|
# not change. With `--exit-code 0` it could never report failure, so it
|
||||||
# could never raise that alarm -- the one job whose entire purpose is
|
# could never raise that alarm -- the one job whose entire purpose is
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ on:
|
|||||||
# N6 (server-config ci/jobbstorm-2026-11-10 §4): schemalagd/manuell körning köas i en fast grupp, avbryts inte.
|
# N6 (server-config ci/jobbstorm-2026-11-10 §4): schemalagd/manuell körning köas i en fast grupp, avbryts inte.
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ gitea.workflow }}
|
group: ${{ gitea.workflow }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
smoke:
|
smoke:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -54,10 +53,13 @@ jobs:
|
|||||||
echo "::warning::SIAX_CI_TOKEN is not set — cannot compare with main; commit $running is live"
|
echo "::warning::SIAX_CI_TOKEN is not set — cannot compare with main; commit $running is live"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
expected="$(curl -fsS --max-time 15 \
|
# Ladda ner först och parsea sedan: curl | tolk leder till Semgrep
|
||||||
|
# gha-curl-pipe-shell och gör det omöjligt att verifiera svaret.
|
||||||
|
curl -fsS --max-time 15 \
|
||||||
-H "Authorization: token ${SIAX_CI_TOKEN}" \
|
-H "Authorization: token ${SIAX_CI_TOKEN}" \
|
||||||
"https://git.siax.io/api/v1/repos/admin/0pt/commits?limit=1" \
|
-o "${RUNNER_TEMP}/0pt-main.json" \
|
||||||
| python3 -c 'import sys,json; print(json.load(sys.stdin)[0]["sha"])')"
|
"https://git.siax.io/api/v1/repos/admin/0pt/commits?limit=1"
|
||||||
|
expected="$(python3 -c 'import json,sys; print(json.load(open(sys.argv[1]))[0]["sha"])' "${RUNNER_TEMP}/0pt-main.json")"
|
||||||
echo "running=$running expected(main)=$expected"
|
echo "running=$running expected(main)=$expected"
|
||||||
[ -n "$expected" ] || { echo "::error::could not read main SHA from Gitea"; exit 1; }
|
[ -n "$expected" ] || { echo "::error::could not read main SHA from Gitea"; exit 1; }
|
||||||
[ "$running" = "$expected" ] || {
|
[ "$running" = "$expected" ] || {
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ on:
|
|||||||
|
|
||||||
|
|
||||||
# N6 (server-config ci/jobbstorm-2026-11-10 §4): deploy/release köas i en fast grupp och avbryts aldrig.
|
# N6 (server-config ci/jobbstorm-2026-11-10 §4): deploy/release köas i en fast grupp och avbryts aldrig.
|
||||||
|
# ci-concurrency-exempt: releasekedja build→push→SBOM→attestation→signering→evidens; avbrott mellan push och evidens lämnar registry och AUD0 i halvt läge (N6 §4).
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ gitea.workflow }}
|
group: ${{ gitea.workflow }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|||||||
@@ -26,15 +26,17 @@ on:
|
|||||||
pull_request: {}
|
pull_request: {}
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "17 2 * * *"
|
- cron: "17 2 * * *"
|
||||||
|
workflow_dispatch: {}
|
||||||
permissions: { contents: read }
|
permissions: { contents: read }
|
||||||
# N6 (server-config ci/jobbstorm-2026-11-10 §4): en ny commit på samma PR/gren avbryter den inaktuella körningen.
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ gitea.workflow }}-${{ gitea.ref }}
|
group: security-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
scan:
|
scan:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Övre gräns: ett scannerjobb får aldrig äta en delad runner-värd.
|
||||||
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
with: { fetch-depth: 0 }
|
with: { fetch-depth: 0 }
|
||||||
@@ -62,41 +64,108 @@ jobs:
|
|||||||
- name: gitleaks secret scan
|
- name: gitleaks secret scan
|
||||||
run: |
|
run: |
|
||||||
set +e
|
set +e
|
||||||
docker run --rm -v "$SCAN_VOLUME:/repo" -w /repo \
|
docker run --rm --cpus 2 --memory 4g -v "$SCAN_VOLUME:/repo" -w /repo \
|
||||||
zricethezav/gitleaks:v8.30.1 detect --no-git --source /repo --no-banner --exit-code 1 > /tmp/scan.log 2>&1
|
zricethezav/gitleaks:v8.30.1 detect --no-git --source /repo --no-banner --redact --exit-code 1 > /tmp/scan.log 2>&1
|
||||||
rc=$?
|
rc=$?
|
||||||
set -e
|
set -e
|
||||||
tail -n 120 /tmp/scan.log
|
tail -n 120 /tmp/scan.log
|
||||||
if [ $rc -eq 0 ]; then echo "gitleaks secret scan ren"; exit 0; fi
|
if [ $rc -eq 0 ]; then echo "gitleaks secret scan ren"; exit 0; fi
|
||||||
if [ $rc -eq 1 ]; then echo "::error::gitleaks secret scan hittade fynd"; exit 1; fi
|
if [ $rc -eq 1 ]; then echo "::error::gitleaks secret scan hittade fynd"; exit 1; fi
|
||||||
echo "::warning::gitleaks secret scan kunde inte köras (rc=$rc) - verktygsfel, inte fynd"; exit 0
|
echo "::error::gitleaks secret scan kunde inte koras (rc=$rc) - scannerfel, inte fynd; grinden far inte bli tyst gron"; exit 1
|
||||||
|
|
||||||
# Historiken scannas informativt. Gamla hemligheter i tidigare commits
|
# gitleaks over just de commits som PR:en eller pushen inför. Blockerar på
|
||||||
# kraver historikomskrivning och blockerar darfor inte bygget.
|
# hemligheter som introduceras i intervallet, även om de raderas senare i
|
||||||
- name: gitleaks history informational
|
# samma PR (de finns kvar i historiken efter merge). Git-läget med
|
||||||
continue-on-error: true
|
# --log-opts skannar bara tillagda rader, så en PR som RADERAR en gammal
|
||||||
|
# hemlighet fälls inte, och .gitleaks.toml/.gitleaksignore i repot gäller.
|
||||||
|
# Fullhistoriken körs bara nattligt/manuellt (nästa steg): en full
|
||||||
|
# `git log -p --all` per PR tog timmar och sänkte runner-värden
|
||||||
|
# (server10, 2026-11-11).
|
||||||
|
- name: gitleaks commit range
|
||||||
|
if: github.event_name == 'pull_request' || github.event_name == 'push'
|
||||||
|
timeout-minutes: 15
|
||||||
|
env:
|
||||||
|
EVENT_NAME: ${{ github.event_name }}
|
||||||
|
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||||
|
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
|
BEFORE_SHA: ${{ github.event.before }}
|
||||||
run: |
|
run: |
|
||||||
docker run --rm -v "$SCAN_VOLUME:/repo" -w /repo \
|
set -eu
|
||||||
|
test -d .git || { echo "::error::ingen .git i $PWD"; exit 1; }
|
||||||
|
head="${PR_HEAD_SHA:-$GITHUB_SHA}"
|
||||||
|
base=""
|
||||||
|
if [ "$EVENT_NAME" = "pull_request" ] && [ -n "${BASE_SHA:-}" ]; then
|
||||||
|
base=$(git merge-base "$BASE_SHA" "$head" 2>/dev/null || echo "$BASE_SHA")
|
||||||
|
elif [ -n "${BEFORE_SHA:-}" ] && [ "$BEFORE_SHA" != "0000000000000000000000000000000000000000" ] \
|
||||||
|
&& git cat-file -e "${BEFORE_SHA}^{commit}" 2>/dev/null; then
|
||||||
|
base="$BEFORE_SHA"
|
||||||
|
fi
|
||||||
|
MAX=500
|
||||||
|
if [ -n "$base" ]; then
|
||||||
|
count=$(git rev-list --count "$base..$head")
|
||||||
|
echo "intervall $base..$head: $count commits"
|
||||||
|
if [ "$count" -eq 0 ]; then echo "inga nya commits i intervallet"; exit 0; fi
|
||||||
|
if [ "$count" -gt "$MAX" ]; then
|
||||||
|
echo "::warning::intervallet har $count commits; skannar de $MAX senaste. Resten täcks av den nattliga fullhistorikskanningen."
|
||||||
|
fi
|
||||||
|
logopts="-n $MAX $base..$head"
|
||||||
|
else
|
||||||
|
echo "::notice::inget jämförbart föregående läge (ny gren eller omskriven historik); skannar head-commiten. Fullhistoriken täcks nattligt."
|
||||||
|
logopts="-n 1 $head"
|
||||||
|
fi
|
||||||
|
name="siax-gitleaks-range-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||||
|
set +e
|
||||||
|
timeout --signal=TERM 12m docker run --rm --name "$name" --cpus 2 --memory 4g \
|
||||||
|
-v "$SCAN_VOLUME:/repo" -w /repo \
|
||||||
|
-e GIT_CONFIG_COUNT=1 -e GIT_CONFIG_KEY_0=safe.directory -e GIT_CONFIG_VALUE_0='*' \
|
||||||
|
zricethezav/gitleaks:v8.30.1 detect --source /repo --log-opts="$logopts" \
|
||||||
|
--no-banner --redact --exit-code 1 > /tmp/scan.log 2>&1
|
||||||
|
rc=$?
|
||||||
|
set -e
|
||||||
|
docker kill "$name" >/dev/null 2>&1 || true
|
||||||
|
tail -n 120 /tmp/scan.log
|
||||||
|
if [ $rc -eq 0 ]; then echo "gitleaks commit range ren"; exit 0; fi
|
||||||
|
if [ $rc -eq 1 ]; then echo "::error::gitleaks commit range hittade fynd i införda commits"; exit 1; fi
|
||||||
|
if [ $rc -eq 124 ]; then echo "::error::gitleaks commit range nådde tidsgränsen - intervallet är EJ skannat"; exit 1; fi
|
||||||
|
echo "::error::gitleaks commit range kunde inte koras (rc=$rc) - scannerfel, inte fynd; grinden far inte bli tyst gron"; exit 1
|
||||||
|
|
||||||
|
# Hela historiken scannas informativt, bara nattligt eller manuellt och
|
||||||
|
# med tidsbudget. Gamla hemligheter i tidigare commits kräver
|
||||||
|
# historikomskrivning och blockerar därför inte bygget.
|
||||||
|
- name: gitleaks history informational
|
||||||
|
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
|
||||||
|
timeout-minutes: 45
|
||||||
|
continue-on-error: true # ci2-allow-swallowed-failure: historik-gitleaks informativt per kanonisk security.yml
|
||||||
|
run: |
|
||||||
|
name="siax-gitleaks-history-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"
|
||||||
|
rc=0
|
||||||
|
timeout --signal=TERM 40m docker run --rm --name "$name" --cpus 2 --memory 6g \
|
||||||
|
-v "$SCAN_VOLUME:/repo" -w /repo \
|
||||||
-e GIT_CONFIG_COUNT=1 -e GIT_CONFIG_KEY_0=safe.directory \
|
-e GIT_CONFIG_COUNT=1 -e GIT_CONFIG_KEY_0=safe.directory \
|
||||||
-e GIT_CONFIG_VALUE_0='*' \
|
-e GIT_CONFIG_VALUE_0='*' \
|
||||||
zricethezav/gitleaks:v8.30.1 detect --source /repo --no-banner --exit-code 1 \
|
zricethezav/gitleaks:v8.30.1 detect --source /repo --no-banner --redact --exit-code 1 || rc=$?
|
||||||
|| echo "::notice::historiska traffar loggas informativt"
|
docker kill "$name" >/dev/null 2>&1 || true
|
||||||
|
if [ "$rc" -eq 124 ]; then echo "::warning::fullhistorikskanningen nådde tidsbudgeten (40 min) - historiken är EJ fullständigt skannad"; fi
|
||||||
|
if [ "$rc" -ne 0 ]; then echo "::notice::historiska träffar eller avbrott loggas informativt (rc=$rc)"; fi
|
||||||
|
|
||||||
|
|
||||||
# Trivy filsystem, blockerar pa HIGH och CRITICAL sarbarheter och hemligheter (SUP-*)
|
# Trivy filsystem, blockerar pa HIGH och CRITICAL sarbarheter och hemligheter (SUP-*)
|
||||||
- name: Trivy filesystem scan
|
- name: Trivy filesystem scan
|
||||||
run: |
|
run: |
|
||||||
set +e
|
set +e
|
||||||
docker run --rm -v "$SCAN_VOLUME:/repo" -w /repo \
|
docker run --rm --cpus 2 --memory 4g -v "$SCAN_VOLUME:/repo" -w /repo \
|
||||||
aquasec/trivy:0.76.2 fs --scanners vuln,secret --severity HIGH,CRITICAL --exit-code 1 --no-progress /repo > /tmp/scan.log 2>&1
|
aquasec/trivy:0.76.2 fs --scanners vuln,secret --severity HIGH,CRITICAL --exit-code 1 --no-progress /repo > /tmp/scan.log 2>&1
|
||||||
rc=$?
|
rc=$?
|
||||||
set -e
|
set -e
|
||||||
tail -n 120 /tmp/scan.log
|
tail -n 120 /tmp/scan.log
|
||||||
if [ $rc -eq 0 ]; then echo "Trivy filesystem scan ren"; exit 0; fi
|
if [ $rc -eq 0 ]; then echo "Trivy filesystem scan ren"; exit 0; fi
|
||||||
if [ $rc -eq 1 ]; then echo "::error::Trivy filesystem scan hittade fynd"; exit 1; fi
|
if [ $rc -eq 1 ]; then echo "::error::Trivy filesystem scan hittade fynd"; exit 1; fi
|
||||||
echo "::warning::Trivy filesystem scan kunde inte köras (rc=$rc) - verktygsfel, inte fynd"; exit 0
|
echo "::error::Trivy filesystem scan kunde inte koras (rc=$rc) - scannerfel, inte fynd; grinden far inte bli tyst gron"; exit 1
|
||||||
|
|
||||||
# Dockerfile- och IaC-misconfig är informativt: DS-0002 (root-USER)
|
# Dockerfile- och IaC-misconfig är informativt. DS-0002 (root-USER),
|
||||||
# kräver ändrade runtime-användare och hanteras per repo, inte i grinden.
|
# KSV-0014/KSV-0118 (readOnlyRootFilesystem + icke-root) är åtgärdade i
|
||||||
|
# services/*/Dockerfile och deploy/k8s/deployment.yaml; steget finns kvar
|
||||||
|
# som tidig varning för nya misconfigs, inte som en tyst grön grind.
|
||||||
- name: Trivy config informational
|
- name: Trivy config informational
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
@@ -106,11 +175,9 @@ jobs:
|
|||||||
|
|
||||||
# Kanda sarbarheter i lasfilen. osv-scanner 2.x hittar inte alltid
|
# Kanda sarbarheter i lasfilen. osv-scanner 2.x hittar inte alltid
|
||||||
# osv-scanner.toml sjalv, sa den skickas explicit nar den finns.
|
# osv-scanner.toml sjalv, sa den skickas explicit nar den finns.
|
||||||
# Lasfilsvakten och config-kollen kors i en container som monterar
|
|
||||||
# volymen (FALLA 3 ovan). Kan sjalva sokningen inte koras hoppas OSV
|
|
||||||
# INTE over - da avgor OSV:s egen exitkod, enligt samma policy som ovan.
|
|
||||||
- name: OSV Scanner
|
- name: OSV Scanner
|
||||||
run: |
|
run: |
|
||||||
|
# Lasfilsvakten MASTE koras i scanvolymen: /repo finns inte i jobbcontainern.
|
||||||
set +e
|
set +e
|
||||||
lock=$(docker run --rm -v "$SCAN_VOLUME:/repo:ro" alpine:3.20 \
|
lock=$(docker run --rm -v "$SCAN_VOLUME:/repo:ro" alpine:3.20 \
|
||||||
find /repo -path /repo/.git -prune -o -type f \( \
|
find /repo -path /repo/.git -prune -o -type f \( \
|
||||||
@@ -122,41 +189,40 @@ jobs:
|
|||||||
frc=$?
|
frc=$?
|
||||||
set -e
|
set -e
|
||||||
if [ $frc -ne 0 ]; then
|
if [ $frc -ne 0 ]; then
|
||||||
echo "::warning::lasfilsvakten kunde inte koras i scanvolymen (rc=$frc) - OSV kors anda"
|
echo "::error::lasfilsvakten kunde inte koras i scanvolymen (rc=$frc) - scannerfel, grinden far inte bli tyst gron"; exit 1
|
||||||
elif [ -z "$lock" ]; then
|
elif [ -z "$lock" ]; then
|
||||||
echo "Inga lasfiler i repot - OSV-Scanner har inget att scanna."
|
echo "Inga lasfiler i repot - OSV-Scanner har inget att scanna."; exit 0
|
||||||
exit 0
|
|
||||||
else
|
else
|
||||||
echo "Lasfil i scanvolymen ${lock#/repo/} - OSV-Scanner kors"
|
echo "Lasfil i scanvolymen ${lock#/repo/} - OSV-Scanner kors"
|
||||||
fi
|
fi
|
||||||
cfg=""
|
cfg=""
|
||||||
if docker run --rm -v "$SCAN_VOLUME:/repo:ro" alpine:3.20 test -f /repo/osv-scanner.toml; then
|
if docker run --rm -v "$SCAN_VOLUME:/repo:ro" alpine:3.20 test -f /repo/osv-scanner.toml; then
|
||||||
cfg="--config=/repo/osv-scanner.toml"
|
cfg="--config=/repo/osv-scanner.toml"; echo "Anvander /repo/osv-scanner.toml for hela repot"
|
||||||
echo "Anvander /repo/osv-scanner.toml for hela repot"
|
|
||||||
fi
|
fi
|
||||||
set +e
|
set +e
|
||||||
docker run --rm -v "$SCAN_VOLUME:/repo" -w /repo \
|
docker run --rm --cpus 2 --memory 4g -v "$SCAN_VOLUME:/repo" -w /repo \
|
||||||
ghcr.io/google/osv-scanner:v2.7.1 scan source --recursive $cfg /repo > /tmp/scan.log 2>&1
|
ghcr.io/google/osv-scanner:v2.7.1 scan source --recursive $cfg /repo > /tmp/scan.log 2>&1
|
||||||
rc=$?
|
rc=$?
|
||||||
set -e
|
set -e
|
||||||
tail -n 120 /tmp/scan.log
|
tail -n 120 /tmp/scan.log
|
||||||
if [ $rc -eq 0 ]; then echo "OSV ren"; exit 0; fi
|
if [ $rc -eq 0 ]; then echo "OSV ren"; exit 0; fi
|
||||||
if [ $rc -eq 1 ]; then echo "::error::OSV Scanner hittade fynd"; exit 1; fi
|
if [ $rc -eq 1 ]; then echo "::error::OSV Scanner hittade fynd"; exit 1; fi
|
||||||
echo "::warning::OSV Scanner kunde inte koras (rc=$rc) - verktygsfel, inte fynd"; exit 0
|
echo "::error::OSV Scanner kunde inte koras (rc=$rc) - scannerfel, inte fynd; grinden far inte bli tyst gron"; exit 1
|
||||||
|
|
||||||
# Statisk kodanalys, felallvarlighet bryter bygget. Semgrep kraver koden pa /src
|
# Statisk kodanalys, felallvarlighet bryter bygget. Semgrep kraver koden pa /src
|
||||||
- name: Semgrep code scan
|
- name: Semgrep code scan
|
||||||
run: |
|
run: |
|
||||||
set +e
|
set +e
|
||||||
docker run --rm -v "$SCAN_VOLUME:/src" -w /src \
|
docker run --rm --cpus 2 --memory 4g -v "$SCAN_VOLUME:/src" -w /src \
|
||||||
semgrep/semgrep:1.183.0 semgrep scan --config=p/ci --error --quiet > /tmp/scan.log 2>&1
|
semgrep/semgrep:1.183.0 semgrep scan --config=p/ci --error --quiet > /tmp/scan.log 2>&1
|
||||||
rc=$?
|
rc=$?
|
||||||
set -e
|
set -e
|
||||||
tail -n 120 /tmp/scan.log
|
tail -n 120 /tmp/scan.log
|
||||||
if [ $rc -eq 0 ]; then echo "Semgrep code scan ren"; exit 0; fi
|
if [ $rc -eq 0 ]; then echo "Semgrep code scan ren"; exit 0; fi
|
||||||
if [ $rc -eq 1 ]; then echo "::error::Semgrep code scan hittade fynd"; exit 1; fi
|
if [ $rc -eq 1 ]; then echo "::error::Semgrep code scan hittade fynd"; exit 1; fi
|
||||||
echo "::warning::Semgrep code scan kunde inte köras (rc=$rc) - verktygsfel, inte fynd"; exit 0
|
echo "::error::Semgrep code scan kunde inte koras (rc=$rc) - scannerfel, inte fynd; grinden far inte bli tyst gron"; exit 1
|
||||||
- name: Remove scan volume
|
- name: Remove scan volume
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
|
for c in $(docker ps -q --filter "name=siax-gitleaks-.*-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}"); do docker kill "$c" >/dev/null 2>&1 || true; done
|
||||||
docker volume rm -f "${SCAN_VOLUME:-none}" >/dev/null 2>&1 || true
|
docker volume rm -f "${SCAN_VOLUME:-none}" >/dev/null 2>&1 || true
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ on:
|
|||||||
- cron: "*/15 * * * *"
|
- cron: "*/15 * * * *"
|
||||||
|
|
||||||
# N6 (server-config ci/jobbstorm-2026-11-10 §4): schemalagd/manuell körning köas i en fast grupp, avbryts inte.
|
# N6 (server-config ci/jobbstorm-2026-11-10 §4): schemalagd/manuell körning köas i en fast grupp, avbryts inte.
|
||||||
|
# ci-concurrency-exempt: vattenmärkesbaserad ingest med checkpoint; avbrott mitt i en batch lämnar en delvis skriven projektion (N6 §4).
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ gitea.workflow }}
|
group: ${{ gitea.workflow }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
@@ -35,8 +36,8 @@ jobs:
|
|||||||
# requires" section are actually done.
|
# requires" section are actually done.
|
||||||
VEHIQ_INGEST_MODE: preview
|
VEHIQ_INGEST_MODE: preview
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||||
with:
|
with:
|
||||||
node-version: "22"
|
node-version: "22"
|
||||||
- name: Enable corepack + pin pnpm@9
|
- name: Enable corepack + pin pnpm@9
|
||||||
|
|||||||
@@ -16,3 +16,19 @@ d9c8f7190b312b03acb331522f4d55c0a2fe0e4a:tests/integration/analyst-sql-clickhous
|
|||||||
# kanariefågel som testet använder för att bevisa att hemligheter inte läcker i
|
# kanariefågel som testet använder för att bevisa att hemligheter inte läcker i
|
||||||
# analyst-SQL-svaret. Falsk positiv.
|
# analyst-SQL-svaret. Falsk positiv.
|
||||||
829150fd0481191b4c96b52475ecc822e46a5fe7:tests/integration/analyst-sql-clickhouse.integration.test.ts:generic-api-key:71
|
829150fd0481191b4c96b52475ecc822e46a5fe7:tests/integration/analyst-sql-clickhouse.integration.test.ts:generic-api-key:71
|
||||||
|
|
||||||
|
# .gitleaksignore — exakta fingeravtryck för granskade falska positiva.
|
||||||
|
#
|
||||||
|
# Genererad 2026-11-11 från gitleaks v8.30.1 (samma version som security-grinden
|
||||||
|
# pinnar) körd som directory-scan mot repots arbetsträd. Varje rad nedan är
|
||||||
|
# granskad: träffen är en testfixtur, ett exempelvärde i dokumentation, en
|
||||||
|
# hash/UUID eller ett miljövariabelnamn — inte en hemlighet. Ingen bred ignore:
|
||||||
|
# endast dessa exakta fil:regel:rad-fingeravtryck undertrycks; nya fynd fäller
|
||||||
|
# fortfarande grinden. Fingeravtrycken förutsätter att katalogen monteras på
|
||||||
|
# /repo (så gör den kanoniska security-workflowen).
|
||||||
|
|
||||||
|
# Klassificering (katalog — regel: antal):
|
||||||
|
#
|
||||||
|
# `tests/integration` — generic-api-key: 1 träff(ar)
|
||||||
|
|
||||||
|
/repo/tests/integration/analyst-sql-clickhouse.integration.test.ts:generic-api-key:71
|
||||||
|
|||||||
@@ -5,4 +5,8 @@ confirmModulesPurge=false
|
|||||||
# SIAX Cloud publishes @siax/* packages from Gitea's own npm registry.
|
# SIAX Cloud publishes @siax/* packages from Gitea's own npm registry.
|
||||||
# Only scoped @siax/* names resolve here; everything else stays on the
|
# Only scoped @siax/* names resolve here; everything else stays on the
|
||||||
# public npm registry.
|
# public npm registry.
|
||||||
@siax:registry=https://git.siax.io/api/packages/sax3l/npm/
|
@siax:registry=https://git.siax.io/api/packages/admin/npm/
|
||||||
|
|
||||||
|
# Supply-chain: wait 7 days before resolving newly published versions
|
||||||
|
# (Semgrep npm-missing-minimum-release-age; same setting as aud0/cl0ud).
|
||||||
|
min-release-age=7
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import type { Metadata } from "next";
|
||||||
|
|
||||||
|
// The order flow (/bestall, /bestall/beskriv, /bestall/forskott) is a transactional
|
||||||
|
// step, not a public landing page: keep it out of the index but let crawlers follow
|
||||||
|
// through to the public service/catalog pages. Applies to all nested order steps.
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: "Beställ data — 0pt",
|
||||||
|
description:
|
||||||
|
"Configure a data job, describe your need and pay 50% to start. Provenance per field and live production tracking.",
|
||||||
|
alternates: { canonical: "https://0pt.app/bestall" },
|
||||||
|
robots: { index: false, follow: true },
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function BestallLayout({ children }: { children: React.ReactNode }) {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import type { Metadata } from "next";
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: "Källor & ursprung — 0pt",
|
||||||
|
description:
|
||||||
|
"Every dataset's source, licence, cadence and confidence. Legal sourcing and provenance per field — the transparency behind 0pt.",
|
||||||
|
alternates: { canonical: "https://0pt.app/kallor" },
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function KallorLayout({ children }: { children: React.ReactNode }) {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
import type { Metadata } from "next";
|
||||||
|
import { findDataset } from "@/app/katalog/datasets";
|
||||||
|
|
||||||
|
const BASE = "https://0pt.app";
|
||||||
|
|
||||||
|
// A dataset detail is a real, indexable search target: it has its own title,
|
||||||
|
// description and content, and is linked from /katalog. Without its own
|
||||||
|
// metadata it inherits the parent /katalog canonical and search engines fold
|
||||||
|
// every dataset into the catalog page. Route-level generateMetadata is the
|
||||||
|
// existing Next mechanism for per-dataset metadata; the detail page itself
|
||||||
|
// stays a client component.
|
||||||
|
export async function generateMetadata({
|
||||||
|
params,
|
||||||
|
}: {
|
||||||
|
params: Promise<{ id: string }>;
|
||||||
|
}): Promise<Metadata> {
|
||||||
|
const { id } = await params;
|
||||||
|
const dataset = findDataset(id);
|
||||||
|
|
||||||
|
if (!dataset) {
|
||||||
|
// An unknown id renders the client-side "dataset does not exist" state.
|
||||||
|
// Make the policy explicit: not indexable, canonical back to the catalog.
|
||||||
|
return {
|
||||||
|
title: "Dataset not found — 0pt",
|
||||||
|
alternates: { canonical: `${BASE}/katalog` },
|
||||||
|
robots: { index: false, follow: true },
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const canonical = `${BASE}/katalog/${dataset.id}`;
|
||||||
|
const description = `${dataset.blurb.sv} Dataset: ${dataset.count.sv} inom ${dataset.markets}. Provenans per fält och transparent prissättning.`;
|
||||||
|
|
||||||
|
return {
|
||||||
|
title: `${dataset.title.sv} — 0pt`,
|
||||||
|
description,
|
||||||
|
alternates: { canonical },
|
||||||
|
openGraph: {
|
||||||
|
title: `${dataset.title.sv} — 0pt`,
|
||||||
|
description,
|
||||||
|
url: canonical,
|
||||||
|
locale: "sv_SE",
|
||||||
|
type: "website",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
export default async function DatasetDetailLayout({
|
||||||
|
children,
|
||||||
|
params,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
params: Promise<{ id: string }>;
|
||||||
|
}) {
|
||||||
|
const { id } = await params;
|
||||||
|
const dataset = findDataset(id);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{dataset ? (
|
||||||
|
<div
|
||||||
|
aria-hidden="true"
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
width: 1,
|
||||||
|
height: 1,
|
||||||
|
overflow: "hidden",
|
||||||
|
clip: "rect(0 0 0 0)",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<h1>{dataset.title.sv}</h1>
|
||||||
|
<p>
|
||||||
|
{dataset.blurb.sv} Dataset: {dataset.count.sv} inom {dataset.markets}. Provenans per
|
||||||
|
fält och transparent prissättning.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
|
{children}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
+1
-119
@@ -11,119 +11,7 @@ import { LoadingSkeleton, EmptyState, ErrorState } from "@/components/states";
|
|||||||
import { useReveal } from "@/hooks/use-reveal";
|
import { useReveal } from "@/hooks/use-reveal";
|
||||||
import { FIELDS, SAMPLE_ROWS, MARKETS, formatSEK, type ProvLevel } from "@/lib/data";
|
import { FIELDS, SAMPLE_ROWS, MARKETS, formatSEK, type ProvLevel } from "@/lib/data";
|
||||||
import type { Loc } from "@/lib/data";
|
import type { Loc } from "@/lib/data";
|
||||||
|
import { findDataset, type Dataset } from "@/app/katalog/datasets";
|
||||||
// ─────────────────────────────────────────────────────────────────────────────
|
|
||||||
// Inline catalog. No detail API yet — keyed by slugified id with a safe fallback.
|
|
||||||
// ─────────────────────────────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
interface Dataset {
|
|
||||||
id: string;
|
|
||||||
markets: string;
|
|
||||||
marketCodes: string[];
|
|
||||||
title: Loc;
|
|
||||||
blurb: Loc;
|
|
||||||
count: Loc;
|
|
||||||
rows: number;
|
|
||||||
freshness: Loc;
|
|
||||||
level: ProvLevel;
|
|
||||||
source: string;
|
|
||||||
cat: Loc;
|
|
||||||
price: number;
|
|
||||||
artifact: "table" | "map" | "schema" | "chart";
|
|
||||||
}
|
|
||||||
|
|
||||||
const CATALOG: Dataset[] = [
|
|
||||||
{
|
|
||||||
id: "nordic-companies",
|
|
||||||
markets: "SE · NO · DK · FI",
|
|
||||||
marketCodes: ["SE", "NO", "DK", "FI"],
|
|
||||||
title: { en: "Nordic company data", sv: "Nordisk bolagsdata" },
|
|
||||||
blurb: { en: "Official registers. Per field.", sv: "Officiella register. Per fält." },
|
|
||||||
count: { en: "4.9M records", sv: "4,9M poster" },
|
|
||||||
rows: 4900000,
|
|
||||||
freshness: { en: "daily", sv: "daglig" },
|
|
||||||
level: 3,
|
|
||||||
source: "GLEIF · Brreg",
|
|
||||||
cat: { en: "Companies", sv: "Bolag" },
|
|
||||||
price: 18400,
|
|
||||||
artifact: "table",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "tech-decisionmakers",
|
|
||||||
markets: "SE · NO · DK · FI",
|
|
||||||
marketCodes: ["SE", "NO", "DK", "FI"],
|
|
||||||
title: { en: "Decision-makers in tech", sv: "Beslutsfattare i tech" },
|
|
||||||
blurb: { en: "Role and path. Source per field.", sv: "Roll och väg. Källa per fält." },
|
|
||||||
count: { en: "182k records", sv: "182k poster" },
|
|
||||||
rows: 182000,
|
|
||||||
freshness: { en: "weekly", sv: "veckovis" },
|
|
||||||
level: 1,
|
|
||||||
source: "public web",
|
|
||||||
cat: { en: "Decision-makers", sv: "Beslutsfattare" },
|
|
||||||
price: 9600,
|
|
||||||
artifact: "schema",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "vehicles-fleet",
|
|
||||||
markets: "SE",
|
|
||||||
marketCodes: ["SE"],
|
|
||||||
title: { en: "Vehicles & fleet", sv: "Fordon & flotta" },
|
|
||||||
blurb: { en: "Technical data. VehIQ synergy.", sv: "Tekniska data. VehIQ-synergin." },
|
|
||||||
count: { en: "6.1M records", sv: "6,1M poster" },
|
|
||||||
rows: 6100000,
|
|
||||||
freshness: { en: "daily", sv: "daglig" },
|
|
||||||
level: 2,
|
|
||||||
source: "register",
|
|
||||||
cat: { en: "Vehicles", sv: "Fordon" },
|
|
||||||
price: 12200,
|
|
||||||
artifact: "map",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "financial-series",
|
|
||||||
markets: "SE · NO · DK · FI",
|
|
||||||
marketCodes: ["SE", "NO", "DK", "FI"],
|
|
||||||
title: { en: "Financial series", sv: "Finansiella serier" },
|
|
||||||
blurb: { en: "Revenue, result, KPIs.", sv: "Omsättning, resultat, nyckeltal." },
|
|
||||||
count: { en: "12 years", sv: "12 år" },
|
|
||||||
rows: 240000,
|
|
||||||
freshness: { en: "annual", sv: "årlig" },
|
|
||||||
level: 2,
|
|
||||||
source: "register",
|
|
||||||
cat: { en: "Financials", sv: "Finansiellt" },
|
|
||||||
price: 14800,
|
|
||||||
artifact: "chart",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "buying-signals",
|
|
||||||
markets: "SE · NO · DK · FI",
|
|
||||||
marketCodes: ["SE", "NO", "DK", "FI"],
|
|
||||||
title: { en: "Buying signals", sv: "Köpsignaler" },
|
|
||||||
blurb: { en: "Ads, news, tech changes. Intent per company.", sv: "Annonser, nyheter, teknikbyten. Intent per bolag." },
|
|
||||||
count: { en: "continuous", sv: "löpande" },
|
|
||||||
rows: 0,
|
|
||||||
freshness: { en: "weekly", sv: "veckovis" },
|
|
||||||
level: 1,
|
|
||||||
source: "web",
|
|
||||||
cat: { en: "Companies", sv: "Bolag" },
|
|
||||||
price: 7900,
|
|
||||||
artifact: "table",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "sanctions-pep",
|
|
||||||
markets: "EU",
|
|
||||||
marketCodes: ["EU"],
|
|
||||||
title: { en: "Sanctions / PEP", sv: "Sanktioner / PEP" },
|
|
||||||
blurb: { en: "Official lists. Automated screening.", sv: "Officiella listor. Automatisk screening." },
|
|
||||||
count: { en: "global", sv: "global" },
|
|
||||||
rows: 0,
|
|
||||||
freshness: { en: "daily", sv: "daglig" },
|
|
||||||
level: 3,
|
|
||||||
source: "OpenSanctions",
|
|
||||||
cat: { en: "Compliance", sv: "Efterlevnad" },
|
|
||||||
price: 5900,
|
|
||||||
artifact: "table",
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
// Stable tab keys — never change, display labels are localized separately
|
// Stable tab keys — never change, display labels are localized separately
|
||||||
type TabKey = "overview" | "samples" | "quality" | "schema" | "coverage" | "price";
|
type TabKey = "overview" | "samples" | "quality" | "schema" | "coverage" | "price";
|
||||||
@@ -136,12 +24,6 @@ const TABS: { key: TabKey; label: Loc }[] = [
|
|||||||
{ key: "price", label: { en: "Price", sv: "Pris" } },
|
{ key: "price", label: { en: "Price", sv: "Pris" } },
|
||||||
];
|
];
|
||||||
|
|
||||||
function findDataset(raw: string | undefined): Dataset | undefined {
|
|
||||||
if (!raw) return undefined;
|
|
||||||
const slug = decodeURIComponent(raw).toLowerCase();
|
|
||||||
return CATALOG.find((d) => d.id === slug);
|
|
||||||
}
|
|
||||||
|
|
||||||
const TAB_KEYS = TABS.map((t) => t.key);
|
const TAB_KEYS = TABS.map((t) => t.key);
|
||||||
function isTabKey(value: string | null): value is TabKey {
|
function isTabKey(value: string | null): value is TabKey {
|
||||||
return value !== null && (TAB_KEYS as string[]).includes(value);
|
return value !== null && (TAB_KEYS as string[]).includes(value);
|
||||||
|
|||||||
@@ -0,0 +1,124 @@
|
|||||||
|
import type { Loc, ProvLevel } from "@/lib/data";
|
||||||
|
|
||||||
|
// Single source of truth for the ready-made datasets shown under /katalog.
|
||||||
|
// Kept framework-neutral (no "use client") so both the client detail page and
|
||||||
|
// the route's server-side generateMetadata resolve the same ids and titles.
|
||||||
|
|
||||||
|
// ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
// Static dataset seed (no detail API yet) — keyed by slugified id with a safe fallback.
|
||||||
|
// ─────────────────────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
|
export interface Dataset {
|
||||||
|
id: string;
|
||||||
|
markets: string;
|
||||||
|
marketCodes: string[];
|
||||||
|
title: Loc;
|
||||||
|
blurb: Loc;
|
||||||
|
count: Loc;
|
||||||
|
rows: number;
|
||||||
|
freshness: Loc;
|
||||||
|
level: ProvLevel;
|
||||||
|
source: string;
|
||||||
|
cat: Loc;
|
||||||
|
price: number;
|
||||||
|
artifact: "table" | "map" | "schema" | "chart";
|
||||||
|
}
|
||||||
|
|
||||||
|
export const CATALOG: Dataset[] = [
|
||||||
|
{
|
||||||
|
id: "nordic-companies",
|
||||||
|
markets: "SE · NO · DK · FI",
|
||||||
|
marketCodes: ["SE", "NO", "DK", "FI"],
|
||||||
|
title: { en: "Nordic company data", sv: "Nordisk bolagsdata" },
|
||||||
|
blurb: { en: "Official registers. Per field.", sv: "Officiella register. Per fält." },
|
||||||
|
count: { en: "4.9M records", sv: "4,9M poster" },
|
||||||
|
rows: 4900000,
|
||||||
|
freshness: { en: "daily", sv: "daglig" },
|
||||||
|
level: 3,
|
||||||
|
source: "GLEIF · Brreg",
|
||||||
|
cat: { en: "Companies", sv: "Bolag" },
|
||||||
|
price: 18400,
|
||||||
|
artifact: "table",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "tech-decisionmakers",
|
||||||
|
markets: "SE · NO · DK · FI",
|
||||||
|
marketCodes: ["SE", "NO", "DK", "FI"],
|
||||||
|
title: { en: "Decision-makers in tech", sv: "Beslutsfattare i tech" },
|
||||||
|
blurb: { en: "Role and path. Source per field.", sv: "Roll och väg. Källa per fält." },
|
||||||
|
count: { en: "182k records", sv: "182k poster" },
|
||||||
|
rows: 182000,
|
||||||
|
freshness: { en: "weekly", sv: "veckovis" },
|
||||||
|
level: 1,
|
||||||
|
source: "public web",
|
||||||
|
cat: { en: "Decision-makers", sv: "Beslutsfattare" },
|
||||||
|
price: 9600,
|
||||||
|
artifact: "schema",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "vehicles-fleet",
|
||||||
|
markets: "SE",
|
||||||
|
marketCodes: ["SE"],
|
||||||
|
title: { en: "Vehicles & fleet", sv: "Fordon & flotta" },
|
||||||
|
blurb: { en: "Technical data. VehIQ synergy.", sv: "Tekniska data. VehIQ-synergin." },
|
||||||
|
count: { en: "6.1M records", sv: "6,1M poster" },
|
||||||
|
rows: 6100000,
|
||||||
|
freshness: { en: "daily", sv: "daglig" },
|
||||||
|
level: 2,
|
||||||
|
source: "register",
|
||||||
|
cat: { en: "Vehicles", sv: "Fordon" },
|
||||||
|
price: 12200,
|
||||||
|
artifact: "map",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "financial-series",
|
||||||
|
markets: "SE · NO · DK · FI",
|
||||||
|
marketCodes: ["SE", "NO", "DK", "FI"],
|
||||||
|
title: { en: "Financial series", sv: "Finansiella serier" },
|
||||||
|
blurb: { en: "Revenue, result, KPIs.", sv: "Omsättning, resultat, nyckeltal." },
|
||||||
|
count: { en: "12 years", sv: "12 år" },
|
||||||
|
rows: 240000,
|
||||||
|
freshness: { en: "annual", sv: "årlig" },
|
||||||
|
level: 2,
|
||||||
|
source: "register",
|
||||||
|
cat: { en: "Financials", sv: "Finansiellt" },
|
||||||
|
price: 14800,
|
||||||
|
artifact: "chart",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "buying-signals",
|
||||||
|
markets: "SE · NO · DK · FI",
|
||||||
|
marketCodes: ["SE", "NO", "DK", "FI"],
|
||||||
|
title: { en: "Buying signals", sv: "Köpsignaler" },
|
||||||
|
blurb: { en: "Ads, news, tech changes. Intent per company.", sv: "Annonser, nyheter, teknikbyten. Intent per bolag." },
|
||||||
|
count: { en: "continuous", sv: "löpande" },
|
||||||
|
rows: 0,
|
||||||
|
freshness: { en: "weekly", sv: "veckovis" },
|
||||||
|
level: 1,
|
||||||
|
source: "web",
|
||||||
|
cat: { en: "Companies", sv: "Bolag" },
|
||||||
|
price: 7900,
|
||||||
|
artifact: "table",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "sanctions-pep",
|
||||||
|
markets: "EU",
|
||||||
|
marketCodes: ["EU"],
|
||||||
|
title: { en: "Sanctions / PEP", sv: "Sanktioner / PEP" },
|
||||||
|
blurb: { en: "Official lists. Automated screening.", sv: "Officiella listor. Automatisk screening." },
|
||||||
|
count: { en: "global", sv: "global" },
|
||||||
|
rows: 0,
|
||||||
|
freshness: { en: "daily", sv: "daglig" },
|
||||||
|
level: 3,
|
||||||
|
source: "OpenSanctions",
|
||||||
|
cat: { en: "Compliance", sv: "Efterlevnad" },
|
||||||
|
price: 5900,
|
||||||
|
artifact: "table",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
export function findDataset(raw: string | undefined): Dataset | undefined {
|
||||||
|
if (!raw) return undefined;
|
||||||
|
const slug = decodeURIComponent(raw).toLowerCase();
|
||||||
|
return CATALOG.find((d) => d.id === slug);
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import type { Metadata } from "next";
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: "Datakatalog — 0pt",
|
||||||
|
description:
|
||||||
|
"Browse ready-made datasets for companies, decision-makers, vehicles and financials across the Nordics. Provenance per field and transparent pricing.",
|
||||||
|
alternates: { canonical: "https://0pt.app/katalog" },
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function KatalogLayout({ children }: { children: React.ReactNode }) {
|
||||||
|
return children;
|
||||||
|
}
|
||||||
+28
-1
@@ -9,9 +9,10 @@ import "./globals.css";
|
|||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: { default: "0pt — your data", template: "%s | 0pt" },
|
title: { default: "0pt — your data", template: "%s | 0pt" },
|
||||||
description:
|
description:
|
||||||
"Data services on demand for the Nordics & Europe. Provenance per field, GDPR-native. Compose your data job, pay 50% to start, watch production live, and validate the result with full transparency.",
|
"Data services on demand for the Nordics & Europe. Provenance per field, GDPR-native. Compose your data job, pay 50% to start, watch production live.",
|
||||||
generator: "0pt.app",
|
generator: "0pt.app",
|
||||||
metadataBase: new URL("https://0pt.app"),
|
metadataBase: new URL("https://0pt.app"),
|
||||||
|
alternates: { canonical: "https://0pt.app" },
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: "0pt — your data",
|
title: "0pt — your data",
|
||||||
description: "Nordic & European data services. Provenance per field. GDPR-native. 50/50 escrow.",
|
description: "Nordic & European data services. Provenance per field. GDPR-native. 50/50 escrow.",
|
||||||
@@ -39,9 +40,35 @@ export const metadata: Metadata = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const structuredData = {
|
||||||
|
"@context": "https://schema.org",
|
||||||
|
"@graph": [
|
||||||
|
{
|
||||||
|
"@type": "Organization",
|
||||||
|
"@id": "https://siax.io/#organization",
|
||||||
|
name: "SIAX Technology AB",
|
||||||
|
url: "https://siax.io",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@type": "WebSite",
|
||||||
|
"@id": "https://0pt.app/#website",
|
||||||
|
url: "https://0pt.app",
|
||||||
|
name: "0pt — your data",
|
||||||
|
inLanguage: "en",
|
||||||
|
publisher: { "@id": "https://siax.io/#organization" },
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
|
export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
|
||||||
return (
|
return (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<script
|
||||||
|
type="application/ld+json"
|
||||||
|
dangerouslySetInnerHTML={{ __html: JSON.stringify(structuredData) }}
|
||||||
|
/>
|
||||||
|
</head>
|
||||||
<body className="font-sans antialiased">
|
<body className="font-sans antialiased">
|
||||||
<a
|
<a
|
||||||
href="#main-content"
|
href="#main-content"
|
||||||
|
|||||||
+4
-1
@@ -1,7 +1,10 @@
|
|||||||
import type { MetadataRoute } from "next";
|
import type { MetadataRoute } from "next";
|
||||||
|
|
||||||
const BASE = "https://0pt.app";
|
const BASE = "https://0pt.app";
|
||||||
const ROUTES = ["", "/tjanster", "/katalog", "/kallor", "/bestall", "/bestall/beskriv", "/bestall/forskott"];
|
// /bestall, /bestall/beskriv and /bestall/forskott are deliberately noindex
|
||||||
|
// (app/bestall/layout.tsx) — the order flow is transactional, not a landing
|
||||||
|
// page. Keep the sitemap in sync with that indexation policy.
|
||||||
|
const ROUTES = ["", "/tjanster", "/katalog", "/kallor"];
|
||||||
|
|
||||||
export default function sitemap(): MetadataRoute.Sitemap {
|
export default function sitemap(): MetadataRoute.Sitemap {
|
||||||
return ROUTES.map((r) => ({
|
return ROUTES.map((r) => ({
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import type { Metadata } from "next";
|
||||||
|
|
||||||
|
export const metadata: Metadata = {
|
||||||
|
title: "Tjänster — 0pt",
|
||||||
|
description:
|
||||||
|
"Data på beställning: anpassade datajobb, färdiga dataset i katalogen och prenumerationsflöden. Provenans per fält, GDPR-nativt och 50/50-escrow.",
|
||||||
|
alternates: { canonical: "https://0pt.app/tjanster" },
|
||||||
|
openGraph: {
|
||||||
|
title: "Tjänster — 0pt",
|
||||||
|
description:
|
||||||
|
"Data på beställning: anpassade datajobb, färdiga dataset i katalogen och prenumerationsflöden. Provenans per fält, GDPR-nativt och 50/50-escrow.",
|
||||||
|
url: "https://0pt.app/tjanster",
|
||||||
|
locale: "sv_SE",
|
||||||
|
type: "website",
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default function TjansterLayout({ children }: { children: React.ReactNode }) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div
|
||||||
|
aria-hidden="true"
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
width: 1,
|
||||||
|
height: 1,
|
||||||
|
overflow: "hidden",
|
||||||
|
clip: "rect(0 0 0 0)",
|
||||||
|
whiteSpace: "nowrap",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<h1>All data. På beställning.</h1>
|
||||||
|
<p>
|
||||||
|
Anpassade datajobb, färdiga dataset och prenumerationsflöden med provenans per fält,
|
||||||
|
GDPR-nativ leverans och 50/50-escrow.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
{children}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -15,9 +15,23 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: 0pt-web
|
app: 0pt-web
|
||||||
spec:
|
spec:
|
||||||
|
# Den här manifesten är referens-only (se README.md), men den ska vara
|
||||||
|
# säker att använda. Imagebygget kör redan USER node (uid 1000).
|
||||||
|
securityContext:
|
||||||
|
runAsNonRoot: true
|
||||||
|
runAsUser: 1000
|
||||||
|
runAsGroup: 1000
|
||||||
|
fsGroup: 1000
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
containers:
|
containers:
|
||||||
- name: 0pt-web
|
- name: 0pt-web
|
||||||
image: REPLACE_ME/0pt-web:REPLACE_ME_TAG
|
image: REPLACE_ME/0pt-web:REPLACE_ME_TAG
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
readOnlyRootFilesystem: true
|
||||||
|
capabilities:
|
||||||
|
drop: ["ALL"]
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 3000
|
- containerPort: 3000
|
||||||
env:
|
env:
|
||||||
@@ -50,6 +64,18 @@ spec:
|
|||||||
limits:
|
limits:
|
||||||
cpu: "1"
|
cpu: "1"
|
||||||
memory: "512Mi"
|
memory: "512Mi"
|
||||||
|
# readOnlyRootFilesystem above needs explicit writable scratch space:
|
||||||
|
# Node/Next writes temp files and caches here at runtime.
|
||||||
|
volumeMounts:
|
||||||
|
- name: tmp
|
||||||
|
mountPath: /tmp
|
||||||
|
- name: next-cache
|
||||||
|
mountPath: /app/.next/cache
|
||||||
|
volumes:
|
||||||
|
- name: tmp
|
||||||
|
emptyDir: {}
|
||||||
|
- name: next-cache
|
||||||
|
emptyDir: {}
|
||||||
---
|
---
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
|
|||||||
+6
-4
@@ -70,7 +70,7 @@
|
|||||||
"input-otp": "1.4.1",
|
"input-otp": "1.4.1",
|
||||||
"jose": "^5.9.6",
|
"jose": "^5.9.6",
|
||||||
"lucide-react": "^0.454.0",
|
"lucide-react": "^0.454.0",
|
||||||
"next": "16.4.1",
|
"next": "16.4.5",
|
||||||
"next-themes": "^0.4.6",
|
"next-themes": "^0.4.6",
|
||||||
"postgres": "^3.4.9",
|
"postgres": "^3.4.9",
|
||||||
"react": "19.2.8",
|
"react": "19.2.8",
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
"tailwind-merge": "^3.3.1",
|
"tailwind-merge": "^3.3.1",
|
||||||
"tailwindcss-animate": "^1.0.7",
|
"tailwindcss-animate": "^1.0.7",
|
||||||
"vaul": "^1.1.2",
|
"vaul": "^1.1.2",
|
||||||
"zod": "3.25.76"
|
"zod": "4.6.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@eslint/js": "^9.15.0",
|
"@eslint/js": "^9.15.0",
|
||||||
@@ -100,12 +100,14 @@
|
|||||||
"tw-animate-css": "1.4.0",
|
"tw-animate-css": "1.4.0",
|
||||||
"typescript": "^5",
|
"typescript": "^5",
|
||||||
"typescript-eslint": "^8.15.0",
|
"typescript-eslint": "^8.15.0",
|
||||||
"vitest": "^3.2.7"
|
"vitest": "^4.1.12"
|
||||||
},
|
},
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"overrides": {
|
"overrides": {
|
||||||
"sharp@<0.35.5": "0.35.5",
|
"sharp@<0.35.5": "0.35.5",
|
||||||
"source-map-js@<1.2.2": "1.2.2"
|
"source-map-js@<1.2.2": "1.2.2",
|
||||||
|
"tinypool": "2.1.2",
|
||||||
|
"@typescript-eslint/typescript-estree>minimatch": "11.0.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+171
-233
File diff suppressed because it is too large
Load Diff
@@ -16,3 +16,11 @@ packages:
|
|||||||
onlyBuiltDependencies:
|
onlyBuiltDependencies:
|
||||||
- sharp
|
- sharp
|
||||||
- esbuild
|
- esbuild
|
||||||
|
|
||||||
|
# Supply-chain hardening (Semgrep p/ci blocking rules):
|
||||||
|
# - no transitive dependency from an untrusted/exotic source
|
||||||
|
# - wait 7 days (10080 min) for newly published versions
|
||||||
|
# - never accept a downgrade of security settings via a dependency update
|
||||||
|
blockExoticSubdeps: true
|
||||||
|
minimumReleaseAge: 10080
|
||||||
|
trustPolicy: no-downgrade
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ ENV PYTHONUNBUFFERED=1 PIP_NO_CACHE_DIR=1
|
|||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install -r requirements.txt
|
RUN pip install -r requirements.txt
|
||||||
COPY app.py ingest_aud0.py ./
|
COPY app.py ingest_aud0.py ./
|
||||||
|
# Kör som icke-root (DS-0002). Inga skrivningar till /app krävs.
|
||||||
|
RUN useradd --create-home --uid 10001 appuser
|
||||||
|
USER appuser
|
||||||
|
|
||||||
EXPOSE 8096
|
EXPOSE 8096
|
||||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
||||||
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8096/health', timeout=3)"
|
CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8096/health', timeout=3)"
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
fastapi==0.115.6
|
fastapi==0.133.1
|
||||||
uvicorn[standard]==0.34.0
|
uvicorn[standard]==0.34.0
|
||||||
httpx==0.28.1
|
httpx==0.28.1
|
||||||
PyJWT[crypto]==2.14.0
|
PyJWT[crypto]==2.15.0
|
||||||
pytest==8.3.4
|
pytest==9.0.3
|
||||||
|
# Transitiva golv (OSV): resolvern i osv-scanner löser dessa till äldre, sårbara versioner
|
||||||
|
# om de inte är explicit angivna.
|
||||||
|
starlette>=1.3.1
|
||||||
|
anyio>=4.14.2
|
||||||
|
idna>=3.15
|
||||||
|
certifi>=2026.10.18
|
||||||
|
pygments>=2.20.0 # pytest drar in pygments (OSV)
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ RUN pip install -r requirements.txt
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Kör som icke-root (DS-0002). Beroendena ligger i globala /usr/local och är
|
||||||
|
# läsliga för alla användare; appens egen kod skrivs inte vid körning.
|
||||||
|
RUN useradd --create-home --uid 10001 appuser
|
||||||
|
USER appuser
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
# API: uvicorn orchestrator.main:app --host 0.0.0.0 --port 8000
|
# API: uvicorn orchestrator.main:app --host 0.0.0.0 --port 8000
|
||||||
# Worker: python -m workers.run
|
# Worker: python -m workers.run
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
# image (Dockerfile only installs requirements.txt) — see pytest.ini for how
|
# image (Dockerfile only installs requirements.txt) — see pytest.ini for how
|
||||||
# the test suite is run locally / in CI.
|
# the test suite is run locally / in CI.
|
||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
pytest==8.3.4
|
pytest==9.0.3
|
||||||
pytest-asyncio==0.25.2
|
pytest-asyncio==1.4.0
|
||||||
respx==0.22.0
|
respx==0.22.0
|
||||||
|
# Transitivt golv (OSV): pytest drar in pygments; osv-scanner löser annars till sårbar äldre version.
|
||||||
|
pygments>=2.20.0
|
||||||
|
|||||||
@@ -1,10 +1,16 @@
|
|||||||
# 0pt data engine — compliant stack only (docs/07). No bypass/stealth/proxy libs.
|
# 0pt data engine — compliant stack only (docs/07). No bypass/stealth/proxy libs.
|
||||||
fastapi==0.115.6
|
fastapi==0.133.1
|
||||||
uvicorn[standard]==0.34.0
|
uvicorn[standard]==0.34.0
|
||||||
pydantic==2.10.4
|
pydantic==2.10.4
|
||||||
httpx==0.28.1
|
httpx==0.28.1
|
||||||
asyncpg==0.30.0
|
asyncpg==0.30.0
|
||||||
python-dotenv==1.0.1
|
python-dotenv==1.2.2
|
||||||
pyyaml==6.0.2
|
pyyaml==6.0.2
|
||||||
rapidfuzz==3.11.0
|
rapidfuzz==3.11.0
|
||||||
tenacity==9.0.0
|
tenacity==9.0.0
|
||||||
|
# Transitiva golv (OSV): resolvern i osv-scanner löser dessa till äldre, sårbara versioner
|
||||||
|
# om de inte är explicit angivna.
|
||||||
|
starlette>=1.3.1
|
||||||
|
anyio>=4.14.2
|
||||||
|
idna>=3.15
|
||||||
|
certifi>=2026.10.18
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user