-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from cisagov/develop
v0.1.0
- Loading branch information
Showing
132 changed files
with
27,484 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Run OPA Tests | ||
on: | ||
# Run tests on each commit, newly opened/reopened PR, and | ||
# PR review submission (e.g. approval) | ||
push: | ||
paths: | ||
- "**.rego" | ||
pull_request: | ||
types: [opened, reopened] | ||
branches: | ||
- "main" | ||
paths: | ||
- "**.rego" | ||
pull_request_review: | ||
types: [submitted] | ||
branches: | ||
- "main" | ||
|
||
jobs: | ||
Run-OPA-Tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup OPA | ||
uses: open-policy-agent/setup-opa@v1 | ||
with: | ||
version: latest | ||
|
||
- name: Run OPA Tests | ||
run: opa test Rego/*.rego Testing/**/*.rego -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Run PS Linter | ||
on: | ||
push: | ||
paths: | ||
- "**.ps1" | ||
- "**.psm1" | ||
pull_request: | ||
types: [opened, reopened] | ||
branches: | ||
- "main" | ||
paths: | ||
- "**.ps1" | ||
- "**.psm1" | ||
workflow_dispatch: | ||
|
||
jobs: | ||
lint: | ||
name: Run PS Linter | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
issues: write | ||
pull-requests: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: lint | ||
uses: docker://devblackops/github-action-psscriptanalyzer:2.4.0 | ||
with: | ||
repoToken: ${{ secrets.GITHUB_TOKEN }} | ||
settingsPath: PSScriptAnalyzerSettings.psd1 | ||
failOnErrors: true | ||
failOnWarnings: true | ||
failOnInfos: true | ||
sendComment: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# dependencies | ||
|
||
# testing | ||
|
||
# production | ||
|
||
# msc | ||
*.xml | ||
*.cer | ||
/M365/*.xml | ||
/PowerShell/output | ||
/PowerShell/example | ||
/PowerShell/M365Baseline* | ||
/output | ||
/example | ||
/M365Baseline* | ||
/Reports* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#Requires -RunAsAdministrator | ||
|
||
# Run this script to enable basic authentication on your local desktop if you get an error when connecting to Exchange Online. | ||
# See README file Troubleshooting section for details. | ||
# | ||
# This script requires administrative privileges on your local desktop and updates a registry key. | ||
# | ||
$regPath = 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WinRM\Client' | ||
$regKey = 'AllowBasic' | ||
|
||
if (Test-Path -LiteralPath $regPath){ | ||
try { | ||
$allowBasic = Get-ItemPropertyValue -Path $regPath -Name $regKey -ErrorAction Stop | ||
} | ||
catch [System.Management.Automation.PSArgumentException]{ | ||
Write-Error -Message "Key, $regKey, was not found" | ||
} | ||
catch{ | ||
Write-Error -Message "Unexpected error occured attempting to get registry key, $regKey." | ||
} | ||
|
||
if ($allowBasic -ne '1'){ | ||
Set-ItemProperty -Path $regPath -Name $regKey -Type DWord -Value '1' | ||
} | ||
} | ||
else { | ||
Write-Error -Message "Registry path not found: $regPath" | ||
} | ||
|
Oops, something went wrong.