An extraordinary mole hunt at the heart of Hewlett-Packard has been made public amid allegations of phone-tapping and eavesdropping.

A filing made to the US Securities & Exchange Commission (SEC) outlines the depth of the investigation into HP's own board of directors following a series of leaks to the media over the company's future plans.

The saga - which HP says covered "multiple leaks of confidential HP information," including information relating to the closed-door deliberations of its board, dating back to at least 2005 - has already seen two resignations from the board.

George Keyworth, an HP director since 1986, eventually admitted to leaking information to the media and was asked to resign, but another director, venture capitalist Thomas Perkins also unexpectedly quit over the methods used while investigating board members.

When Perkins unexpectedly quit in May, HP provided no reason for his resignation, but according to an 8-K filing HP made to the SEC today, he quit over concerns with the HP board's handling of investigations into the leaks of confidential information.

To try and stem the leaks and identify the culprit, HP had turned to an external legal counsel who interviewed the board's directors in early 2005 and got each of them to recommit to their duty of confidentiality. The interviews didn't turn up the party responsible and the leaks continued.

So HP brought in an external specialised investigations firm which revealed that George Keyworth has been disclosing board deliberations and other confidential information to the media. Keyworth admitted the allegations at a board meeting on 18 May and was asked to resign.

Keyworth refused, and at that point Perkins announced his own resignation, citing "personal frustration" with the chairman of the board in how the investigation had been handled. Perkins didn't like the matter being aired before the entire board and had believed he and HP non-executive chairman Patricia Dunn would handle the matter privately.

On 19 June, Perkins sought information from HP about the methods used to conduct the investigations into the leaks. According to the filing, he "asserted that phone and email communications had been improperly recorded as part of the investigation."

HP responded that there had been no recording or eavesdropping, but admitted "that some form of 'pretexting' for phone record information, a technique used by investigators to obtain information by disguising their identity, had been used." In pretexting, investigators call a phone company and use personal information to pretend to be someone else so as to gain access to that individual's phone records.

After receiving the HP response, Perkins asked HP's nominating and governance committee to carry out an inquiry into whether the techniques used to conduct the investigation were appropriate. The vendor went ahead and engaged outside counsel, not previously involved in the earlier inquiries, to conduct such an investigation.

The counsel discovered that a third party retained by the external consulting firm HP brought in to investigate the leaks, "had in some cases employed pretexting." Such a practice, at that time, was not generally illegal, the counsel reported, but added that it "could not confirm that the techniques employed by the outside consulting firm and the party retained by that firm complied in all respects with applicable law."

As a result, the HP committee recommended that controls relating to investigations be strengthened and that HP management ensure that all aspects of HP's investigations do comply with both applicable laws and HP's code of ethics. HP CEO Mark Hurd accepted the committee's conclusions.

However, the California's Attorney General has asked HP to supply information about the processes used in the leak investigation. "HP intends to co-operate fully with that inquiry," the company said in the filing.

Former HP CEO Carly Fiorina was angered by the leaks when she was in charge because they demonstrated a gulf between her and members of her board. She was ousted from HP in early 2005 and is due to tell her side of the story in a book out in October.