Skip to content

Commit

Permalink
Update PowerSTIG to send a warning to the user when using a composite…
Browse files Browse the repository at this point in the history
… that leverages the new DISA Ids (#773)

* add disa warn msg to composites with new 2.1 stig

* updated changelog.md
  • Loading branch information
bcwilhite committed Nov 4, 2020
1 parent e2b29be commit a71b0d4
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Unreleased]

* Update PowerSTIG to send a warning to the user when using a composite that leverages the new DISA Ids: [#772](https://github.com/microsoft/PowerStig/issues/772)
* Update PowerSTIG to successfully parse/apply Microsoft Office System 2013 STIG - Ver 2, Rel 1: [#769](https://github.com/microsoft/PowerStig/issues/769)
* Update PowerSTIG to successfully parse/apply Microsoft Windows 2012 Server DNS STIG - Ver 2, Rel 1: [#760](https://github.com/microsoft/PowerStig/issues/760)
* Update PowerSTIG to successfully parse/apply Microsoft SQL Server 2016 Instance Version 2; Release 1: [#761](https://github.com/microsoft/PowerStig/issues/761)
Expand Down
3 changes: 3 additions & 0 deletions source/DSCResources/IisServer/IisServer.schema.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,8 @@ configuration IisServer
. "$resourcePath\windows.xIisMimeTypeMapping.ps1"
. "$resourcePath\windows.xWebConfigProperty.ps1"
. "$resourcePath\windows.xIisLogging.ps1"

# DISA STIG Warning Message when v2.1 or greater verison of STIG is specified
. "$resourcePath\disaWarning.Message.ps1"
}
#endregion Composite
3 changes: 3 additions & 0 deletions source/DSCResources/IisSite/IisSite.schema.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ configuration IisSite
. "$resourcePath\windows.xIisMimeTypeMapping.ps1"
. "$resourcePath\windows.xWebConfigProperty.ps1"
. "$resourcePath\windows.xSslSettings.ps1"

# DISA STIG Warning Message when v2.1 or greater verison of STIG is specified
. "$resourcePath\disaWarning.Message.ps1"
}

#endregion Composite
3 changes: 3 additions & 0 deletions source/DSCResources/Office/Office.schema.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,7 @@ configuration Office
. "$resourcePath\windows.Registry.ps1"
. "$resourcePath\windows.Script.skip.ps1"
. "$resourcePath\windows.RefreshRegistryPolicy.ps1"

# DISA STIG Warning Message when v2.1 or greater verison of STIG is specified
. "$resourcePath\disaWarning.Message.ps1"
}
8 changes: 8 additions & 0 deletions source/DSCResources/Resources/disaWarning.Message.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

if ($stig.Version -ge [version]2.1)
{
Write-Warning -Message "With DISA's Quarterly Release (October 2020), rule Ids have changed."
Write-Warning -Message "For more information, please visit https://aka.ms/PowerStigDisaChanges"
}
3 changes: 3 additions & 0 deletions source/DSCResources/SqlServer/SqlServer.schema.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,7 @@ configuration SqlServer
Import-DscResource -ModuleName PSDSCresources -ModuleVersion 2.12.0.0
. "$resourcePath\windows.Registry.ps1"
. "$resourcePath\windows.Script.skip.ps1"

# DISA STIG Warning Message when v2.1 or greater verison of STIG is specified
. "$resourcePath\disaWarning.Message.ps1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,6 @@ configuration WindowsDnsServer
Import-DscResource -ModuleName ComputerManagementDsc -ModuleVersion 8.4.0
. "$resourcePath\windows.WindowsEventLog.ps1"

# DISA STIG Warning Message when v2.1 or greater verison of STIG is specified
. "$resourcePath\disaWarning.Message.ps1"
}

0 comments on commit a71b0d4

Please sign in to comment.