Skip to content

Commit d35abb4

Browse files
committed
Revert "Format license text and use latest version."
This reverts commit 8350f6c.
1 parent 0c9bf6f commit d35abb4

3 files changed

Lines changed: 36 additions & 70 deletions

File tree

vulnerabilities/lib_oval.py

Lines changed: 23 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,13 @@
11
#!/usr/bin/env/ python3
2-
# Copyright (c) 2010 United States Government. All Rights Reserved.
3-
4-
# Redistribution and use in source and binary forms, with or without
5-
# modification, are permitted provided that the following conditions are met:
6-
#
7-
# * Redistributions of source code must retain the above copyright notice, this
8-
# list of conditions and the following disclaimer.
9-
#
10-
# * Redistributions in binary form must reproduce the above copyright notice, this
11-
# list of conditions and the following disclaimer in the documentation and/or
12-
# other materials provided with the distribution.
13-
#
14-
# * Neither the name of the Center for Internet Security, Inc. (CIS) nor the names
15-
# of its contributors may be used to endorse or promote products derived from
16-
# this software without specific prior written permission.
17-
18-
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER, CIS AND CONTRIBUTORS "AS
19-
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20-
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21-
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER, CIS OR CONTRIBUTORS BE
22-
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23-
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24-
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25-
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26-
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27-
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28-
# POSSIBILITY OF SUCH DAMAGE.
2+
# Copyright© 2010 United States Government. All Rights Reserved.
293

4+
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5+
6+
# * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7+
# * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8+
# * Neither the name of the Center for Internet Security, Inc. (CIS) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9+
10+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER, CIS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER, CIS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3011
"""Library to simplify working with the OVAL XML structure
3112
3213
@@ -58,29 +39,29 @@
5839
5940
1. Create an OvalDocument:
6041
61-
>>> tree = ElementTree()
62-
>>> tree.parse("OvalTest.xml")
63-
>>> document = OvalDocument(tree)
42+
>> tree = ElementTree()
43+
>> tree.parse("OvalTest.xml")
44+
>> document = OvalDocument(tree)
6445
6546
2. Find an oval element within the loaded document:
6647
67-
>>> element = document.getElementByID("oval:org.mitre.oval:def:22382")
68-
>>> if element is not None:
69-
>>> ....
48+
>> element = document.getElementByID("oval:org.mitre.oval:def:22382")
49+
>> if element is not None:
50+
>> ....
7051
7152
3. Read an XML file with a single OVAL Definition (error checking omitted for brevity):
7253
73-
>>> tree = ElementTree()
74-
>>> tree.parse('test-definition.xml')
75-
>>> root = tree.getroot()
76-
>>> definition = lib_oval.OvalDefinition(root)
54+
>> tree = ElementTree()
55+
>> tree.parse('test-definition.xml')
56+
>> root = tree.getroot()
57+
>> definition = lib_oval.OvalDefinition(root)
7758
7859
4. Change information in the definition from #3 and write the changes
7960
80-
>>> meta = definition.getMetadata()
81-
>>> repo = meta.getOvalRepositoryInformation()
82-
>>> repo.setMinimumSchemaVersion("5.9")
83-
>>> tree.write("outfilename.xml", UTF-8", True)
61+
>> meta = definition.getMetadata()
62+
>> repo = meta.getOvalRepositoryInformation()
63+
>> repo.setMinimumSchemaVersion("5.9")
64+
>> tree.write("outfilename.xml", UTF-8", True)
8465
8566
8667
@@ -1401,4 +1382,4 @@ def __init__(self, element):
14011382

14021383

14031384
def getType(self):
1404-
return OvalElement.VARIABLE
1385+
return OvalElement.VARIABLE

vulnerabilities/lib_oval.py.ABOUT

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
about_resource: lib_oval.py
2-
version: e74da20d7c1de91c098c564ce65d6b93656eb86f
3-
download_url: https://raw.githubusercontent.com/CISecurity/OVALRepo/e74da20d7c1de91c098c564ce65d6b93656eb86f/scripts/lib_oval.py
4-
package_url: pkg:github/CISecurity/OVALRepo@e74da20d7c1de91c098c564ce65d6b93656eb86f#scripts/lib_oval.py
2+
version: 6aaae0
3+
download_url: https://raw.githubusercontent.com/CISecurity/OVALRepo/6aaae00876ec716927e0ae5b9ccfa12f310427a0/scripts/lib_oval.py
4+
5+
name: OVALRepo - lib_oval
56
homepage_url: https://github.com/CISecurity/OVALRepo
67
owner: Center for Internet Security
78
author: Gunnar Engelbach <Gunnar.Engelbach@ThreatGuard.com>
89
notes: This a single file extracted from OVALRepo that parses OVAL files.
910

10-
copyright: Copyright (c) 2010 United States Government. All Rights Reserved.
11-
license_expression: bsd-new
11+
license: bsd-new
1212
license_file: lib_oval.py.LICENSE
13+
14+
copyright: Copyright (c) 2010 United States Government. All Rights Reserved.
Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,9 @@
1-
Copyright (c) 2010 United States Government. All Rights Reserved.
1+
Copyright© 2010 United States Government. All Rights Reserved.
22

3-
Redistribution and use in source and binary forms, with or without modification,
4-
are permitted provided that the following conditions are met:
3+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
54

6-
Redistributions of source code must retain the above copyright notice, this
7-
list of conditions and the following disclaimer.
5+
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
6+
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
7+
Neither the name of the Center for Internet Security, Inc. (CIS) nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
88

9-
Redistributions in binary form must reproduce the above copyright notice,
10-
this list of conditions and the following disclaimer in the documentation
11-
and/or other materials provided with the distribution.
12-
13-
Neither the name of the Center for Internet Security, Inc. (CIS) nor the
14-
names of its contributors may be used to endorse or promote products derived
15-
from this software without specific prior written permission.
16-
17-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER, CIS AND CONTRIBUTORS "AS IS"
18-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER, CIS OR CONTRIBUTORS BE LIABLE
21-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
25-
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26-
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
9+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER, CIS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER, CIS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)