Federal authorities ended two investigations into the actions of Goldman Sachs during the financial crisis, handing a quiet victory to the bank after years of public scrutiny, The New York Times Dealbook reported yesterday. In a statement late Thursday, the Justice Department said there was “not a viable basis to bring a criminal prosecution” against Goldman or its employees after a congressional committee asked prosecutors to examine whether the bank had been involved with any illegal acts related to several mortgage deals. The Senate’s Permanent Subcommittee on Investigations had examined troubled mortgage securities that Goldman sold to investors, who later sustained steep losses during the crisis. The subcommittee also suggested that prosecutors investigate whether the chief executive of the bank had misled lawmakers during public testimony. Separately, Goldman Sachs announced early Thursday that the Securities and Exchange Commission had ended an investigation into a $1.3 billion subprime mortgage deal, taking no action. The move was an about-face for the commission, which notified the bank in February that it planned to pursue a civil action.