自分が書いたコードだけでなく、使っている外部ライブラリの脆弱性も攻撃対象になる
(OWASP Top 10 A06)。2017年の Apache Struts2 の事件が典型。依存関係を検査する仕組みが
SCA(Software Composition Analysis)。npm なら npm audit。
npm audit の出力例(読み方)# npm audit report lodash <4.17.21 Severity: high Prototype Pollution - https://github.com/advisories/GHSA-xxxx fix available via `npm audit fix` node_modules/lodash axios 0.21.0 - 0.21.1 Severity: moderate Server-Side Request Forgery - https://github.com/advisories/GHSA-yyyy fix available via `npm audit fix --force` 2 vulnerabilities (1 moderate, 1 high)
npm audit fix)package-lock.json)でバージョンを固定・記録