A friend (1st year PhD student) is facing some technical issues with writing a code (Computer science) that she finds difficult. The supervisor does not want her to get any help from lab members. Should I, as a postdoc, help her "secretly" code her programs?
Actually no, unless the supervisor gives you permission to do so, in which case it isn't secret. You can point her to resources she might need, but if the supervisor thinks she needs coding experience then your "help" is actually not help at all.
You could ask the supervisor whether they would agree to your offering general help such as coding instruction and what the limits of that should be.
You also put yourself at risk if it is found out.
No. You'd be engaging in an academic violation. Submitting work that's not your own but representing it as entirely your own is called plagiarism or, perhaps in this case, cheating. You'd be helping and encouraging her to do that. Helping someone commit an academic violation is also considered a chargeable violation at most schools.