AVISITOR TO THE halls of state government in Richmond quickly learns two things: First, the General Assembly is the oldest legislative body in the Western Hemisphere, having been founded in 1619; and second, Virginia considers itself a bastion of good and clean government. The first is indisputable. The second is harder to measure — or has been until now.

A recent survey by a group led by the Center for Public Integrity, a nonpartisan group based in Washington, gave Virginia an “F” on its “corruption risk report card.” The commonwealth, one of eight states to receive a failing grade, ranked 47th among the 50 states, and it received especially poor marks for ethics enforcement, disclosure of lobbying activities and public access to information, among other measures of sound and open government.

The report’s findings registered with a clang of cognitive dissonance among elected officials, who take it as an article of faith that Virginia is among the best-governed, least-crooked states. But even if they are right, they need to take this report seriously.

It’s true that Virginia has been spared the steady drip of scandal and sleaze that is the hallmark of governments in Illinois, New Jersey and elsewhere. (Maryland, which ranked 40th among the states in the report, has had more than its share of problems, too.) Prominent instances of misbehavior in Richmond — a House of Delegates speaker forced to resign in a sex scandal a decade ago; another delegate convicted on federal corruption charges last year — seemed like exceptions to the rule.

But things can change. After all, Congress used to be a place where things got done and lawmakers made compromises across the aisle. For Virginia, the best guarantee of continued success is a legal regimen that ensures open access to information, accountability for all branches of government and robust enforcement of ethics rules. By these measures, Virginia law is paper-thin and full of holes; it makes the state susceptible to future scandal.

As the report points out, Virginia “is one of nine states with no statewide ethics commission, one of four states with no campaign finance limits, and one of only two states . . . where the part-time legislators handpick the judges before whom many of them practice law.”

There are other problems, as the report makes clear. While state law does require disclosure of campaign donations over $100, enforcement of the law is weak and compliance is uncertain. Similarly, the rules governing disclosure of lobbying activity are spottily bare and easily evaded. And there is no legal mechanism of appeal in cases where the state refuses to hand over information to citizens, journalists and other interested parties who request it.

In response to the report, Gov. Robert F. McDonnell (R) did the right thing, directing officials to conduct “a full and thorough review,” according to his spokesman. That’s a good start. Lawmakers, too, should get into the act by tightening state laws in the next legislative session.