2026年6月10日 星期三

[研究]Mend(WhiteSource)為何連 ASP.NET WebForm 專案排除但未刪除的檔案都在掃瞄 ? Fortify SAST (SCA) 就不會 ?

[研究]Mend(WhiteSource)為何連 ASP.NET WebForm 專案排除但未刪除的檔案都在掃瞄 ? Fortify SAST (SCA) 就不會 ?

2026-06-10

Fortify SAST(SCA)通常以 Visual Studio 專案(.csproj/.sln) 為主。

它會依照:

<Compile Include="xxx.cs" />

<Content Include="xxx.aspx" />

來決定哪些檔案屬於專案。

因此:

  • 不在 .csproj 的檔案
  • 不參與 Build 的檔案

通常不會進入分析範圍。

*****

Mend SAST / Mend Code

很多情況下採用的是:檔案系統掃描(Filesystem Scan)

而非:MSBuild 專案掃描(Project Scan)

因此它會直接掃描:

D:\Project\

    aaa.cs

    bbb.cs

    old\

       test.aspx

只要副檔名符合規則:

*.cs

*.vb

*.aspx

*.js

*.ts

就可能被分析。

*****

如何避免?

方法 1:直接刪除

方法 2:設定 Mend Ignore

Mend 通常支援:

.mendignore

方法 3:將備份移出 Repository

(完)

沒有留言:

張貼留言