alibaba / alibaba/open-code-review

feat(language): add complete PowerShell review support

Open
#969 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
24.4k
Forks
1.8k
Avg merge
2d 6h
Merged PRs (30d)
105

Description

Related to #470.

## Problem Statement

PowerShell `.ps1` files are already included in the review allowlist, but they currently fall back to the generic review rules. PowerShell module (`.psm1`) and data/manifest (`.psd1`) files are not allowlisted, even though they are standard PowerShell source formats analyzed by PSScriptAnalyzer.

Pester's conventional `*.Tests.ps1` files are also treated as production review inputs instead of test files.

## Proposed Solution

- Add `.psm1` and `.psd1` to the supported file types.
- Exclude conventional Pester `*.Tests.ps1` files.
- Add a PowerShell-specific review rule covering command injection, error and native-process semantics, pipeline output, credentials, remoting, module manifests, platform compatibility, and Pester test correctness.
- Map `.ps1`, `.psm1`, and `.psd1` files to the PowerShell rule.
- Add allowlist, exclusion, and rule-resolution tests.

A focused implementation is ready and will be linked in a pull request.

## Validation

- `make check`
- `make test`
- `make coverage` (91.5% total coverage)

Contributor guide

Open the contributing guide

Research direction

Start at the review allowlist, file exclusion, and rule-resolution entry points; the issue does not name specific files. Run the listed make check and make test commands while adding coverage for .psm1, .psd1, *.Tests.ps1, and PowerShell rule resolution. Done means all three PowerShell formats resolve correctly, Pester files are excluded, and the stated validation commands pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, powershell
Domain
security, testing, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.