TheHive-Project / TheHive

TheHive: a Scalable, Open Source and Free Security Incident Response Platform
https://thehive-project.org
GNU Affero General Public License v3.0
3.28k stars 609 forks source link

[Question] Generating report with TheHive-Templates #2318

Closed StiveN99 closed 2 years ago

StiveN99 commented 2 years ago

Request Type

Question

Work Environment

Question Answer
OS version (server) Debian, Ubuntu, CentOS, RedHat, ...
OS version (client) XP, Seven, 10, Ubuntu, ...
Virtualized Env. True / False
Dedicated RAM XX GB
vCPU 4 / 8 / 16 / 32
TheHive version / git hash 4.x, hash of the commit
Package Type RPM, DEB, Docker, Binary, From source
Database Cassandra / BerlkelyDB
Index type Lucene / Elasticsearch
Attachments storage Local, NFS, S3, HDFS
Browser type & version If applicable

Question

Hi there,

I'm developing a responder to export all observables (and associated analyzer report) and I would like to know if its possible to use the TheHive-Templates to generate the report in my report responder? I'm presently retrieving the analyzer reports json data using the cortex connector rest api but I would like to populate the Thehive-Templates (like in The Hive). I"m not really familiar with Angular JS, but I believe I"m missing the model to populate the template( json,template and model are needed).

Any idea where I could find the model or if there is any other way to populate the Thehive-Templates ?

Thanks

StiveN99 commented 2 years ago

It ended up being relatively easy do to. I think was confusing Angular JS with Angular. Looks like you can provide a dictionary of json data to the $scope(model).