Author SHA1 Message Date
Sbhayana 39634fc404 Dockerfile: keep zlib1g comment together (refs #22)
continuous-integration/jenkins Jenkins: all gates passed
2026-11-30 20:53:27 +00:00
Sbhayana bb395aed23 Pricing image: fix libzstd1 CVE-2026-124851; dated exceptions for OpenSSL QUIC CVEs (refs #22) 2026-11-30 20:52:37 +00:00
Sbhayana fca706c9bb Add Zammad support desk config and support.ssw590 HTTPS probe (closes #22)
continuous-integration/jenkins Jenkins: a gate failed or approval was not given
2026-11-30 20:19:11 +00:00
Sbhayana e0c02eefe3 Merge pull request 'Revert "Failure drill: bind Gunicorn to 8001 in staging only, healthcheck still probes 8000 (refs #16)"' (#21) from drill/restore-staging into main
continuous-integration/jenkins Jenkins: all gates passed
Reviewed-on: #21
2026-11-12 21:11:33 +00:00
Sbhayana 5c663fe237 Revert "Failure drill: bind Gunicorn to 8001 in staging only, healthcheck still probes 8000 (refs #16)"
continuous-integration/jenkins Jenkins: all gates passed
This reverts commit c81879f4f2.
2026-11-12 16:09:32 -05:00
Sbhayana 3c56d87896 Merge pull request 'Failure drill: bind Gunicorn to 8001 in staging only, healthcheck still probes 8000 (refs #16)' (#20) from drill/staging-bad-port into main
continuous-integration/jenkins Jenkins: a gate failed or approval was not given
Reviewed-on: #20
2026-11-12 21:04:57 +00:00
Sbhayana c81879f4f2 Failure drill: bind Gunicorn to 8001 in staging only, healthcheck still probes 8000 (refs #16)
continuous-integration/jenkins Jenkins: all gates passed
2026-11-12 15:58:36 -05:00
Sbhayana 2c76722b04 Merge pull request 'Immutable releases: fix v1 record after tag overwrite, add v2 records (refs #16)' (#19) from fix/immutable-releases into main
continuous-integration/jenkins Jenkins: all gates passed
Reviewed-on: #19
2026-11-12 20:51:36 +00:00
Sbhayana c83174f2c2 Point v1 records at surviving v1 digest, add v2 records, refuse to overwrite published tags (refs #16)
continuous-integration/jenkins Jenkins: all gates passed
2026-11-12 15:46:04 -05:00
Sbhayana 0465bde401 Merge pull request 'Pricing service v2 and v1 release records (refs #16)' (#18) from feature/pricing-v2 into main
continuous-integration/jenkins Jenkins: a gate failed or approval was not given
Reviewed-on: #18
2026-11-12 19:29:37 +00:00
Sbhayana c815e53fc2 Release v2: unit price USD 12, starter v2 source and tests (refs #16)
continuous-integration/jenkins Jenkins: all gates passed
2026-11-12 14:16:51 -05:00
Sbhayana 615fcb396a Record v1 release (Jenkins #7, digest 3c0d12eb) for staging and production (refs #16) 2026-11-12 14:16:51 -05:00
Sbhayana d4c012560d Merge pull request 'Pricing service v1 with secure delivery pipeline (refs #16)' (#17) from feature/pricing-delivery into main
continuous-integration/jenkins Jenkins: a gate failed or approval was not given
Reviewed-on: #17
2026-11-12 18:35:15 +00:00
15 changed files with 813 additions and 571 deletions
File diff suppressed because it is too large Load Diff
+2
View File
@@ -14,6 +14,8 @@ scrape_configs:
- targets:
- https://git.ssw590.abrdns.com/user/login
- https://ci.ssw590.abrdns.com/login
- https://app.ssw590.abrdns.com/health
- https://support.ssw590.abrdns.com/
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
+5
View File
@@ -160,6 +160,11 @@ pipeline {
set -o pipefail
export DOCKER_CONFIG="$WORKSPACE/.docker-publish"
printf '%s' "$REG_TOKEN" | docker login "$REGISTRY" -u "$REG_USER" --password-stdin
# Releases are immutable: never overwrite an existing tag (see Chapter 6, rollback incident).
if docker manifest inspect "$IMAGE:$COMMIT" >/dev/null 2>&1; then
echo "ERROR: $IMAGE:$COMMIT is already published; releases are immutable. Use MODE=redeploy with the committed record." >&2
docker logout "$REGISTRY"; exit 1
fi
docker push "$IMAGE:$COMMIT" 2>&1 | tee reports/docker-push.log
docker rmi "$IMAGE:$COMMIT"
docker pull "$IMAGE:$COMMIT" 2>&1 | tee reports/docker-pull.log
+2 -1
View File
@@ -4,8 +4,9 @@
FROM python:3.13-slim@sha256:e48f59cdba69a3cbd9ed2cf0f348d90d45a8d350d98134cf1070bc106ee9ed90
# Security fix (Trivy, 2026-11-12): zlib1g fixed in the Debian 13 point update
# (CVE-2026-76844, CVE-2026-85091). Exact version, so the build stays reproducible.
# Security fix (Trivy, 2026-11-30, Jenkins #20): libzstd1 CVE-2026-124851 fixed in 1.5.7+dfsg-1+deb13u1
RUN apt-get update \
&& apt-get install -y --no-install-recommends --only-upgrade 'zlib1g=1:1.3.dfsg+really1.3.1-1+deb13u1' \
&& apt-get install -y --no-install-recommends --only-upgrade 'zlib1g=1:1.3.dfsg+really1.3.1-1+deb13u1' 'libzstd1=1.5.7+dfsg-1+deb13u1' \
&& rm -rf /var/lib/apt/lists/*
ARG APP_COMMIT=development
ENV APP_COMMIT=$APP_COMMIT PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
+2 -2
View File
@@ -2,8 +2,8 @@ import os
from flask import Flask, jsonify, request
app = Flask(__name__)
VERSION = "v1"
UNIT_PRICE = 10
VERSION = "v2"
UNIT_PRICE = 12
COMMIT = os.environ.get("APP_COMMIT", "development")
+3 -3
View File
@@ -7,17 +7,17 @@ class PricingTests(unittest.TestCase):
self.client = app.test_client()
def test_price(self):
self.assertEqual(total_price(3), 30)
self.assertEqual(total_price(3), 36)
response = self.client.get("/price?quantity=3")
self.assertEqual(response.status_code, 200)
self.assertEqual(response.json["total"], 30)
self.assertEqual(response.json["total"], 36)
def test_invalid_quantity(self):
for value in ["0", "-1", "1001", "abc", "1.5"]:
self.assertEqual(self.client.get("/price?quantity=" + value).status_code, 400)
def test_release_identity(self):
self.assertEqual(self.client.get("/").json["version"], "v1")
self.assertEqual(self.client.get("/").json["version"], "v2")
self.assertEqual(self.client.get("/health").json["status"], "ok")
+14
View File
@@ -0,0 +1,14 @@
# Release record: v1 production. Metadata only; no credentials.
# Corrected 2026-11-12: the original v1 image (sha256:3c0d12eb..., Jenkins #7) was overwritten in
# the registry when Jenkins #10 rebuilt the same commit and re-pushed the same tag. This digest is
# that rebuild of the same reviewed source commit; it passed every gate and the staging smoke test in #10.
target_env: production
release_image: git.ssw590.abrdns.com/startupteam/pricing@sha256:d4d894df4634b088e6d52cbae2128510a05d0e4e1d972f4d64ba959423c07c97
expected_version: v1
expected_commit: d4c012560d5096f399224d5b5f6516a5cb2158a4
expected_total: 30
public_url: https://app.ssw590.abrdns.com
proxy_network: startup_private
config_commit: d4c012560d5096f399224d5b5f6516a5cb2158a4
jenkins_build: https://ci.ssw590.abrdns.com/job/pricing-delivery/10/
recorded_at: 2026-11-12, see Jenkins #10
+14
View File
@@ -0,0 +1,14 @@
# Release record: v1 staging. Metadata only; no credentials.
# Corrected 2026-11-12: the original v1 image (sha256:3c0d12eb..., Jenkins #7) was overwritten in
# the registry when Jenkins #10 rebuilt the same commit and re-pushed the same tag. This digest is
# that rebuild of the same reviewed source commit; it passed every gate and the staging smoke test in #10.
target_env: staging
release_image: git.ssw590.abrdns.com/startupteam/pricing@sha256:d4d894df4634b088e6d52cbae2128510a05d0e4e1d972f4d64ba959423c07c97
expected_version: v1
expected_commit: d4c012560d5096f399224d5b5f6516a5cb2158a4
expected_total: 30
public_url: https://staging.ssw590.abrdns.com
proxy_network: startup_private
config_commit: d4c012560d5096f399224d5b5f6516a5cb2158a4
jenkins_build: https://ci.ssw590.abrdns.com/job/pricing-delivery/10/
recorded_at: 2026-11-12, see Jenkins #10
+11
View File
@@ -0,0 +1,11 @@
# Release record: v2 production. Metadata only; no credentials.
target_env: production
release_image: git.ssw590.abrdns.com/startupteam/pricing@sha256:adf58a4abcb03be98cce394d5fde1794ae77525d2e1882a8be3c59c8c3556d92
expected_version: v2
expected_commit: 0465bde4017a3d1f9e3b523dcdc065154789cad7
expected_total: 36
public_url: https://app.ssw590.abrdns.com
proxy_network: startup_private
config_commit: 0465bde4017a3d1f9e3b523dcdc065154789cad7
jenkins_build: https://ci.ssw590.abrdns.com/job/pricing-delivery/11/
recorded_at: 2026-11-12, see Jenkins #11
+11
View File
@@ -0,0 +1,11 @@
# Release record: v2 staging. Metadata only; no credentials.
target_env: staging
release_image: git.ssw590.abrdns.com/startupteam/pricing@sha256:adf58a4abcb03be98cce394d5fde1794ae77525d2e1882a8be3c59c8c3556d92
expected_version: v2
expected_commit: 0465bde4017a3d1f9e3b523dcdc065154789cad7
expected_total: 36
public_url: https://staging.ssw590.abrdns.com
proxy_network: startup_private
config_commit: 0465bde4017a3d1f9e3b523dcdc065154789cad7
jenkins_build: https://ci.ssw590.abrdns.com/job/pricing-delivery/11/
recorded_at: 2026-11-12, see Jenkins #11
+10
View File
@@ -44,3 +44,13 @@ vulnerabilities:
- id: CVE-2026-9538
statement: "perl Archive::Tar DoS (perl-base); Debian status fix_deferred; perl not used by the service"
expired_at: 2026-12-15
# Triage: SB, 2026-11-30, from Jenkins pricing-delivery #20 (branch feature/zammad-support), Trivy 0.69.3.
# OpenSSL (libssl3t64, openssl, openssl-provider-legacy): QUIC-only denial-of-service bugs.
# Debian status fix_deferred (no fixed version). The service speaks plain HTTP/1.1 (gunicorn)
# on a private network behind Caddy and never opens a QUIC connection.
- id: CVE-2026-107494
statement: "OpenSSL QUIC unbounded frame queueing DoS; Debian fix_deferred, no fix; service does not use QUIC"
expired_at: 2026-12-15
- id: CVE-2026-124709
statement: "OpenSSL QUIC stream memory leak DoS; Debian fix_deferred, no fix; service does not use QUIC"
expired_at: 2026-12-15
+3
View File
@@ -0,0 +1,3 @@
support.ssw590.abrdns.com {
reverse_proxy zammad-nginx:8080
}
+28
View File
@@ -0,0 +1,28 @@
# Zammad support desk (Chapter 7)
Upstream: https://github.com/zammad/zammad-docker-compose at commit 67141451b6239190f7a616231bff20b8b0ccbd8a (detached).
Droplet path: /root/dos-support/zammad-docker-compose (Compose project `dos-support`).
Images: ghcr.io/zammad/zammad:7.3.0-0011, elasticsearch:9.5.7, postgres:17.12-alpine, redis:8.12-alpine, memcached:1.6.45-alpine.
Scenario: scenarios/add-external-network-to-nginx.yml; only zammad-nginx joins `startup_private`; no host ports published.
URL: https://support.ssw590.abrdns.com (Caddy route in Caddyfile.support; TLS by Caddy/Let's Encrypt).
## Files here
- env.example: the real .env with passwords replaced (real file: mode 600 on the droplet, never committed)
- Caddyfile.support: block appended to /opt/startup/Caddyfile
- sysctl-99-zammad.conf: /etc/sysctl.d/99-zammad.conf (Elasticsearch prerequisite)
## Operate (run in /root/dos-support/zammad-docker-compose)
- status: docker compose ps -a
- start / stop: docker compose up -d / docker compose stop
- restart web only: docker compose restart zammad-nginx
- NEVER: docker compose down -v (deletes the named volumes)
## Data and backups
Volumes: dos-support_postgresql-data, dos-support_elasticsearch-data, dos-support_redis-data, dos-support_zammad-storage, dos-support_zammad-backup.
zammad-backup writes <timestamp>_zammad_db.psql.gz and <timestamp>_zammad_files.tar.gz to the zammad-backup volume daily (BACKUP_TIME 03:00 container time, HOLD_DAYS 10).
One-off backup: docker compose run --rm --env BACKUP_ONCE=true zammad-backup
Restore: follow the Zammad "Backup & Restore (Docker)" guide for this release (copy the .gz files to /var/tmp/zammad/restore, start the stack, rebuild the search index). Backups stay on the droplet; they are not off-site.
## Monitoring
https://support.ssw590.abrdns.com/ is a target of the existing `https` blackbox job (monitoring/prometheus/prometheus.yml); panels 8-10 in monitoring/grafana/dashboards/ssw590-ops.json.
Tracking: issue #22, Zammad ticket #78003.
+15
View File
@@ -0,0 +1,15 @@
COMPOSE_PROJECT_NAME=dos-support
COMPOSE_FILE=docker-compose.yml:scenarios/add-external-network-to-nginx.yml
ZAMMAD_NGINX_EXTERNAL_NETWORK=startup_private
ZAMMAD_FQDN=support.ssw590.abrdns.com
ZAMMAD_HTTP_TYPE=https
NGINX_SERVER_SCHEME=https
RAILS_TRUSTED_PROXIES=172.18.0.6
VERSION=7.3.0-0011
ELASTICSEARCH_VERSION=9.5.7
MEMCACHE_VERSION=1.6.45-alpine
REDIS_VERSION=8.12-alpine
POSTGRES_VERSION=17.12-alpine
POSTGRES_PASS=CHANGE_ME_openssl_rand_hex_24
POSTGRES_SUPERUSER_PASS=CHANGE_ME_openssl_rand_hex_24
ELASTICSEARCH_PASS=CHANGE_ME_openssl_rand_hex_24
+1
View File
@@ -0,0 +1 @@
vm.max_map_count=262144