In a side-chain and main-chain combination, the security of main-chain is not affected by any kind of hacking or malicious act in the side-chain. If the side-chain networks fails in terms of security and some undesirable player get access to the network of side-chain, then it will not affect the main-chain.
On the reverse side, if the main-chain's security is compromised then also it is not going to affect the side-chain's security. But as the economy of side-chain is interconnected with the native token(main-chain) of the entire ecosystem, the value of the side-chain token may loose value. If as a result of security breach of main-chain the coin value decreases, then the token of side-chain will also loose its value. That is because in general there is a reserve ratio between side-chain token and the native token.