Switch branches/tags
Nothing to show
Find file History
Permalink
..
Failed to load latest commit information.
.idea Updated Repo Jul 28, 2015
Documentation Updated lib_repo and lib_xml, mostly to create an algorithm for ident… Jul 17, 2015
Test Revised test submissions by using actual submissions Jul 28, 2015
lib/iso-schematron-xslt1 changed oval_ids from list to set to eliminate duplicates, fixes #13 Jul 6, 2015
CONTRIBUTING.md Update and rename README.contributing.scripts.md to CONTRIBUTING.md Jul 16, 2015
README.md must be in git repo to run scripts Jul 17, 2015
README.scripting.setup.md Additional formatting fixes Jun 29, 2018
add_to_repository.py Added 5.11.2 schemas and updated scripts to use them Dec 14, 2016
build_all_oval_definitions.py Reverted to a clean fork and recreated the QA changes Jul 24, 2015
build_oval_definitions_file.py added argument to specify location of temp files used in generation o… Sep 16, 2015
build_oval_definitions_file_from_nvd.py NVD support Sep 19, 2016
bulk_generate_schematron.py Create bulk_generate_schematron.py Jul 21, 2015
fetch_pull_request.py Processed Pull Request 168 Dec 11, 2015
find_affected.py Added 5.11.2 schemas and updated scripts to use them Dec 14, 2016
find_duplicate_oval_ids.py Created Dec 14, 2016
find_elements_missing_from_index.py Create find_elements_missing_from_index.py Aug 4, 2015
find_orphans.py updated find_orphans.py, deleted orphans Feb 24, 2018
get_element_from_index.py Update get_element_from_index.py Aug 4, 2015
get_min_oval_version.py Title & Version Corrections Nov 16, 2015
get_related_elements.py added related elements script and library methods, fixes #19 Jul 14, 2015
git_pull_request.py New repo files Aug 5, 2015
lib_git.py Processed Pull Request 334 - jOVALCM May 14, 2016
lib_nvd.py NVD support Sep 19, 2016
lib_oval.py Updated Scripts Aug 24, 2015
lib_repo.py updated find_orphans.py, deleted orphans Feb 24, 2018
lib_search.py updated find_orphans.py, deleted orphans Feb 24, 2018
lib_xml.py fixed oval output formatting Feb 23, 2018
oval_decomposition.py Updates and Fixes Aug 10, 2015
python Processed pull request 1126 - ATLX-SOFT Oct 24, 2017
requirements.txt Updated to allow latest versions Jun 29, 2018
serialize_latest_repo.py Updates and Fixes Aug 10, 2015
set_xsi_namespace.py Create set_xsi_namespace.py Aug 5, 2015
status.py CIS Definition Status Updates Feb 8, 2016
submission_qa.py QA script fix to find any non-repository IDs which arent also contain… May 5, 2017
validate_oval_definitons_files.py Added 5.11.2 schemas and updated scripts to use them Dec 14, 2016
web_build_definition_cve_map.py Added definition to CVE-ID mapping script Mar 18, 2016
web_build_oval_definitions_file.py added argument to specify location of temp files used in generation o… Sep 16, 2015
web_get_contributor_stats.py added revisions index and filtering Aug 8, 2015
web_get_repository_stats.py Fixed elements indexing. Dec 14, 2016
web_search_definitions.py updates to address #62 Aug 14, 2015
web_update_indexes.py bug fixes Aug 10, 2015

README.md

Scripts

This folder contains scripts that can be used:

Status: Work in Progress

Please note: this documentation is a work in progress. If you have questions or suggestions, please create an issue with a full description of your question or idea.

Related Resources

Prerequisites

Before you can get started using these scripts, you will need to:

Notes

  • You must run these scripts from within a repo: These scripts are intended to be run from within a copy of this repository that was retrieved using git (i.e. a git clone). If you've followed the instructions for getting a local copy of the repository, then you're all set. But, if you have downloaded a zip of the content or moved the scripts outside of your local copy of the repo, these scripts will not work properly.

Getting Help, Making Suggestions

If you need help using these scripts, please post your questions to the OVAL Repository Mailing List (link TBD).

If you encounter a bug or have ideas for improving these scripts, please create an issue with a full description of your bug or idea.

Scripts for Content Use

Once you have a local copy of the repository and the scripting prerequisites in place, you're ready to build your own content!

build_oval_definitions_file.py

Use this script to search the repository for the content you want and compile it into an OVAL definitions file you can run.

# First, make sure you have the lastest content & scripts
$ git pull origin master

# Compile all Windows vulnerability definitions into all.windows.vulnerability.xml
$ python3 build_oval_definitions_file.py -o all.windows.vulnerability.xml --family windows --class vulnerability

# Compile all UNIX definitions related to CVE-2014-6509 into CVE.2014.6509.xml
$ python3 build_oval_definitions_file.py -o CVE.2014.6509.xml --family unix --reference_id "CVE-2014-6509"

# See script usage and options
$ python3 build_oval_definitions_file.py -h

Scripts for Content Contribution

Before using these scripts to contribute content, you must have a local copy of the repository,
install the scripting prerequisites and review the content contribution process & guidelines.

oval_decomposition.py

If your submission is a complete OVAL definitions file, you should use this script to extract its component elements and store those elements in the appropriate places in the repository file structure.

# extract elements in my.oval.defintions.file.xml and insert them into the repository
$ python3 oval_decomposition.py -f my.oval.defintions.file.xml

# See script usage and options
$ python3 oval_decomposition.py -h

build_oval_definitions_file.py

If your submission includes updates to elements in the repository, you can use this script to compile those elements into an OVAL definitions file that you can test and validate.

# Compile oval:com.mysite.oval:def:1 into 1.xml and schema validate it
$ python3 build_oval_definitions_file.py -o 1.xml --definition_id="oval:com.mysite.oval:def:1" -v

# See script usage and options
$ python3 build_oval_definitions_file.py -h

validate_oval_definitions_files.py

Schema and schematron validate one or more OVAL definitions files.

# See script usage and options
$ python3 validatate_oval_definitions_files.py -h

get_related_elements.py

Get OVAL elements that are related to one or more elements.

# See script usage and options
$ python3 get_related_elements.py -h

Scripts for Content Maintainance

get_repository_stats.py

Get OVAL elements that are related to one or more elements.

# See script usage and options
$ python3 get_repository_stats.py -h