Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish to live #94

Merged
merged 5 commits into from
Aug 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/expectations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
name: Commenting
on:
schedule:
- cron: 0/10 * * * *
- cron: 0/30 * * * *
permissions:
contents: read
pull-requests: write
Expand Down
33 changes: 33 additions & 0 deletions .markdownlint-cli2.yaml
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]
132 changes: 132 additions & 0 deletions .markdownlint.json
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
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../../../../.markdownlint.json",
"no-emphasis-as-heading": false
}
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
```
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The PSScriptAnalyzer contains the following rule definitions.
| [AvoidSemicolonsAsLineTerminators](./AvoidSemicolonsAsLineTerminators.md) | Warning | No | |
| [AvoidShouldContinueWithoutForce](./AvoidShouldContinueWithoutForce.md) | Warning | Yes | |
| [AvoidTrailingWhitespace](./AvoidTrailingWhitespace.md) | Warning | Yes | |
| [AvoidUsingBrokenHashAlgorithms](./AvoidUsingBrokenHashAlgorithms.md) | Warning | Yes | |
| [AvoidUsingCmdletAliases](./AvoidUsingCmdletAliases.md) | Warning | Yes | Yes<sup>2</sup> |
| [AvoidUsingComputerNameHardcoded](./AvoidUsingComputerNameHardcoded.md) | Error | Yes | |
| [AvoidUsingConvertToSecureStringWithPlainText](./AvoidUsingConvertToSecureStringWithPlainText.md) | Error | Yes | |
Expand Down
2 changes: 2 additions & 0 deletions reference/docs-conceptual/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ items:
href: PSScriptAnalyzer/Rules/AvoidShouldContinueWithoutForce.md
- name: AvoidTrailingWhitespace
href: PSScriptAnalyzer/Rules/AvoidTrailingWhitespace.md
- name: AvoidUsingBrokenHashAlgorithms
href: PSScriptAnalyzer/Rules/AvoidUsingBrokenHashAlgorithms.md
- name: AvoidUsingCmdletAliases
href: PSScriptAnalyzer/Rules/AvoidUsingCmdletAliases.md
- name: AvoidUsingComputerNameHardcoded
Expand Down
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
}
}
Loading