Upcoming syntax change of script_version() and last_modification script_tag in NASL scripts

Summary

As a preparation for the following change in the upcoming GVM-10 / GOS 5.0:

Drop „version“ element for NVTs and update version format for Results: The version information is actually redundant since the „last modification“ element specifies the version even more meaningful. Thus, the „version“ element is removed from the NVT meta data. This also means a minor change to the GMP protocol. Results are still given a version number of the respective NVT, but the format changes from for example „$Revision: 1244$“ to „2017-12-20T08:01:27Z“ (FS-171208-4740).

Roadmap und Lifecycle - Greenbone

the syntax of the following tags will be changed for updated or newly submitted VTs from:

script_version("$Revision: 14323 $");
script_tag(name:"last_modification", value:"$Date: 2019-03-21 12:19:01 +0000 (Thu, 21 Mar 2019) $");

to:

script_version("2019-03-21T12:19:01+0000");
script_tag(name:"last_modification", value:"2019-03-21 12:19:01 +0000 (Thu, 21 Mar 2019)");

Affects to VT-Developers

Instead of relying on SVN setting the Revision/Date via auto-props please use e.g. the following command to create a correct entry for the script_version:

LC_ALL=C date -u +"%Y-%m-%dT%H:%M:%S%z"

as well as the following for the modification_date time:

LC_ALL=C date -u +"%F %T %z (%a, %d %b %Y)"

Affects to the End-User

During the migration phase from the old to the new syntax one side-effect is a mixed version shown in the “Version” column of SecInfo -> NVTs within the Greenbone Security Assistant (GSA). This would temporarily make the sorting of the “Version” column unreliable due to the different used syntax.

3 Likes