Skip to content

Commit

Permalink
Add rule filters for HIPAA & NIST800-53 extension
Browse files Browse the repository at this point in the history
  • Loading branch information
pablotr9 committed Jun 3, 2019
1 parent 13f70f8 commit 8fa46b0
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@
<i class="fa fa-fw fa-times cursor-pointer" aria-hidden="true" ng-click="removeFilter('file')"></i>
</span>
</md-chip>
<md-chip class="wz-chip" ng-show="includesFilter('hipaa')">
<span>File: {{getFilter('hipaa')}}
<i class="fa fa-fw fa-times cursor-pointer" aria-hidden="true" ng-click="removeFilter('hipaa')"></i>
</span>
</md-chip>
<md-chip class="wz-chip" ng-show="includesFilter('nist-800-53')">
<span>File: {{getFilter('NIST 800-53')}}
<i class="fa fa-fw fa-times cursor-pointer" aria-hidden="true" ng-click="removeFilter('nist-800-53')"></i>
</span>
</md-chip>
<md-chip class="wz-chip" ng-show="includesFilter('path')">
<span>Path: {{getFilter('path')}}
<i class="fa fa-fw fa-times cursor-pointer" aria-hidden="true" ng-click="removeFilter('path')"></i>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ <h1 class="font-size-20" ng-bind-html="colorRuleArg(ruleInfo.description)"></h1>
<!-- End groups section -->

