-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(rules): add rules.Store and in-memory implementation #12
Conversation
The Store interface allows rule information to be pulled from different types of sources while providing a default implementation for immediate use. Signed-off-by: Jennifer Power <[email protected]>
Setting this allows validation that go.mod is up to date in CI Signed-off-by: Jennifer Power <[email protected]>
Signed-off-by: Jennifer Power <[email protected]>
Signed-off-by: Jennifer Power <[email protected]>
Formats the license header to be compliant with Apache 2.0 short variant header Signed-off-by: Jennifer Power <[email protected]>
f3f144a
to
68831db
Compare
Signed-off-by: Jennifer Power <[email protected]>
b0fffa4
to
cd235ef
Compare
The ruleset does not need to be set in the map until it is populated Signed-off-by: Jennifer Power <[email protected]>
a1f8a29
to
37434ee
Compare
Signed-off-by: Jennifer Power <[email protected]>
Signed-off-by: Jennifer Power <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added so that the interface does not need to be broken or rewritten if implementation include the use of remote calls.
If there is a possibility of storing OSCAL objects in external storage in the future, adding context.Context to the interface now is reasonable.
While it's technically possible to embed context.Context in a "struct" that implements the interface without passing through argument, it affects the entire struct's lifecycle, making it less flexible for handling multiple concurrent requests with different contexts.
Description
Creates a way to index and interact with rule set extension data gather from OSCAL Components. Starts with a basic in-memory implementation using maps for efficient searching.
Closes #8
Decisions
Making the Store interface: It's very likely that other implementations will be needed to scale to larger datasets or to support for concurrent searches. Creating an interface that can be used will allow these implementation to be used easily.
Adding context to the Store Interface - Essentially future proofing the interface. Added so that the interface does not need to be broken or rewritten if implementation include the use of remote calls. This is a medium opinion though and I could probably go either way on including this.
How has this been tested?
Types of changes
Quality assurance (all should be covered).