
579 S.E.2d 404 (2003)
PENNSYLVANIA NATIONAL MUTUAL CASUALTY INSURANCE COMPANY, Plaintiff,
v.
ASSOCIATED SCAFFOLDERS AND EQUIPMENT COMPANY, INC., Van Thomas Contractor, Inc., Associated Scaffolders and Equipment Company, Inc., Comfort Engineers, Inc., and Larry E. Jackson, Administrator of the Estate of Jeremy Scott Jackson, Defendants.
No. COA02-397.
Court of Appeals of North Carolina.
May 6, 2003.
*405 Pinto Coates Kyre & Brown, P.L.L.C., by Richard L. Pinto and Nancy R. Myers, Greensboro, for the plaintiff appellee.
Howard Stallings From & Hutson, P.A., by John N. Hutson, Jr., Raleigh, for the defendant appellant.
ELMORE, Judge.
The factual background of this case is summarized in the companion case Jackson v. Associated Scaffolders et al, 152 N.C.App. 687, 568 S.E.2d 666 (2002) (the Jackson case).
In the rental contract between Associated Scaffolders and Equipment Company, Inc. (Associated) and defendant (Comfort), Associated included a provision intended to secure indemnification from Comfort in case of any negligence or equipment failure, excepting only willful misconduct. The relevant provision states:
INDEMNIFICATION: LESSEE SHALL INDEMNIFY AND DEFEND LESSOR AGAINST AND HOLD LESSOR HARMLESS FROM ANY AND ALL CLAIMS, ACTIONS, SUITS, PROCEEDINGS, COSTS, EXPENSES, DAMAGES AND LIABILITIES INCLUDING ATTORNEY'S FEES WHICH
1) RELATE TO INJURY OR TO DESTRUCTION OF PROPERTY, OR BODILY INJURY, ILLNESS, SICKNESS, DISEASE OR DEATH OF ANY PERSON (INCLUDING EMPLOYEES OF LESSEE) AND;
2) ARE CAUSED OR CLAIMED TO BE CAUSED IN WHOLE OR IN PART BY THE EQUIPMENT LEASED HEREIN OR BY THE LIABILITY OR CONDUCT (INCLUDING ACTIVE, PASSIVE, PRIMARY OR SECONDARY) OF LESSOR, ITS AGENTS OR EMPLOYEES OR ANYONE FOR WHOSE ACTS ANY OF THEM MAY BE LIABLE. THE PARTIES AGREE THAT LESSOR SHALL ONLY BE LIABLE OR RESPONSIBLE FOR ACTIONS OF WILLFUL MISCONDUCT.... *406 PURPOSE OF THIS CLAUSE: IT IS THE PURPOSE OF THIS CLAUSE TO SHIFT THE RISK OF ALL CLAIMS RELATING TO THE LEASED PROPERTY TO THE LESSEE DURING THE ENTIRE TERM OF THIS LEASE.
This contract in its entirety was adjudicated void by this Court in the above referenced Jackson case as against section 22B-1 of the General Statutes, which pertains to construction indemnity agreements.
Comfort had liability insurance through Pennsylvania National Mutual Casualty Insurance Company (Penn National), and sought reimbursement from Penn National for costs incurred in the defense of the third-party complaint filed by Associated. Penn National sought a declaratory judgment stating it had no duty to defend against a claim based on the invalid contract between Comfort and Associated.
The relevant portion of the insurance contract between Penn National and Comfort provides as follows. The insurance contract does not apply to:
"Bodily injury" or "property damage" for which the insured is obligated to pay damages by reason of the assumption of liability in a contract or agreement. This exclusion does not apply to liability for damages: ... assumed in a contract or agreement that is an "insured contract"... (Sec.I.2.b.2)
"Insured contract" means:
f. that part of any other contract ... under which you assume the tort liability of another party to pay for "bodily injury"... to a third person or organization. (Sec.V.8.f)
So, the insurance does apply to liability assumed in an insured contract. Comfort contends that the complaint by Associated falls within the coverage for an insured contract. Penn National contends that not only is the complaint not within the insured contract exception, but since the rental contract is invalid under the statute it cannot effectuate an obligation of coverage.
Penn National moved for summary judgment and Comfort Engineers moved for partial summary judgment. The trial court granted Penn National's motion, and denied Comfort Engineers's motion. We agree with the ruling of the trial court.

I.
Summary judgment is appropriate when "the pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that any party is entitled to a judgment as a matter of law." N.C. Gen.Stat. § 1A-1, Rule 56(c) (2001). On appeal, the standard of review is (1) whether there is a genuine issue of material fact, and (2) whether the movant is entitled to judgment as a matter of law. See Kessing v. Mortgage Corp., 278 N.C. 523, 534, 180 S.E.2d 823, 830 (1971). The evidence presented is viewed in the light most favorable to the non-movant. See Caldwell v. Deese, 288 N.C. 375, 378, 218 S.E.2d 379, 381 (1975).
Both parties stipulate that there is no genuine issue of material fact, so this Court's review will be limited to determining whether Penn National was entitled to judgment as a matter of law. The issue on appeal is whether Penn National, as the liability insurer, had a duty to provide a defense to its insured, Comfort Engineers, against a claim based on an invalid contract.

