What happened?
optiqor analyze can miss host namespace findings when hostNetwork, hostPID, or hostIPC are nested under a security-context-style values map.
Expected: nested host namespace fields should populate parser.Workload.Security so the existing host-network, host-pid, and host-ipc detectors can fire.
Actual: the parser only reads these fields from the workload-level mapping, so nested values are silently ignored.
Reproduction steps
1. Create a values file containing the YAML fragment below.
2. Run `optiqor analyze ./values.yaml --detector host-pid --detector host-ipc --detector host-network`.
3. Notice no host namespace findings are emitted, even though the workload sets host namespace flags under `podSecurityContext`.
optiqor-cli version
2e997fc
Install method
Built from source
OS and arch
macOS 15.7.7 / arm64
Relevant output
No `host-network`, `host-pid`, or `host-ipc` findings are emitted for the nested values shape.
Minimal chart fragment (if applicable)
agent:
resources:
requests:
cpu: 50m
podSecurityContext:
hostNetwork: true
hostPID: true
hostIPC: true
Additional context
This appears to be in pkg/parser/helm.go.
readSecurity reads hostNetwork, hostPID, and hostIPC from the workload-level map. Nested securityContext, podSecurityContext, and containerSecurityContext maps are handled by applySecFields, but that helper does not currently copy the host namespace fields.
The detectors themselves already behave correctly when parser.Workload.Security.HostNetwork, HostPID, or HostIPC are populated, so this looks like a parser false negative.
What happened?
optiqor analyzecan miss host namespace findings whenhostNetwork,hostPID, orhostIPCare nested under a security-context-style values map.Expected: nested host namespace fields should populate
parser.Workload.Securityso the existinghost-network,host-pid, andhost-ipcdetectors can fire.Actual: the parser only reads these fields from the workload-level mapping, so nested values are silently ignored.
Reproduction steps
optiqor-cli version
2e997fc
Install method
Built from source
OS and arch
macOS 15.7.7 / arm64
Relevant output
Minimal chart fragment (if applicable)
Additional context
This appears to be in
pkg/parser/helm.go.readSecurityreadshostNetwork,hostPID, andhostIPCfrom the workload-level map. NestedsecurityContext,podSecurityContext, andcontainerSecurityContextmaps are handled byapplySecFields, but that helper does not currently copy the host namespace fields.The detectors themselves already behave correctly when
parser.Workload.Security.HostNetwork,HostPID, orHostIPCare populated, so this looks like a parser false negative.