Skip to content

Instantly share code, notes, and snippets.

@axpatito
Created December 17, 2018 19:44
Show Gist options
  • Save axpatito/082837b3053788218092ac47d56992f8 to your computer and use it in GitHub Desktop.
Save axpatito/082837b3053788218092ac47d56992f8 to your computer and use it in GitHub Desktop.
Example report for TheHive case_report PR
<table class="table" style="color:red;">
<tr>
<td>key</td>
<td>value</td>
</tr>
<tr>
<td>Title</td>
<td>{{caze.title}}</td>
</tr>
<tr>
<td>Description</td>
<td>{{caze.description}}</td>
</tr>
<tr>
<td>Date</td>
<td>{{caze.startDate | shortDate}}</td>
</tr>
<tr>
<td>Severity</td>
<td>{{caze.severity}}</td>
</tr>
<tr>
<td>TLP</td>
<td>{{caze.tlp}}</td>
</tr>
<tr>
<td>Assignee</td>
<td>{{caze.owner}}</td>
</tr>
<tr>
<td>Close date</td>
<td>{{caze.endDate | shortDate}}</td>
</tr>
<tr>
<td>Resolution Status</td>
<td>{{CaseResolutionStatus[caze.resolutionStatus]}}</td>
</tr>
<tr>
<td>Impact Status</td>
<td>{{caze.impactStatus === 'NoImpact' ? 'No' : 'Yes'}}</td>
</tr>
<tr>
<td>Conclusions</td>
<td>{{caze.summary}}</td>
</tr>
<tr>
<td>Tags</td>
<td><ul><li ng-repeat="tag in caze.tags">{{tag.text}}</li></ul></td>
</tr>
</table>
<h4>Metrics</h4>
<table class="table">
<tr>
<td>Metric</td>
<td>Value</td>
</tr>
<tr ng-repeat="(k,v) in caze.metrics">
<td>{{metricsCache[k].title || k}}</td>
<td>
{{caze.metrics[k]}}
</td>
</tr>
</table>
<ng-include src="'views/partials/case/details/related.cases.html'"></ng-include>
<h4>Statistics</h4>
<h6>Observables by type</h6>
<table class="table" ng-controller="ObservablesStatsCtrl as statsCtrl">
<tr ng-repeat="item in statsCtrl.byType.details">
<td>{{item.key}}</td>
<td>{{item.count}}</td>
</tr>
</table>
<h6>Observables as IOC</h6>
<table class="table" ng-controller="ObservablesStatsCtrl as statsCtrl">
<tr ng-repeat="item in statsCtrl.byIoc.details">
<td>{{(item.key === 'false') ? 'Not IOC' : 'IOC' }}</td>
<td>{{item.count}}</td>
</tr>
</table>
<h6>Top 10 tags</h6>
<table class="table" ng-controller="ObservablesStatsCtrl as statsCtrl">
<tr ng-repeat="item in statsCtrl.byTags.details">
<td>{{item.key}}</td>
<td>{{item.count}}</td>
</tr>
</table>
<h4>Attachments</h4>
<table class="table table-striped">
<tr>
<td>Filename</td>
<td>Date</td>
<td>Type</td>
<td>Size</td>
</tr>
<tr ng-repeat="attachment in attachments.values">
<td>{{attachment.attachment.name}}</td>
<td>{{attachment.startDate | shortDate}}</td>
<td>{{attachment.attachment.contentType}}</td>
<td>{{attachment.attachment.size}}</td>
</tr>
</table>
<h4>Observables</h4>
<table class="table">
<tr>
<td>Type</td>
<td>Value</td>
<tr>
<tr ng-repeat="artifact in caze.artifacts.allValues">
<td>{{artifact.dataType}}</td>
<td>{{artifact.data}}</td>
</tr>
</table>
@axpatito
Copy link
Author

To be used with TheHive-Project/TheHive#834

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment