Short answer. The contractor is liable, not the owner, under this article. Article 1728 provides that the contractor is liable for all the claims of laborers and others employed by him, and of third persons for death or physical injuries during the construction. So a passerby hurt or killed during the work looks to the contractor.
What the law says
third persons for death or physical injuries during the construction
Civil Code, Article 1728 — Liability for Workers and Third Persons. Read the full provision →
The contractor bears responsibility to third persons
Article 1728 is direct about who answers when someone is hurt at a construction job: the contractor is liable for all the claims of laborers and others employed by him, and of third persons for death or physical injuries during the construction. A passerby who is injured, or the family of one who is killed, is a third person under this rule, and the contractor is the party the law points to. This reflects the reality that the contractor is the one running the site, directing the work, and controlling how it is carried out. Having taken charge of the construction, the contractor also carries responsibility for the harm it causes to outsiders.
Why not the owner?
The owner who merely engaged the contractor is generally not the one this article holds liable. In a genuine independent-contractor arrangement, the contractor works according to his own methods and controls his own workers and safety measures; the owner does not direct the day-to-day work. Because the contractor, not the owner, runs the site, the law places the claims of injured third persons on the contractor. This protects an owner who hired a builder and stepped back, while making sure the injured person still has someone clearly answerable: the party actually in control of the dangerous activity that caused the harm.
What the liability covers
The article's reach is broad on the claimant side. It covers all the claims of laborers and others employed by him, so the contractor's own workers are protected, and it extends to third persons, meaning people outside the project such as a passerby on the street. The triggering harm is specific: death or physical injuries during the construction. So the injury or death must arise during, and in connection with, the construction work. This gives an injured outsider a clear route to claim against the contractor for the bodily harm suffered because of the ongoing work.
Important limits and other possible liabilities
Two cautions. First, this article settles who is liable as between contractor and owner for these construction injuries; it does not, by itself, decide fault, the amount of damages, or every possible claim. An owner might still be drawn in under other legal grounds, for instance if the owner interfered with or controlled the work, or under separate rules on the liability of building owners. Second, the contractor's liability here does not require the victim to prove an employment tie. Because outcomes depend heavily on the facts, how the injury happened and who actually controlled the site, this is general information, not advice on a specific accident.