This has a serious security flaw.
Reproducing the security flaw:
1. Create a plausible enough distraction
2. Place pill on said keyboard
3. Pharmaceutical intervention Complete!
Perhaps, this is a general flaw in the choosing of a visible, non-access restircted (presuming) place to keep the pill (also no verification if it's the correct pill).
How would you solve this problem?
1. Trivially, restrict access to this place (lock your cabin or something) or use a pill box for which you've the keys
2. Verification of pill
- camera surveilance of keyboard(has its own issues lol, perhaps, if angle it such a way that you're not keylogging yourself)
- weight sensitive plate on keyboard (mission impossible anyone? :D)
- edible hologram on pill
- SHA engraving on pill (manual verification becomes is time consuming and is not cool)
- encode hash in pill weight: Have a delicate weighing balance, alter the weight of the pill by addition or removal of a neutral substance, program the balance or use an sdk for balance to auto verify this; (note SSH keys required)
- Ah! laser engrave a qr code on to pill; laser engraving can be reasonable automated (presumption), verification via smartphone i.e. check the hash or qr code is a shortlink to a verifiable hash (I'm reasonable happy with this solution, moving on)