Pervasive health applications that compose longitudinal information streams to infer people's health and encourage lifestyle changes have the potential to substantially benefit public health. Off-the-shelf medical and wellness sensors meet the sensing requirements of such applications but their closed and vertically-integrated designs impede composability and complicate unified management. Furthermore, the lack of security and privacy controls discourages individuals from sharing their data. This paper presents HealthOS, a development and execution framework for pervasive health applications. HealthOS addresses the sensor and system incompatibility challenge through a set of adapters. Moreover, pipeline modules translate custom formats and protocols to the requirements of target applications/systems. These modules execute in HealthOS servers, programmable devices that expose Representational State Transfer (REST) interfaces for data retrieval and sensor management. HealthOS servers can store data locally or push them to untrusted, third party services. Finally, HealthOS leverages attribute-based encryption to offer sophisticated role-based and content-based access controls for users' data.