Skip to content

Commit

Permalink
Release
Browse files Browse the repository at this point in the history
Merge release into master
  • Loading branch information
athaynes authored Mar 11, 2019
1 parent e741e6c commit 7128be8
Show file tree
Hide file tree
Showing 50 changed files with 700 additions and 4,296 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
# Versions

## 3.0.0
## Unreleased

## 3.0.1

UPDATES

* Fixed [#350](https://github.com/Microsoft/PowerStig/issues/350): Updates to fix Skip rules not working correctly
* Fixed [#348](https://github.com/Microsoft/PowerStig/issues/348): Update to DnsServer Schema to correct typo.

NEW
## 3.0.0

* Introduces class support for each rule type
* The STIG class now contains an array of rule objects vs xml elements
Expand Down
2 changes: 1 addition & 1 deletion DSCResources/Resources/windows.ProcessMitigation.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $mitigationTargets = $rules.MitigationTarget | Select-Object -Unique

foreach ($target in $mitigationTargets)
{
$targetrules = $rules | where {$_.MitigationTarget -eq "$target"}
$targetrules = $rules | Where-Object {$_.MitigationTarget -eq "$target"}
$enableValue = @()
$disableValue = @()
$idValue = @()
Expand Down
2 changes: 1 addition & 1 deletion DSCResources/Resources/windows.Script.skip.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.

$rules = $stig.RuleList | Select-Rule -Type SkipRule
$rules = $stig.RuleList | Select-Rule -Type SkippedRule

foreach ( $rule in $rules )
{
Expand Down
16 changes: 8 additions & 8 deletions DSCResources/Resources/windows.xSslSettings.ps1
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# Header

$rules = $stig.RuleList | Select-Rule -Type SslSettingsRule

foreach ($website in $WebsiteName)
if ($rules)
{
$value = Get-UniqueStringArray -InputObject $rules.Value -AsString
[array] $value = $value.Split(',') -replace "'",''

xSslSettings "$(Get-ResourceTitle -Rule $rule -Instance $website)"
foreach ($website in $WebsiteName)
{
Name = "IIS:\Sites\$website"
Bindings = $value
xSslSettings "[$($rules.id -join ' ')]$website"
{
Name = "IIS:\Sites\$website"
Bindings = (Get-UniqueStringArray -InputObject $rules.Value)
}
}
}
18 changes: 9 additions & 9 deletions DSCResources/Resources/windows.xWebConfigProperty.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
#region Header

$rules = $stig.RuleList | Select-Rule -Type WebConfigurationPropertyRule

if ($WebsiteName)
Expand All @@ -11,10 +11,10 @@ if ($WebsiteName)
{
xWebConfigProperty "$(Get-ResourceTitle -Rule $rule -Instance $website)"
{
WebsitePath = "IIS:\Sites\$website"
Filter = $rule.ConfigSection
PropertyName = $rule.Key
Value = $rule.Value
WebsitePath = "IIS:\Sites\$website"
Filter = $rule.ConfigSection
PropertyName = $rule.Key
Value = $rule.Value
}
}
}
Expand All @@ -34,10 +34,10 @@ else

xWebConfigProperty "$(Get-ResourceTitle -Rule $rule)"
{
WebsitePath = $psPath
Filter = $rule.ConfigSection
PropertyName = $rule.Key
Value = $rule.Value
WebsitePath = $psPath
Filter = $rule.ConfigSection
PropertyName = $rule.Key
Value = $rule.Value
}
}
}
4 changes: 2 additions & 2 deletions DSCResources/WindowsDnsServer/WindowsDnsServer.schema.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Configuration WindowsDnsServer

[Parameter()]
[ValidateNotNullOrEmpty()]
[sashtable]
[hashtable]
$Exception,

[Parameter()]
Expand All @@ -78,7 +78,7 @@ Configuration WindowsDnsServer
)

##### BEGIN DO NOT MODIFY #####
$stig = [STIG]::New('WindowsServer', $OsVersion, 'Dns' , $StigVersion)
$stig = [STIG]::New('WindowsDnsServer', $OsVersion, $StigVersion)
$stig.LoadRules($OrgSettings, $Exception, $SkipRule, $SkipRuleType)

# $resourcePath is exported from the helper module in the header
Expand Down
5 changes: 4 additions & 1 deletion DSCResources/helper.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ function Select-Rule

process
{
return $RuleList.Where( {$_.GetType().ToString() -eq $Type})
return $RuleList.Where({
$_.GetType().ToString() -eq $Type -and
[string]::IsNullOrEmpty($_.DuplicateOf)
})
}
}

Expand Down
166 changes: 93 additions & 73 deletions FILEHASH.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Module/Rule.Skip/Skip.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ Class SkippedRule : Rule
.DESCRIPTION
A constructor for SkippedRule. Returns a ready to use instance
of SkippedRule.
.PARAMETER StigRuleId
The Id of an individual Stig Rule
.PARAMETER Rule
The Stig Rule
#>
SkippedRule ([string] $Id)
SkippedRule ([xml.xmlelement] $Rule) : Base ($Rule)
{
$this.Id = $Id
$this.UpdateRuleTitle('Skip')
}

#endregion
Expand Down
11 changes: 10 additions & 1 deletion Module/Rule/Rule.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,19 @@ Class Rule : ICloneable
#>
[void] AddExceptionToPolicy ([string] $Value)
{
$this.Title = "[Exception] " + $this.title
$this.UpdateRuleTitle('Exception')
$this.($this.GetOverrideValue()) = $Value
}

<#
.SYNOPSIS
Applies a uniform title update format
#>
[void] UpdateRuleTitle ([string] $Value)
{
$this.Title = "[$Value] " + $this.Title
}

<#
.SYNOPSIS
Creates a shallow copy of the current object
Expand Down
4 changes: 2 additions & 2 deletions Module/STIG/STIG.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,9 @@ Class STIG
{
foreach ($rule in $type.Rule)
{
if ( @($SkipRules) -contains $rule.Id -or $type.Name -eq $SkipRuleType )
if (@($SkipRules) -contains $rule.Id -or @($SkipRuleType) -contains $type.Name)
{
$importRule = [SkippedRule]::new($rule.Id)
$importRule = [SkippedRule]::new($rule)
}
else
{
Expand Down
44 changes: 5 additions & 39 deletions PowerStig.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
RootModule = 'PowerStig.psm1'

# Version number of this module.
ModuleVersion = '3.0.0'
ModuleVersion = '3.0.1'

# ID used to uniquely identify this module
GUID = 'a132f6a5-8f96-4942-be25-b213ee7e4af3'
Expand Down Expand Up @@ -96,44 +96,10 @@ PrivateData = @{
ProjectUri = 'https://github.com/Microsoft/PowerStig'

# ReleaseNotes of this module
ReleaseNotes = 'NEW
* Introduces class support for each rule type
* The STIG class now contains an array of rule objects vs xml elements
* Orgsettings, Exceptions, and Rule skips are all supported by the Rule base class
* Rule help is provided for any loaded rule.
* See the [wiki](https://github.com/Microsoft/PowerStig/wiki/GettingRuleHelp) for more information.
* Major code refactor to simplify maintenance and usage
* [Breaking Change] The STIG class constructor no longer accepts Orgsettings, Exceptions, or Rule skips
* That functionality has move to the load rule method
* DSC composite resource parameter validation for version numbers has been removed
* The STIG class validates all input and will throw an error if invalid data is provided.
* The Get-StigList has be updated and renamed to Get-Stig to return the STIG class
UPDATES
* Fixed [#241](https://github.com/Microsoft/PowerStig/issues/241): [WindowsFeatureRule] PsDesiredStateConfiguration\WindowsOptionalFeature doesn''t properly handle features that return $null
* Fixed [#258](https://github.com/Microsoft/PowerStig/issues/258): New-StigChecklist will not accept a path without an explicit filename
* Fixed [#243](https://github.com/Microsoft/PowerStig/issues/243): [V-46515] Windows-All-IE11-1.15 Rawstring typo
* Fixed [#289](https://github.com/Microsoft/PowerStig/issues/289): Updated DocumentRule and DocumentRuleConvert Classes to parse correctly.
* Fixed [#284](https://github.com/Microsoft/PowerStig/issues/284): [V-74415] [V-74413] Windows 10 STIG rule V-74415 and V-74413 should not contain white space in key
* Fixed [290](https://github.com/Microsoft/PowerStig/issues/290): [V-76731] IIS Server STIG V-76731 fails to properly set STIG guidance because rule is not split.
* Fixed [314](https://github.com/Microsoft/PowerStig/issues/314): Update PowerSTIG to Utilize LogTargetW3C parameter in xWebAdministration 2.5.0.0.
* Fixed [334](https://github.com/Microsoft/PowerStig/issues/334): Update PowerStig to utilize AccessControlDsc 1.3.0.0
* Fixed [331](https://github.com/Microsoft/PowerStig/issues/331): 2012/R2 [V-39325] 2016 [V-73373], [V-73389] PermissionRule.Convert CheckContent Match Parser Update
* Fixed [320](https://github.com/Microsoft/PowerStig/issues/320): IIS Site STIG doesn''t correctly convert STIGS that contain "SSL Settings" in raw string
* Added the following STIGs
* IIS Site 8.5 V1R6 [#276](https://github.com/Microsoft/PowerStig/issues/276)
* Windows Firewall STIG V1R7 [#319](https://github.com/Microsoft/PowerStig/issues/319)
* Removed the following STIGs
* Windows Server 2012 R2 DC 2.12
* Windows Server 2012 R2 DSN 1.7
* Active Directory Domain 2.9
* IIS Server 8.5 1.3
* IIS Site 8.5 1.2
* Removed: Internet Explorer 1.13'
ReleaseNotes = 'UPDATES
* Fixed [#350](https://github.com/Microsoft/PowerStig/issues/350): Updates to fix Skip rules not working correctly
* Fixed [#348](https://github.com/Microsoft/PowerStig/issues/348): Update to DnsServer Schema to correct typo.'
} # End of PSData hashtable
} # End of PrivateData hashtable
}
Loading

0 comments on commit 7128be8

Please sign in to comment.