Modeling And Mitigating Side Channels In Optical And Embedded Sensing Systems