James A. Gagliano is a CNN law enforcement analyst and retired FBI supervisory special agent. He is also an adjunct assistant professor at St. John's University in Queens, New York. Follow him on Twitter: @JamesAGagliano . The views expressed in this commentary are his. Read more opinion on CNN.

(CNN) A whistleblower's recent bombshell revelation highlighting the US President's quid pro quo attempts to leverage military aid to Ukraine, in exchange for an investigation into one of his chief 2020 political rivals, Joe Biden, has been supported by a rough White House telephone transcript . The accusation, which has led to a House impeachment inquiry, was further buttressed by the recent testimony of a commissioned US Army officer, Lt. Col. Alexander Vindman , who serves on the National Security Council and was a party to the telephone call.

When the Justice Department under Attorney General William Barr blocked attempts to share the whistleblower complaint with Congress and publicly pronounced the President guilty of no crime related to it, critics were incensed, leading the House Permanent Select Committee on Intelligence, chaired by Rep. Adam Schiff, to convene its own hearings into the charges.

Democrats briefly flirted with idea of impeaching Barr but have pivoted to the more ambitious task of impeaching the President. Still, there ought to be a less fraught path by which Congress could forestall the possibility of a potentially compromised attorney general -- an efficient way for the legislature to shield the AG position from partisan influence, real or imagined. What if the attorney general position was assured of a term that would extend beyond the term of the president who appointed them?

Barr's contentious confirmation hearings last winter served to highlight our nation's deep political divisions, as he repeatedly came under fire from opposition-party critics who warned that his seeming lack of independence and partisan tendencies would be dangerous at the helm of DOJ. After all, Barr had famously earned the President's attention with a June 8, 2018, memorandum to then-Deputy Attorney General Rod Rosenstein, adding support to the argument that Donald Trump should not face obstruction of justice charges in the Mueller investigation.

It is almost as if the future AG's opinion was that presidents may ultimately be above the law. President Trump was understandably enamored with this take, deciding to nominate Barr to succeed Jeff Sessions on February 14 this year. Barr previously served as the 77th AG, under President George H.W. Bush.

While Barr appeared confident and at ease during his confirmation hearings , parrying barbs from concerned Democrats , that was little-league stuff compared to what he would face following his decision to release a four-page summary of the 448-page Mueller report . Enraged critics alleged that Barr's summary document served less to communicate Mueller's principal conclusions and more as a preemptive diminution of heavier charges that, if not indictable, were certainly impeachment-worthy.

So, is Barr the most partisan AG in recent memory?

Presidential cabinet positions are political appointments. Those who fill them understand that they serve at the pleasure (or whim) of the president. Our nation's first President, George Washington, appointed Edmund Randolph in 1789 to the position, and essentially charged him with shaping and defining our country's justice system.

Across the ensuing 230 years, members of the minority party have consistently complained of bias. In recent memory, look no further back than the " Pearl Harbor Day Massacre " in 2006, when George W. Bush's AG, Alberto Gonzalez, insisted that the curious midterm firings of eight Republican US attorneys had nothing to do with politics. Gonzalez's top deputy later attributed the firings to "performance-related" issues . Critics begged to differ , suggesting that the supposedly independent US attorneys were fired for refusing to remain in complete lockstep with the presidential administration they served.

During the early 1960s, John F. Kennedy's brother Robert served as his AG -- an appointment that led to understandable charges of nepotism. And another more recent president who appeared to enjoy a cozy, quasi-sibling relationship with one of his AGs was Barack Obama. Here's how his first selection, Eric Holder , described the relationship he shared with his boss in 2013:

"I'm still enjoying what I'm doing, there's still work to be done. I'm still the President's wingman, so I'm there with my boy."

Loretta Lynch, Holder's eventual replacement, would end up recusing herself from the FBI's 2016 investigation into then-presidential candidate Hillary Clinton's private email server because of an ill-advised private meeting with the candidate's husband, former President Bill Clinton. Lynch later described the impromptu tarmac meeting as simply a conversation about their travels, golf and grandchildren. If nothing else, it gave the appearance of unseemly partisanship.

Even more baffling were Lynch's instructions to then-FBI Director James Comey to avoid referring publicly to the Clinton investigation as an investigation. Comey testified to the curious term that Lynch wanted him to use: a "matter." Lynch has denied this conversation ever took place.

If these examples indicate the position may be subject to undue partisan influence, then what, if anything, can be done to combat that influence? One available solution may be to subject the AG position to something like the provision in Section 203 of the Crime Control Act of 1976 , which sets forth a 10-year term for the director of the post-J. Edgar Hoover FBI.

Such a term would serve as a check on presidential power, helping to foster a DOJ better prepared to resist partisan influence. It would be more difficult to exert pressure on an AG who is certain to outlast the presidential administration that appointed them. That job security could essentially inspire the courage necessary to stand up to a president's orders -- or suggestions -- of any act that appears partisan, untoward, unethical or illegal.

This new protocol wouldn't protect the AG from, say, getting fired for cause, just as Comey's 10-year term as director of the FBI didn't prevent Trump from firing him -- but it would still offer a much-needed guardrail against partisanship.

It is almost impossible to imagine this Congress coming to consensus on any matter these days. But a 10-year term for attorneys general should be palatable to both political parties, who know by now that one side never remains in power -- or out of power -- for too long. Congress should make this change in the spirit of a bipartisan commitment to maintaining an apolitical Justice Department.

Get our free weekly newsletter Sign up for CNN Opinion's new newsletter. Join us on Twitter and Facebook

Make it before the final scintilla of America's waning trust and confidence in the department's independence is gone. Act before it's too late.