Skip to content

Commit 280b3b9

Browse files
committed
fix: add CippExtensions to allowlist
1 parent fc76e11 commit 280b3b9

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

Modules/CIPPActivityTriggers/Public/Entrypoints/Activity Triggers/Push-ExecScheduledCommand.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function Push-ExecScheduledCommand {
179179
return
180180
}
181181

182-
if ($Command.Module -notin @('CIPPCore', 'CIPPAlerts', 'CIPPStandards', 'CIPPTests', 'CIPPDB')) {
182+
if ($Command.Module -notin @('CIPPCore', 'CIPPAlerts', 'CIPPStandards', 'CIPPTests', 'CIPPDB', 'CippExtensions')) {
183183
$State = 'Failed'
184184
Write-LogMessage -headers $Headers -API 'ScheduledTask' -message "Blocked attempt to schedule command from unauthorized module: $($Command.ModuleName)\$($Item.Command)" -Sev 'Warning'
185185
$Results = "Task blocked: The command '$($Item.Command)' is not permitted to run as a scheduled task."

Modules/CIPPCore/Public/Add-CIPPScheduledTask.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function Add-CIPPScheduledTask {
7070
$ImportedModules = [System.Collections.Generic.List[string]]::new()
7171
if (-not $Command) {
7272
try {
73-
foreach ($SiblingModule in @('CIPPStandards', 'CIPPAlerts', 'CIPPTests', 'CIPPDB')) {
73+
foreach ($SiblingModule in @('CIPPStandards', 'CIPPAlerts', 'CIPPTests', 'CIPPDB', 'CippExtensions')) {
7474
if (-not (Get-Module -Name $SiblingModule)) {
7575
Import-Module $SiblingModule -ErrorAction SilentlyContinue
7676
if (Get-Module -Name $SiblingModule) {
@@ -91,7 +91,7 @@ function Add-CIPPScheduledTask {
9191
return "Error - The command '$RequestedCommand' does not exist and cannot be scheduled."
9292
}
9393

94-
if ($Command.Module -notin @('CIPPCore', 'CIPPAlerts', 'CIPPStandards', 'CIPPTests', 'CIPPDB')) {
94+
if ($Command.Module -notin @('CIPPCore', 'CIPPAlerts', 'CIPPStandards', 'CIPPTests', 'CIPPDB', 'CippExtensions')) {
9595
Write-LogMessage -headers $Headers -API 'ScheduledTask' -message "Blocked attempt to schedule command from unauthorized module: $($Command.ModuleName)\$RequestedCommand" -Sev 'Warning'
9696
return "Error - The command '$RequestedCommand' is not permitted to run as a scheduled task."
9797
}

profile.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ $Timings['Timezone'] = $SwTimezone.Elapsed.TotalMilliseconds
216216
# Import Extra modules if needed
217217
$SwExtraModules = [System.Diagnostics.Stopwatch]::StartNew()
218218
$ModulesPath = Join-Path $env:CIPPRootPath 'Modules'
219-
$NonHttpModules = @('CIPPStandards', 'CIPPAlerts', 'CIPPTests', 'CIPPDB', 'CIPPActivityTriggers', 'DNSHealth')
219+
$NonHttpModules = @('CIPPStandards', 'CIPPAlerts', 'CIPPTests', 'CIPPDB', 'CIPPActivityTriggers', 'DNSHealth', 'CippExtensions')
220220
$HttpModule = @('CIPPHTTP')
221221

222222
$HttpDisabled = $env:AzureWebJobs_CIPPHttpTrigger_Disabled -in @('true', '1') -or [System.Environment]::GetEnvironmentVariable('AzureWebJobs.CIPPHttpTrigger.Disabled') -in @('true', '1')

0 commit comments

Comments
 (0)