PowerShell / PowerShell/PowerShell
Add [math] to ConstrainedLanguage mode
Open
Nobody has claimed this yet.
Issue-Enhancement
Needs-Triage
WG-Security
- Dominant language
- C#
- Stars
- 55.5k
- Forks
- 8.5k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 88
Description
Summary of the new feature / enhancement
I'm not entirely sure why [math] was left out of ConstrainedLanguage mode, but [math] would still be useful for operations like [math]::Ceiling().
- Types like
[regex]are allowed, so I can't think of a reason that[math]would not be.
Proposed technical implementation details (optional)
Include it as one of the allowed types.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked about_language_modes documentation, then locate the ConstrainedLanguage implementation that defines allowed types. Add [math] to that allowed set and verify that calls such as [math]::Ceiling() work in ConstrainedLanguage mode without broadening access beyond the requested type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, security
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100