This release includes 5 security fixes for security teams reviewing exposed deployments.
Published 3mo
Dashboards & Visualization
✓ No known CVEs patched
This release patches 5 known CVEs
Topics
carbon-emissions
carbon-footprint
cloud
co2
cost-optimization
devops
+12 more
fastapi
finops
grafana
green-computing
green-software
greenops
helm
kubernetes
prometheus
python
sustainability
svelte
Affected surfaces
auth
rbac
crypto_tls
Summary
AI summaryUpdates KSV-0041, informational, and CI across a mixed release.
Full changelog
What's Changed
Security
- Dockerfile hardening: Base image for the frontend build stage upgraded from
node:20-alpinetonode:22-alpine. Both the builder and final runtime stages now runapt-get upgradeat build time to patch known OS CVEs (libssl3, zlib1g, ncurses, libc). The final image user (greenkube, UID/GID 10001) is created with an explicitgroupadd/useraddand/sbin/nologinshell. - Helm deployment securityContext: Full pod-level and per-container security hardening on both the collector and API containers —
runAsNonRoot: true,runAsUser/Group: 10001,allowPrivilegeEscalation: false,readOnlyRootFilesystem: true,capabilities.drop: [ALL], andseccompProfile.type: RuntimeDefault./tmpdirectories served byemptyDirvolumes (64 MiB each) to satisfy Python's runtime tmp needs under a read-only root. - Helm PostgreSQL securityContext: Pod and container security hardening on the PostgreSQL StatefulSet —
runAsUser/Group: 70(upstream requirement),readOnlyRootFilesystem: true,capabilities.drop: [ALL],seccompProfile.type: RuntimeDefault./var/run/postgresqland/tmpmounted asemptyDirvolumes. PostgreSQL upgraded from17-alpineto18-alpinefor longer upstream lifecycle. - PostgreSQL scram-sha-256:
POSTGRES_INITDB_ARGSset to--auth-host=scram-sha-256 --auth-local=scram-sha-256— replaces the default md5 password hashing with the stronger SCRAM-SHA-256 protocol. Liveness and readiness probes added viapg_isready. - ClusterRole secrets removal: Removed
secretsfrom the ClusterRole resource list, eliminating the critical RBAC over-permission (KSV-0041) that allowed the service account to read cluster-wide secrets. - API security headers: New
SecurityHeadersMiddleware(StarletteBaseHTTPMiddleware) added to the FastAPI app, injecting seven OWASP-recommended headers on every response:X-Content-Type-Options,X-Frame-Options,X-XSS-Protection,Referrer-Policy,Permissions-Policy,Cache-Control, and a strictContent-Security-Policy. CORS is now restricted toGET,POST,OPTIONSmethods andAuthorization/Content-Typeheaders (previously wildcard). - Automated vulnerability scanning (CI): New
.github/workflows/security.ymlworkflow running on every push/PR tomain/devand weekly (Monday 06:00 UTC) — five jobs: Trivy image scan for the GreenKube image (exit 1 on CRITICAL/HIGH), Trivy image scan for PostgreSQL (informational), Trivy IaC config scan for Dockerfile + Helm chart, Trivy filesystem scan for Python dependencies, andnpm auditfor the frontend. SARIF results uploaded to GitHub Security. .trivyignore: Documents eight upstream-unfixable CVEs (gosu/Go-stdlib CVEs in the Alpine postgres image, one OpenSSL CMS CVE, and one zlib utility CVE) with justifications and a quarterly review date.
Added
- Helm
secrets.existingSecret: Newsecrets.existingSecretvalue allows passing the name of a pre-created Kubernetes Secret instead of letting the chart manage one. When set, the chart skips Secret creation entirely and allsecrets.*inline values are ignored — recommended for production to avoid storing credentials invalues.yaml. - SQLite SCD2 node snapshots:
SQLiteNodeRepositorynow implements a Slowly Changing Dimensions Type 2 pattern to deduplicate node records across collection cycles. A separatenode_snapshots_scdtable stores only rows where tracked columns (instance_type,vcpu,memory_gb,region,provider,zone) actually changed, avoiding write amplification on stable clusters. Migration0003creates this table and the associated indexes. - Recommendation
scopecolumn:recommendation_historytable now includes ascopeTEXT column (values:pod,namespace,node) to allow filtering recommendations by granularity.pod_nameandnamespacecolumns are nullable for node-scope and cluster-scope recommendations. Applied in migration0003for both PostgreSQL and SQLite. - Configurable PostgreSQL connection pool: New
DB_POOL_MIN_SIZE(default:2) andDB_POOL_MAX_SIZE(default:10) environment variables controlasyncpg's connection pool bounds. Exposed asdb.poolMinSize/db.poolMaxSizeinhelm-chart/values.yamland propagated viaconfigmap.yaml. - Configurable statement timeout: New
DB_STATEMENT_TIMEOUT_MSenvironment variable (default:30000ms) sets a per-statement timeout on the PostgreSQL connection pool viaserver_settings. Exposed asdb.statementTimeoutMsinhelm-chart/values.yaml. - Database migration indexes (0003): Compound indexes added on
combined_metrics(namespace, timestamp),namespace_cache(last_seen), andcarbon_intensity_history(datetime)to accelerate the most frequent query patterns. - Artifact Hub listing:
helm-chart/Chart.yamlenriched with full Artifact Hub annotations —artifacthub.io/category,artifacthub.io/screenshots(6 screenshots),artifacthub.io/links,artifacthub.io/recommendations,artifacthub.io/changes,artifacthub.io/images(linux/amd64 + linux/arm64),artifacthub.io/maintainers, andartifacthub.io/readme(fixes "no README" on the listing page). Chart now includeskeywords,home,sources, andmaintainersfields for richer search indexing. artifacthub-repo.yml: Artifact Hub repository metadata file withrepositoryIDfor Verified Publisher badge. Automatically copied togh-pagesby the release workflow alongsideindex.yaml.llms.txt(greenkube-website/public/): LLM/AI crawler guidance file following the llms.txt convention — enables AI assistants (Claude, ChatGPT, Perplexity) to understand GreenKube when crawling the website.- New dashboard screenshots:
assets/demo-report.pngandassets/demo-settings.pngadded to README,Chart.yamlArtifact Hub screenshots, andllms.txt. scripts/pg_upgrade_17_to_18.sh: New maintenance script to upgrade an existing PostgreSQL 17 data directory to version 18 in-place using a Kubernetes Job andpg_upgrade --link, preserving all data with an automatic backup.
Fixed
- Aggregate queries from both raw and hourly tables:
aggregate_summaryandaggregate_timeseriesnow correctly query both the rawcombined_metricstable and the pre-aggregatedhourly_metricstable, ensuring historical reports cover the full retention window without gaps at the boundary between live and archived data. - Infinite aggregated retention by default:
METRICS_AGGREGATED_RETENTION_DAYSnow defaults to-1(infinite retention), preserving all historical data by default. This is the correct default for CSRD/ESRS E1 compliance, which requires multi-year reporting. Set an explicit positive integer to enforce a rolling window. - Trivy KSV-0014 on
init-pgrun-perms: AddedreadOnlyRootFilesystem: trueto the PostgreSQL init container's securityContext, resolving the HIGH misconfiguration finding. - Frontend npm audit (HIGH): Updated
svelte,vite,rollup,picomatch,devalue, and@sveltejs/kitto their latest compatible versions, resolving all HIGH-severity advisories. - CI Trivy image scan: Split the GreenKube image scan into a
table-format step (exit-code 1, visible in log) and a separatesarifstep (exit-code 0, uploaded to GitHub Security tab). Addedpull: trueto the Docker build step so the base image layers are always pulled fresh from the registry, preventing stale GHA cache from hiding unfixed CVEs.
Changed
artifacthub-repo.yml: Ownernameandemailcorrected to match the actual GitHub account (Hugo Lelievre/[email protected]).- Storage layer refactoring: The
src/greenkube/storage/package is split into three sub-packages —storage/postgres/,storage/sqlite/, andstorage/elastic/— each with its own__init__.py. All cross-package imports updated. Test suite reorganized to mirror the new structure with dedicatedtests/core/,tests/grafana/, andtests/helm/directories. pyproject.toml: Added 20 SEO keywords, 5 new PyPI classifiers, and 4 additional project URLs (Documentation, Changelog, Docker Hub, Repository).release.yml: Release workflow now copiesartifacthub-repo.ymltogh-pageson every release so Artifact Hub always picks up the latest metadata.scripts/sync_version.py:update_helm_chart_yaml()now also keeps theartifacthub.io/imagesannotation in sync with the new version on each release.
Docker: docker pull greenkube/greenkube:0.2.8
Helm:
helm repo add greenkube https://GreenKubeCloud.github.io/GreenKube
helm repo update
helm install greenkube greenkube/greenkube -n greenkube --create-namespace
Breaking Changes
- Removed `secrets` from ClusterRole resource list, eliminating KSV-0041 over‑permission.
Security Fixes
- Removed cluster‑wide secret read permission (KSV-0041).
- Dockerfile base image updated from node:20‑alpine to node:22‑alpine with `apt-get upgrade` for OS CVEs.
- Helm pod and container securityContext hardened with runAsNonRoot, readOnlyRootFilesystem, dropped capabilities, seccompProfile.RuntimeDefault.
- PostgreSQL StatefulSet secured with runAsUser/Group 70, readOnlyRootFilesystem, capability drops, seccompProfile.RuntimeDefault, and auth‑host/scram‑sha‑256.
- Added SecurityHeadersMiddleware injecting OWASP headers (X-Content-Type-Options, X-Frame-Options, X-XSS-Protection, Referrer-Policy, Permissions-Policy, Cache-Control, strict CSP) and restricted CORS.
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About GreenKube
All releases →Beta — feedback welcome: [email protected]