II.
We first recognize that in construing an insurance policy, any doubts and ambiguities must be resolved in favor of the insured. Stockton v. N.C. Farm Bureau Mut. Ins. Co., 139 N.C.App. 196, 199, 532 S.E.2d 566, 567-68, disc. review denied, 352 N.C. 683, 545 S.E.2d 727 (2000). The underlying contract has already been adjudicated void as violative of section 22B-1 of the General Statutes. Having determined that the indemnity agreement is void on the facts of this case, we must next determine whether Penn National nonetheless has a duty to defend Comfort in the action. We recognize that an insurer's duty to defend is broader than its duty to indemnify. Bruce-Terminix Co. v. Zurich Ins. Co., 130 N.C.App. 729, 735, 504 S.E.2d 574, 578 (1998); Couch on Insurance 3D § 202:17 (1999).
*407 An insurer has a duty to defend when the pleadings state facts demonstrating that the alleged injury is covered by the policy. The mere possibility the insured is liable and that the potential liability is covered may suffice to impose a duty to defend. Waste Management of Carolinas, Inc. v. Peerless Ins. Co., 315 N.C. 688, 691, 340 S.E.2d 374, 377, reh'g denied, 316 N.C. 386, 346 S.E.2d 134 (1986); Bruce-Terminix, 130 N.C.App. at 735, 504 S.E.2d at 578. Any doubt as to coverage is to be resolved in favor of the insured. Waste Management, at 693, 340 S.E.2d at 378. Bruce-Terminix, at 735, 504 S.E.2d at 578.
In this case, the relevant pleading is the third party complaint filed against Comfort by Associated. If the complaint on its face alleges facts which may give rise to a claim which falls within the coverage of the Penn National policy, then Penn National has a duty to defend. The complaint includes two counts: the first for contractual indemnity, and the second for breach of contract.
The first count of the complaint was based on the indemnification clause of the rental contract. It alleged that:
In the contract of October 27, 1997, Comfort agreed to hold harmless, defend, and indemnify Associated from all suits and actions, including attorney's fees, costs of litigation and judgments, arising out of or incidental to the performance of the contract or work performed under the contract. Comfort further agreed to indemnify Associated against all claims, actions, and liabilities related to the death of any employee of Comfort if such death was caused or claimed to be caused by the equipment leased to Comfort or by the conduct of Associated. Comfort also agreed to indemnify Associated for any liability resulting from noncompliance with any safety regulations.
Section 8 (emphasis added).
The bare language of this count runs afoul of section 22B-1 of the Statutes, as it seeks to enforce a contract for indemnity for Associated's own actions and possible negligence in a building construction context. "[A] construction indemnity agreement may purport to indemnify a promisee from damages arising from negligence of the promisor, but any provision seeking to indemnify the promisee from its own negligence is void." Bridgestone/Firestone, Inc. v. Ogden Plant Maint. Co. of N.C., 144 N.C.App. 503, 506, 548 S.E.2d 807, 810 (2001), aff'd per curium 355 N.C. 274, 559 S.E.2d 786 (2002). Although at the time of the complaint the contract had not yet been adjudicated void, an insurer will not be obligated to defend its insured when the insured has stepped outside the protective bounds of the General Statutes. An insurer may assume that its insured will contract within the law and not obligate the insurer to defend an illegal contract.
The second count alleges that Associated suffered damages because Comfort did not maintain the scaffolding in accordance with regulatory standards as agreed in the rental contract.
The Penn National policy, as excerpted above, does not cover claims for bodily injury (which includes death under the policy definitions) by reason of assumption of liability in a contract except for in an insured contract. An insured contract is defined by the policy as:
That part of any other contract ... under which you assume the tort liability of another party to pay for "bodily injury" ... to a third person or organization. Tort liability means a liability that would be imposed by law in the absence of any contract or agreement.
Under this provision of the policy, which is essential to Comfort's argument on appeal, no claim for breach of contract is covered. The policy clearly states that the exception which grants coverage applies to tort claims only which "would be imposed by law in the absence of any contract or agreement." This claim lies outside the policy coverage. Therefore, Penn National had no duty to defend on either count of the complaint.
We note that any insurer who denies a defense takes a significant risk that he is breaching his duty to defend. Indeed, if the claim is within the policy, a refusal to defend *408 is unjustified even if based on an honest but mistaken belief that the claim is not covered. Duke University v. St. Paul Fire and Marine Ins. Co., 96 N.C.App. 635, 637, 386 S.E.2d 762, 764, disc. review denied, 326 N.C. 595, 393 S.E.2d 876 (1990). However, in this case, that risk was well-taken since the contract is clearly improper and the pleadings do not trigger coverage.
We hold that Penn National was entitled to judgment as a matter of law, and thus affirm the summary judgment order.
Affirmed.
Judge WYNN and Judge McCULLOUGH concur.
