#%NASL_MIN_LEVEL 80900
##
# (C) Tenable, Inc.
##
include('compat.inc');
if (description)
{
script_id(240164);
script_version("1.1");
script_set_attribute(attribute:"plugin_modification_date", value:"2025/06/18");
script_name(english:"Set Linux OS Identifier");
script_set_attribute(attribute:"synopsis", value:"Establish an OS Identifier value for Linux machines.");
script_set_attribute(attribute:"description", value:
"Establishes a unique identifier for Linux machines that we can use going forward to
determine if the machine attributes fit Linux checks.");
script_set_attribute(attribute:"solution", value:"N/A");
script_set_attribute(attribute:"agent", value:"unix");
script_set_attribute(attribute:"plugin_publication_date", value:"2025/06/18");
script_set_attribute(attribute:"plugin_type", value:"local");
script_end_attributes();
script_category(ACT_GATHER_INFO);
script_family(english:"Misc.");
script_copyright(english:"This script is Copyright (C) 2025 and is owned by Tenable, Inc. or an Affiliate thereof.");
script_dependencies("ssh_get_info2.nasl");
script_require_keys("Host/cpu", "Host/local_checks_enabled");
exit(0);
}
var os_product = get_one_kb_item('installed_os/local/SSH/0/product');
var os_release = get_one_kb_item('installed_os/local/SSH/0/release');
if (isnull(os_product)) audit(AUDIT_KB_MISSING, "installed_os/local/SSH/0/product");
if (isnull(os_release)) audit(AUDIT_KB_MISSING, "installed_os/local/SSH/0/release");
var os_id = join([os_product, os_release], sep:"-");
replace_kb_item(name:"Host/OS/identifier", value:os_id); # use this one to check in the plugin
replace_kb_item(name:"Host/OS/"+os_id, value:true); #use this one to as a script_require check
Data
Build on a solid foundation with Vulners data
We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data
Api
Power your application with Vulners API
The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access
App
Assess and manage vulnerabilities with Vulners tools
Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation