diff --git a/.github/workflows/PSScriptAnalyzer.yml b/.github/workflows/PSScriptAnalyzer.yml index fe69d8f..b45d340 100644 --- a/.github/workflows/PSScriptAnalyzer.yml +++ b/.github/workflows/PSScriptAnalyzer.yml @@ -5,7 +5,7 @@ jobs: name: Run PSScriptAnalyzer runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: lint uses: devblackops/github-action-psscriptanalyzer@master with: @@ -14,4 +14,4 @@ jobs: failOnWarnings: false failOnInfos: false repoToken: ${{ secrets.GITHUB_TOKEN }} - settingsPath: .github/workflows/PSScriptAnalyzerSettings.psd1 \ No newline at end of file + settingsPath: .github/workflows/PSScriptAnalyzerSettings.psd1 diff --git a/.github/workflows/Release.yml b/.github/workflows/Release.yml index fff8379..ab0c84a 100644 --- a/.github/workflows/Release.yml +++ b/.github/workflows/Release.yml @@ -8,7 +8,7 @@ jobs: publish-to-gallery: runs-on: windows-2019 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set PSRepository to Trusted for PowerShell Gallery shell: pwsh run: | @@ -25,6 +25,10 @@ jobs: shell: pwsh run: | Install-Module -Name PScriboCharts -Repository PSGallery -Force + - name: Install Diagrammer.Microsoft.AD module + shell: pwsh + run: | + Install-Module -Name Diagrammer.Microsoft.AD -Repository PSGallery -Force - name: Test Module Manifest shell: pwsh run: | diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..6267bc4 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,49 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# +# https://github.com/microsoft/action-psscriptanalyzer +# For more information on PSScriptAnalyzer in general, see +# https://github.com/PowerShell/PSScriptAnalyzer + +name: CodeQL + +on: + push: + branches: [ "dev" ] + pull_request: + branches: [ "dev" ] + schedule: + - cron: '20 14 * * 1' + +permissions: + contents: read + +jobs: + build: + permissions: + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/upload-sarif to upload SARIF results + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + name: PSScriptAnalyzer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Run PSScriptAnalyzer + uses: microsoft/psscriptanalyzer-action@v1.1 + with: + # Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options. + # The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules. + path: .\ + recurse: true + # Include your own basic security rules. Removing this option will run all the rules + excludeRule: '"PSAvoidUsingPlainTextForPassword", "PSAvoidUsingUsernameAndPasswordParams", "PSAvoidUsingConvertToSecureStringWithPlainText"' + output: results.sarif + + # Upload the SARIF file generated in the previous step + - name: Upload SARIF results file + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: results.sarif diff --git a/AsBuiltReport.Microsoft.AD.Style.ps1 b/AsBuiltReport.Microsoft.AD.Style.ps1 index 6e23d75..3cb7004 100644 --- a/AsBuiltReport.Microsoft.AD.Style.ps1 +++ b/AsBuiltReport.Microsoft.AD.Style.ps1 @@ -101,6 +101,13 @@ Table -Name 'Cover Page' -List -Style Borderless -Width 0 -Hashtable ([Ordered] }) PageBreak +if ($Global:BuitReportParams.EnableHealthCheck) { + Section -Style TOC -ExcludeFromTOC 'DISCLAIMER' { + Paragraph "The information contained in this report has been obtained through automation and observations. Opinions, recommendations and conclusions are disseminated using insight, knowledge, training and experience. This assessment was not intended to be exhaustive. However, we have done our best to capture the most relevant opportunities for improvement. It is expected that responsibility for the implementation of these recommendations will be reviewed and implemented by a person with the necessary knowledge, experience or expertise. In no event shall the author(s) be liable for damages of any kind (including, but not limited to, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use or inability to use these recommendations or the statements made in this documentation." + } + PageBreak +} + if ($ReportConfig.Report.ShowTableOfContents) { # Add Table of Contents TOC -Name 'Table of Contents' diff --git a/AsBuiltReport.Microsoft.AD.json b/AsBuiltReport.Microsoft.AD.json index 5b84cf8..8dee1b1 100644 --- a/AsBuiltReport.Microsoft.AD.json +++ b/AsBuiltReport.Microsoft.AD.json @@ -12,6 +12,7 @@ "ShowDefinitionInfo": false, "PSDefaultAuthentication": "Negotiate", "EnableCharts": false, + "EnableDiagrams": true, "Exclude": { "Domains": [], "DCs": [] diff --git a/AsBuiltReport.Microsoft.AD.psd1 b/AsBuiltReport.Microsoft.AD.psd1 index 8feb5a5..d461901 100644 --- a/AsBuiltReport.Microsoft.AD.psd1 +++ b/AsBuiltReport.Microsoft.AD.psd1 @@ -12,7 +12,7 @@ RootModule = 'AsBuiltReport.Microsoft.AD.psm1' # Version number of this module. -ModuleVersion = '0.7.15' +ModuleVersion = '0.8.0' # Supported PSEditions # CompatiblePSEditions = @() @@ -27,7 +27,7 @@ Author = 'Jonathan Colon' # CompanyName = 'Unknown' # Copyright statement for this module -Copyright = '(c) 2023 Jonathan Colon. All rights reserved.' +Copyright = '(c) 2024 Jonathan Colon. All rights reserved.' # Description of the functionality provided by this module Description = 'A PowerShell module to generate an as built report on the configuration of Microsoft AD.' @@ -63,6 +63,10 @@ RequiredModules = @( @{ ModuleName = 'PScriboCharts'; ModuleVersion = '0.9.0' + }, + @{ + ModuleName = 'Diagrammer.Microsoft.AD'; + ModuleVersion = '0.1.3' } ) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e0601b..e854d02 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,24 @@ # :arrows_clockwise: Microsoft AD As Built Report Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.8.0] - 2024-01-24 + +### Added + +- Added initial diagram support: + - Forest Diagram +- Added disclaimer section if the EnableHealthCheck option is used. + +### Fixed + +- Fix [#137](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/137) +- Fix [#138](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/138) +- Fix [#143](https://github.com/AsBuiltReport/AsBuiltReport.Microsoft.AD/issues/143) + ## [0.7.15] - 2023-10-03 ### Changed diff --git a/README.md b/README.md index 4ffddfe..b6b897f 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,8 @@ The **Options** schema allows certain options within the report to be toggled on | Exclude.DCs | Array List | Empty | Allow to filter on AD Domain Controller Server FQDN. | | Include.Domains | Array List | Empty | Allow only a list of Active Directory Domain Controller FQDN to document. | | Include.DCs | Array List | Empty | Allow only a list of Active Directory Domain FQDN to document. | +| EnableDiagrams | true / false | false | Toggle to enable/disable of Infrastructure Diagrams| + ### InfoLevel diff --git a/Samples/Sample Microsoft AD As Built Report.html b/Samples/Sample Microsoft AD As Built Report.html index f030496..f3061a1 100644 --- a/Samples/Sample Microsoft AD As Built Report.html +++ b/Samples/Sample Microsoft AD As Built Report.html @@ -1,6 +1,6 @@ - + -Microsoft Active Directory As Built Report +Microsoft AD As Built Report