<!-- PCI section -->
<md-card ng-if="(ruleInfo.pci.length > 0 || ruleInfo.gdpr.length > 0) && !editingFile" flex class="wz-md-card">
<md-card ng-if='(ruleInfo.pci.length > 0 || ruleInfo.gdpr.length > 0 || ruleInfo.hipaa.length > 0 || ruleInfo["nist-800-53"].length > 0) && !editingFile' flex class="wz-md-card">
<md-card-content class="wazuh-column">
<span class="wz-headline-title wz-margin-left--10">
<i class="fa fa-fw fa-cogs" aria-hidden="true"></i> Compliance
Expand All @@ -168,6 +168,17 @@ <h1 class="font-size-20" ng-bind-html="colorRuleArg(ruleInfo.description)"></h1>
</dd>
</dl>
</div>
<div class="euiFlexItem" style="padding-left: 40px;">
<dl class="dl-rules">
<dt>HIPAA</dt>
<dd class="dd-rules" ng-repeat="item in ruleInfo.hipaa">
<span class="wz-text-link" tooltip="Filter by this requirement" tooltip-placement="bottom"
ng-click="addDetailFilter('hipaa', item)">
{{ item }}
</span>
</dd>
</dl>
</div>
</div>
<div layout="row" class="wz-margin-top-10" ng-if="ruleInfo.gdpr.length">
<div class="euiFlexItem">
Expand All @@ -181,6 +192,17 @@ <h1 class="font-size-20" ng-bind-html="colorRuleArg(ruleInfo.description)"></h1>
</dd>
</dl>
</div>
<div class="euiFlexItem" style="padding-left: 40px;">
<dl class="dl-rules">
<dt>NIST 800-53</dt>
<dd class="dd-rules" ng-repeat='item in ruleInfo["nist-800-53"]'>
<span class="wz-text-link" tooltip="Filter by this requirement" tooltip-placement="bottom"
ng-click="addDetailFilter('nist-800-53', item)">
{{ item }}
</span>
</dd>
</dl>
</div>
</div>
</md-card-content>
</md-card>
Expand Down Expand Up @@ -249,7 +271,7 @@ <h1 class="md-headline wz-headline">
<div layout="row" class="md-padding">
<wazuh-table custom-columns="true" flex path="'/rules'"
implicit-filter="[{ name:'file',value: ruleInfo.file}]"
keys="['id',{value:'file',size:2},{value:'description',size:4},{value:'groups',nosortable:true,size:2},{value:'pci',nosortable:true,size:2},{value:'gdpr',nosortable:true},'level']"
keys="['id',{value:'file',size:2},{value:'description',size:4},{value:'groups',nosortable:true,size:2},{value:'pci',nosortable:true,size:2},{value:'gdpr',nosortable:true},{value:'hipaa',nosortable:true},{value:'nist-800-53',nosortable:true},'level']"
allow-click="true">
</wazuh-table>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,16 @@
<i class="fa fa-fw fa-times cursor-pointer" aria-hidden="true" ng-click="removeFilter('pci')"></i>
</span>
</md-chip>
<md-chip class="wz-chip" ng-show="includesFilter('hipaa')">
<span>HIPAA: {{getFilter('hipaa')}}
<i class="fa fa-fw fa-times cursor-pointer" aria-hidden="true" ng-click="removeFilter('hipaa')"></i>
</span>
</md-chip>
<md-chip class="wz-chip" ng-show="includesFilter('nist-800-53')">
<span>NIST 800-53: {{getFilter('nist-800-53')}}
<i class="fa fa-fw fa-times cursor-pointer" aria-hidden="true" ng-click="removeFilter('nist-800-53')"></i>
</span>
</md-chip>
<md-chip class="wz-chip" ng-show="includesFilter('gdpr')">
<span>GDPR: {{getFilter('gdpr')}}
<i class="fa fa-fw fa-times cursor-pointer" aria-hidden="true" ng-click="removeFilter('gdpr')"></i>
Expand All @@ -101,11 +111,11 @@
</md-chips>
<div layout="row" layout-padding>
<wazuh-table custom-columns="true" ng-if="!localFilter && !rulesetFiles" implicit-filter="appliedFilters" flex
path="'/rules'" keys="['id',{value:'description',size:4},{value:'groups',nosortable:true,size:2},{value:'pci',nosortable:true,size:2},{value:'gdpr',nosortable:true},'level',{value:'file',size:2}]"
path="'/rules'" keys="['id',{value:'description',size:4},{value:'groups',nosortable:true,size:2},{value:'pci',nosortable:true,size:2},{value:'gdpr',nosortable:true},{value:'hipaa',nosortable:true},{value:'nist-800-53',nosortable:true},'level',{value:'file',size:2}]"
allow-click="true" rows-per-page="14">
</wazuh-table>
<wazuh-table custom-columns="true" ng-if="localFilter && !rulesetFiles" implicit-filter="appliedCustomFilters"
flex path="'/rules'" keys="['id',{value:'description',size:4},{value:'groups',nosortable:true,size:2},{value:'pci',nosortable:true,size:2},{value:'gdpr',nosortable:true},'level',{value:'file',size:2}]"
flex path="'/rules'" keys="['id',{value:'description',size:4},{value:'groups',nosortable:true,size:2},{value:'pci',nosortable:true,size:2},{value:'gdpr',nosortable:true},{value:'hipaa',nosortable:true},{value:'nist-800-53',nosortable:true},'level',{value:'file',size:2}]"
allow-click="true" rows-per-page="14">
</wazuh-table>
<wazuh-table admin-mode="adminMode" ng-if="rulesetFiles && !localFilter" flex path="'/rules/files'" keys="['file']"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ define(['../module'], function(module) {
pci: 'PCI',
hipaa: 'HIPAA',
nist: 'NIST 800-53',
'nist-800-53': 'NIST 800-53',
groups: 'Groups',
name: 'Name',
count: 'Count',
Expand Down
4 changes: 2 additions & 2 deletions SplunkAppForWazuh/appserver/static/js/utils/filter-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ define([], function() {
const result = this.base();
result.meta.type = 'exists';
result.meta.value = 'exists';
result.meta.key = 'rule.nist';
result.meta.key = 'rule.nist_800_53';
result.exists = {
field: 'rule.nist'
field: 'rule.nist_800_53'
};
delete result.query;
return result;
Expand Down

0 comments on commit 8fa46b0

Please sign in to comment.