CI (SIAX Cloud) / security (push) Successful in 14s
Security Scan (SIAX Cloud) / security (push) Successful in 14s
CI (SIAX Cloud) / integration (push) Failing after 30s
CI (SIAX Cloud) / quality (push) Successful in 47s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 14s
CI (SIAX Cloud) / integration (pull_request) Failing after 25s
CI (SIAX Cloud) / security (pull_request) Successful in 29s
CI (SIAX Cloud) / quality (pull_request) Successful in 48s
Two defects of the same kind: the repo asserted things about itself that were
not true, and nothing in it could tell.
A. CHANGELOG.md claimed CSP/HSTS/X-Frame-Options since 2026-08. `main`
contained none of it -- a repo-wide grep for
`content-security-policy|strict-transport-security|x-frame-options` matched
exactly one file, CHANGELOG.md itself. The only header on 0pt.app was
Vercel's own HSTS default, which does not survive the move to
Coolify/Traefik that siax.config.json and .gitea/workflows/cd.yml are
already pointed at.
- next.config.mjs: `headers()` on `/(.*)` with CSP (frame-ancestors 'none',
base-uri 'self', object-src 'none', form-action 'self'), HSTS,
X-Frame-Options DENY, X-Content-Type-Options, Referrer-Policy,
Permissions-Policy; plus poweredByHeader: false. Same idiom as
sax3l/siax-io's next.config.mjs.
- Carve-outs re-derived against THIS tree, not inherited: the stale
`ci/security-headers-and-scanning` branch (8d2ff73, 142 commits behind)
carried a `form-action https://checkout.stripe.com` allowance justified
by a redirect that is actually `window.location.href`, which form-action
does not govern -- dropped rather than kept as decorative permission.
frame-src is derived from NOCODB_BASE_URL/METABASE_SITE_URL, the same env
the components/embed.tsx iframe is configured from, so wiring that
component up cannot be silently blanked by this header (the failure
sax3l/siax-io recorded as SIO-013). 'unsafe-eval' is dev-only.
- tests/security/security-headers.test.ts: blocking regression gate inside
`pnpm run test`, i.e. the required "CI (SIAX Cloud) / quality" context.
Asserts against expectations written out in the test, not imported from
the config. Proven to fail: removing X-Frame-Options -> `pnpm run test`
exits 1; weakening frame-ancestors to 'self' -> exits 1.
B. scripts/siax-doctor.mjs validated that siax.repo.json fields were PRESENT,
never what they said. Measured on this tree: operationalState "running"
(false) and "down" (true) both gave 40/40, exit 0, byte-identical output.
- Value checks (enums, git.siax.io const, fleet node pattern, bare-hostname
form), cross-file consistency (declared prod hostnames must appear in
this repo's own siax.config.json / contracts/openapi.yaml, and vice
versa), and GOV-06 substantiation: operationalState must be backed by a
dated probe record in evidence/operational-state.json that agrees with
it. Liveness is not knowable offline; whether a liveness CLAIM is backed
is. Offline, deterministic, no network -- CI can never go red for want of
an internet connection.
- `--live` (opt-in) probes the declared hosts for real and checks the
headers on the wire; `--write-evidence` refreshes the record. Not wired
into CI on purpose.
- tests/repo/siax-doctor.test.ts runs the doctor inside `pnpm run test` and
asserts the negative cases against fixture trees (SIAX_DOCTOR_ROOT), so
the "cannot fail" defect cannot come back.
C. CHANGELOG.md is now true. The header claim stands; the four claims it was
bundled with (Trivy --exit-code 1, gitleaks, SHA-pinned actions, SBOM +
license artifacts) are still false on main and are listed as not
implemented instead of left asserted. All four live in .gitea/workflows/**,
a protected path on this repo, so they need an authorised workflow change.
Nothing under .gitea/workflows/** or .gitignore is touched.
Verified: pnpm run typecheck exit 0; pnpm run test exit 0 (74 files / 965
tests passed, up from 72/945); pnpm run build exit 0 and the built
.next/routes-manifest.json carries all six headers; node scripts/siax-doctor.mjs
55/55 exit 0; --live 57/57 exit 0. eslint on the new files exit 0 (repo lint is
advisory and its 17 pre-existing problems are unchanged).
Co-Authored-By: Claude Opus 5 <[email protected]>
115 lines
6.1 KiB
Markdown
115 lines
6.1 KiB
Markdown
# Changelog
|
||
|
||
> BACKLOG P1-3. Format loosely follows [Keep a Changelog](https://keepachangelog.com/).
|
||
> No git tags/releases exist yet for this repo — this file starts the practice
|
||
> retroactively from real `git log` history rather than inventing version
|
||
> numbers that were never cut. Dates are commit dates on `main`, not calendar
|
||
> "release" dates (there have been none).
|
||
|
||
## [Unreleased]
|
||
|
||
- fix(security): response security headers are set by the app itself, in
|
||
`next.config.mjs` `headers()` — CSP (incl. `frame-ancestors 'none'`,
|
||
`base-uri 'self'`, `object-src 'none'`, `form-action 'self'`), HSTS,
|
||
X-Frame-Options `DENY`, X-Content-Type-Options, Referrer-Policy,
|
||
Permissions-Policy — plus `poweredByHeader: false`. Regression-gated by
|
||
`tests/security/security-headers.test.ts` (blocking, runs in
|
||
`pnpm run test`) and re-checkable against a live origin with
|
||
`node scripts/siax-doctor.mjs --live`. (BACKLOG P0-13, P1-15)
|
||
|
||
Correcting this file: from 2026-08 until 2026-09-07 this bullet also
|
||
claimed the headers themselves, while `main` contained none — a repo-wide
|
||
grep for `content-security-policy|strict-transport-security|
|
||
x-frame-options` matched only CHANGELOG.md. The only thing setting HSTS on
|
||
0pt.app was Vercel's platform default (still observable on the 402
|
||
responses recorded in `evidence/operational-state.json`), which is not this
|
||
repo's and does not survive the move to Coolify/Traefik. The claim is true
|
||
as of this entry; the four claims it was bundled with are not, and are
|
||
moved below rather than left standing.
|
||
|
||
- fix(repo-honesty): `scripts/siax-doctor.mjs` validated that
|
||
`siax.repo.json` fields were PRESENT, never what they said — measured:
|
||
`operationalState: "running"` (false at the time; every declared host
|
||
answered 402/404) and `"down"` (true) both produced 40/40 and
|
||
byte-identical output. It now validates values (enums, hostname form),
|
||
cross-file consistency (declared prod hostnames must appear in this repo's
|
||
own deploy/contract config, and vice versa), and requires
|
||
`operationalState` to be backed by a dated probe record in
|
||
`evidence/operational-state.json` that agrees with it. Offline and
|
||
deterministic by default; `--live` (opt-in) probes the real hosts.
|
||
Gated by `tests/repo/siax-doctor.test.ts`, which also asserts the negative
|
||
cases against fixture trees. (BACKLOG P1-19, control AGENT-04, GOV-06)
|
||
|
||
- fix(health): `/api/health` reports real per-dependency status instead of a
|
||
hardcoded `ok: true`; new `/api/ready` readiness endpoint. (BACKLOG P0-3)
|
||
- docs/chore: repo-hygiene pass — schema-valid `siax.repo.json`/`siax.config.json`
|
||
(standard v2.0), ADRs, this CHANGELOG, `siax:doctor` script, devcontainer,
|
||
`docs/architecture/ARCHITECTURE.md` §5 "Ytor och paritet", CODEOWNERS,
|
||
stale-link cleanup. (BACKLOG P1-1, P1-2, P1-3, P1-19, P1-20, P1-21, P2-5, P3-5)
|
||
|
||
### Claimed here before 2026-09-07 but NOT implemented (kept visible, not deleted)
|
||
|
||
These were asserted by the `fix(security)` bullet above and were never true
|
||
on `main`. They are listed so the gap is legible instead of silently dropped;
|
||
all four live in `.gitea/workflows/**`, which is a PROTECTED path on this
|
||
repo (`protected_file_patterns: .gitea/workflows/**;.gitignore`), so they
|
||
need an authorised workflow change rather than an ordinary PR:
|
||
|
||
- CI security gates are still ADVISORY, not enforcing: both
|
||
`.gitea/workflows/security.yml` and `nightly.yml` run
|
||
`trivy fs --scanners vuln,secret --severity HIGH,CRITICAL --exit-code 0`.
|
||
`--exit-code 1` was claimed. (BACKLOG P0-16)
|
||
- gitleaks is not run anywhere in this repo. (BACKLOG P0-19)
|
||
- Actions are NOT pinned to commit SHAs — every workflow uses
|
||
`actions/checkout@v4` / `actions/setup-node@v4` tags. (BACKLOG P1-14)
|
||
- No SBOM and no license inventory are produced or uploaded as CI artifacts.
|
||
|
||
## 2026-08-11 — Evasion-stack decision provenance
|
||
|
||
- Attributed and dated the account-owner's keep-decision on `services/scrapers/*`
|
||
across `SECURITY.md`, `CONTRIBUTING.md`, `prompts/002-compliance-audit.md`,
|
||
`renovate.json`, `.gitea/workflows/security.yml`, `docs/slo.md`.
|
||
|
||
## 2026-08-09/10 — Golden Standard compliance pass (FAS 0–10)
|
||
|
||
- `docs/compliance/{INVENTORY,RELATIONS,OSS-INVENTORY,GOLDEN-STANDARD-REPORT,BACKLOG,SLUTRAPPORT}.md`
|
||
written; `siax.repo.json` classification recorded.
|
||
- `fix(security)`: `GET /api/orders` and `GET /api/admin/metrics` now require
|
||
auth (were live 200 anonymous — the routes sit outside `middleware.ts`'s
|
||
`/api/0pt/:path*` matcher).
|
||
- `fix(deploy)`: `siax.config.json` `deploy.target` flipped from `vercel` to
|
||
`coolify` (config-only; the live instance is still on Vercel until a
|
||
Coolify app is provisioned and DNS is cut over).
|
||
- `feat(contract)`: OpenAPI 3.1 SSOT added (`contracts/openapi.yaml`);
|
||
`@vercel/analytics` and `next/font/google` removed in favor of self-hosted
|
||
`@fontsource-variable/*` (AR-4).
|
||
- `ci(workflows)`: CD/security/nightly split under `.gitea/workflows/`.
|
||
- README/SECURITY/CONTRIBUTING/AGENTS + runbooks (deploy, incident,
|
||
backup-restore, oncall) + SLO doc added.
|
||
|
||
## 2026-08 — Auth + capability hardening ("Wave 2/3")
|
||
|
||
- `fix(auth)`: `AUTH_ENFORCE` default flipped to fail-closed on `/api/0pt/*`.
|
||
- Zitadel Bearer-token verification wired into `middleware.ts`
|
||
(`src/auth/zitadel.ts`, `src/auth/context.ts`).
|
||
- P0 capability layer built out: `0pt.query_source`, document
|
||
capture/extraction, Iceberg write-boundary, external writeback, dataset
|
||
quality flow docs.
|
||
- CI quality gate added (typecheck/lint/test), `.env.example` committed
|
||
(previously blocked by a blanket `.gitignore` `.env*` rule).
|
||
|
||
## 2026-07-13 — Scraper stack (kept, see BACKLOG P3-3 / SECURITY.md)
|
||
|
||
- `services/scrapers/*` (WAF-bypass, proxy rotation, ClickHouse pipeline) was
|
||
added on the Gitea line of history. This is the subject of the dated,
|
||
attributed account-owner decision referenced throughout this repo's
|
||
compliance docs — not reopened or altered by this changelog entry.
|
||
|
||
## Earlier
|
||
|
||
- Initial Next.js scaffold, order/catalog/portal UI, FastAPI engine
|
||
scaffold, i18n (EN/SV) and accessibility passes, lakehouse write-path
|
||
ownership ADR (`ADR-0030`, in the `n0d` repo).
|
||
|
||
[Unreleased]: https://git.siax.io/sax3l/0pt/compare/main...HEAD
|