The expression "spilling the beans" is a common idiom that means revealing a secret. The idiom originates from the ancient Greek method of voting, where beans were used as votes. If the beans were spilled, the results of the vote were prematurely revealed. In modern usage, it is used when someone reveals something that was meant to be kept secret.
Thus, the correct meaning is (b) To reveal a secret.