no way to compare when less than two revisions

差異處

這裏顯示兩個版本的差異處。


tech:perl_deprecated_obsolete_functions_modules [2021/10/24 09:36] (目前版本) – 建立 jonathan
行 1: 行 1:
 +====== Perl deprecated or obsolete functions or modules ======
 +最近透過 checkmarx 掃描 perl 的原始碼, 只要出現 <code perl>
 +open(FH, '<', $file) or die $!;
 +</code>就會有以下這個風險項目 \\ {{:tech:image_43.png?650}}
  
 +  * 由 [[https://wiki.sei.cmu.edu/confluence/display/perl/SEI+CERT+Perl+Coding+Standard|SEI CERT Perl Coding Standard]] 所建議的解決方式如下:
 +    * 原本 <code perl>
 +:
 +open(FH, '<', $branch_env_file) or die $!;
 +:
 +</code>
 +    * 改成 <code perl>
 +use Carp;
 +:
 +open(FH, '<', $branch_env_file) or croak "error opening $branch_env_file: stopped";
 +:
 +</code>
 +
 +===== 參考網址 =====
 +  * https://wiki.sei.cmu.edu/confluence/display/perl/EXP30-PL.+Do+not+use+deprecated+or+obsolete+functions+or+modules
 +
 +{{tag>perl 資安風險}}
  • tech/perl_deprecated_obsolete_functions_modules.txt
  • 上一次變更: 2021/10/24 09:36
  • jonathan