High public spending puts the country's rating at risk if savings are not found, analysts have said.