Idioms use language metaphorically rather than literally. If you are a ‘dark horse', it means you have a mysterious or unknown past (the metaphorical meaning) not that you are a horse with dark coloured skin (the literal meaning).
Idioms are also fixed groups of words so you can't change the wording of an idiom. For example, you can say ‘He let the cat out of the bag' to say that someone revealed a secret, but you can't say ‘He let the cat out of the suitcase'.
Here are some idioms related to keeping secrets.
When someone has a secret:
To be a dark horse: This means that someone has a mysterious past or hidden talent. It comes from horse racing, when a successful horse was disguised by changing its colour. 黑马(意外得胜的马), 实力难测的赛马, 实力难测的竞争者, 出人意外的获胜者
To have a skeleton in the cupboard (US closet): This means that someone has a bad or shameful secret in their past, perhaps they were once a criminal. A closet is a small cupboard that people keep their clothes in, so it is a personal space. 不可告人的秘密,家丑,柜中骷髅
To have a trick up your sleeve: This means that you have a secret plan or strategy that you will use at the right time in order to be successful. This hidden trick will surprise your opponent. The idiom probably comes from the world of performing magic. 有锦囊妙计,胸中自有主张
It is written all over your face: This means that you can easily realise that someone has a secret, simply by looking at that person's face. 已经写在脸上了
A little bird told me: We use this phrase when we want to keep a source of information secret, when we don't want to say who told us something. 有人告诉我
When you try to find out a secret :
Curiosity killed the cat: We use this to stop someone from trying to find out a secret. It is a warning that looking for the secret might be dangerous 好奇心害死猫
Keep your nose out of it: We use this to tell someone to stop asking about a secret or about business that is private. 避免插手他人的事,尽力不卷入
Keep your ear to the ground: We use this to tell someone to try to find out a secret or private information. If you keep your ear to the ground, you listen carefully for advance warning of something.仔细听,注意看动向
Keep it under your hat: We use this to tell someone to keep something secret 保密
To spill the beans: This means to tell someone a secret. 泄密