-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* (AB-4960) Run expectations workflow every 30m (#89) This change reduces the frequency the expectations GHA runs from once every 10 minutes to once every 30 minutes to help reduce the frequency of rate limiting. * (GH-90) Document PSAvoidUsingBrokenHashAlgorithms (#91) This change: - documents the new `PSAvoidUsingBrokenHashAlgorithms` rule for **PSScriptAnalyzer** by updating the rule table and adding a document for the rule. - Resolves #90 - Fixes AB#4996 * (AB-4196) Codify markdownlint (#92) Prior to this change, the repository had no markdownlint configuration. This change adds configuration based on the rules defined in the MicrosoftDocs/PowerShell-Docs project. The root-folder `.markdownlint.json` file specifies the enforced syntax for Markdown files in this project. The root-folder `.markdownlint-cli2.yaml` file governs the behavior of the linter overall. The settings included are minimal and do not effect the editing experience. This file may require iteration for advanced usage later. In every `About` folder for reference content, this change adds a `.markdownlint.json` file. When editing Markdown in VS Code, the editor uses the closest configuration file to the edited document. That allows us to override and specify alternate rules on a per-folder basis. In this change, the configuration files in the `About` folders: - Extend the root configuration. Any settings not specified in these configurations is inherited from the configuration at the project root. - Overrides the `line-length` rule, setting the maximum line length for code blocks to 74 characters and for other text to 79 characters.This is to accomodate the PowerShell Help System's line length requirements. In the `rules` folder for PSScriptAnalyzer's conceptual content, this change adds a `.markdownlint.json` file which ignores the markdownlint rule `no-emphasis-as-heading`. PSSA rules indicate their severity level by a single line of emphasized text. This change is related to AB#4196 and AB#4197. * Add CrescendoBuilt to docs (#93) * Fix typos (#95) Co-authored-by: Mikey Lombardi (He/Him) <[email protected]>
- Loading branch information
1 parent
964c3a6
commit e4dd62a
Showing
11 changed files
with
301 additions
and
45 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
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,33 @@ | ||
# Rule definitions live in .markdownlint.json | ||
|
||
# Include a custom rule package | ||
# customRules: | ||
# - markdownlint-rule-titlecase | ||
|
||
# Fix any fixable errors | ||
fix: true | ||
|
||
# Define a custom front matter pattern | ||
# frontMatter: (^---\s*$[^]*?^---\s*$)(\r\n|\r|\n|$) | ||
|
||
# Define glob expressions to use (only valid at root) | ||
# globs: | ||
# - "!*bout.md" | ||
|
||
# Define glob expressions to ignore | ||
ignores: | ||
- breadcrumb | ||
|
||
# Use a plugin to recognize math | ||
# markdownItPlugins: | ||
# - - "@iktakahiro/markdown-it-katex" | ||
|
||
# Disable inline config comments | ||
noInlineConfig: false | ||
|
||
# Disable progress on stdout (only valid at root) | ||
noProgress: true | ||
|
||
# Use a specific formatter (only valid at root) | ||
# outputFormatters: | ||
# - [markdownlint-cli2-formatter-default] |
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,132 @@ | ||
{ | ||
"blanks-around-fences": true, | ||
"blanks-around-headers": true, | ||
"blanks-around-lists": true, | ||
"code-block-style": { | ||
"style": "fenced" | ||
}, | ||
"code-fence-style": { | ||
"style": "backtick" | ||
}, | ||
"commands-show-output": true, | ||
"docsmd.alert": true, | ||
"docsmd.codesnippet": true, | ||
"docsmd.column": true, | ||
"docsmd.image": true, | ||
"docsmd.moniker": true, | ||
"docsmd.no-loc": true, | ||
"docsmd.row": true, | ||
"docsmd.securelinks": true, | ||
"docsmd.syntax": true, | ||
"docsmd.video": true, | ||
"docsmd.xref": true, | ||
"docsmd.zone": true, | ||
"emphasis-style": { | ||
"style": "underscore" | ||
}, | ||
"fenced-code-language": false, | ||
"first-line-h1": { | ||
"front_matter_title": "" | ||
}, | ||
"header-increment": true, | ||
"header-start-left": true, | ||
"header-style": { | ||
"style": "atx" | ||
}, | ||
"hr-style": { | ||
"style": "---" | ||
}, | ||
"line-length": { | ||
"code_block_line_length": 90, | ||
"code_blocks": true, | ||
"heading_line_length": 100, | ||
"headings": true, | ||
"line_length": 100, | ||
"stern": true, | ||
"tables": false | ||
}, | ||
"list-indent": true, | ||
"list-marker-space": true, | ||
"no-alt-text": true, | ||
"no-bare-urls": true, | ||
"no-blanks-blockquote": true, | ||
"no-duplicate-header": { | ||
"siblings_only": true | ||
}, | ||
"no-emphasis-as-header": true, | ||
"no-empty-links": true, | ||
"no-hard-tabs": true, | ||
"no-inline-html": { | ||
"allowed_elements": [ | ||
"a", | ||
"br", | ||
"code", | ||
"kbd", | ||
"li", | ||
"properties", | ||
"sup", | ||
"tags", | ||
"ul" | ||
] | ||
}, | ||
"no-missing-space-atx": true, | ||
"no-missing-space-closed-atx": true, | ||
"no-multiple-blanks": true, | ||
"no-multiple-space-atx": true, | ||
"no-multiple-space-blockquote": true, | ||
"no-multiple-space-closed-atx": true, | ||
"no-reversed-links": true, | ||
"no-space-in-code": true, | ||
"no-space-in-emphasis": true, | ||
"no-space-in-links": true, | ||
"no-trailing-punctuation": { | ||
"punctuation": ".,;:!。,;:!?" | ||
}, | ||
"no-trailing-spaces": { | ||
"br_spaces": 2, | ||
"strict": true | ||
}, | ||
"ol-prefix": { | ||
"style": "one" | ||
}, | ||
"proper-names": { | ||
"code_blocks": false, | ||
"names": [ | ||
"PowerShell", | ||
"IntelliSense", | ||
"Authenticode", | ||
"CentOS", | ||
"Contoso", | ||
"CoreOS", | ||
"Debian", | ||
"Ubuntu", | ||
"openSUSE", | ||
"RHEL", | ||
"JavaScript", | ||
".NET", | ||
"NuGet", | ||
"VS Code", | ||
"Newtonsoft" | ||
] | ||
}, | ||
"required-headers": false, | ||
"single-h1": { | ||
"front_matter_title": "", | ||
"level": 1 | ||
}, | ||
"single-trailing-newline": true, | ||
"strong-style": { | ||
"style": "asterisk" | ||
}, | ||
"ul-indent": { | ||
"indent": 2, | ||
"start_indented": false | ||
}, | ||
"ul-start-left": true, | ||
"ul-style": { | ||
"style": "dash" | ||
}, | ||
"link-fragments": true, | ||
"reference-links-images": true, | ||
"link-image-reference-definitions": true | ||
} |
4 changes: 4 additions & 0 deletions
4
reference/docs-conceptual/PSScriptAnalyzer/Rules/.markdownlint.json
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,4 @@ | ||
{ | ||
"extends": "../../../../.markdownlint.json", | ||
"no-emphasis-as-heading": false | ||
} |
48 changes: 48 additions & 0 deletions
48
reference/docs-conceptual/PSScriptAnalyzer/Rules/AvoidUsingBrokenHashAlgorithms.md
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,48 @@ | ||
--- | ||
description: Avoid using broken hash algorithms | ||
ms.custom: PSSA v1.21.0 | ||
ms.date: 05/31/2022 | ||
ms.topic: reference | ||
title: AvoidUsingBrokenHashAlgorithms | ||
--- | ||
# AvoidUsingBrokenHashAlgorithms | ||
|
||
**Severity Level: Warning** | ||
|
||
## Description | ||
|
||
Avoid using the broken algorithms MD5 or SHA-1. | ||
|
||
## How | ||
|
||
Replace broken algorithms with secure alternatives. MD5 and SHA-1 should be replaced with SHA256, | ||
SHA384, SHA512, or other safer algorithms when possible, with MD5 and SHA-1 only being utilized by | ||
necessity for backwards compatibility. | ||
|
||
## Example 1 | ||
|
||
### Wrong | ||
|
||
```powershell | ||
Get-FileHash foo.txt -Algorithm MD5 | ||
``` | ||
|
||
### Correct | ||
|
||
```powershell | ||
Get-FileHash foo.txt -Algorithm SHA256 | ||
``` | ||
|
||
## Example 2 | ||
|
||
### Wrong | ||
|
||
```powershell | ||
Get-FileHash foo.txt -Algorithm SHA1 | ||
``` | ||
|
||
### Correct | ||
|
||
```powershell | ||
Get-FileHash foo.txt | ||
``` |
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
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
12 changes: 12 additions & 0 deletions
12
reference/ps-modules/Microsoft.PowerShell.Crescendo/About/.markdownlint.json
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,12 @@ | ||
{ | ||
"extends": "../../../../.markdownlint.json", | ||
"line-length": { | ||
"code_block_line_length": 74, | ||
"code_blocks": true, | ||
"heading_line_length": 79, | ||
"headings": true, | ||
"line_length": 79, | ||
"stern": true, | ||
"tables": false | ||
} | ||
} |
Oops, something went wrong.