Skip to content

feat(misc/hard): address security PR misc hard - #1443

Merged
leninmehedy merged 3 commits into
mainfrom
feat/1283-hard-misc
Oct 27, 2026
Merged

leninmehedy merged 3 commits into
mainfrom
feat/1283-hard-misc

Conversation

@arturre

@arturre arturre commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

Description

  • Private-key file modes (HARD-1): Secret-backed private-key volumes (keys projected volume, grpc-tls-key) now mount with mode 0440 instead of 0644. ConfigMap volumes and grpc-tls-cert stay at 0644. To keep the keys readable by the non-root node user (uid/gid 2000), the pod now gets fsGroup: 2000 whenever Secret-backed keys are mounted. Previously fsGroup was set only when a Cheetah uploader was enabled. fsGroupChangePolicy: OnRootMismatch avoids re-chowning large PVCs on every start. A user-set fsGroup is preserved.
  • Node Role least privilege (HARD-2): Removed the namespace-wide get/list/watch on secrets and configmaps from the ConsensusCapsule Role. Nothing in the node pod reads them through the API. Keys and config arrive through volumes, and the UC's RBAC probe only checks the operator's config resources. Existing Roles are updated in place on the next reconcile.
  • Image reference validation (HARD-3):
    • EnvoyProxy.spec.image and HAProxyCapsule.spec.image now require a tag or @sha256: digest and reject latest, enforced by CEL rules plus maxLength: 512.
    • The ImageRegistrySpec.image pattern on the NetworkUpgrade* CRDs now requires a tag or digest; a bare repository is rejected.
    • The Orbit's existing opt-in requireDigestOnDeploy now also applies to EnvoyProxy and HAProxyCapsule. An image without a digest fails the reconcile with a terminal ImageDigestRequired error and is not requeued.
  • Beacon upgrade-file integrity (HARD-4): beacon file upload without --expect-hash or --expect-hash-file now logs an UnverifiedPackage warning with the package's SHA-384, asking the operator to confirm it against the release before freeze prepare.
  • hostPath volumes (HARD-5): The spec.secrets.hostPath and spec.configFolder mounts are now read-only. Both fields are documented as legacy (prefer secretResources and the config CR refs), and each reconcile logs a HostPathVolume warning when either is used.
  • Base image pinning (HARD-6): All FROM lines in Dockerfile, Dockerfile.beacon and Dockerfile.uc are pinned by multi-arch @sha256: digest (debian:bookworm-slim, distroless/static-debian13:nonroot). The weekly grouped Dependabot docker update keeps the digests current.

Related Issues

@arturre
arturre requested review from a team as code owners October 26, 2026 21:39
@arturre
arturre requested a review from crypto-pablo October 26, 2026 21:39
@arturre
arturre added this pull request to stack #1445 October 26, 2026 22:08
Comment thread api/v1alpha1/consensuscapsule_types.go Outdated
Signed-off-by: Artur Reznikov <artur.reznikov@swirldslabs.com>
Signed-off-by: Artur Reznikov <artur.reznikov@swirldslabs.com>
Signed-off-by: Artur Reznikov <artur.reznikov@swirldslabs.com>
@arturre
arturre force-pushed the feat/1283-hard-misc branch from c5f59e6 to 2fe2955 Compare October 27, 2026 18:29
@leninmehedy
leninmehedy merged commit 6e69844 into main Oct 27, 2026
16 of 17 checks passed
@leninmehedy
leninmehedy deleted the feat/1283-hard-misc branch October 27, 2026 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HARDENING LowMedium misc issues based on Security Report

2 participants