Skip to content

Commit

Permalink
Change: Fix NASL coding style output of deprecate VT plugin. Adjust t…
Browse files Browse the repository at this point in the history
…est.
  • Loading branch information
cfi-gb committed Jan 10, 2025
1 parent 1d3679d commit a577f89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/standalone_plugins/test_deprecate_vts.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def test_finalize_content(self):
result = _finalize_content(NASL_CONTENT)
expected = (
'...if(description)\n{\n script_oid("1.3.6.1.4.1.25623.1.0.910673");\n '
'script_version("2024-03-12T14:15:13+0000");\n script_name("RedHat: Security Advisory for gd (RHSA-2020:5443-01)");\n script_family("Red Hat Local Security Checks");\n script_dependencies("gather-package-list.nasl");\n script_mandatory_keys("ssh/login/rhel", "ssh/login/rpms", re:"ssh/login/release=RHENT_7");\n\n script_xref(name:"RHSA", value:"2020:5443-01");\n script_xref(name:"URL", value:"https://www.redhat.com/archives/rhsa-announce/2020-December/msg00044.html");\n\n script_tag(name:"summary", value:"The remote host is missing an update for the \'gd\'\n package(s) announced via the RHSA-2020:5443-01 advisory.");\n\n script_tag(name:"deprecated", value:TRUE);\n\nexit(0);\n}\n\nexit(66);\n' # noqa: E501
'script_version("2024-03-12T14:15:13+0000");\n script_name("RedHat: Security Advisory for gd (RHSA-2020:5443-01)");\n script_family("Red Hat Local Security Checks");\n script_dependencies("gather-package-list.nasl");\n script_mandatory_keys("ssh/login/rhel", "ssh/login/rpms", re:"ssh/login/release=RHENT_7");\n\n script_xref(name:"RHSA", value:"2020:5443-01");\n script_xref(name:"URL", value:"https://www.redhat.com/archives/rhsa-announce/2020-December/msg00044.html");\n\n script_tag(name:"summary", value:"The remote host is missing an update for the \'gd\'\n package(s) announced via the RHSA-2020:5443-01 advisory.");\n\n script_tag(name:"deprecated", value:TRUE);\n\n exit(0);\n}\n\nexit(66);\n' # noqa: E501
)
self.assertEqual(result, expected)

Expand Down
2 changes: 1 addition & 1 deletion troubadix/standalone_plugins/deprecate_vts.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def _finalize_content(content: str) -> str:
content_to_keep = content.split("exit(0);")[0]
return content_to_keep + (
'script_tag(name:"deprecated", value:TRUE);'
"\n\nexit(0);\n}\n\nexit(66);\n"
"\n\n exit(0);\n}\n\nexit(66);\n"
)


Expand Down

0 comments on commit a577f89

Please sign in to comment.