Skip to content

114 deprecated elements have no Schematron report warning content authors #343

Description

@dragosprisaca

Describe the bug

OVAL signals deprecation to content authors through a sch:report, so that validating a definition using a deprecated test emits a warning while still passing. The convention is established and used correctly in places, for example apache-def:httpd_test:

<sch:rule context="apache-def:httpd_test">
  <sch:report test="true()">DEPRECATED TEST: <sch:value-of select="name()"/> ID: <sch:value-of select="@id"/></sch:report>
</sch:rule>

114 elements carrying oval:deprecated_info across 20 schemas have no such report. Content using them validates silently, so authors get no signal that they are building on a deprecated test.

Replication Steps

  1. Extract and compile the Schematron for any schema below.
  2. Validate a document using one of its deprecated tests, for example win-def:activedirectory_test.
  3. No svrl:successful-report is produced, so no deprecation warning reaches the author.

Expected behavior

Every element declaring oval:deprecated_info is matched by a rule with a sch:report, so validation surfaces the deprecation.

Content

Schema Missing reports
windows 20
sharepoint 15
solaris 13
android 13
asa 9
unix 5
macos 5
hpux 5
ios 4
junos 3
iosxe 3
esx 3
catos 3
apple-ios 3
aix 3
pixos 2
linux 2
netconf 1
independent 1
freebsd 1

Several of these platforms are deprecated in full (Android, Apple iOS, CatOS, ESX, FreeBSD, HP-UX), so every test they offer should be reporting.

A single union-context rule per schema covers all of its deprecated elements compactly:

<sch:pattern id="win-def_declared_deprecations">
  <sch:rule context="win-def:activedirectory_test | win-def:auditeventpolicy_test | ...">
    <sch:report test="true()">DEPRECATED ELEMENT: <sch:value-of select="name()"/> ID: <sch:value-of select="@id"/></sch:report>
  </sch:rule>
</sch:pattern>

Care is needed to list only elements that are themselves deprecated. An element whose child entity carries the deprecated_info should not be reported, or ordinary content using that element gets a spurious warning.

OVAL details

  • Schema: all 20 listed above

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugA technical or implementation-related issue with an OVAL schema or construct.

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions