PowerShell SAST/OWASP 10

PowerShell SAST / OWASP 10

我目前正在开发一个 PowerShell 脚本,其中有 10k 行代码连接到 SQL 数据库。 虽然在 IDE 中使用插件被认为是最佳实践,例如 Java 或 C# 来扫描代码(Resharper/Fortify 或 Sonarcube 插件)并在构建过程中执行 SAST分析,除了 PSScriptAnalyzer 之外,我找不到任何适合 PowerShell 代码的工具,PSScriptAnalyzer 对难闻的气味有好处,但不太被认为是 SAST 工具。

PowerShell 目前是否没有这样的工具,或者您知道任何有用的工具吗?

韩国 克里斯

NIST 定期更新 SAST 工具示例列表(非推荐)here. As of August 20, 2021, the only tool that lists Powershell as a supported language is Atlassian's Static Reviewer:

Provides security checks in compliance with OWASP, CWE, CVE, CVSS, MISRA, CERT. Available as a module for Software Composition Analysis (SCA) to find vulnerabilities in open source and third party libraries

就个人而言,我只是将 PSScriptAnalyzer 模块与 Microsoft 的 InjectionHunter 规则集一起使用。现在,您可以将它们添加到 VSCode 的 powershell 插件规则中。