Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
datorr2 committed Dec 9, 2022
1 parent 2d73687 commit 22e50f1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Public/policy-ioa-exclusions.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ https://github.com/crowdstrike/psfalcon/wiki/ConvertTo-FalconIoaExclusion
#>
[CmdletBinding()]
param(
[Parameter(Mandatory,ValueFromPipeline,Position=1)]
[Parameter(Mandatory,ValueFromPipeline,Position=0)]
[System.Object]$Detection
)
begin { [System.Collections.Generic.List[object]]$Output = @() }
process {
if ($_.behaviors -and $_.device) {
@($_.behaviors).Where({ $_.tactic -notmatch '^(Machine Learning|Malware)$' }).foreach{
if ($Detection.behaviors -and $Detection.device) {
@($Detection.behaviors).Where({ $_.tactic -notmatch '^(Machine Learning|Malware)$' }).foreach{
$Output.Add(([PSCustomObject]@{
pattern_id = $_.behavior_id
pattern_name = $_.display_name
Expand All @@ -43,8 +43,8 @@ https://github.com/crowdstrike/psfalcon/wiki/ConvertTo-FalconIoaExclusion
}
} else {
foreach ($Property in @('behaviors','device')) {
if (!$_.$Property) {
throw "[ConvertTo-FalconMlExclusion] Missing required '$Property' property."
if (!$Detection.$Property) {
throw "[ConvertTo-FalconIoaExclusion] Missing required '$Property' property."
}
}
}
Expand Down Expand Up @@ -315,4 +315,4 @@ https://github.com/crowdstrike/psfalcon/wiki/Remove-FalconIoaExclusion
Invoke-Falcon @Param -Inputs $PSBoundParameters
}
}
}
}

0 comments on commit 22e50f1

Please sign in to comment.