usnistgov / oscal-deep-diff Goto Github PK
View Code? Open in Web Editor NEWOpen Security Controls Assessment Language (OSCAL) Deep Differencing Tool
License: Other
Open Security Controls Assessment Language (OSCAL) Deep Differencing Tool
License: Other
As an OSCAL user, I need tooling to help review changes between revisions of large OSCAL documents.
No longer in scope of this issue:
Note some of these issues will be broken into smaller tickets, see usnistgov/OSCAL#988 for more details
None.
Currently oscal-deep-diff
has no documentation for using the cli, or developing comparison configuration objects. The application needs:
As an OSCAL tool developer, I want to allow the tool to be able to only show JSON pointers in order to optimize the output object for machine-readable applications.
None.
The CLI checks if the --config
flag exists along with a manually passed in config. It should throw an error if both are defined, but it currently throws an error always when the --config
flag is defined.
As a NIST OSCAL team member, in order to ensure this project is well-designed, implemented, tested, and documented, I want itemized list of NIST publication requirements for publishing research software, status, and supported evidence for individual items per and other relevant guidelines.
NOTE: this issue is derived from usnistgov/metaschema-node#16
The following NIST requirements must be met:
package.json
As an OSCAL-deep-diff user, I need to be able to easily generate constraint sets for reproducible comparisons.
{A clear and concise description of what you want to happen. This should be outcome focused. Include concise description of any alternative solutions or features you've considered. Feel free to include screenshots or examples about the feature request here.}
Some workflows may want certain object properties (such as id or uuid) explicitly ignored from object comparisons. Other workflows may want entire sub-objects to not be compared (such as ignoring the back-matter object in a catalog)
As an OSCAL deep diff user analyzing comparison results by hand, I would like a way to omit unchanged array and array item records from the json comparison output for all or specific paths (e.x. omit unchanged control parameters, but keep unchanged control parameters) to make it easier to read.
array_changed
from an objectsubChanges
array items from an objectN/A
{The items above are general acceptance criteria for all User Stories. Please describe anything else that must be completed for this issue to be considered resolved.}
oscal-deep-diff --version
returns "unknown" instead of the proper version number.
As an CLI user, I need to be able to easily interpret the output of the comparison.
When no extra options are provided, the CLI should produce an output that is easily human readable. Some inspiration output formats include:
The main limitation is that the format chosen must not have any dependencies that would break non-cli usage (e.g. fs).
None.
{The items above are general acceptance criteria for all User Stories. Please describe anything else that must be completed for this issue to be considered resolved.}
As an OSCAL deep diff user, I would like to be able to change comparison behavior based on a property of an object that is being compared, such as:
This would require the "path condition" system to be reworked to allow for syntax that selects a property of a path, e.g. controls/#/props[name="ignoreme" and value="true"]
. This may mean moving towards an XPath-eque selection syntax.
N/A
{The items above are general acceptance criteria for all User Stories. Please describe anything else that must be completed for this issue to be considered resolved.}
As an OSCAL catalog consumer, I need to be able to compare OSCAL documents on the control level (compare how each control changes from revision to revision). This output comparison document should be expressive enough to be rendered to a human-readable format (such as a web page, PDF, or spreadsheet).
The implementation of this feature should take the form of a separate stage of the comparison that takes the base diff option and transforms it into a document with the following information:
title
and/or id
of the control for easy referenceunchanged
, changed
, moved
, added
, or withdrawn
high
, medium
, low
or numeric?) noting how much of a control has changed, and if the change is administrative or not{Describe any previous issues or related work that must be completed to start or complete this issue.}
As an OSCAL team member, I need documentation describing our compliance with NIST's software publication checklist (see more in https://github.com/usnistgov/oscal-base/issues/1).
This issue was formulated as a result of https://github.com/usnistgov/oscal-base/issues/1
Currently the ability to specify the way two subobjects are compared (a constraint) has been implemented, but the following needs to be implemented:
Old and new documents has a confusing connotation, usage should be renamed to left and right documents, like most diffing tools.
The current implementation of the match system uses a recursive function to maximize the scoring of matched sub-objects. This scoring system has one big flaw, that large documents take an exorbitant amount of time to compute (two NIST-SP-800-53 revisions could take upwards of several minutes on my machine). The recursive functions essentially recompute each sub-object match many times.
This is an optimal substructure problem, and is best solved by "caching" subobjects, trading time efficiency for space efficiency.
A simple CI pipeline (though CircleCI) needs to be set up to run the mocha tests in this repository. All tests are located in the src/
folder along with the source code, and are differentiated with a .spec
suffix.
In the DocumentComparison
type, include the final accumulated "score" of all sub-comparisons.
As an OSCAL developer, I need a consistent CI/CD process.
GitHub actions replacing the CircleCI testing and deployment tasks.
None
For example, in an OSCAL catalog, back-matter resources could be matched by title, but it may be more accurate to match them by the citation text, which is a sub-object's property. Being able to match by a sub-object (possibly using a JSON pointer) would increase matching power.
The CLI should be able to load documents from a URL, in addition to an on disk and in memory comparison. This would also make writing tests with live OSCAL documents a possibility.
As an OSCAL user, I need to be able to detect deeper changes in OSCAL documents with configuration that allows for better reproducibility.
Currently, the OSCAL-deep-diff tool can, given two documents, compare objects (nested maps) directly including their sub-objects, as well as optimally matching arrays of objects together by their properties, so that the matched array pairs have the minimum number of differences between them. This covers many scenarios that can apply to OSCAL documents, such as minor edits to catalogs, or groups that have been renamed.
The tool does not handle one scenario that can happen a lot during major revisions: sub-objects moved from one item of an array to another. For example, within a catalog, a control could move from one group to another between revisions, or parts from multiple controls could be consolidated into one control (or dispersed into multiple controls).
This is an Epic issue, which means it is a issue that links to multiple sub-issues.
No longer in scope of this issue:
Note some of these issues will be broken into smaller tickets, see usnistgov/OSCAL#988 for more details.
No active issues are dependencies.
For all sub-tasks:
When a new tag is created, CircleCI should run the pipeline that would automatically publish the package. This does not happen.
As a user of the tool, I would like to be able to produce excel reports of objects whose parents do not contain the same properties (e.g. comparing groups at the root of a catalog).
Currently if identifiers
are specified in an outputConfigs
item, the records are required to have these properties, and their parents must also contain them. This behavior limits the application of excel outputs to cases like an OSCAL catalog, which shares a title
and id
with its parent, group.
parentIdentifiers
option (if omitted, default to no parent identifiers?)identifiers
and parentIdentifiers
to have missing records (e.g. an OSCAL part
optionally has an id
)N/A
When the base comparison collects results from the comparison document, it finds all changes that match the specified pattern (for example, controls
) and merges them into one list. This does not account for parent changes, such as a group being added or deleted.
Parent ArrayChanged
' leftOnly
and rightOnly
fields should be traversed when assembling the intermediate output document of a base comparison.
Also a related problem that I do not have details on yet: some conditions cause the excel output document to produce bad output (no matched controls, no changes) that causes the table formatter and conditional formatting rules to break.
This repository lacks project-specific templates for issues and pull requests. See this link for details.
As an OSCAL catalog consumer, I need a easy to reference and human-readable document that compares how controls in a catalog have changed from one revision to the next (see https://csrc.nist.gov/CSRC/media/Publications/sp/800-53/rev-5/final/documents/sp800-53r4-to-r5-comparison-workbook.xlsx for an example of a human-generated comparison of control changes).
This implementation of this feature should take the form of a final stage to the OSCAL-deep-diff comparison that takes the output document generated in #27 and creates a human-readable document (spreadsheet, html document, or otherwise).
This issue depends on #27
{The items above are general acceptance criteria for all User Stories. Please describe anything else that must be completed for this issue to be considered resolved.}
The publish GitHub actions workflow fails, but running the identical commands manually does not.
See details here:
https://github.com/usnistgov/oscal-deep-diff/actions/runs/2247763509
As an OSCAL author and user, I need proper documentation of the deep-diff's capabilities.
{The items above are general acceptance criteria for all User Stories. Please describe anything else that must be completed for this issue to be considered resolved.}
When comparing documents, sometimes objects move from one part of the document to another. This can be in the form of a promotion (for example, an OSCAL enhancement becoming a full control), demotion (for example, a control being demoted into an enhancement), or a move (for example, a control moving families).
Note that the previous implementation of the matching system did have the capability to perform these "out of tree" matches.
Create tests to ensure that the solver consistently matches specific scenarios of sub-objects
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.