vz-risk / verisr

R package for working with VERIS data
21 stars 11 forks source link

Parse error from json2veris #27

Open hukuzatuna opened 2 years ago

hukuzatuna commented 2 years ago

I'm working through the examples from Data Driven Security, and have also cloned the repo. I am getting an error from json2veris as shown in the screenshot:

Screen Shot 2022-05-30 at 10 29 04

The command I use is vcdb <- json2veris("/Volumes/prm/DataDrivenSecurity/verisr-master/data")

The R package was installed today (30 May 2022 10:00) from the GitiHub repo.

I read the other issues and didn't see anything that replicated this. If you need me to do more debugging, just let me know!

GlenmaelA commented 2 years ago

Try this, I found that you need to specify the schema manually and also call both the idustry2 and 2021_pattern_models:

library(devtools)
install.packages("readr")
install.packages("skmeans")
install_github("vz-risk/verisr")
library(verisr)

jsondir <- "./data/vcdb/"
data('industry2', package='verisr')
data('2021_pattern_models', package='verisr')
##Specify the schema manually and download from https://github.com/vz-risk/VCDB/blob/master/vcdb-merged.json
vcdb <- json2veris(jsondir, schema="./vcdb/vcdb-merged1.3.6.json")  
gdbassett commented 2 years ago

REcommend using jay jacobs' verisr (https://github.com/jayjacobs/verisr) as it's been static since about when the book was written. The one thing missing is veris2matrix(). it's in the /r/1.0/ directory of the repository but not exported by the function. Something I think Jay is looking into.