OpenC2-org / openc2-org

The Open Command and Control Forum promotes the global development and adoption of the OpenC2 language and reference material.
Other
30 stars 4 forks source link

Sample JSON for testing #3

Closed sparrell closed 7 years ago

sparrell commented 8 years ago

PROBLEM

There doesn't exist (to my knowledge) a set of "sample openc2 json data". This would be very useful for testing. Now each developer makes up some data on their own. For example there are some example jsons in python within https://github.com/OpenC2-org/openc2-org/blob/master/ref-implementations/OC2Tools/produce-cmd.py and some in erlang at https://github.com/sparrell/ocas/tree/master/include and probably others elsewhere.

It would be useful to go to a common place that had raw json files that each of us could use (and add to) when we needed test data. I believe it would also be helpful for validating the spec as creating these files causes you to think thru what the command should be in the use case you are thinking of.

POTENTIAL SOLUTION

Make a directory called ExampleJson (or whatever you want to call it) in a fairly accessible place (maybe at top level of this repo, or maybe directly under ref-implementations) and populate with raw json files using some agreed upon naming convention.

jmbrule commented 8 years ago

I agree with your proposed solution, I will ask Jason to set it up. I believe there are some sample json files in yuuki/examples, will have them copied and put in the new directory

-----Original Message----- From: Duncan Sparrell [mailto:notifications@github.com] Sent: Saturday, October 15, 2016 5:03 PM To: OpenC2-org/openc2-org openc2-org@noreply.github.com Subject: [OpenC2-org/openc2-org] Sample JSON for testing (#3)

PROBLEM

There doesn't exist (to my knowledge) as set of "sample openc2 json data". This would be very useful for testing. Now each developer makes up some data on their own. For example there are some example jsons in python within https://github.com/OpenC2-org/openc2-org/blob/master/ref-implementations/OC2Tools/produce-cmd.py and some in erlang at https://github.com/sparrell/ocas/tree/master/include and probably others elsewhere.

It would be useful to go to a common place that had raw json files that each of us could add to when we needed test data. I believe it would also be helpful for validating the spec as creating these files causes you to think thru what the command should be in the use case you are thinking of.

POTENTIAL SOLUTION

Make a directory called ExampleJson (or whatever you want to call it) in a fairly accessible place (maybe at top level of this repo, or maybe directly under ref-implementations) and populate with raw json files using some agreed upon naming convention.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OpenC2-org/openc2-org/issues/3 , or mute the thread https://github.com/notifications/unsubscribe-auth/AQQtp1n7ntAswBrmgJeX9scu_uj13Vujks5q0T9zgaJpZM4KX0GI . https://github.com/notifications/beacon/AQQtpwK2e5a0NqwQTAuY6LQamUGj7Q2Oks5q0T9zgaJpZM4KX0GI.gif

romanojd commented 8 years ago

I'll setup the framework so that members can upload their own examples.

romanojd commented 8 years ago

I added a folder for examples here: https://github.com/OpenC2-org/openc2-org/tree/master/schemas/json/examples

Is this too deep? We already had the schemas/json folder.

davaya commented 8 years ago

I will extract the JSON examples from OC2Tools/oc2test.py and put them in the examples folder Jason has created. That file also contains several negative examples that should fail validation, which is just as important a component of a test corpus. Unfortunately the negative examples are fuzzed from a previous version of the schema, and while they will fail to validate under the current schema, we should also have a set that is fuzzed from the current schema. I'll create some current negative examples as time permits.

Dave

-----Original Message----- From: Duncan Sparrell [mailto:notifications@github.com] Sent: Saturday, October 15, 2016 5:03 PM To: OpenC2-org/openc2-org Subject: [OpenC2-org/openc2-org] Sample JSON for testing (#3)

PROBLEM

There doesn't exist (to my knowledge) as set of "sample openc2 json data". This would be very useful for testing. Now each developer makes up some data on their own. For example there are some example jsons in python within https://github.com/OpenC2-org/openc2-org/blob/master/ref-implementations/OC2Tools/produce-cmd.py and some in erlang at https://github.com/sparrell/ocas/tree/master/include and probably others elsewhere.

It would be useful to go to a common place that had raw json files that each of us could add to when we needed test data. I believe it would also be helpful for validating the spec as creating these files causes you to think thru what the command should be in the use case you are thinking of.

POTENTIAL SOLUTION

Make a directory called ExampleJson (or whatever you want to call it) in a fairly accessible place (maybe at top level of this repo, or maybe directly under ref-implementations) and populate with raw json files using some agreed upon naming convention.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/OpenC2-org/openc2-org/issues/3 , or mute the thread https://github.com/notifications/unsubscribe-auth/ASRALNTeRD5lmpIIX9jh7G0yH-nOzDnCks5q0T90gaJpZM4KX0GI . https://github.com/notifications/beacon/ASRALBnoB--LXDoY8HUK0NpY4EuZucqsks5q0T90gaJpZM4KX0GI.gif

romanojd commented 7 years ago

The examples can be found here: https://github.com/OpenC2-org/openc2-org/tree/master/schemas/json/examples.

As discussed in the Forum Meeting on 1/19/2017, this issue is closed.