Attorney-General George Brandis said the national security agencies had supported the new laws.

The first in a series of bills to significantly expand Australia's national security laws has passed the Senate, despite repeated attempts by the Greens and some crossbenchers to water down proposed new penalties for disclosing secret information.

The bill was actually strengthened in the Senate, with the Government agreeing to an amendment by the Palmer United Party (PUP) to increase tenfold the penalty for identifying an intelligence officer.

"Exposure of an ASIO or ASIS officers' identity is a form of treason and should carry a harsh penalty," PUP's Senate leader, Glenn Lazarus said.

The penalty has been increased from one year in jail, to 10 years.

Attorney-General George Brandis said the whole package was the most important update to national security laws since 1979.

The National Security Legislation Amendment Bill will make it easier for security agencies to access personal computers and spy on Australians overseas.

Under the new laws, the penalty for disclosing secret information is increased to up to 10 years' imprisonment - a measure that could lead to journalists being jailed.

"What we have achieved tonight is to ensure that those who protect us, particularly in a newly dangerous age, have the strong powers and capabilities they need," Senator Brandis said.

"But we've also achieved the outcome that those strong powers are protected and balanced by strong safeguards."

That is disputed by the Greens and several other crossbench senators, who used hours of debate to try to increase ASIO's obligation to publicly report on its activities.

The bill includes a streamlined process for warrants, gives ASIO officers some immunity for some covert actions, and allows the secret use of third party computers during intelligence operations.

It also enables Australia's overseas spy agency ASIS (Australian Secret Intelligence Service) to spy on Australians overseas and to cooperate with ASIO with less executive oversight.

Greens concerned by potential impact on press freedom

But the most debated amendments centred on the proposal to dramatically increase, and in some cases insert new penalties for disclosing information, and reporting on special intelligence operations.

Greens leader Christine Milne and independent senator Nick Xenophon said they were concerned that the provision to increase the penalties for anyone who revealed intelligence information may affect journalists and deter whistleblowers.

Senator Milne accused the Coalition and Labor of eroding press freedom by backing the bill.

"We are doing away with freedoms of the press that have been fought for a long period of time and have now been given away," she said.

Greens senator Scott Ludlam repeatedly questioned if the Australian media would still be able to report on intelligence operations like the attempted phone tapping of the Indonesian president's wife, or the Mohammed Haneef case.

"By what means does the Government believe that the potential criminalisation of national security reporting makes our country any safer?" Senator Ludlam asked.

He said Australian media organisations had almost universally expressed concern about the new maximum penalties, ranging from five to 10 years.

"We have quite a proud tradition of press freedom in this country, I would like to see a lot more of it, but from what we do know, protections for these people are absolutely essential," he said.

The Government rejects that the laws are designed to curb the freedom of the press.

"This is not about reporting on the operation of the intelligence agencies, it's about intentionally disclosing a covert operation with reckless disregard as to that circumstance," Senator Brandis said.

But Senator Xenophon also moved amendments to try to insert a public interest immunity clause.

In voting against the bill, Senator Xenophon said he could not support it because of the "potential curtailment" of freedom of the press.

"There are many elements of this bill that I think are good," Senator Xenophon said.

"But this, this particular clause to me is a deal-breaker, because it strikes at heart of the freedom of the press in this country."

Brandis rejects sunset clause for bill

Having forced the Government to move its own amendment to explicitly rule out the use of torture during covert operations, Liberal Democrat David Leyonhjelm put forward a string of his own amendments, including a time limit, or sunset clause, on the bill.

"The Prime Minister has stated that our current circumstances justify the current rebalancing of security and freedom concerns. These circumstances may, or may not be present in 2025," he said.

But all non-Government amendments, apart from the one put forward by PUP, were rebuffed by the Attorney-General.

Senator Brandis said a time limit on the bill was unnecessary.

"This regime is by no means a temporary regime, we do not foresee that the augmentation of ASIO's powers by these provisions is something that is going to expire," he said.

The Greens tried to remove the provision which could potentially see journalists jailed for reporting on special intelligence operations, but Labor sided with the Government to push it through.

The bill passed the Senate, 44 votes to 12. The Government, Opposition and Palmer United Party voted for the legislation, along with the Motoring Enthusiasts Party Senator Ricky Muir, and Family First's Bob Day.

The Greens, Senators Xenophon, Leyonhjelm, and Senator John Madigan were all opposed.

The bill will now go to the Lower House for final approval.

Senator Leyonhjelm this week raised concerns about the provision giving officers working on special operations immunity from prosecution, saying he feared it could allow ASIO agents to torture suspects.

Senator Brandis rejected the concerns, but said he would change the bill to "avoid the debate being diverted".

A raft of new counter-terrorism laws are being introduced in three stages and aim to bolster the powers of security agencies and make it easier to identify and prosecute Australians involved in terrorist activities.

The next batch of national security laws, to deal with foreign fighters, will be considered by Parliament's Joint Committee on Intelligence and Security in the next few weeks.