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

Feature: Checks should support powershell scripts #4253

Open
balteravishay opened this issue Jul 23, 2024 · 0 comments
Open

Feature: Checks should support powershell scripts #4253

balteravishay opened this issue Jul 23, 2024 · 0 comments
Labels
kind/enhancement New feature or request

Comments

@balteravishay
Copy link
Contributor

balteravishay commented Jul 23, 2024

Is your feature request related to a problem? Please describe.
powershell isn't supported by mvdan.cc/sh/v3/syntax and so the Pinned dependency and others such as SAST check ignores .ps1 files AND powershell based tasks/jobs in GitHub Actions AND fails on windows containers dockerfiles that use powershell.
Supporting powershell based scripts will increase the number of repositories that can leverage the Pinned Dependency checks.

Describe the solution you'd like
Pinned Dependency should be able to analyze the following and treat them the same as POSIX Shell, Bash, and mksh and leverage the existing checks that are implemented for those scripts:

  • .ps1 files
  • powershell tasks/jobs in GitHub Actions
  • windows container dockerfiles that use powershell RUN commands

examples:

  • go run main.go --repo PULSAR-Modders/pulsar-mod-loader --checks Pinned-Dependencies --format json --show-details | jq
  • go run main.go --repo SonarSource/sonar-dotnet --checks Pinned-Dependencies --format json --show-details | jq
  • go run main.go --repo dotnet/runtime --checks Pinned-Dependencies --format json --show-details | jq

today these examples do not detect the .net dependencies given that they are either specified in yaml powershell jobs, or in .ps1 files, or the check fails because the dockerfile is using powershell script.

@balteravishay balteravishay added the kind/enhancement New feature or request label Jul 23, 2024
@balteravishay balteravishay changed the title Feature: Pinned Dependency checks should support powershell scripts Feature: Checks should support powershell scripts Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant