Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
a5410fe
Static analysis: expand PowerShell rule catalog
PrzemyslawKlys Feb 8, 2026
15c05af
Static analysis: normalize PowerShell metadata text
PrzemyslawKlys Feb 8, 2026
b2aa9ef
Static analysis: keep catalog sync script clean
PrzemyslawKlys Feb 8, 2026
9dd0a05
Static analysis: polish PowerShell metadata; test pack wiring
PrzemyslawKlys Feb 8, 2026
b18bed0
Static analysis: PowerShell metadata overrides + consistent tags
PrzemyslawKlys Feb 8, 2026
0fdb1db
Static analysis: fix PowerShell metadata typos via overrides
PrzemyslawKlys Feb 8, 2026
73e31c9
Tests: assert PowerShell catalog overrides apply
PrzemyslawKlys Feb 8, 2026
2a517c7
Tests: unify workspace root; sync PowerShell catalog as UTF-8 no BOM
PrzemyslawKlys Feb 8, 2026
b481c5b
Static analysis: keep PowerShell catalog sync pristine
PrzemyslawKlys Feb 8, 2026
66cb697
Tests: ensure PowerShell override test is executed
PrzemyslawKlys Feb 8, 2026
ef15513
Tests: fix LINQ import; clarify PowerShell docs slugs
PrzemyslawKlys Feb 8, 2026
eb47976
Analysis policy: restore review limits; test PowerShell docs URLs
PrzemyslawKlys Feb 8, 2026
219afef
CI: expand reviewer context only for large diffs
PrzemyslawKlys Feb 8, 2026
2445a0e
Tests: make PowerShell docs check non-brittle; guard known typos
PrzemyslawKlys Feb 8, 2026
cf4c564
Tests: allow hyphens in Learn docs slugs
PrzemyslawKlys Feb 8, 2026
74c3af9
Catalog sync: preserve docs; harden PSScriptAnalyzer import
PrzemyslawKlys Feb 8, 2026
dec04a5
Catalog: fix PowerShell metadata typos; relax docs test
PrzemyslawKlys Feb 8, 2026
2b56222
Catalog: polish PowerShell rule descriptions
PrzemyslawKlys Feb 8, 2026
8a0236c
Tests: enforce Learn docs URL shape; validate PowerShell overrides
PrzemyslawKlys Feb 8, 2026
1b01f7e
Tests: make tag override validation match merge semantics
PrzemyslawKlys Feb 8, 2026
d270057
Tests: relax PowerShell docs URL match; guard override tags
PrzemyslawKlys Feb 8, 2026
e1a214f
Tests: harden PowerShell docs/override validation
PrzemyslawKlys Feb 8, 2026
017cab7
Catalog sync: generate docs; prune stale rules; expand PowerShell ove…
PrzemyslawKlys Feb 8, 2026
72e8b58
Catalog sync: fix PowerShell typos in generated metadata
PrzemyslawKlys Feb 8, 2026
5b8ac15
Catalog: fix double-period typo; relax PowerShell docs URL regex
PrzemyslawKlys Feb 8, 2026
90bb05b
Tests: speed up override check; harden sync path trust
PrzemyslawKlys Feb 8, 2026
837ac7c
Tests: assert override filenames; allow Learn trailing slash
PrzemyslawKlys Feb 8, 2026
3a348d2
Sync: make pruning opt-in; tests: tag checks order-independent
PrzemyslawKlys Feb 8, 2026
648745a
Tests: allow additive tag overrides; Packs: clarify PowerShell default
PrzemyslawKlys Feb 8, 2026
ce42310
Tests: compute override changes from effective vs base
PrzemyslawKlys Feb 8, 2026
afc3fce
Tests: fix indentation; Sync: strict read errors
PrzemyslawKlys Feb 8, 2026
7ffc9f7
Sync: restrict pruning target unless forced
PrzemyslawKlys Feb 8, 2026
b4e68ef
Tests: relax docs URL enforcement; require overrides actually change
PrzemyslawKlys Feb 8, 2026
8e6e239
Tests: harden PowerShell docs/override validation against bad data
PrzemyslawKlys Feb 8, 2026
379f9ec
PowerShell: relax override test and use approved verb
PrzemyslawKlys Feb 8, 2026
0ddeafa
Tests: make PowerShell base-catalog load self-contained
PrzemyslawKlys Feb 8, 2026
376b87f
Tests: fix PowerShell override loop scoping and UTF-8 reads
PrzemyslawKlys Feb 8, 2026
e3aeac9
Tests: best-effort temp cleanup; fix PS mandatory param description
PrzemyslawKlys Feb 8, 2026
9481afd
Tests: harden PowerShell override test temp dir and value kinds
PrzemyslawKlys Feb 8, 2026
c2bfdd0
Tests: use explicit empty overrides dir; Script: warn instead of fail…
PrzemyslawKlys Feb 8, 2026
8ad09cd
Tests: log temp cleanup failures; Script: harden prune to workspace
PrzemyslawKlys Feb 8, 2026
596c1ad
Tests: make PowerShell base-catalog comparison unambiguous
PrzemyslawKlys Feb 8, 2026
6fbee04
Tests: simplify temp overrides dir creation
PrzemyslawKlys Feb 8, 2026
7ba7788
Tests: strict Learn docs URLs; fail cleanup on passing tests
PrzemyslawKlys Feb 8, 2026
c524389
Tests: guard base rule JSON title/description access
PrzemyslawKlys Feb 8, 2026
191fe4b
PowerShell: DRY default pack and enforce non-redundant overrides
PrzemyslawKlys Feb 8, 2026
e421eda
Tests: avoid temp-dir cleanup flake; Script: fail-fast prune deletions
PrzemyslawKlys Feb 8, 2026
a5b5a52
Tests: relax tag-only override redundancy; Script: normalize docs URLs
PrzemyslawKlys Feb 8, 2026
1398054
PowerShell sync: avoid empty catch blocks
PrzemyslawKlys Feb 8, 2026
d574159
Tests: use empty overrides dir and fix switch formatting
PrzemyslawKlys Feb 8, 2026
cd0fa7e
Tests: fix PowerShell override test scoping
PrzemyslawKlys Feb 8, 2026
2741cf3
Tests: clean up PowerShell override switch formatting
PrzemyslawKlys Feb 8, 2026
07bbd3c
Tests: tighten PowerShell docs and tags-only overrides
PrzemyslawKlys Feb 8, 2026
8d507c1
Tests: derive PowerShell docs slug from rule ids
PrzemyslawKlys Feb 8, 2026
9dba5e7
Tests: relax PowerShell docs slug check; harden temp dirs
PrzemyslawKlys Feb 8, 2026
1b97e42
Tests: harden PowerShell override temp dir + Script: case-insensitive…
PrzemyslawKlys Feb 8, 2026
a4e580a
Tests: enforce reviewer symbol; Sync: require explicit non-intended p…
PrzemyslawKlys Feb 8, 2026
44be6b6
Sync: restrict PSScriptAnalyzer import to trusted sources
PrzemyslawKlys Feb 8, 2026
7aa799d
Tests: validate powershell-default pack; tighten temp dir; Script: av…
PrzemyslawKlys Feb 8, 2026
427853f
Tests: make PowerShell temp dir fully random; Sync: PS5.1 windows det…
PrzemyslawKlys Feb 8, 2026
112d6e5
Tests: harden overrides test temp dir + ignore unknown override props…
PrzemyslawKlys Feb 8, 2026
6e27210
Tests: use OS temp name for overrides dir; clarify reviewer symbol ga…
PrzemyslawKlys Feb 8, 2026
bb297f8
Tests: fix temp-dir creation and indentation in PS overrides test
PrzemyslawKlys Feb 8, 2026
b69bf8d
Tests: avoid temp overrides dir; Script: normalize paths and comparisons
PrzemyslawKlys Feb 8, 2026
4573312
Script: use platform-sensitive compare for overrides pruning; fix tes…
PrzemyslawKlys Feb 9, 2026
cf304a7
Tests: fail on unknown PowerShell override properties
PrzemyslawKlys Feb 9, 2026
058f4d5
Tests: normalize switch default indentation in PS overrides test
PrzemyslawKlys Feb 9, 2026
93edff0
Script: deterministic JSON output and stricter IO errors
PrzemyslawKlys Feb 9, 2026
03a173b
Script: relax/verify module trust; Tests: validate override tag types
PrzemyslawKlys Feb 9, 2026
2f1292e
Script: fix deterministic JSON null branch
PrzemyslawKlys Feb 9, 2026
c963eb1
Script: deterministic key order; Tests: normalize PS override tags block
PrzemyslawKlys Feb 9, 2026
98a82d7
Script: fix JSON escaping; Tests: remove redundant overrides dir check
PrzemyslawKlys Feb 9, 2026
f1a04d0
Tests: fix PS override test scoping; Script: normalize non-existent p…
PrzemyslawKlys Feb 9, 2026
ae301a2
Script: tighten PSScriptAnalyzer trust + preload docs
PrzemyslawKlys Feb 9, 2026
12d6106
Script: require docs for all generated PowerShell rules
PrzemyslawKlys Feb 9, 2026
b6ed5f4
Script: require resolved existing paths for pruning
PrzemyslawKlys Feb 9, 2026
f893be3
Script: resolve OutDir via Resolve-Path for pruning checks
PrzemyslawKlys Feb 9, 2026
8775ff2
Tests: use empty overrides dir; Script: fix indent
PrzemyslawKlys Feb 9, 2026
1ec7c65
Tests: normalize PS override test indentation + cleanup
PrzemyslawKlys Feb 9, 2026
50367e4
Tests: fix PS override test scoping and null tag handling
PrzemyslawKlys Feb 9, 2026
27ee614
Tests: fix docs test placement; Script: verify module import
PrzemyslawKlys Feb 9, 2026
7fd2d9b
Tests: qualify MergeTags types + warn on cleanup failure
PrzemyslawKlys Feb 9, 2026
575f3aa
Tests: improve temp cleanup; Script: guard duplicate rule names
PrzemyslawKlys Feb 9, 2026
5857a97
Tests: avoid temp path reassignment in cleanup
PrzemyslawKlys Feb 9, 2026
5544347
Tests: remove global temp cleanup; Script: accept any valid signature
PrzemyslawKlys Feb 9, 2026
cb74e09
Tests: assert PSScriptAnalyzer Learn docs slug; Script: clarify PS pr…
PrzemyslawKlys Feb 9, 2026
5021cfb
Tests: add Learn slug overrides for PSScriptAnalyzer
PrzemyslawKlys Feb 9, 2026
eade435
Script: fix JSON escaping; Tests: normalize Learn URLs
PrzemyslawKlys Feb 9, 2026
6931e33
Tests: relax PowerShell Learn docs slug assertion
PrzemyslawKlys Feb 9, 2026
f636c20
Tests: fail if temp overrides dir can't be deleted
PrzemyslawKlys Feb 9, 2026
77a8f56
Tests: create empty overrides temp dir robustly
PrzemyslawKlys Feb 9, 2026
c2763c0
Tests: avoid temp dir leaks; Script: simplify OutDir default
PrzemyslawKlys Feb 9, 2026
10e8876
Tests: harden temp dir helper; split docs test file
PrzemyslawKlys Feb 9, 2026
ef70fdc
Tests: scope temp dir lifecycle; avoid docs null-forgiving
PrzemyslawKlys Feb 9, 2026
b31995d
Tests: prove overrides root used; Script: normalize workspace root
PrzemyslawKlys Feb 9, 2026
3122261
Tests: avoid temp dir for overrides baseline
PrzemyslawKlys Feb 9, 2026
12fc58e
Tests: fix overrides test scoping; allow no-op overrides
PrzemyslawKlys Feb 9, 2026
b5df26d
Script: import PSScriptAnalyzer by path to avoid shadowing
PrzemyslawKlys Feb 9, 2026
2a65b8d
Tests: align overrides assertions with loader semantics
PrzemyslawKlys Feb 9, 2026
8b97844
Script: fail fast on empty rule enumeration; Tests: relax Learn docs …
PrzemyslawKlys Feb 9, 2026
31958dd
Script: validate JSON array items are strings
PrzemyslawKlys Feb 9, 2026
33f9b9c
PowerShell: fix grammar override; Script: remove IN->in rewrite
PrzemyslawKlys Feb 9, 2026
ba9926c
PowerShell catalog: pin PSScriptAnalyzer; fix Learn docs locale test
PrzemyslawKlys Feb 9, 2026
664c49d
Merge branch 'master' into codex/static-policy-powershell
PrzemyslawKlys Feb 9, 2026
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
13 changes: 13 additions & 0 deletions .github/workflows/review-intelligencex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ jobs:
fi
echo "Changed files: $(wc -l < artifacts/changed-files.txt)"

- name: Tune reviewer budgets for large PRs
if: ${{ github.event_name == 'pull_request' }}
run: |
changed="$(wc -l < artifacts/changed-files.txt | tr -d ' ')"
catalog="$(grep -cE '^Analysis/Catalog/(rules|overrides)/' artifacts/changed-files.txt || true)"
if [ "${changed:-0}" -gt 30 ] || [ "${catalog:-0}" -gt 10 ]; then
echo "Detected large diff (changed=${changed}, catalog=${catalog}); expanding reviewer context limits."
echo "INPUT_MAX_FILES=200" >> "$GITHUB_ENV"
echo "INPUT_MAX_PATCH_CHARS=120000" >> "$GITHUB_ENV"
else
echo "Diff size within default limits (changed=${changed}, catalog=${catalog}); using defaults."
fi

- name: Static analysis gate
run: dotnet run --project IntelligenceX.Cli/IntelligenceX.Cli.csproj --framework net8.0 -- analyze gate --config .intelligencex/reviewer.json --workspace . --changed-files artifacts/changed-files.txt

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"id": "PSAvoidDefaultValueForMandatoryParameter",
"description": "Mandatory parameters should not be initialized with a default value in the param block because this value will be ignored. To fix a violation of this rule, avoid initializing a value for mandatory parameters in the param block."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"id": "PSAvoidDefaultValueSwitchParameter",
"description": "Switch parameters should not default to true."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"id": "PSAvoidMultipleTypeAttributes",
"description": "Parameters should not have more than one type specifier."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"id": "PSUseConsistentIndentation",
"title": "Use Consistent Indentation",
"description": "Each statement block should have consistent indentation."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAlignAssignmentStatement",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAlignAssignmentStatement",
"title": "Align Assignment Statements",
"description": "Line up assignment statements so that the assignment operators are aligned.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/alignassignmentstatement"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidAssignmentToAutomaticVariable",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidAssignmentToAutomaticVariable",
"title": "Changing automatic variables might have undesired side effects",
"description": "Automatic variables are built into PowerShell and are read-only. Avoid assigning to them.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidassignmenttoautomaticvariable"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidDefaultValueForMandatoryParameter",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidDefaultValueForMandatoryParameter",
"title": "Avoid Default Value For Mandatory Parameter",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Contains a double period and pluralization issues; tighten to one clear sentence.

