Three attributes do the work, and each carries its own failure mode.
Authentication. Parties identify themselves with digital signatures, private cryptographic keys used to verify participation and assent to the agreed terms. That makes the identity question a key-custody question: whoever controls the key can act as the party, and the code cannot distinguish the owner from somebody who has obtained the key.
Outside data. A contract that turns on a real-world fact needs a source for that fact, which the primer calls an oracle: a mutually agreed, network-authenticated reference data provider supplying information such as commodity prices, weather data, interest rates or whether an event occurred. This is the dependency people underestimate. The primer lists oracle failure or disruption among the technical risks, notes that an attacker may compromise an oracle, and notes that oracles may accept or distribute unexpected information or be subject to manipulation. A contract executes on what the oracle reports, not on what happened, and the two are not always the same thing.
Self-execution. The contract acts without further action by the parties, which is the source of the efficiency and of the exposure. The primer's list of operational risks is worth reading as written: a smart contract may lack adequate backup or failover, may depend on other systems whose vulnerabilities prevent it from working as intended, may sit on a platform missing critical safeguards and customer protections, and may be disrupted by a fork in the underlying chain. It adds that in the case of an operational failure, recourse may be limited or nonexistent and complete loss of a virtual asset is possible. Under technical risk it lists unintended software vulnerabilities and, in as many words, that humans make mistakes when coding.
The legal position is the part most often stated backwards. "Code is law" is a design philosophy, not a doctrine any court applies. The primer states that existing law and regulation apply equally regardless of what form a contract takes, that contracts or parts of contracts written in code are subject to otherwise applicable law and regulation, and it lists the frameworks that can reach them, including the Commodity Exchange Act, federal and state securities laws, tax law, the Uniform Commercial Code and the electronic-signature statutes, the Bank Secrecy Act and anti-money-laundering rules, and state money transmission laws. A separate subcommittee presentation to the CFTC's Technology Advisory Committee makes the practical counterpoint about the code itself: the smart contracts underlying a decentralized trading venue are, in its word, alegal, meaning they do not necessarily incorporate regulatory compliance. Both things are true at once. The obligation exists; the code does not enforce it.
Reviewability deserves a measured note rather than reassurance. Contract code deployed to a public chain is usually readable by anyone, and paid code reviews are a common practice before launch. A review is a judgment about a specific version of the code at a specific moment, by people who may not anticipate how the contract will interact with other contracts later. It reduces the chance of an obvious defect and does not convert the code into a guarantee.