Security: Scope CI credentials to least privilege #92

Open
opened 2026-12-04 18:16:40 +01:00 by claude-bot · 0 comments

Why

CI jobs hold the most powerful credentials in the homelab: Proxmox API tokens for pve1 to pve3, pfSense access, the Pulumi passphrase and the backend URL. They're in the job environment because deploys need them, so whatever runner design we pick, a compromised job (e.g. a malicious npm package during pulumi up) can read them. Limiting what those credentials can do is the most effective protection we have, since Proxmox and pfSense don't support short-lived credentials.

Split out of #64. Related: #82 (runner VM and its egress firewall).

Enterprise practice: least-privilege service accounts per pipeline, no admin credentials in CI, pinned dependencies.

Steps

Proxmox

  • Dedicated Proxmox user for Pulumi, with API tokens that have privilege separation turned on, in place of the current tokens
  • Least-privilege role on the pools and storage Pulumi manages (e.g. PVEVMAdmin + PVEDatastoreUser + PVESDNUser where needed). No root@pam, no Administrator. Check whether any resource still needs root@pam and document the exception
  • Update the *_PULUMI_DEV_YAML secrets with the new tokens, check preview and deploy for 01 and 02, then revoke the old tokens

pfSense

  • Check which pfSense API access 01 needs (DHCP static mappings, HAProxy, ...) and give the Pulumi user only those privileges

Workflows

  • Pin third-party actions (pulumi/actions, actions/checkout, actions/setup-node, azure/setup-helm, ...) to commit SHAs. Coordinate with Roadmap 1.3 (Renovate with digest pinning) so they get updated

Docs

  • Runbook in docs/runbooks/ for rebuilding or re-registering the runner and rotating the Proxmox and pfSense tokens

Tools

Proxmox VE permissions, pfSense user manager, Gitea Actions.

Done when

  • The old Proxmox tokens are revoked; the new ones can't do anything outside the Pulumi-managed pools and storage (check with a call that should fail, e.g. reading another pool's VM)
  • Preview and deploy pass for 01 to 05 with the new credentials
  • No workflow references a third-party action by tag only
## Why CI jobs hold the most powerful credentials in the homelab: Proxmox API tokens for pve1 to pve3, pfSense access, the Pulumi passphrase and the backend URL. They're in the job environment because deploys need them, so whatever runner design we pick, a compromised job (e.g. a malicious npm package during `pulumi up`) can read them. Limiting what those credentials can do is the most effective protection we have, since Proxmox and pfSense don't support short-lived credentials. Split out of #64. Related: #82 (runner VM and its egress firewall). **Enterprise practice:** least-privilege service accounts per pipeline, no admin credentials in CI, pinned dependencies. ## Steps ### Proxmox - [ ] Dedicated Proxmox user for Pulumi, with API tokens that have **privilege separation** turned on, in place of the current tokens - [ ] Least-privilege role on the pools and storage Pulumi manages (e.g. `PVEVMAdmin` + `PVEDatastoreUser` + `PVESDNUser` where needed). No `root@pam`, no `Administrator`. Check whether any resource still needs `root@pam` and document the exception - [ ] Update the `*_PULUMI_DEV_YAML` secrets with the new tokens, check preview and deploy for `01` and `02`, then revoke the old tokens ### pfSense - [ ] Check which pfSense API access `01` needs (DHCP static mappings, HAProxy, ...) and give the Pulumi user only those privileges ### Workflows - [ ] Pin third-party actions (`pulumi/actions`, `actions/checkout`, `actions/setup-node`, `azure/setup-helm`, ...) to commit SHAs. Coordinate with Roadmap 1.3 (Renovate with digest pinning) so they get updated ### Docs - [ ] Runbook in `docs/runbooks/` for rebuilding or re-registering the runner and rotating the Proxmox and pfSense tokens ## Tools Proxmox VE permissions, pfSense user manager, Gitea Actions. ## Done when - The old Proxmox tokens are revoked; the new ones can't do anything outside the Pulumi-managed pools and storage (check with a call that should fail, e.g. reading another pool's VM) - Preview and deploy pass for `01` to `05` with the new credentials - No workflow references a third-party action by tag only
claude-bot Bot added the Kind/Security label 2026-12-04 18:16:40 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kasun/homelab-infrastructure-as-code#92