Suggested change
"title": "Avoid Default Value For Mandatory Parameter",
"description": "Mandatory parameters should not be initialized with a default value in the param block because the value will be ignored. To fix a violation of this rule, avoid initializing a value for the mandatory parameter in the param block.",

"description": "Mandatory parameter should not be initialized with a default value in the param block because this value will be ignored. To fix a violation of this rule, please avoid initializing a value for the mandatory parameter in the param block.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoiddefaultvalueformandatoryparameter"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidDefaultValueSwitchParameter",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidDefaultValueSwitchParameter",
"title": "Switch Parameters Should Not Default To True",
"description": "Switch parameter should not default to true.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoiddefaultvalueswitchparameter"
}
16 changes: 16 additions & 0 deletions Analysis/Catalog/rules/powershell/PSAvoidExclaimOperator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidExclaimOperator",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidExclaimOperator",
"title": "Avoid exclaim operator",
"description": "The negation operator ! should not be used for readability purposes. Use -not instead.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidexclaimoperator"
}
16 changes: 16 additions & 0 deletions Analysis/Catalog/rules/powershell/PSAvoidGlobalAliases.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidGlobalAliases",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidGlobalAliases",
"title": "Avoid global aliases.",
"description": "Checks that global aliases are not used. Global aliases are strongly discouraged as they overwrite desired aliases with name conflicts.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidglobalaliases"
}
16 changes: 16 additions & 0 deletions Analysis/Catalog/rules/powershell/PSAvoidGlobalFunctions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidGlobalFunctions",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidGlobalFunctions",
"title": "Avoid global functions and aliases",
"description": "Checks that global functions and aliases are not used. Global functions are strongly discouraged as they can cause errors across different systems.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidglobalfunctions"
}
16 changes: 16 additions & 0 deletions Analysis/Catalog/rules/powershell/PSAvoidGlobalVars.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidGlobalVars",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidGlobalVars",
"title": "No Global Variables",
"description": "Checks that global variables are not used. Global variables are strongly discouraged as they can cause errors across different systems.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidglobalvars"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidInvokingEmptyMembers",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidInvokingEmptyMembers",
"title": "Avoid Invoking Empty Members",
"description": "Invoking non-constant members would cause potential bugs. Please double check the syntax to make sure members invoked are non-constant.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidinvokingemptymembers"
}
16 changes: 16 additions & 0 deletions Analysis/Catalog/rules/powershell/PSAvoidLongLines.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidLongLines",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidLongLines",
"title": "Avoid long lines",
"description": "Line lengths should be less than the configured maximum.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidlonglines"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidMultipleTypeAttributes",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidMultipleTypeAttributes",
"title": "Avoid multiple type specifiers on parameters",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Description has a typo (“Prameter”); fix user-facing metadata.

