Skip to content

Commit ead68c3

Browse files
committed
initial commit
0 parents  commit ead68c3

20 files changed

+1023
-0
lines changed

.github/ISSUE_TEMPLATE.md

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
### Prerequisites
2+
3+
Put an X between the brackets on each line to confirm you have completed them:
4+
5+
* [ ] The issue is still present in the latest version of the module.
6+
* [ ] The issue has not been previously reported.
7+
8+
### Description
9+
10+
[Description of the issue]
11+
12+
### Steps to Reproduce
13+
14+
1. [First Step]
15+
2. [Second Step]
16+
3. [and so on...]
17+
18+
**Expected behavior:** [What you expect to happen]
19+
20+
**Actual behavior:** [What actually happens]
21+
22+
**Reproduces how often:** [What percentage of the time does it reproduce?]
23+
24+
### System Details:
25+
26+
**Operating System:** [Windows | Linux | MacOS]
27+
28+
**Operating System Version:** [Version and Build, eg Wndows 10 Build 1709]
29+
30+
**PowerShell Version:** [Use ```Get-Host```]
31+
32+
**Architecture for PowerShell Session:** [64bit | 32bit]
33+
34+
**Is this system an Azure Worker?:** [No, Hybrid Worker, Azure Worker]
35+
36+
**Other loaded modules:** [Include the output of ```Get-Module```]
37+
38+
### Additional Information
39+
40+
Any additional information, configuration or data that might be necessary to reproduce the issue.
41+
42+
> Note: By filling an issue, you are expected to comply with this projects Code of Conduct.
43+
44+
<!--
45+
46+
This templated is based upon the work by the Atom project, https://github.com/atom/atom/
47+
48+
-->

.github/PULL_REQUEST_TEMPLATE.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
### Requirements
2+
3+
* This template is required. Any request that does not include enough information may be closed at the maintainers' discretion.
4+
* Have you (put an X between the brackets on each line to confirm):
5+
* [ ] Written new test cases to ensure no regession bugs occur?
6+
* [ ] Ensured all test cases are now passing?
7+
* [ ] Ensured that PowerShell Script Analyser issues and warnings are completely resolved?
8+
* [ ] Updated any help or documentation that may be impacted by your changes?
9+
10+
### Description of the Change
11+
12+
[ We must be able to understand the design of your change from this description. If we can't get a good idea of what the code will be doing from the description here, the pull request may be closed at the maintainers' discretion. Keep in mind that the maintainer reviewing this PR may not be familiar with or have worked with the code here recently, so please walk us through the concepts. ]
13+
14+
### Testing
15+
16+
[ Please describe the testing you have performed ]
17+
18+
### Associated/Resolved Issues
19+
20+
[ Enter any applicable issues here ]
21+
22+
> Note: By creating a pull request, you are expected to comply with this projects Code of Conduct.
23+
24+
<!--
25+
26+
This templated is based upon the work by the Atom project, https://github.com/atom/atom/
27+
28+
-->

.vscode/settings.json

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
//
3+
// Custom Settings for Project
4+
//
5+
// These are here so that anyone potentially modifying the code base has the same editor experience, this ensures that the code will follow the same structure.
6+
7+
// Controls whether the editor should render control characters
8+
"editor.renderControlCharacters": true, // Default: false
9+
10+
// Number of spaces for tabs
11+
"editor.tabSize": 4, // Default: 4
12+
13+
// Use spaces not tabs
14+
"editor.insertSpaces": true, // Default: true
15+
16+
// When enabled, will trim trailing whitespace when you save a file.
17+
"files.trimTrailingWhitespace": true, // Default: false
18+
19+
// Does not reformat one-line code blocks, such as "if (...) {...} else {...}".
20+
"powershell.codeFormatting.ignoreOneLineBlock": false, // Default: True
21+
22+
// Adds a newline (line break) after a closing brace.
23+
"powershell.codeFormatting.newLineAfterCloseBrace": true, // Default: True
24+
25+
// Adds a newline (line break) after an open brace.
26+
"powershell.codeFormatting.newLineAfterOpenBrace": true, // Default: True
27+
28+
// Places open brace on the same line as its associated statement.
29+
"powershell.codeFormatting.openBraceOnSameLine": true, // Default: True
30+
31+
// Adds a space after a separator (',' and ';').
32+
"powershell.codeFormatting.whitespaceAfterSeparator": true, // Default: True
33+
34+
// Adds spaces before and after an operator ('=', '+', '-', etc.).
35+
"powershell.codeFormatting.whitespaceAroundOperator": true, // Default: True
36+
37+
// Adds a space between a keyword and its associated scriptblock expression.
38+
"powershell.codeFormatting.whitespaceBeforeOpenBrace": true, // Default: True
39+
40+
// Adds a space between a keyword (if, elseif, while, switch, etc) and its associated conditional expression.
41+
"powershell.codeFormatting.whitespaceBeforeOpenParen": true, // Default: True
42+
43+
// Align assignment statements in a hashtable or a DSC Configuration.
44+
"powershell.codeFormatting.alignPropertyValuePairs": true // Default: True
45+
}

.vscode/tasks.json

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Available variables which can be used inside of strings.
2+
// ${workspaceRoot}: the root folder of the team
3+
// ${file}: the current opened file
4+
// ${relativeFile}: the current opened file relative to workspaceRoot
5+
// ${fileBasename}: the current opened file's basename
6+
// ${fileDirname}: the current opened file's dirname
7+
// ${fileExtname}: the current opened file's extension
8+
// ${cwd}: the current working directory of the spawned process
9+
{
10+
// See https://go.microsoft.com/fwlink/?LinkId=733558
11+
// for the documentation about the tasks.json format
12+
"version": "0.1.0",
13+
14+
// Start PowerShell
15+
"windows": {
16+
"command": "${env:windir}\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe",
17+
"args": [ "-NoProfile", "-ExecutionPolicy", "Bypass" ]
18+
},
19+
"linux": {
20+
"command": "/usr/bin/powershell",
21+
"args": [ "-NoProfile" ]
22+
},
23+
"osx": {
24+
"command": "/usr/local/bin/powershell",
25+
"args": [ "-NoProfile" ]
26+
},
27+
28+
// The command is a shell script
29+
"isShellCommand": true,
30+
31+
// Show the output window always
32+
"showOutput": "always",
33+
34+
// Associate with test task runner
35+
"tasks": [
36+
{
37+
"taskName": "Test",
38+
"suppressTaskName": true,
39+
"isTestCommand": true,
40+
"showOutput": "always",
41+
"args": [
42+
"Write-Host 'Invoking Pester'; Invoke-Pester -PesterOption @{IncludeVSCodeMarker=$true};",
43+
"Invoke-Command { Write-Host 'Completed Test task in task runner.' }"
44+
],
45+
"problemMatcher": [
46+
{
47+
"owner": "powershell",
48+
"fileLocation": ["absolute"],
49+
"severity": "error",
50+
"pattern": [
51+
{
52+
"regexp": "^\\s*(\\[-\\]\\s*.*?)(\\d+)ms\\s*$",
53+
"message": 1
54+
},
55+
{
56+
"regexp": "^\\s+at\\s+[^,]+,\\s*(.*?):\\s+line\\s+(\\d+)$",
57+
"file": 1,
58+
"line": 2
59+
}
60+
]
61+
}
62+
]
63+
}
64+
]
65+
}

CHANGELOG.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# cSpeculationControlFixes Release History
2+
3+
## Version Number - Release Date
4+
5+
### Fixed
6+
7+
* First item fixed
8+
* Second item fixed
9+
10+
### Added
11+
12+
* New item added
13+
* Another new item added
14+
15+
### Changed
16+
17+
* Feature changed
18+
* Tests added
19+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
Configuration EnableSpeculationControl
2+
{
3+
Import-DscResource -Module cSpeculationControlFixes
4+
cSpeculationControlFix enableSpeculationControlFix
5+
{
6+
Status = 'Enabled'
7+
}
8+
}
9+
EnableSpeculationControl -OutputPath C:\DSCConfiguration
10+
#Start-DSCConfiguration -Wait -Force -Verbose -Path C:\DSCConfiguration

LICENSE.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) Kieran Jacobsen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.MD

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# cSpeculationControlFixes
2+
3+
![Build Status](https://build.status.url.here)
4+
5+
## Description
6+
7+
PowerShell DSC for enabling Speculation Control fixes on Windows Server
8+
9+
Authored by Kieran Jacobsen
10+
11+
## Installing
12+
13+
The easiest way to get cSpeculationControlFixes is using the [PowerShell Gallery](https://powershellgallery.com/packages/cSpeculationControlFixes/)!
14+
15+
### Inspecting the module
16+
17+
Best practice is that you inspect modules prior to installing them. You can do this by saving the module to a local path:
18+
19+
``` PowerShell
20+
PS> Save-Module -Name cSpeculationControlFixes -Path <path>
21+
```
22+
23+
### Installing the module
24+
25+
Once you trust a module, you can install it using:
26+
27+
``` PowerShell
28+
PS> Install-Module -Name cSpeculationControlFixes
29+
```
30+
31+
### Updating cSpeculationControlFixes
32+
33+
Once installed from the PowerShell Gallery, you can update it using:
34+
35+
``` PowerShell
36+
PS> Update-Module -Name cSpeculationControlFixes
37+
```
38+
39+
### Removing cSpeculationControlFixes
40+
41+
To remove cSpeculationControlFixes:
42+
43+
``` PowerShell
44+
PS> Uninstall-Module -Name cSpeculationControlFixes
45+
```
46+
47+
## Contributing to cSpeculationControlFixes
48+
49+
Interested in contributing? Read how you can [Contribute](contributing.md) to cSpeculationControlFixes
50+
51+
This project is maintains a [Code of Conduct](code-of-conduct.md) that establishes how the project is governed and how everyone involved is expected to behave. You can report unacceptable behavior to [[email protected]](mailto:[email protected]).
52+
53+
## Release History
54+
55+
A detailed release history is contained in the [Change Log](CHANGELOG.md).
56+
57+
## License
58+
59+
cSpeculationControlFixes is provided under the [MIT license](LICENSE.md).

0 commit comments

Comments
 (0)