카테고리 없음

[Node.JS] npm audit report으로 주기적으로 사용하고 있는 npm 모듈의 취약점을 검사하자!

보리시스템 2023. 12. 21.

npm audit 기능이란?

https://blog.outsider.ne.kr/1375

 

npm에 새로 추가된 audit 기능 :: Outsider's Dev Story

[npm v6가 나오면서](https://medium.com/npm-inc/announcing-npm-6-5d0b1799a905) `npm audit`이라는 기능이 추가되었다. 이는 사용하는 npm 모듈의 취약점을 검사해주는 [Node Security Platform](https://node...

blog.outsider.ne.kr

npm v6가 나오면서 npm audit이라는 기능이 추가되었다. 이는 사용하는 npm 모듈의 취약점을 검사해주는 Node Security Platform(보통 nsp 명령어로 사용한다)를 npm, Inc가 인수하면서 NSP의 데이터베이스를 이용해서 취약점을 점검해 주는 기능을 추가한 것이다. 이번에 이 npm audit이 npm v6뿐만 아니라 v5.10.0에도 추가되면서 6으로 올리지 않더라도 사용할 수 있게 되었다.
이제는 GitHub에서도 취약점 경고를 해주지만 Node 생태계에 특화된 NSP쪽이 데이터베이스가 좀 더 풍부하고 빠른 것으로 보인다.(GitHub이 어디의 데이터를 사용하는지 모르지만, GitHub은 JavaScript만 지원해야 하는 것은 아니라..)

 

결과 보는 방법?

https://www.syncfusion.com/blogs/post/how-to-treat-npm-audit-results.aspx

 

How You Should Treat NPM Audit Results | Syncfusion Blogs

This post discusses how to treat NPM audit findings to ensure an application’s security.

www.syncfusion.com

An NPM audit result can contain four levels of severity:
- Critical: Highest severity that requires immediate attention.
- High: These findings need developers to address them urgently.
- Moderate: These findings are of medium severity and developers have more time to address them.
- Low: These findings are of the lowest severity and developers can remediate them at their convenience.