Collection of CheckMK checks (see https://checkmk.com/). All checks and plugins are provided as is. Absolutely no warranty. Send any comments to thl-cmk[at]outlook[dot]com

Skip to content
Snippets Groups Projects
Commit 1c19876d authored by thl-cmk's avatar thl-cmk :flag_na:
Browse files

Delete inv_cisco_psirt.py

parent c98c9af4
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# License: GNU General Public License v2
# Author: thl-cmk[at]outlook[dot]com
# URL : https://thl-cmk.hopto.org
# Date :
#
# 2021-07-23: rewritten for CMK 2.0
#
from cmk.gui.i18n import _
from cmk.gui.plugins.wato import (
HostRulespec,
rulespec_registry,
)
from cmk.gui.valuespec import (
Dictionary,
FixedValue,
TextAscii,
ListChoice,
Integer,
Alternative,
)
from cmk.gui.plugins.wato.inventory import (
RulespecGroupInventory,
)
_removecolumns_inv_cisco_psirt = [
('bugIDs', 'Cisco Bug IDs'),
('firstFixed', 'First fixed in'),
('firstPublished', 'First Published'),
('installed_version', 'installed version'),
('lastUpdated', 'Last Updated'),
('publicationUrl', 'Public URL'),
('summary', 'Summary'),
('cwe', 'CWE'),
('cves', 'CVEs'),
('productNames', 'Product names'),
('ipsSignatures', 'IPS signatures'),
('iosRelease', 'IOS Releases'),
('cvrfUrl', 'CVRF URL'),
('ovalUrl', 'OVAL URL'),
]
def _valuespec_inv_cisco_psirt():
return Dictionary(
title=_('Cisco PSIRT advisories'),
elements=[
('removecolumns',
ListChoice(
title=_('remove columns'),
help=_('remove information from report'),
choices=_removecolumns_inv_cisco_psirt,
default_value=[
'publicationUrl',
'summary',
'cwe',
'cves',
'productNames',
'iosRelease',
'ipsSignatures',
'cvrfUrl',
'ovalUrl',
],
)),
('psirt_type',
Alternative(
title=_('Cisco PSIRT advisory type'),
style='dropdown',
# default_value=True,
elements=[
FixedValue(
'IOS',
title=_('add Cisco PSIRT IOS security advisories'),
# tototext=_('Cisco PSIRT IOS security advisories info enabled'),
help=_('CMK will request Cisco IOS PSIRT security advisories'),
),
FixedValue(
'IOS-XE',
title=_('add Cisco PSIRT IOS-XE security advisories'),
# tototext=_('Cisco PSIRT IOS-XE security advisories info enabled'),
help=_('CMK will request Cisco IOS-XE PSIRT security advisories'),
),
Dictionary(
title=_('add Cisco PSIRT advisories by base product id'),
elements=[
('product_family',
TextAscii(
title=_('product family'),
help=_('Product family for example: NEXUS, WSA, ESA or ASA'),
allow_empty=False,
size=24,
)),
('not_updated',
Integer(
title=_('don\'t show advisories not updated for the last X days'),
default_value=730,
# allow_empty=False,
)
),
('dont_show_older_then',
TextAscii(
title=_('don\'t show advisories from before YYYY-MM-DD'),
default_value='2000-01-01',
allow_empty=False,
)),
])
]
)),
])
rulespec_registry.register(
HostRulespec(
group=RulespecGroupInventory,
match_type='dict',
name='inv_parameters:inv_cisco_psirt',
valuespec=_valuespec_inv_cisco_psirt,
))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment