CB-633 follow-up: union memberCredentials.allow into the derived env allow-list #179
Reference in New Issue
Block a user
Delete Branch "worker/cb633-allowlist-union-90fa4d-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the CB-633 follow-up defect:
MemberEnvAllowList.deriveonly looked at profile fields (INFRASTRUCTURE_PASSTHROUGH, gitTokenEnv/gitHostEnv/tokenEnv/env), somemberCredentials.allow:was silently ignored underpolicy: allow-list. Turning the policy on would have blanked credentials an operator explicitly allow-listed.Changes
MemberEnvAllowList.derive(profiles, configuredAllow): new overload that unionsmemberCredentials.allow:names into the derived set.SSH_AUTH_SOCKis explicitly excluded from that union with a comment explaining why (it is a live ssh-agent handle, not a value, so it stays governed only bysshAuthSock: allow).HerdrPeerLauncher.applyEnvironmentAllowListPolicynow threadscreds.allowSet()into the derivation via a newderivedAllowedNames(creds, launch)helper, instead of calling the profiles-onlyderiveoverload.logAllowListCoverage: one INFO line per allow-list spawn,member credentials: allowed N of M(N/M computed from the existinghostEnvNamesproxy for the daemon's own environment). Never logs a blocked variable NAME or a VALUE.Tests
MemberEnvAllowListTest: a name that appears only inmemberCredentials.allow:survives derivation;SSH_AUTH_SOCKis excluded from that union even when listed inallow:.HerdrPeerLauncherAllowListWiringTest(the real launcher spawn path, viaHerdrPeerLauncher#spawn— not a direct call toMemberEnvAllowList.derive):allow:-only name reaches the generated scrub script;SSH_AUTH_SOCKstays out of the generated scrub even when listed inallow:(sshAuthSock unset);member credentials: allowed N of Mlog line is asserted with real, non-constant N/M against a real spawn.mvn clean install: BUILD SUCCESS,Tests run: 975, Failures: 0, Errors: 0, Skipped: 0.Ref: CB-633 follow-up ticket.