Merge branch 'main' into fix/osv-guard-in-scan-volume-20261122
CI (SIAX Cloud) / quality (pull_request) Successful in 47s
CI (SIAX Cloud) / contracts (pull_request) Successful in 15s
CI (SIAX Cloud) / sonar (pull_request) Skipped
Component conformance / Component conformance (blocking) (pull_request) Successful in 5s
CI (SIAX Cloud) / security (pull_request) Successful in 3m4s
security / scan (pull_request) Failing after 4m12s
CI (SIAX Cloud) / quality (pull_request) Successful in 47s
CI (SIAX Cloud) / contracts (pull_request) Successful in 15s
CI (SIAX Cloud) / sonar (pull_request) Skipped
Component conformance / Component conformance (blocking) (pull_request) Successful in 5s
CI (SIAX Cloud) / security (pull_request) Successful in 3m4s
security / scan (pull_request) Failing after 4m12s
This commit is contained in:
+13
-9
@@ -13,11 +13,11 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: "22"
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
|
||||
with:
|
||||
version: 9.15.9
|
||||
- name: Install
|
||||
@@ -34,20 +34,24 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
- name: Install Trivy
|
||||
run: curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
|
||||
run: |
|
||||
# Pinned + checksum-verified instead of `curl ... | sh` (Semgrep gha-curl-pipe-shell)
|
||||
curl -sSfL -o /tmp/trivy.tar.gz "https://github.com/aquasecurity/trivy/releases/download/v0.76.2/trivy_0.76.2_Linux-64bit.tar.gz"
|
||||
echo "bc0fc726e017b8927a62b2d3531d7a84ee01769daf5c99ed866dced54089fdbf /tmp/trivy.tar.gz" | sha256sum -c -
|
||||
tar -xzf /tmp/trivy.tar.gz -C /usr/local/bin trivy
|
||||
- name: Scan
|
||||
run: trivy fs --scanners vuln,secret --severity HIGH,CRITICAL --exit-code 0 .
|
||||
contracts:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
|
||||
with:
|
||||
node-version: "22"
|
||||
- uses: pnpm/action-setup@v4
|
||||
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
|
||||
with:
|
||||
version: 9.15.9
|
||||
- name: Install
|
||||
@@ -65,7 +69,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 20
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: SonarQube analysis (self-hosted sonar.siax.io)
|
||||
|
||||
@@ -10,5 +10,5 @@ jobs:
|
||||
lock:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
|
||||
- run: echo "masterplan lock placeholder"
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
@siax:registry=https://git.siax.io/api/packages/siax/npm/
|
||||
//git.siax.io/api/packages/siax/npm/:_authToken=${NODE_AUTH_TOKEN}
|
||||
# @siax/* resolves from SIAX's local Gitea npm registry, canonical owner "admin" (host git.siax.app, anonymous read).
|
||||
# No _authToken line on purpose: an unset or stale ${NODE_AUTH_TOKEN} makes npm send an empty Bearer and Gitea answers 401 even for public reads.
|
||||
# Publishing sets its own auth in the CI user config, never here. Do not use npm.siax.io (402) or /api/packages/siax/ (owner does not exist, 404).
|
||||
# External builds (Vercel etc.) use https://registry.siax.dev via design.siax.dev/docs/consume.md.
|
||||
@siax:registry=https://git.siax.app/api/packages/admin/npm/
|
||||
engine-strict=true
|
||||
fund=false
|
||||
# Supply-chain: wait 7 days before resolving newly published versions (Semgrep p/ci; npm 11.10+).
|
||||
min-release-age=7
|
||||
|
||||
@@ -14,16 +14,16 @@
|
||||
"@siax/c0py-config": "workspace:*",
|
||||
"@siax/c0py-core": "workspace:*",
|
||||
"@siax/c0py-types": "workspace:*",
|
||||
"fastify": "^5.12.0",
|
||||
"fastify": "^5.12.6",
|
||||
"pg": "^8.23.0",
|
||||
"playwright-core": "^1.63.0",
|
||||
"zod": "^3.24.0"
|
||||
"zod": "^4.6.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^24.0.0",
|
||||
"@types/pg": "^8.23.1",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "^5.7.2",
|
||||
"vitest": "^3.0.0"
|
||||
"vitest": "^4.1.12"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"test": "vitest run"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "^15.0.0",
|
||||
"next": "15.5.28",
|
||||
"react": "^19.0.0",
|
||||
"react-dom": "^19.0.0"
|
||||
},
|
||||
@@ -20,6 +20,6 @@
|
||||
"@types/react": "^19.0.0",
|
||||
"@types/react-dom": "^19.0.0",
|
||||
"typescript": "^5.7.2",
|
||||
"vitest": "^3.0.0"
|
||||
"vitest": "^4.1.12"
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -32,7 +32,10 @@
|
||||
"postcss@<8.5.18": "8.5.28",
|
||||
"next": "15.5.28",
|
||||
"sharp": "0.35.5",
|
||||
"source-map-js": "1.2.2"
|
||||
"source-map-js": "1.2.2",
|
||||
"next@<15.5.29": "15.5.29",
|
||||
"tinypool": "2.1.2",
|
||||
"@typescript-eslint/typescript-estree>minimatch": "11.0.8"
|
||||
}
|
||||
},
|
||||
"packageManager": "[email protected]"
|
||||
|
||||
@@ -14,6 +14,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.7.2",
|
||||
"vitest": "^3.0.0"
|
||||
"vitest": "^4.1.12"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
"test": "vitest run"
|
||||
},
|
||||
"dependencies": {
|
||||
"zod": "^3.24.0"
|
||||
"zod": "^4.6.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.7.2",
|
||||
"vitest": "^3.0.0"
|
||||
"vitest": "^4.1.12"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import { envSchema } from "../src/index.js";
|
||||
|
||||
const required = {
|
||||
ZITADEL_ISSUER: "https://id-customers.siax.io",
|
||||
ZITADEL_AUDIENCE: "c0py-api.siax.io",
|
||||
DATABASE_URL: "postgresql://localhost:5432/c0py",
|
||||
};
|
||||
|
||||
// Regressionstest för zod 3 -> 4 (OSV GHSA-mrhx-c7xc-m3w5): beteendet hos envSchema ska vara oförändrat.
|
||||
describe("envSchema (zod 4)", () => {
|
||||
it("fyller i standardvärden och coerce:ar numeriska strängar", () => {
|
||||
const env = envSchema.parse({ ...required });
|
||||
expect(env.PORT).toBe(3000);
|
||||
expect(env.NODE_ENV).toBe("development");
|
||||
expect(env.CRAWL_TIMEOUT_MS).toBe(30000);
|
||||
expect(env.MAX_REGISTRY_PAGES).toBe(1000);
|
||||
expect(env.CAPTURE_WORKER).toBe("on");
|
||||
expect(env.CL0UD_REQUIRED).toBe("false");
|
||||
expect(env.CL0UD_PROBE_INTERVAL_MS).toBe(300000);
|
||||
expect(envSchema.parse({ ...required, PORT: "8080" }).PORT).toBe(8080);
|
||||
});
|
||||
|
||||
it("kräver issuer, audience och databas-URL", () => {
|
||||
const result = envSchema.safeParse({});
|
||||
expect(result.success).toBe(false);
|
||||
if (!result.success) {
|
||||
const paths = result.error.issues.map((i) => i.path.join("."));
|
||||
expect(paths).toEqual(
|
||||
expect.arrayContaining(["ZITADEL_ISSUER", "ZITADEL_AUDIENCE", "DATABASE_URL"]),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
it("avvisar ogiltig URL och okänt enum-värde", () => {
|
||||
expect(envSchema.safeParse({ ...required, ZITADEL_ISSUER: "inte-en-url" }).success).toBe(false);
|
||||
expect(envSchema.safeParse({ ...required, CL0UD_BASE_URL: "nope" }).success).toBe(false);
|
||||
expect(envSchema.safeParse({ ...required, NODE_ENV: "staging" }).success).toBe(false);
|
||||
expect(envSchema.safeParse({ ...required, CAPTURE_WORKER: "maybe" }).success).toBe(false);
|
||||
});
|
||||
});
|
||||
@@ -11,6 +11,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.7.2",
|
||||
"vitest": "^3.0.0"
|
||||
"vitest": "^4.1.12"
|
||||
}
|
||||
}
|
||||
|
||||
Generated
+197
-258
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,8 @@
|
||||
packages:
|
||||
- 'apps/*'
|
||||
- 'packages/*'
|
||||
|
||||
# Supply-chain hardening (Semgrep p/ci blocking rules): 7 days wait, no downgrade of trust, no exotic sub-dependencies
|
||||
minimumReleaseAge: 10080
|
||||
trustPolicy: no-downgrade
|
||||
blockExoticSubdeps: true
|
||||
|
||||
+35
-1
@@ -1 +1,35 @@
|
||||
{"$schema": "https://github.com/renovatebot/renovate-config/blob/master/renovate-schema.json", "extends": ["config:recommended"], "packageRules": [{"matchPackagePatterns": ["^@siax/"], "rangeStrategy": "bump"}, {"matchPackagePatterns": ["typescript"], "rangeStrategy": "bump"}, {"matchPackagePatterns": ["node"], "rangeStrategy": "update"}], "vulnerabilityReport": {"enabled": true}, "schedule": ["before 3am on Saturday"]}
|
||||
{
|
||||
"$schema": "https://github.com/renovatebot/renovate-config/blob/master/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:recommended"
|
||||
],
|
||||
"packageRules": [
|
||||
{
|
||||
"matchPackagePatterns": [
|
||||
"^@siax/"
|
||||
],
|
||||
"rangeStrategy": "bump",
|
||||
"minimumReleaseAge": "7 days"
|
||||
},
|
||||
{
|
||||
"matchPackagePatterns": [
|
||||
"typescript"
|
||||
],
|
||||
"rangeStrategy": "bump",
|
||||
"minimumReleaseAge": "7 days"
|
||||
},
|
||||
{
|
||||
"matchPackagePatterns": [
|
||||
"node"
|
||||
],
|
||||
"rangeStrategy": "update",
|
||||
"minimumReleaseAge": "7 days"
|
||||
}
|
||||
],
|
||||
"vulnerabilityReport": {
|
||||
"enabled": true
|
||||
},
|
||||
"schedule": [
|
||||
"before 3am on Saturday"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"id": "server6-db.qhucpjjpv3mx9jupqkbyf5uh",
|
||||
"repo": "c0py",
|
||||
"frequency": "daily",
|
||||
"retention": "3m",
|
||||
"target": "storage-box",
|
||||
"encrypted": true,
|
||||
"lastRunAt": "2026-11-23T00:42:41Z"
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"id": "server6-db.qhucpjjpv3mx9jupqkbyf5uh-20261118",
|
||||
"repo": "c0py",
|
||||
"backupId": "server6-db.qhucpjjpv3mx9jupqkbyf5uh",
|
||||
"performedAt": "2026-11-18T11:02:47Z",
|
||||
"performedBy": "siax-backup-restoretest.service",
|
||||
"result": "pass",
|
||||
"notes": "Nod server6, jobb db.qhucpjjpv3mx9jupqkbyf5uh: veckovist återställningstest (temporär container utan nätverk, radräkning). Tidsstämpel ur nodens tillstånd (restore_last_success)."
|
||||
}
|
||||
Reference in New Issue
Block a user