Suggested change
"title": "Avoid multiple type specifiers on parameters",
"description": "Parameter should not have more than one type specifier.",

"description": "Parameter should not have more than one type specifier.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidmultipletypeattributes"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidNullOrEmptyHelpMessageAttribute",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidNullOrEmptyHelpMessageAttribute",
"title": "Avoid using null or empty HelpMessage parameter attribute.",
"description": "Setting the HelpMessage attribute to an empty string or null value causes PowerShell interpreter to throw an error while executing the corresponding function.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidnulloremptyhelpmessageattribute"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidOverwritingBuiltInCmdlets",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidOverwritingBuiltInCmdlets",
"title": "Avoid overwriting built in cmdlets",
"description": "Do not overwrite the definition of a cmdlet that is included with PowerShell.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidoverwritingbuiltincmdlets"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidSemicolonsAsLineTerminators",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidSemicolonsAsLineTerminators",
"title": "Avoid semicolons as line terminators",
"description": "Line should not end with a semicolon.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidsemicolonsaslineterminators"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidShouldContinueWithoutForce",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidShouldContinueWithoutForce",
"title": "Avoid Using ShouldContinue Without Boolean Force Parameter",
"description": "Functions that use ShouldContinue should have a boolean force parameter to allow user to bypass it.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidshouldcontinuewithoutforce"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidTrailingWhitespace",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidTrailingWhitespace",
"title": "Avoid trailing whitespace",
"description": "Each line should have no trailing whitespace.",
"category": "BestPractices",
"defaultSeverity": "info",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidtrailingwhitespace"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidUsingAllowUnencryptedAuthentication",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidUsingAllowUnencryptedAuthentication",
"title": "Avoid AllowUnencryptedAuthentication Switch",
"description": "Avoid sending credentials and secrets over unencrypted connections.",
"category": "Security",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"security"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusingallowunencryptedauthentication"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidUsingBrokenHashAlgorithms",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidUsingBrokenHashAlgorithms",
"title": "Avoid Using Broken Hash Algorithms",
"description": "Avoid using the broken algorithms MD5 or SHA-1.",
"category": "Security",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"security"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusingbrokenhashalgorithms"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidUsingCmdletAliases",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidUsingCmdletAliases",
"title": "Avoid Using Cmdlet Aliases or omitting the 'Get-' prefix.",
"description": "An alias is an alternate name or nickname for a cmdlet or for a command element, such as a function, script, file, or executable file. An implicit alias is also the omission of the 'Get-' prefix for commands with this prefix. But when writing scripts that will potentially need to be maintained over time, either by the original author or another Windows PowerShell scripter, please consider using full cmdlet name instead of alias. Aliases can introduce these problems, readability, understandability and availability.",
"category": "BestPractices",
"defaultSeverity": "warning",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusingcmdletaliases"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidUsingComputerNameHardcoded",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidUsingComputerNameHardcoded",
"title": "Avoid Using ComputerName Hardcoded",
"description": "The ComputerName parameter of a cmdlet should not be hardcoded as this will expose sensitive information about the system.",
"category": "BestPractices",
"defaultSeverity": "error",
"tags": [
"powershell",
"psscriptanalyzer",
"best-practices"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusingcomputernamehardcoded"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"id": "PSAvoidUsingConvertToSecureStringWithPlainText",
"language": "powershell",
"tool": "PSScriptAnalyzer",
"toolRuleId": "PSAvoidUsingConvertToSecureStringWithPlainText",
"title": "Avoid Using SecureString With Plain Text",
"description": "Using ConvertTo-SecureString with plain text will expose secure information.",
"category": "Security",
"defaultSeverity": "error",
"tags": [
"powershell",
"psscriptanalyzer",
"security"
],
"docs": "https://learn.microsoft.com/powershell/utility-modules/psscriptanalyzer/rules/avoidusingconverttosecurestringwithplaintext"
}
Loading
Loading